From patchwork Fri Nov 25 08:25:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 84032 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp29343qgi; Fri, 25 Nov 2016 00:26:15 -0800 (PST) X-Received: by 10.84.218.8 with SMTP id q8mr14833852pli.138.1480062374962; Fri, 25 Nov 2016 00:26:14 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q127si23112729pfb.189.2016.11.25.00.26.14; Fri, 25 Nov 2016 00:26:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750862AbcKYI0N (ORCPT + 3 others); Fri, 25 Nov 2016 03:26:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:44889 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbcKYI0L (ORCPT ); Fri, 25 Nov 2016 03:26:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 544F8AE04; Fri, 25 Nov 2016 08:25:21 +0000 (UTC) From: Jiri Slaby To: stable@vger.kernel.org Cc: Ard Biesheuvel , Paolo Bonzini , Jiri Slaby Subject: [patch added to 3.12-stable] mm: export symbol dependencies of is_zero_pfn() Date: Fri, 25 Nov 2016 09:25:11 +0100 Message-Id: <20161125082518.26936-3-jslaby@suse.cz> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161125082518.26936-1-jslaby@suse.cz> References: <20161125082518.26936-1-jslaby@suse.cz> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ard Biesheuvel This patch has been added to the 3.12 stable tree. If you have any objections, please let us know. -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html =============== commit 0b70068e47e8f0c813a902dc3d6def601fd15acb upstream. In order to make the static inline function is_zero_pfn() callable by modules, export its symbol dependencies 'zero_pfn' and (for s390 and mips) 'zero_page_mask'. We need this for KVM, as CONFIG_KVM is a tristate for all supported architectures except ARM and arm64, and testing a pfn whether it refers to the zero page is required to correctly distinguish the zero page from other special RAM ranges that may also have the PG_reserved bit set, but need to be treated as MMIO memory. Signed-off-by: Ard Biesheuvel Acked-by: Andrew Morton Signed-off-by: Paolo Bonzini Signed-off-by: Jiri Slaby --- arch/mips/mm/init.c | 1 + arch/s390/mm/init.c | 1 + mm/memory.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index e205ef598e97..c247cf5a31cb 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -74,6 +74,7 @@ */ unsigned long empty_zero_page, zero_page_mask; EXPORT_SYMBOL_GPL(empty_zero_page); +EXPORT_SYMBOL(zero_page_mask); /* * Not static inline because used by IP27 special magic initialization code diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index ad446b0c55b6..1b30d5488f82 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c @@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE))); unsigned long empty_zero_page, zero_page_mask; EXPORT_SYMBOL(empty_zero_page); +EXPORT_SYMBOL(zero_page_mask); static void __init setup_zero_pages(void) { diff --git a/mm/memory.c b/mm/memory.c index a0c9c6cb59d1..f5744269a454 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -116,6 +116,8 @@ __setup("norandmaps", disable_randmaps); unsigned long zero_pfn __read_mostly; unsigned long highest_memmap_pfn __read_mostly; +EXPORT_SYMBOL(zero_pfn); + /* * CONFIG_MMU architectures set up ZERO_PAGE in their paging_init() */