Re: [PATCH] syscall_user_dispatch: Introduce ARCH_SUPPORTS_SYSCALL_USER_DISPATCH

From: Thomas Weißschuh

Date: Thu Jul 09 2026 - 03:38:21 EST


On Thu, Jul 09, 2026 at 03:28:03PM +0800, Jinjie Ruan wrote:
> Currently, only x86 genuinely implements and supports Syscall User
> Dispatch (SUD). Multiple architectures provide a stub
> arch_syscall_is_vdso_sigreturn() returning 'false' simply to satisfy
> GENERIC_ENTRY compilation, which creates a false impression of feature
> support.
>
> Introduce ARCH_SUPPORTS_SYSCALL_USER_DISPATCH to decouple this mechanism
> from GENERIC_ENTRY. Select it exclusively on x86 and remove the redundant
> stub functions from other architectures.

Nice, this confused me before.

> Link: https://lore.kernel.org/linux-arm-kernel/akZgV0Y4YAmB43_g@xxxxxxxxxxxxxxxxxxxxxxxxxxxx/
> Cc: Thomas Gleixner <tglx@xxxxxxxxxx>
> Cc: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Ada Couprie Diaz <ada.coupriediaz@xxxxxxx>
> Cc: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
> Suggested-by: Mark Rutland <mark.rutland@xxxxxxx>
> Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
> ---
> arch/Kconfig | 1 +
> arch/loongarch/include/asm/syscall.h | 6 ------
> arch/powerpc/include/asm/syscall.h | 5 -----
> arch/riscv/include/asm/syscall.h | 5 -----
> arch/s390/include/asm/syscall.h | 5 -----
> arch/x86/Kconfig | 1 +
> 6 files changed, 2 insertions(+), 21 deletions(-)
>
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 0c01521c2f3f..393d0fb75eac 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -116,6 +116,7 @@ config GENERIC_ENTRY
>
> config SYSCALL_USER_DISPATCH
> bool "Syscall User Dispatch"
> + depends on ARCH_SUPPORTS_SYSCALL_USER_DISPATCH

ARCH_SUPPORTS_SYSCALL_USER_DISPATCH is not declared as a config option,
so the 'select' will not do anything. Needs this:

config ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
bool

> depends on GENERIC_ENTRY
> default y
> help

(...)