25 lines
656 B
Diff
25 lines
656 B
Diff
From c000c7188f1a114a0d11eb006ab67c183d5da83a Mon Sep 17 00:00:00 2001
|
|
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
|
|
Date: Thu, 19 Dec 2019 09:05:21 +0000
|
|
Subject: [PATCH 2/3] riscv: reject invalid syscalls below -1
|
|
|
|
---
|
|
arch/riscv/kernel/entry.S | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
|
|
index a1349ca..e163b7b 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
|
|
--
|
|
2.24.1
|
|
|