[<prev] [next>] [day] [month] [year] [list]
Message-ID: <157294605141.29376.16810559476409135725.tip-bot2@tip-bot2>
Date: Tue, 05 Nov 2019 09:27:31 -0000
From: "tip-bot2 for Kees Cook" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Kees Cook <keescook@...omium.org>, Borislav Petkov <bp@...e.de>,
Will Deacon <will@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
linux-alpha@...r.kernel.org, linux-arch@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-c6x-dev@...ux-c6x.org,
linux-ia64@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>,
Michal Simek <monstr@...str.eu>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
Segher Boessenkool <segher@...nel.crashing.org>,
"x86-ml" <x86@...nel.org>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
linux-kernel@...r.kernel.org
Subject: [tip: x86/build] vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA
The following commit has been merged into the x86/build branch of tip:
Commit-ID: b8c2f776164c8f74ac31c5e370ca3f029be0aa19
Gitweb: https://git.kernel.org/tip/b8c2f776164c8f74ac31c5e370ca3f029be0aa19
Author: Kees Cook <keescook@...omium.org>
AuthorDate: Tue, 29 Oct 2019 14:13:36 -07:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Mon, 04 Nov 2019 15:59:01 +01:00
vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA
Many architectures have an EXCEPTION_TABLE that needs to be only
readable. As such, it should live in RO_DATA. Create a macro to identify
this case for the architectures that can move EXCEPTION_TABLE into
RO_DATA.
Signed-off-by: Kees Cook <keescook@...omium.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Acked-by: Will Deacon <will@...nel.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: linux-alpha@...r.kernel.org
Cc: linux-arch@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-c6x-dev@...ux-c6x.org
Cc: linux-ia64@...r.kernel.org
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: linux-s390@...r.kernel.org
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Michal Simek <monstr@...str.eu>
Cc: Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc: Segher Boessenkool <segher@...nel.crashing.org>
Cc: x86-ml <x86@...nel.org>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Link: https://lkml.kernel.org/r/20191029211351.13243-15-keescook@chromium.org
---
include/asm-generic/vmlinux.lds.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 356078e..9867d8e 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -69,6 +69,17 @@
#define NOTES_HEADERS_RESTORE
#endif
+/*
+ * Some architectures have non-executable read-only exception tables.
+ * They can be added to the RO_DATA segment by specifying their desired
+ * alignment.
+ */
+#ifdef RO_EXCEPTION_TABLE_ALIGN
+#define RO_EXCEPTION_TABLE EXCEPTION_TABLE(RO_EXCEPTION_TABLE_ALIGN)
+#else
+#define RO_EXCEPTION_TABLE
+#endif
+
/* Align . to a 8 byte boundary equals to maximum function alignment. */
#define ALIGN_FUNCTION() . = ALIGN(8)
@@ -513,6 +524,7 @@
__stop___modver = .; \
} \
\
+ RO_EXCEPTION_TABLE \
NOTES \
\
. = ALIGN((align)); \
Powered by blists - more mailing lists