From: "Zhao Gongyi" <zhaogongyi@bytedance.com>
To: "Jinjie Ruan" <ruanjinjie@huawei.com>,
"Catalin Marinas" <catalin.marinas@arm.com>
Cc: <will@kernel.org>, <mark.rutland@arm.com>, <oleg@redhat.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: Mon, 2 Nov 2026 16:45:35 +0800 [thread overview]
Message-ID: <8028d335-c304-49de-81fa-07fd446cf9d0@bytedance.com> (raw)
In-Reply-To: <d8aced38-fb7a-4359-b3ab-c625faae5023@huawei.com>
Hi Jinjie,
On 11/2/26 3:54 PM, Jinjie Ruan wrote:
>
> I think maybe we can refer to ptrace_get_syscall_info_op()?
>
Thanks for the suggestion.
I checked ptrace_get_syscall_info_op(). It is currently static to
kernel/ptrace.c and identifies a syscall stop only when
last_siginfo->si_code is SIGTRAP | 0x80.
The arm64 path here also needs to handle a syscall-exit-stop when the
tracer has not enabled PTRACE_O_TRACESYSGOOD. In that case, the tested
si_code is plain SIGTRAP. Reusing the current logic from
ptrace_get_syscall_info_op() would therefore fail to recognize that
syscall-exit-stop and could update orig_x0 from x0, which contains the
syscall return value at that point.
We could refactor the generic helper and consider recognizing plain
SIGTRAP there as well, but that would broaden this fix and potentially
change the behavior of PTRACE_GET_SYSCALL_INFO. For this patch, I think
the local check of last_siginfo, with bit 0x80 masked and ptrace_message
checked for PTRACE_EVENTMSG_SYSCALL_EXIT, is the smaller and safer change.
Thanks,
Gongyi
next prev parent reply other threads:[~2026-11-02 8:46 UTC|newest]
Thread overview: 9+ 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-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 [this message]
2026-11-02 11:31 ` Oleg Nesterov
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=8028d335-c304-49de-81fa-07fd446cf9d0@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®