Re: [PATCH v17 15/15] arm64: vdso: Expose sigreturn address on vdso to the kernel
From: Thomas Weißschuh <hidden>
Date: 2026-07-21 08:51:50
Also in:
linux-mm, lkml
On Tue, Jul 21, 2026 at 04:18:58PM +0800, Jinjie Ruan 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)
With the new label this code snippet here shouldnt be needed anymore.
quoted hunk ↗ jump to hunk
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> --- arch/arm64/Kconfig | 1 + arch/arm64/include/asm/elf.h | 1 + arch/arm64/kernel/vdso.c | 16 ++++++++++++++++ arch/arm64/kernel/vdso/sigreturn.S | 1 + arch/arm64/kernel/vdso/vdso.lds.S | 1 + 5 files changed, 20 insertions(+)diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index aea686dce3d5..a41d2b593899 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig@@ -86,6 +86,7 @@ config ARM64 select ARCH_SUPPORTS_SCHED_SMT select ARCH_SUPPORTS_SCHED_CLUSTER select ARCH_SUPPORTS_SCHED_MC + select ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
From the subject and description I would not have expected this to be in here. Split into its own patch?
select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH select ARCH_WANT_COMPAT_IPC_PARSE_VERSION if COMPAT select ARCH_WANT_DEFAULT_BPF_JIT
(...) For the rest: Reviewed-by: Thomas Weißschuh <redacted> Thomas