summaryrefslogtreecommitdiff
path: root/arch/riscv/kernel
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-03-30 02:23:24 +0800
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-04-26 08:25:09 -0700
commite6a302248cec96c3af4cbfcedc44b0de8a26ebe0 (patch)
treed5a7e610acdcd462632a79dd58e498f149433f73 /arch/riscv/kernel
parentde31ea4a1181a8bb4d32ab74f3434f2bc2b79122 (diff)
riscv: Constify sys_call_table
Constify the sys_call_table so that it will be placed in the .rodata section. This will cause attempts to modify the table to fail when strict page permissions are in place. Signed-off-by: Jisheng Zhang <jszhang@kernel.org> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/kernel')
-rw-r--r--arch/riscv/kernel/syscall_table.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/syscall_table.c b/arch/riscv/kernel/syscall_table.c
index f1ead9df96ca..a63c667c27b3 100644
--- a/arch/riscv/kernel/syscall_table.c
+++ b/arch/riscv/kernel/syscall_table.c
@@ -13,7 +13,7 @@
#undef __SYSCALL
#define __SYSCALL(nr, call) [nr] = (call),
-void *sys_call_table[__NR_syscalls] = {
+void * const sys_call_table[__NR_syscalls] = {
[0 ... __NR_syscalls - 1] = sys_ni_syscall,
#include <asm/unistd.h>
};