Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

David Abdurachmanov and committed by
Paul Walmsley
556f47ac 4d47ce15

+1
+1
arch/riscv/kernel/entry.S
··· 246 246 */ 247 247 li t1, -1 248 248 beq a7, t1, ret_from_syscall_rejected 249 + blt a7, t1, 1f 249 250 /* Call syscall */ 250 251 la s0, sys_call_table 251 252 slli t0, a7, RISCV_LGPTR