Re: [PATCH] syscall_user_dispatch: Use CONFIG_SYSCTL for sysctl guard

Joel Granados <[email protected]>
Newsgroups org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-next
Message-ID <mnqdw5ldn7xeif6xyfkf3m2stl42np47dlhqj5tt5czur6n3mt@aufccz5rwjhx>
On Thu, Aug 13, 2026 at 08:20:39AM +0200, Karl Mehltretter wrote:
> 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 <[email protected]>
> ---
> 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 */
Reviewed-by: Joel Granados <[email protected]>

This looks good to me. It still depends on sysctl-next getting upstream.
I don't see why that would not happen, but it is worth checking after
the merge window if this change is still valid.

Best

Joel
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEErkcJVyXmMSXOyyeQupfNUreWQU8FAmp+9DoACgkQupfNUreW
QU8yowv+Jm1OYEFgCoxktJufOqk0plTgQc2knGnh5cYYuLwQUV7ZEqJ19eZv50TY
H3Xx+CcMdAp7O3bv5e7aaA64fEX1LszCm+a8eRHjQJ7M/efuh4h+SbNs/b0Y82+G
zb7UF4iA90C9kHpmFC8DF5l4qkMwPwUaa2TOBIiKJklq1xwz8/PensAp/3NrIkrK
6HNPoiMHQuXmoqS7bdYDl9xKHPg2OftWi/0s3sBmwSG3ABk5iEQiJieVi55U1aIr
xzZM/wfDCzmW3X3JOoVwrzisl+OmHD+6XczXErIe6zhzEUwCR51vIyPMRG56L4sq
H9qjaOdLUq7vyTsumtBEKfbS8Gib4T2dtT9xaNKV3TMAMoAhfRFcYDgZm0zQchQE
4bX675/Gwjb2QD0jclBy8EW4wk4aW6uOody5g7YBz0XinXpUtsriM91PaD+ecABW
2rPe0GcMJkxVCz5LElbH8xJNaz/nhX8xYkn44XvaAtMyJOrlrrIxyVuJzxiAU6MY
kIICHTl3
=ubzy
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.