[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1590416306-66453-1-git-send-email-guoren@kernel.org>
Date: Mon, 25 May 2020 14:18:26 +0000
From: guoren@...nel.org
To: tycho@...ho.ws, keescook@...omium.org, palmerdabbelt@...gle.com,
paul.walmsley@...ive.com, anup@...infault.org
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
Guo Ren <guoren@...ux.alibaba.com>
Subject: [PATCH] riscv: Remove unnecessary path for syscall_trace
From: Guo Ren <guoren@...ux.alibaba.com>
Obviously, there is no need to recover a0-a7 in reject path.
Previous modification is from commit af33d243 by Tycho, to
fixup seccomp reject syscall code path.
Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
Cc: Tycho Andersen <tycho@...ho.ws>
Cc: Kees Cook <keescook@...omium.org>
Cc: Palmer Dabbelt <palmerdabbelt@...gle.com>
---
arch/riscv/kernel/entry.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
index 56d071b..ea3444d 100644
--- a/arch/riscv/kernel/entry.S
+++ b/arch/riscv/kernel/entry.S
@@ -306,7 +306,7 @@ work_resched:
handle_syscall_trace_enter:
move a0, sp
call do_syscall_trace_enter
- move t0, a0
+ bnez a0, ret_from_syscall_rejected
REG_L a0, PT_A0(sp)
REG_L a1, PT_A1(sp)
REG_L a2, PT_A2(sp)
@@ -315,7 +315,6 @@ handle_syscall_trace_enter:
REG_L a5, PT_A5(sp)
REG_L a6, PT_A6(sp)
REG_L a7, PT_A7(sp)
- bnez t0, ret_from_syscall_rejected
j check_syscall_nr
handle_syscall_trace_exit:
move a0, sp
--
2.7.4
Powered by blists - more mailing lists