Re: [PATCH] arm64: ptrace: don't warn on missing siginfo in a group-stop

From: Oleg Nesterov

Date: Fri Oct 16 2026 - 02:45:09 EST


On 10/16, Zhao Gongyi wrote:
>
> --- a/arch/arm64/kernel/ptrace.c
> +++ b/arch/arm64/kernel/ptrace.c
> @@ -573,9 +573,11 @@ static void update_syscall_orig_x0_after_ptrace(struct task_struct *target)
> if (regs->syscallno == NO_SYSCALL)
> return;
>
> - /* We should only be called when target is in a ptrace stop */
> - if (WARN_ON_ONCE(!info))
> + /* Only non-seized group-stops lack siginfo (see do_jobctl_trap()). */
> + if (!info) {
> + WARN_ON_ONCE(target->ptrace & PT_SEIZED);
> return;
> + }

Perhaps we can simply remove this WARN_ON_ONCE?

Oleg.

--- x/arch/arm64/kernel/ptrace.c
+++ x/arch/arm64/kernel/ptrace.c
@@ -573,10 +573,6 @@ static void update_syscall_orig_x0_after
if (regs->syscallno == NO_SYSCALL)
return;

- /* We should only be called when target is in a ptrace stop */
- if (WARN_ON_ONCE(!info))
- return;
-
/*
* For compat tasks, orig_r0 is provided directly through GPR index
* 17.
@@ -588,7 +584,7 @@ static void update_syscall_orig_x0_after
* Don't update orig_x0 for a syscall-exit-stop, as x0 now contains the
* return value of the system call.
*/
- if ((info->si_code & ~0x80) == SIGTRAP &&
+ if (info && info->si_code == (SIGTRAP | 0x80) &&
target->ptrace_message == PTRACE_EVENTMSG_SYSCALL_EXIT) {
return;
}