mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Zhao Gongyi <zhaogongyi@bytedance.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	mark.rutland@arm.com, oleg@redhat.com, ruanjinjie@huawei.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arm64: ptrace: don't warn on missing siginfo in a group-stop
Date: Fri, 13 Nov 2026 13:24:43 +0000	[thread overview]
Message-ID: <avcPmzjYGc-uHMkU@willie-the-truck> (raw)
In-Reply-To: <56ed8952-fb5a-4f88-90c9-6fe5476237cc@bytedance.com>

On Thu, Nov 05, 2026 at 12:15:24PM +0800, Zhao Gongyi wrote:
> Hi Will,
> 
> On 11/4/26 9:41 PM, Will Deacon wrote:
> > I can't quite get my head around what it means to set NT_ARM_SYSTEM_CALL
> > in this context. Suddenly, in_syscall() will return true, which has
> > implications for things like signal handling that seem bizarre if we're
> > not actually in a syscall. Should we be avoiding this situation to start
> > with?
> > 
> 
> I ran an additional arm64 KVM test with SIGUSR1 and SIGUSR2 queued at a
> group-stop. After the tracer set NT_ARM_SYSTEM_CALL to __NR_getpid, the
> second signal-handling pass saw syscallno=172 (the control saw -1),
> although the task had not entered a syscall. I did not observe an
> incorrect restart: x0 held the first signal number (10) by that point.
> 
> system_call_set() assigns syscallno before calling
> update_syscall_orig_x0_after_ptrace(), so retaining the early return
> will not prevent that state. I can investigate separately whether the
> regset write should be rejected at such a stop.

Thanks. We probably need to be careful about tightening this up, but if
the current semantics are just that "things go wrong" in some way, then
I think it might be worth it.

Will

      reply	other threads:[~2026-11-13 13:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 11:07 Zhao Gongyi
2026-10-23 13:24 ` Oleg Nesterov
2026-10-24 14:50   ` Zhao Gongyi
2026-10-24 15:09     ` Oleg Nesterov
2026-11-04 14:05   ` Will Deacon
2026-11-09 13:43     ` Oleg Nesterov
2026-11-13 13:29       ` Will Deacon
2026-10-26 18:32 ` Catalin Marinas
2026-11-02  7:42   ` Jinjie Ruan
2026-11-02  7:54   ` Jinjie Ruan
2026-11-02  8:45     ` Zhao Gongyi
2026-11-02 11:31       ` Oleg Nesterov
2026-11-04 13:41   ` Will Deacon
2026-11-05  4:15     ` Zhao Gongyi
2026-11-13 13:24       ` Will Deacon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avcPmzjYGc-uHMkU@willie-the-truck \
    --to=will@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=oleg@redhat.com \
    --cc=ruanjinjie@huawei.com \
    --cc=zhaogongyi@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®