* [PATCH] syscall_user_dispatch: Use CONFIG_SYSCTL for sysctl guard
@ 2026-08-13 6:20 Karl Mehltretter
2026-08-13 15:09 ` Oleg Nesterov
0 siblings, 1 reply; 2+ messages in thread
From: Karl Mehltretter @ 2026-08-13 6:20 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Karl Mehltretter, Gregory Price, Peter Zijlstra, Andy Lutomirski,
Kees Cook, Joel Granados, Oleg Nesterov, Jonathan Corbet,
Shuah Khan, Mark Brown, Stephen Rothwell, linux-kernel, linux-doc,
linux-next
sysctl-next removes CONFIG_PROC_SYSCTL because it mirrors CONFIG_SYSCTL.
When combined with the syscall user dispatch sysctl in linux-next, the
stale guard prevents registration of kernel.syscall_user_dispatch.
syscall_user_dispatch_allowed defaults to true. SUD therefore remains
available, but administrators cannot disable new activations.
Use CONFIG_SYSCTL for the guard and documentation.
Fixes: 5b6e32ba7b59 ("syscall_user_dispatch: Add kernel.syscall_user_dispatch sysctl")
Assisted-by: Codex:gpt-5.6-sol
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
---
The conflicting sysctl-next commit is currently:
8d75c338f0bc ("sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL")
This is a cross-tree integration fix intended for the tip tree. It has
no functional effect in tip/master, but restores the sysctl when
combined with sysctl-next.
Verified in linux-next with an x86_64 object build using
CONFIG_SYSCALL_USER_DISPATCH=y and CONFIG_SYSCTL=y.
Documentation/admin-guide/sysctl/kernel.rst | 2 +-
kernel/entry/syscall_user_dispatch.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index b6328cd0f43e9..ffea61d448ebb 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -1416,7 +1416,7 @@ Controls whether userspace may arm Syscall User Dispatch via
== ===================================================================
Only present when the kernel is built with ``CONFIG_SYSCALL_USER_DISPATCH``
-and ``CONFIG_PROC_SYSCTL``.
+and ``CONFIG_SYSCTL``.
sysctl_writes_strict
diff --git a/kernel/entry/syscall_user_dispatch.c b/kernel/entry/syscall_user_dispatch.c
index 2002c7aae4358..59c861866941d 100644
--- a/kernel/entry/syscall_user_dispatch.c
+++ b/kernel/entry/syscall_user_dispatch.c
@@ -178,7 +178,7 @@ int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long siz
(char __user *)(uintptr_t)cfg.selector);
}
-#ifdef CONFIG_PROC_SYSCTL
+#ifdef CONFIG_SYSCTL
static const struct ctl_table syscall_user_dispatch_sysctls[] = {
{
.procname = "syscall_user_dispatch",
@@ -195,4 +195,4 @@ static int __init syscall_user_dispatch_sysctl_init(void)
return 0;
}
late_initcall(syscall_user_dispatch_sysctl_init);
-#endif /* CONFIG_PROC_SYSCTL */
+#endif /* CONFIG_SYSCTL */
base-commit: 98292902c7108717c4f4bea7226520b336f9a8bc
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] syscall_user_dispatch: Use CONFIG_SYSCTL for sysctl guard
2026-08-13 6:20 [PATCH] syscall_user_dispatch: Use CONFIG_SYSCTL for sysctl guard Karl Mehltretter
@ 2026-08-13 15:09 ` Oleg Nesterov
0 siblings, 0 replies; 2+ messages in thread
From: Oleg Nesterov @ 2026-08-13 15:09 UTC (permalink / raw)
To: Karl Mehltretter
Cc: Thomas Gleixner, Gregory Price, Peter Zijlstra, Andy Lutomirski,
Kees Cook, Joel Granados, Jonathan Corbet, Shuah Khan, Mark Brown,
Stephen Rothwell, linux-kernel, linux-doc, linux-next
On 08/13, Karl Mehltretter wrote:
>
> --- a/kernel/entry/syscall_user_dispatch.c
> +++ b/kernel/entry/syscall_user_dispatch.c
> @@ -178,7 +178,7 @@ int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long siz
> (char __user *)(uintptr_t)cfg.selector);
> }
>
> -#ifdef CONFIG_PROC_SYSCTL
> +#ifdef CONFIG_SYSCTL
> static const struct ctl_table syscall_user_dispatch_sysctls[] = {
> {
> .procname = "syscall_user_dispatch",
> @@ -195,4 +195,4 @@ static int __init syscall_user_dispatch_sysctl_init(void)
> return 0;
> }
> late_initcall(syscall_user_dispatch_sysctl_init);
> -#endif /* CONFIG_PROC_SYSCTL */
> +#endif /* CONFIG_SYSCTL */
Thanks!
Acked-by: Oleg Nesterov <oleg@redhat.com>
and just in case... this change is fine even without
8d75c338f0bc ("sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL")
from sysctl-next.
Oleg.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-13 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 6:20 [PATCH] syscall_user_dispatch: Use CONFIG_SYSCTL for sysctl guard Karl Mehltretter
2026-08-13 15:09 ` Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox