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
1416 == ===================================================================1416 == ===================================================================
1417 1417
1418Only present when the kernel is built with ``CONFIG_SYSCALL_USER_DISPATCH``1418Only present when the kernel is built with ``CONFIG_SYSCALL_USER_DISPATCH``
1419and ``CONFIG_PROC_SYSCTL``.1419and ``CONFIG_SYSCTL``.
1420 1420
1421 1421
1422sysctl_writes_strict1422sysctl_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
178 (char __user *)(uintptr_t)cfg.selector);178 (char __user *)(uintptr_t)cfg.selector);
179}179}
180 180
181#ifdef CONFIG_PROC_SYSCTL181#ifdef CONFIG_SYSCTL
182static const struct ctl_table syscall_user_dispatch_sysctls[] = {182static const struct ctl_table syscall_user_dispatch_sysctls[] = {
183 {183 {
184 .procname = "syscall_user_dispatch",184 .procname = "syscall_user_dispatch",
@@ -195,4 +195,4 @@ static int __init syscall_user_dispatch_sysctl_init(void) · 10 unmodified lines
195 return 0;195 return 0;
196}196}
197late_initcall(syscall_user_dispatch_sysctl_init);197late_initcall(syscall_user_dispatch_sysctl_init);
198#endif /* CONFIG_PROC_SYSCTL */198#endif /* CONFIG_SYSCTL */