Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752216AbbK2JF0 (ORCPT ); Sun, 29 Nov 2015 04:05:26 -0500 Received: from terminus.zytor.com ([198.137.202.10]:40515 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbbK2JFI (ORCPT ); Sun, 29 Nov 2015 04:05:08 -0500 Date: Sun, 29 Nov 2015 01:03:44 -0800 From: tip-bot for Matt Fleming Message-ID: Cc: dave.hansen@intel.com, toshi.kani@hp.com, bp@suse.de, ard.biesheuvel@linaro.org, luto@amacapital.net, dvlasenk@redhat.com, matt@codeblueprint.co.uk, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, sai.praneeth.prakhya@intel.com, mingo@kernel.org, brgerst@gmail.com, torvalds@linux-foundation.org, peterz@infradead.org, bp@alien8.de Reply-To: luto@amacapital.net, dvlasenk@redhat.com, matt@codeblueprint.co.uk, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, dave.hansen@intel.com, toshi.kani@hp.com, bp@suse.de, ard.biesheuvel@linaro.org, brgerst@gmail.com, torvalds@linux-foundation.org, peterz@infradead.org, bp@alien8.de, sai.praneeth.prakhya@intel.com, mingo@kernel.org In-Reply-To: <1448658575-17029-2-git-send-email-matt@codeblueprint.co.uk> References: <1448658575-17029-2-git-send-email-matt@codeblueprint.co.uk> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/efi] x86/mm: Page align the '_end' symbol to avoid pfn conversion bugs Git-Commit-ID: 21cdb6b568435738cc0b303b2b3b82742396310c X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2240 Lines: 61 Commit-ID: 21cdb6b568435738cc0b303b2b3b82742396310c Gitweb: http://git.kernel.org/tip/21cdb6b568435738cc0b303b2b3b82742396310c Author: Matt Fleming AuthorDate: Fri, 27 Nov 2015 21:09:30 +0000 Committer: Ingo Molnar CommitDate: Sun, 29 Nov 2015 09:15:42 +0100 x86/mm: Page align the '_end' symbol to avoid pfn conversion bugs Ingo noted that if we can guarantee _end is aligned to PAGE_SIZE we can automatically avoid bugs along the lines of, size = _end - _text >> PAGE_SHIFT which is missing a call to PFN_ALIGN(). The EFI mixed mode contains this bug, for example. _text is already aligned to PAGE_SIZE through the use of LOAD_PHYSICAL_ADDR, and the BSS and BRK sections are explicitly aligned in the linker script, so it makes sense to align _end to match. Reported-by: Ingo Molnar Signed-off-by: Matt Fleming Acked-by: Borislav Petkov Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sai Praneeth Prakhya Cc: Thomas Gleixner Cc: Toshi Kani Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1448658575-17029-2-git-send-email-matt@codeblueprint.co.uk Signed-off-by: Ingo Molnar --- arch/x86/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 74e4bf1..4f19942 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -325,6 +325,7 @@ SECTIONS __brk_limit = .; } + . = ALIGN(PAGE_SIZE); _end = .; STABS_DEBUG -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/