This series relocates sysctl tables from kern_table to their respective subsystems. It is mostly moves to core kernel subsystems but also includes mm/memory.c and 2 drivers (parisc and tty). With this series we are left with 8 ctl_tables out of the original 50 that existed within the kern_table array. With all this activity in kernel/sysctl.c, I took the liberty of removing unneeded include headers as well as outdated changelog comments.
By decentralizing sysctl registrations, subsystem maintainers regain control over their sysctl interfaces, improving maintainability and reducing the likelihood of merge conflicts. All this is made possible by the work done to reduce the ctl_table memory footprint in commit d7a76ec87195 ("sysctl: Remove check for sentinel element in ctl_table arrays"). A few comments on the process: 1. If you see that the change is good and want to push it through a tree different than sysctl, please tell me so I can remove it from this series and try to avoid conflicts in linux-next. 2. Apologies if you have received this in error. Please tell me if you want to be removed from recipient list and note that it is difficult to actually know who is interested in these "treewide" changes. Testing done by running sysctl selftests on x86_64 and 0-day. You can find the first batch here [1], if you are curious. Comments are greatly appreciated [1] https://lore.kernel.org/20250313-jag-mv_ctltables-v3-0-91f3bb434...@kernel.org To: Luis Chamberlain <mcg...@kernel.org> To: Petr Pavlu <petr.pa...@suse.com> To: Sami Tolvanen <samitolva...@google.com> To: Daniel Gomez <da.go...@samsung.com> To: Kees Cook <k...@kernel.org> To: Peter Zijlstra <pet...@infradead.org> To: Ingo Molnar <mi...@redhat.com> To: Will Deacon <w...@kernel.org> To: Boqun Feng <boqun.f...@gmail.com> To: Waiman Long <long...@redhat.com> To: Paul E. McKenney <paul...@kernel.org> To: Frederic Weisbecker <frede...@kernel.org> To: Neeraj Upadhyay <neeraj.upadh...@kernel.org> To: Joel Fernandes <j...@joelfernandes.org> To: Josh Triplett <j...@joshtriplett.org> To: Uladzislau Rezki <ure...@gmail.com> To: Steven Rostedt <rost...@goodmis.org> To: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> To: Lai Jiangshan <jiangshan...@gmail.com> To: Zqiang <qiang.zhang1...@gmail.com> To: Andrew Morton <a...@linux-foundation.org> To: James E.J. Bottomley <james.bottom...@hansenpartnership.com> To: Helge Deller <del...@gmx.de> To: Greg Kroah-Hartman <gre...@linuxfoundation.org> To: Jiri Slaby <jirisl...@kernel.org> Cc: linux-modu...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Cc: r...@vger.kernel.org Cc: linux...@kvack.org Cc: linux-par...@vger.kernel.org Cc: linux-ser...@vger.kernel.org Signed-off-by: Joel Granados <joel.grana...@kernel.org> --- Joel Granados (12): module: Move modprobe_path and modules_disabled ctl_tables into the module subsys locking/rtmutex: Move max_lock_depth into rtmutex.c rcu: Move rcu_stall related sysctls into rcu/tree_stall.h mm: move randomize_va_space into memory.c parisc/power: Move soft-power into power.c fork: mv threads-max into kernel/fork.c Input: sysrq: mv sysrq into drivers/tty/sysrq.c sysctl: Move tainted ctl_table into kernel/panic.c sysctl: move cad_pid into kernel/pid.c sysctl: Move sysctl_panic_on_stackoverflow to kernel/panic.c sysctl: Remove (very) old file changelog sysctl: Remove superfluous includes from kernel/sysctl.c drivers/parisc/power.c | 20 +++- drivers/tty/sysrq.c | 38 +++++++ include/linux/kmod.h | 1 - include/linux/panic.h | 2 - include/linux/rtmutex.h | 2 - include/linux/sysctl.h | 4 - kernel/fork.c | 20 +++- kernel/locking/rtmutex.c | 23 +++++ kernel/locking/rtmutex_api.c | 5 - kernel/module/kmod.c | 32 +++++- kernel/panic.c | 60 +++++++++++ kernel/pid.c | 32 ++++++ kernel/rcu/tree_stall.h | 33 +++++- kernel/sysctl.c | 233 ------------------------------------------- mm/memory.c | 18 ++++ 15 files changed, 271 insertions(+), 252 deletions(-) --- base-commit: 7a94ff386a4a0d9322c56c0e998dd20468d869b1 change-id: 20250509-jag-mv_ctltables_iter2-9a176a322c9d Best regards, -- Joel Granados <joel.grana...@kernel.org>