arch/Kconfig | 4 ++++ 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, 5 insertions(+), 21 deletions(-)
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.
Link: https://lore.kernel.org/linux-arm-kernel/akZgV0Y4YAmB43_g@J2N7QTR9R3.cambridge.arm.com/
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Gregory Price <gourry@gourry.net>
Cc: Ada Couprie Diaz <ada.coupriediaz@arm.com>
Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
v1 -> RESEND
- Define missing ARCH_SUPPORTS_SYSCALL_USER_DISPATCH.
---
arch/Kconfig | 4 ++++
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, 5 insertions(+), 21 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index d2dbed524f15..066263cc44fe 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -114,8 +114,12 @@ config GENERIC_ENTRY
select GENERIC_IRQ_ENTRY
select GENERIC_SYSCALL
+config ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
+ bool
+
config SYSCALL_USER_DISPATCH
bool "Syscall User Dispatch"
+ depends on ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
depends on GENERIC_ENTRY
default y
help
diff --git a/arch/loongarch/include/asm/syscall.h b/arch/loongarch/include/asm/syscall.h
index df8ea223c77b..d9275010f548 100644
--- a/arch/loongarch/include/asm/syscall.h
+++ b/arch/loongarch/include/asm/syscall.h
@@ -84,10 +84,4 @@ static inline int syscall_get_arch(struct task_struct *task)
return AUDIT_ARCH_LOONGARCH64;
#endif
}
-
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
-
#endif /* __ASM_LOONGARCH_SYSCALL_H */
diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
index 834fcc4f7b54..4b3c52ed6e9d 100644
--- a/arch/powerpc/include/asm/syscall.h
+++ b/arch/powerpc/include/asm/syscall.h
@@ -139,9 +139,4 @@ static inline int syscall_get_arch(struct task_struct *task)
else
return AUDIT_ARCH_PPC64;
}
-
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
#endif /* _ASM_SYSCALL_H */
diff --git a/arch/riscv/include/asm/syscall.h b/arch/riscv/include/asm/syscall.h
index 8067e666a4ca..987c9a78806f 100644
--- a/arch/riscv/include/asm/syscall.h
+++ b/arch/riscv/include/asm/syscall.h
@@ -112,11 +112,6 @@ static inline void syscall_handler(struct pt_regs *regs, ulong syscall)
regs->a0 = fn(regs);
}
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
-
asmlinkage long sys_riscv_flush_icache(uintptr_t, uintptr_t, uintptr_t);
asmlinkage long sys_riscv_hwprobe(struct riscv_hwprobe *, size_t, size_t,
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h
index 4271e4169f45..5f310caad1fc 100644
--- a/arch/s390/include/asm/syscall.h
+++ b/arch/s390/include/asm/syscall.h
@@ -89,11 +89,6 @@ static inline int syscall_get_arch(struct task_struct *task)
return AUDIT_ARCH_S390X;
}
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
-
#define SYSCALL_FMT_0
#define SYSCALL_FMT_1 , "0" (r2)
#define SYSCALL_FMT_2 , "d" (r3) SYSCALL_FMT_1
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index bdad90f210e4..f3f8ad107eeb 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -335,6 +335,7 @@ config X86
select SCHED_SMT if SMP
select ARCH_SUPPORTS_SCHED_CLUSTER if SMP
select ARCH_SUPPORTS_SCHED_MC if SMP
+ select ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
select HAVE_SINGLE_FTRACE_DIRECT_OPS if X86_64 && DYNAMIC_FTRACE_WITH_DIRECT_CALLS
config INSTRUCTION_DECODER
--
2.34.1
On Mon, Jul 13, 2026 at 11:54:22AM +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. > > Link: https://lore.kernel.org/linux-arm-kernel/akZgV0Y4YAmB43_g@J2N7QTR9R3.cambridge.arm.com/ > Cc: Thomas Gleixner <tglx@kernel.org> > Cc: Mark Rutland <mark.rutland@arm.com> > Cc: Gregory Price <gourry@gourry.net> > Cc: Ada Couprie Diaz <ada.coupriediaz@arm.com> > Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de> > Suggested-by: Mark Rutland <mark.rutland@arm.com> > Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> > --- > v1 -> RESEND > - Define missing ARCH_SUPPORTS_SYSCALL_USER_DISPATCH. If code is changed it is not a resend. Instead it should have been v2. > --- > arch/Kconfig | 4 ++++ > 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, 5 insertions(+), 21 deletions(-) (...)
The following commit has been merged into the core/entry branch of tip:
Commit-ID: 8383e05af734355ba5cdd348991eaa71f6003e71
Gitweb: https://git.kernel.org/tip/8383e05af734355ba5cdd348991eaa71f6003e71
Author: Jinjie Ruan <ruanjinjie@huawei.com>
AuthorDate: Mon, 13 Jul 2026 11:54:22 +08:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 14 Jul 2026 16:34:07 +02:00
syscall_user_dispatch: Introduce ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
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.
Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://patch.msgid.link/20260713035422.582771-1-ruanjinjie@huawei.com
---
arch/Kconfig | 4 ++++
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, 5 insertions(+), 21 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig
index d2dbed5..066263c 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -114,8 +114,12 @@ config GENERIC_ENTRY
select GENERIC_IRQ_ENTRY
select GENERIC_SYSCALL
+config ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
+ bool
+
config SYSCALL_USER_DISPATCH
bool "Syscall User Dispatch"
+ depends on ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
depends on GENERIC_ENTRY
default y
help
diff --git a/arch/loongarch/include/asm/syscall.h b/arch/loongarch/include/asm/syscall.h
index df8ea22..d927501 100644
--- a/arch/loongarch/include/asm/syscall.h
+++ b/arch/loongarch/include/asm/syscall.h
@@ -84,10 +84,4 @@ static inline int syscall_get_arch(struct task_struct *task)
return AUDIT_ARCH_LOONGARCH64;
#endif
}
-
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
-
#endif /* __ASM_LOONGARCH_SYSCALL_H */
diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
index 834fcc4..4b3c52e 100644
--- a/arch/powerpc/include/asm/syscall.h
+++ b/arch/powerpc/include/asm/syscall.h
@@ -139,9 +139,4 @@ static inline int syscall_get_arch(struct task_struct *task)
else
return AUDIT_ARCH_PPC64;
}
-
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
#endif /* _ASM_SYSCALL_H */
diff --git a/arch/riscv/include/asm/syscall.h b/arch/riscv/include/asm/syscall.h
index 8067e66..987c9a7 100644
--- a/arch/riscv/include/asm/syscall.h
+++ b/arch/riscv/include/asm/syscall.h
@@ -112,11 +112,6 @@ static inline void syscall_handler(struct pt_regs *regs, ulong syscall)
regs->a0 = fn(regs);
}
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
-
asmlinkage long sys_riscv_flush_icache(uintptr_t, uintptr_t, uintptr_t);
asmlinkage long sys_riscv_hwprobe(struct riscv_hwprobe *, size_t, size_t,
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h
index 4271e41..5f310ca 100644
--- a/arch/s390/include/asm/syscall.h
+++ b/arch/s390/include/asm/syscall.h
@@ -89,11 +89,6 @@ static inline int syscall_get_arch(struct task_struct *task)
return AUDIT_ARCH_S390X;
}
-static inline bool arch_syscall_is_vdso_sigreturn(struct pt_regs *regs)
-{
- return false;
-}
-
#define SYSCALL_FMT_0
#define SYSCALL_FMT_1 , "0" (r2)
#define SYSCALL_FMT_2 , "d" (r3) SYSCALL_FMT_1
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index bdad90f..f3f8ad1 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -335,6 +335,7 @@ config X86
select SCHED_SMT if SMP
select ARCH_SUPPORTS_SCHED_CLUSTER if SMP
select ARCH_SUPPORTS_SCHED_MC if SMP
+ select ARCH_SUPPORTS_SYSCALL_USER_DISPATCH
select HAVE_SINGLE_FTRACE_DIRECT_OPS if X86_64 && DYNAMIC_FTRACE_WITH_DIRECT_CALLS
config INSTRUCTION_DECODER
© 2016 - 2026 Red Hat, Inc.