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

From: Jinjie Ruan

Date: Tue Jul 21 2026 - 05:30:22 EST




On 7/21/2026 4:55 PM, Linus Walleij wrote:
> On Tue, Jul 21, 2026 at 10:19 AM Jinjie Ruan <ruanjinjie@xxxxxxxxxx> 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@xxxxxxxxxxxxx>
>> Suggested-by: Kevin Brodsky <kevin.brodsky@xxxxxxx>
>> Suggested-by: kemal <kmal@xxxxxxx>
>> Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
>
> 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?

Yes, Mark's idea is the same. We can place the SUD patch here separately
and wait for thorough testing and review.

Link:
https://lore.kernel.org/all/akZgV0Y4YAmB43_g@xxxxxxxxxxxxxxxxxxxxxxxxxxxx/

>
> Yours,
> Linus Walleij