On 17/11/2025 14:30, Jinjie Ruan wrote: > 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 <[email protected]> > --- > 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 707951ad5d24..9af3046a2ce9 100644 > --- a/arch/arm64/kernel/ptrace.c > +++ b/arch/arm64/kernel/ptrace.c > @@ -2387,8 +2387,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);
No argument was passed to __secure_computing() in v6, as expected since it was removed in v6.15. Not sure why this NULL reappeared. > + if (ret == -1L) ret is an int, so should be -1, not -1L. - Kevin > + return NO_SYSCALL; > + } > > /* Either of the above might have changed the syscall number */ > syscall = syscall_get_nr(current, regs);

