Commit c623b33b authored by Mark Rutland's avatar Mark Rutland Committed by Catalin Marinas

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: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 96486069
...@@ -49,7 +49,7 @@ asmlinkage long sys_rt_sigreturn_wrapper(void); ...@@ -49,7 +49,7 @@ asmlinkage long sys_rt_sigreturn_wrapper(void);
* The sys_call_table array must be 4K aligned to be accessible from * The sys_call_table array must be 4K aligned to be accessible from
* kernel/entry.S. * 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, [0 ... __NR_syscalls - 1] = sys_ni_syscall,
#include <asm/unistd.h> #include <asm/unistd.h>
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment