summaryrefslogtreecommitdiffstats
path: root/arch/riscv/include
diff options
context:
space:
mode:
authorJisheng Zhang <jszhang@kernel.org>2021-03-29 20:23:24 +0200
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-04-26 17:25:09 +0200
commite6a302248cec96c3af4cbfcedc44b0de8a26ebe0 (patch)
treed5a7e610acdcd462632a79dd58e498f149433f73 /arch/riscv/include
parentriscv: Mark some global variables __ro_after_init (diff)
downloadlinux-e6a302248cec96c3af4cbfcedc44b0de8a26ebe0.tar.xz
linux-e6a302248cec96c3af4cbfcedc44b0de8a26ebe0.zip
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/include')
-rw-r--r--arch/riscv/include/asm/syscall.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/syscall.h b/arch/riscv/include/asm/syscall.h
index 49350c8bd7b0..b933b1583c9f 100644
--- a/arch/riscv/include/asm/syscall.h
+++ b/arch/riscv/include/asm/syscall.h
@@ -15,7 +15,7 @@
#include <linux/err.h>
/* The array of function pointers for syscalls. */
-extern void *sys_call_table[];
+extern void * const sys_call_table[];
/*
* Only the low 32 bits of orig_r0 are meaningful, so we return int.