mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhao Gongyi" <zhaogongyi@bytedance.com>
To: "Will Deacon" <will@kernel.org>,
	 "Catalin Marinas" <catalin.marinas@arm.com>
Cc: <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: Thu, 5 Nov 2026 12:15:24 +0800	[thread overview]
Message-ID: <56ed8952-fb5a-4f88-90c9-6fe5476237cc@bytedance.com> (raw)
In-Reply-To: <aus2Aq12Z-PKvoW7@willie-the-truck>

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.


> I was trying to limit the scope of this hack as much as possible, so I
> think I'd prefer the early return tbh (i.e. just drop the WARN_ON_ONCE()
> and update the comment).
> 

Agreed. I'll retain the early return, drop WARN_ON_ONCE(), update the 
comment, and send v3 with that minimal change.

Thanks,
Gongyi

      reply	other threads:[~2026-11-05  4:15 UTC|newest]

Thread overview: 12+ 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-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 [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=56ed8952-fb5a-4f88-90c9-6fe5476237cc@bytedance.com \
    --to=zhaogongyi@bytedance.com \
    --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=will@kernel.org \
    /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®