From: Jinjie Ruan <ruanjinjie@huawei.com>
To: Mark Rutland <mark.rutland@arm.com>, Linus Walleij <linusw@kernel.org>
Cc: <catalin.marinas@arm.com>, <will@kernel.org>, <kees@kernel.org>,
<oleg@redhat.com>, <luto@amacapital.net>, <wad@chromium.org>,
<thuth@redhat.com>, <peterz@infradead.org>,
<ada.coupriediaz@arm.com>, <kevin.brodsky@arm.com>,
<yeoreum.yun@arm.com>, <anshuman.khandual@arm.com>,
<james.morse@arm.com>, <tglx@kernel.org>, <broonie@kernel.org>,
<pengcan@kylinos.cn>, <ryan.roberts@arm.com>,
<liqiang01@kylinos.cn>, <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH v17 15/15] arm64: vdso: Expose sigreturn address on vdso to the kernel
Date: Thu, 23 Jul 2026 09:54:36 +0800 [thread overview]
Message-ID: <5a200b28-d970-462b-ab49-ccb6bbe6c94c@huawei.com> (raw)
In-Reply-To: <amEJkyKFvVOkiGao@J2N7QTR9R3>
在 2026/7/23 2:18, Mark Rutland 写道:
> On Tue, Jul 21, 2026 at 10:55:03AM +0200, Linus Walleij wrote:
>> On Tue, Jul 21, 2026 at 10:19 AM Jinjie Ruan <ruanjinjie@huawei.com> wrote:
>>
>>> Syscall User Dispatch (SUD) must not intercept the signal trampoline
>>> code, otherwise returning from a signal with a locked selector may
>>> cause infinite recursion into the signal handler.
>>>
>>> Provide an arm64 implementation of arch_syscall_is_vdso_sigreturn()
>>> to exclude these sigreturn syscalls from dispatch.
>>>
>>> For native 64-bit tasks, check whether the current PC matches the 'svc #0'
>>> instruction inside the vDSO sigreturn trampoline (defined in
>>> arch/arm64/kernel/vdso/sigreturn.S as below).
>>>
>>> SYM_CODE_START(__kernel_rt_sigreturn)
>>> mov x8, #__NR_rt_sigreturn
>>> svc #0
>>> SYM_CODE_END(__kernel_rt_sigreturn)
>>>
>>> For COMPAT tasks, verify that the instruction falls within the dedicated
>>> 'sigpage' range, since compat signal handlers use this architecture-
>>> specific page (not the vDSO) for their return trampoline. This prevents
>>> SUD from incorrectly dispatching syscalls issued during signal return.
>>>
>>> Suggested-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
>>> Suggested-by: Kevin Brodsky <kevin.brodsky@arm.com>
>>> Suggested-by: kemal <kmal@cock.li>
>>> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
>>
>> I'm a bit scared about SUD.
>>
>> Certainly we can merge patches 1-14 first and iron out
>> any trouble related to that and split this off so a separate
>> series to be applied lated?
>
> I had already asked Jinie to drop SUD back in v14, and he had agreed:
>
> https://lore.kernel.org/lkml/akegeU59jSK9t7FX@J2N7QTR9R3/
> https://lore.kernel.org/lkml/3ac6d4be-7c57-44c2-80a0-408e2c6f8136@huawei.com/
>
> Jinjie, please drop this for now, as we had _already_ agreed.
Ah, sorry about that.I will drop this SUD patch in the next revision.
>
> I will look over the rest of the series soon.
Thank you! I look forward to your review and feedback on the rest of the
patches.
Thanks,
Jinjie
>
> Mark.
>
prev parent reply other threads:[~2026-07-23 1:54 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 8:18 [PATCH v17 00/15] arm64: entry: Convert to Generic Entry Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 01/15] arm64: ptrace: Skip syscall exit reporting for PTRACE_SYSEMU_SINGLESTEP Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 02/15] arm64: ptrace: Rework audit_syscall_entry() Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 03/15] arm64: ptrace: Open-code seccomp check in syscall_trace_enter() Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 04/15] arm64: ptrace: Rename and clean up syscall_trace_enter() Jinjie Ruan
2026-07-21 8:39 ` Linus Walleij
2026-07-21 8:18 ` [PATCH v17 05/15] arm64: ptrace: Protect rseq_syscall() from tracer PC modifications Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 06/15] arm64: syscall: Rework the syscall exit path in el0_svc_common() Jinjie Ruan
2026-07-21 8:43 ` Linus Walleij
2026-07-21 8:45 ` Linus Walleij
2026-07-21 8:18 ` [PATCH v17 07/15] arm64: ptrace: Pass thread flags to trace enter/exit Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 08/15] arm64: ptrace: Extract arm64_syscall_exit_to_user_mode_work() helper Jinjie Ruan
2026-07-21 8:45 ` Linus Walleij
2026-07-21 8:18 ` [PATCH v17 09/15] arm64: ptrace: Align syscall exit work semantics with generic entry Jinjie Ruan
2026-07-21 8:46 ` Linus Walleij
2026-07-21 8:18 ` [PATCH v17 10/15] arm64: syscall: Use exit-specific flags check in el0_svc_common() Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 11/15] arm64: syscall: Simplify el0_svc_common() syscall exit path Jinjie Ruan
2026-07-21 8:51 ` Linus Walleij
2026-07-21 9:30 ` Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 12/15] arm64: ptrace: Make return type of arm64_syscall_trace_enter() bool Jinjie Ruan
2026-07-21 8:52 ` Linus Walleij
2026-07-21 8:18 ` [PATCH v17 13/15] arm64: entry: Convert to generic entry Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 14/15] arm64: Inline el0_svc_common() Jinjie Ruan
2026-07-21 8:18 ` [PATCH v17 15/15] arm64: vdso: Expose sigreturn address on vdso to the kernel Jinjie Ruan
2026-07-21 8:51 ` Thomas Weißschuh
2026-07-21 9:23 ` Jinjie Ruan
2026-07-21 9:55 ` Thomas Weißschuh
2026-07-21 8:55 ` Linus Walleij
2026-07-21 9:27 ` Jinjie Ruan
2026-07-22 18:18 ` Mark Rutland
2026-07-23 1:54 ` Jinjie Ruan [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=5a200b28-d970-462b-ab49-ccb6bbe6c94c@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=ada.coupriediaz@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=kees@kernel.org \
--cc=kevin.brodsky@arm.com \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liqiang01@kylinos.cn \
--cc=luto@amacapital.net \
--cc=mark.rutland@arm.com \
--cc=oleg@redhat.com \
--cc=pengcan@kylinos.cn \
--cc=peterz@infradead.org \
--cc=ryan.roberts@arm.com \
--cc=tglx@kernel.org \
--cc=thuth@redhat.com \
--cc=wad@chromium.org \
--cc=will@kernel.org \
--cc=yeoreum.yun@arm.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®