Thread (31 messages) 31 messages, 4 authors, 6d ago

Re: [PATCH v17 15/15] arm64: vdso: Expose sigreturn address on vdso to the kernel

From: Jinjie Ruan <hidden>
Date: 2026-07-23 01:54:54
Also in: linux-mm, lkml


在 2026/7/23 2:18, Mark Rutland 写道:
On Tue, Jul 21, 2026 at 10:55:03AM +0200, Linus Walleij wrote:
quoted
On Tue, Jul 21, 2026 at 10:19 AM Jinjie Ruan [off-list ref] wrote:
quoted
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 <redacted>
Suggested-by: Kevin Brodsky <redacted>
Suggested-by: kemal <redacted>
Signed-off-by: Jinjie Ruan <redacted>
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/ (local)
  https://lore.kernel.org/lkml/3ac6d4be-7c57-44c2-80a0-408e2c6f8136@huawei.com/ (local)

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.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help