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

From: Will Deacon

Date: Fri Nov 13 2026 - 09:12:41 EST


On Sun, Nov 08, 2026 at 07:59:25PM +0100, Oleg Nesterov wrote:
> On 11/05, Zhao Gongyi wrote:
> >
> > --- a/arch/arm64/kernel/ptrace.c
> > +++ b/arch/arm64/kernel/ptrace.c
> > @@ -573,8 +573,8 @@ 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))
> > + /* Non-seized group-stops do not provide siginfo (see do_jobctl_trap()). */
> > + if (!info)
> > return;
>
> First of all, FWIW
>
> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>
> This change is "obviously good" and doesn't change the current behaviour.
>
>
>
> ----------------------------------------------------------------------------
> But can't resist... The old comment was obviously wrong, the new one doesn't
> look clear to me. It correctly explains why info can be NULL, but not why we
> should not update orig_x0 in this case. May be it should just say that exit-stop
> always comes with info != NULL?
>
> Nevermind, I leave this to you, Catalin, and Will.

Yes, I think it makes more sense to talk about the exit-stop, as that
is what this code cares about. Something like:

"For exit-stops, info is always non-NULL, but that's not true for other
stops such as non-seized group-stops. In those cases, just return early
as there's no need to update orig_x0 anyway."

With that (or something like it):

Acked-by: Will Deacon <will@xxxxxxxxxx>

Thanks,

Will