[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH -next v5 18/22] arm64/ptrace: Expand secure_computing() in place
- To: <catalin.marinas@xxxxxxx>, <will@xxxxxxxxxx>, <oleg@xxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <tglx@xxxxxxxxxxxxx>, <peterz@xxxxxxxxxxxxx>, <luto@xxxxxxxxxx>, <mingo@xxxxxxxxxx>, <juri.lelli@xxxxxxxxxx>, <vincent.guittot@xxxxxxxxxx>, <dietmar.eggemann@xxxxxxx>, <rostedt@xxxxxxxxxxx>, <bsegall@xxxxxxxxxx>, <mgorman@xxxxxxx>, <vschneid@xxxxxxxxxx>, <kees@xxxxxxxxxx>, <wad@xxxxxxxxxxxx>, <akpm@xxxxxxxxxxxxxxxxxxxx>, <samitolvanen@xxxxxxxxxx>, <masahiroy@xxxxxxxxxx>, <hca@xxxxxxxxxxxxx>, <aliceryhl@xxxxxxxxxx>, <rppt@xxxxxxxxxx>, <xur@xxxxxxxxxx>, <paulmck@xxxxxxxxxx>, <arnd@xxxxxxxx>, <mbenes@xxxxxxx>, <puranjay@xxxxxxxxxx>, <mark.rutland@xxxxxxx>, <ruanjinjie@xxxxxxxxxx>, <pcc@xxxxxxxxxx>, <ardb@xxxxxxxxxx>, <sudeep.holla@xxxxxxx>, <guohanjun@xxxxxxxxxx>, <rafael@xxxxxxxxxx>, <liuwei09@xxxxxxxx>, <dwmw@xxxxxxxxxxxx>, <Jonathan.Cameron@xxxxxxxxxx>, <liaochang1@xxxxxxxxxx>, <kristina.martsenko@xxxxxxx>, <ptosi@xxxxxxxxxx>, <broonie@xxxxxxxxxx>, <thiago.bauermann@xxxxxxxxxx>, <kevin.brodsky@xxxxxxx>, <joey.gouly@xxxxxxx>, <liuyuntao12@xxxxxxxxxx>, <leobras@xxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
- Date: Fri, 6 Dec 2024 18:17:40 +0800
- Delivery-date: Fri, 06 Dec 2024 10:20:59 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
The generic entry expand secure_computing() in place and call
__secure_computing() directly.
In order to switch to the generic entry for arm64, refactor
secure_computing() for syscall_trace_enter().
No functional changes.
Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
---
arch/arm64/kernel/ptrace.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c
index b53d3759baf8..c0c00e173f61 100644
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -2368,8 +2368,11 @@ int syscall_trace_enter(struct pt_regs *regs, long
syscall, unsigned long flags)
}
/* Do the secure computing after ptrace; failures should be fast. */
- if (secure_computing() == -1)
- return NO_SYSCALL;
+ if (flags & _TIF_SECCOMP) {
+ ret = __secure_computing(NULL);
+ if (ret == -1L)
+ return NO_SYSCALL;
+ }
/* Either of the above might have changed the syscall number */
syscall = syscall_get_nr(current, regs);
--
2.34.1
|