From mboxrd@z Thu Jan 1 00:00:00 1970 From: "tip-bot2 for Kees Cook" Subject: [tip: x86/build] x86/vmlinux: Move EXCEPTION_TABLE to RO_DATA segment Date: Tue, 05 Nov 2019 09:27:30 -0000 Message-ID: <157294605067.29376.15944354524301929135.tip-bot2@tip-bot2> References: <20191029211351.13243-17-keescook@chromium.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191029211351.13243-17-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: linux-tip-commits@vger.kernel.org Cc: Kees Cook , Borislav Petkov , Andy Lutomirski , Arnd Bergmann , Dave Hansen , Heiko Carstens , "H. Peter Anvin" , Ingo Molnar , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Michael Ellerman , Michal Simek , Rick Edgecombe , Ross Zwisler , Segher Boessenkool , Thomas Gleixner , Thomas Lendacky The following commit has been merged into the x86/build branch of tip: Commit-ID: f0d7ee17d57c7a8510518a1e60366d053e2f3ff5 Gitweb: https://git.kernel.org/tip/f0d7ee17d57c7a8510518a1e60366d053e2f3ff5 Author: Kees Cook AuthorDate: Tue, 29 Oct 2019 14:13:38 -07:00 Committer: Borislav Petkov CommitterDate: Mon, 04 Nov 2019 17:55:02 +01:00 x86/vmlinux: Move EXCEPTION_TABLE to RO_DATA segment The exception table was needlessly marked executable. In preparation for execute-only memory, move the table into the RO_DATA segment via the new macro that can be used by any architectures that want to make a similar consolidation. Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-c6x-dev@linux-c6x.org Cc: linux-ia64@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: Michael Ellerman Cc: Michal Simek Cc: Rick Edgecombe Cc: Ross Zwisler Cc: Segher Boessenkool Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: Will Deacon Cc: x86-ml Cc: Yoshinori Sato Link: https://lkml.kernel.org/r/20191029211351.13243-17-keescook@chromium.org --- arch/x86/kernel/vmlinux.lds.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index a1a758e..b06d6e1 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -22,6 +22,7 @@ #endif #define EMITS_PT_NOTE +#define RO_EXCEPTION_TABLE_ALIGN 16 #include #include @@ -145,8 +146,6 @@ SECTIONS #endif } :text = 0x9090 - EXCEPTION_TABLE(16) - /* End of text section, which should occupy whole number of pages */ _etext = .; . = ALIGN(PAGE_SIZE);