History

syscall_user_dispatch: Use CONFIG_SYSCTL for sysctl guard

Commit 8d75c338f0bc ("sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL") removed CONFIG_PROC_SYSCTL, but the sysctl added by commit 5b6e32ba7b59 ("syscall_user_dispatch: Add kernel.syscall_user_dispatch sysctl") is still guarded by it. Now that both commits are merged, kernel.syscall_user_dispatch is no longer registered. 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.

Karl Mehltretter committed 2 months ago

Commit 353a95f1 parent df290802 files · +3 −3Browse files

Unified · Split

2 files
  1. Documentation/admin-guide/sysctl/kernel.rst +1 −1
  2. kernel/entry/syscall_user_dispatch.c +2 −2
Documentation/admin-guide/sysctl/kernel.rst+1−1
@@ -1416,7 +1416,7 @@ Controls whether userspace may arm Syscall User Dispatch via · 1415 unmodified lines
14161416 == ===================================================================
14171417
14181418 Only present when the kernel is built with ``CONFIG_SYSCALL_USER_DISPATCH``
1419−and ``CONFIG_PROC_SYSCTL``.
1419+and ``CONFIG_SYSCTL``.
14201420
14211421
14221422 sysctl_writes_strict
kernel/entry/syscall_user_dispatch.c+2−2
@@ -178,7 +178,7 @@ int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long siz · 177 unmodified lines
178178 (char __user *)(uintptr_t)cfg.selector);
179179 }
180180
181−#ifdef CONFIG_PROC_SYSCTL
181+#ifdef CONFIG_SYSCTL
182182 static const struct ctl_table syscall_user_dispatch_sysctls[] = {
183183 {
184184 .procname = "syscall_user_dispatch",
@@ -195,4 +195,4 @@ static int __init syscall_user_dispatch_sysctl_init(void) · 10 unmodified lines
195195 return 0;
196196 }
197197 late_initcall(syscall_user_dispatch_sysctl_init);
198−#endif /* CONFIG_PROC_SYSCTL */
198+#endif /* CONFIG_SYSCTL */