diff options
| author | Mark Rutland <mark.rutland@arm.com> | 2015-01-08 11:42:59 +0000 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2016-12-11 11:53:50 +0100 |
| commit | b0be10a223b90c38309e8a6d3cd2ee12e45727cc (patch) | |
| tree | 3aabc701741fc0d7cd05b9e87c6f5ff36ef0038b /arch/arm64 | |
| parent | 9a800372eb4e9e7c7381d83077bc5297cec93f97 (diff) | |
arm64: make sys_call_table const
As with x86, mark the sys_call_table const such that it will be placed
in the .rodata section. This will cause attempts to modify the table
(accidental or deliberate) to fail when strict page permissions are in
place. In the absence of strict page permissions, there should be no
functional change.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
| -rw-r--r-- | arch/arm64/kernel/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c index 3fa98ff14..df20b7918 100644 --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c @@ -50,7 +50,7 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len, * The sys_call_table array must be 4K aligned to be accessible from * kernel/entry.S. */ -void *sys_call_table[__NR_syscalls] __aligned(4096) = { +void * const sys_call_table[__NR_syscalls] __aligned(4096) = { [0 ... __NR_syscalls - 1] = sys_ni_syscall, #include <asm/unistd.h> }; |
