summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2023-03-28 11:00:33 +0300
committerVasily Gorbik <gor@linux.ibm.com>2023-04-04 19:34:55 +0300
commitb46650d56bd31dca8b09b5670ee9441a8f7b8869 (patch)
tree202660e628d8be3b2dd35360c8658409a5656a95 /arch/s390/kernel/vmlinux.lds.S
parent385bf43c48ffe44af881039779a6be09ac8a77c8 (diff)
downloadlinux-b46650d56bd31dca8b09b5670ee9441a8f7b8869.tar.xz
s390: make extables read-only
Currently, exception tables are marked as ro_after_init. However, since they are sorted during compile time using scripts/sorttable, they can be moved to RO_DATA using the RO_EXCEPTION_TABLE_ALIGN macro, which is specifically designed for this purpose. Suggested-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/vmlinux.lds.S')
-rw-r--r--arch/s390/kernel/vmlinux.lds.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 8d2288a5ba25..2ae201ebf90b 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -14,6 +14,8 @@
#define BSS_FIRST_SECTIONS *(.bss..swapper_pg_dir) \
*(.bss..invalid_pg_dir)
+#define RO_EXCEPTION_TABLE_ALIGN 16
+
/* Handle ro_after_init data on our own. */
#define RO_AFTER_INIT_DATA
@@ -66,7 +68,6 @@ SECTIONS
*(.data..ro_after_init)
JUMP_TABLE_DATA
} :data
- EXCEPTION_TABLE(16)
. = ALIGN(PAGE_SIZE);
__end_ro_after_init = .;