diff options
author | David Abdurachmanov <david.abdurachmanov@gmail.com> | 2019-12-18 09:47:56 +0100 |
---|---|---|
committer | Paul Walmsley <paul.walmsley@sifive.com> | 2019-12-28 06:50:57 +0100 |
commit | 556f47ac6083d778843e89aa21b1242eee2693ed (patch) | |
tree | 7d15925f22c0625e9fd3e0c60f74c0e812f519ab /arch/riscv/kernel/entry.S | |
parent | riscv: fix compile failure with EXPORT_SYMBOL() & !MMU (diff) | |
download | linux-556f47ac6083d778843e89aa21b1242eee2693ed.tar.xz linux-556f47ac6083d778843e89aa21b1242eee2693ed.zip |
riscv: reject invalid syscalls below -1
Running "stress-ng --enosys 4 -t 20 -v" showed a large number of kernel oops
with "Unable to handle kernel paging request at virtual address" message. This
happens when enosys stressor starts testing random non-valid syscalls.
I forgot to redirect any syscall below -1 to sys_ni_syscall.
With the patch kernel oops messages are gone while running stress-ng enosys
stressor.
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
Fixes: 5340627e3fe0 ("riscv: add support for SECCOMP and SECCOMP_FILTER")
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Diffstat (limited to '')
-rw-r--r-- | arch/riscv/kernel/entry.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S index a1349ca64669..e163b7b64c86 100644 --- a/arch/riscv/kernel/entry.S +++ b/arch/riscv/kernel/entry.S @@ -246,6 +246,7 @@ check_syscall_nr: */ li t1, -1 beq a7, t1, ret_from_syscall_rejected + blt a7, t1, 1f /* Call syscall */ la s0, sys_call_table slli t0, a7, RISCV_LGPTR |