]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sysctl: rename kern_table -> sysctl_subsys_table
authorJoel Granados <joel.granados@kernel.org>
Fri, 27 Jun 2025 08:12:40 +0000 (10:12 +0200)
committerJoel Granados <joel.granados@kernel.org>
Wed, 23 Jul 2025 09:56:02 +0000 (11:56 +0200)
Renamed sysctl table from kern_table to sysctl_subsys_table and grouped
the two arch specific ctls to the end of the array.

This is part of a greater effort to move ctl tables into their
respective subsystems which will reduce the merge conflicts in
kernel/sysctl.c.

Signed-off-by: Joel Granados <joel.granados@kernel.org>
kernel/sys.c
kernel/sysctl.c

index bbeee62f9abcdf18cdf5cdb06271476b048357ae..18a037cc6f61a339f1f21af9c26b25ecca1ae43c 100644 (file)
@@ -210,7 +210,6 @@ static int __init init_overflow_sysctl(void)
 
 postcore_initcall(init_overflow_sysctl);
 
-
 /*
  * Returns true if current's euid is same as p's uid or euid,
  * or has CAP_SYS_NICE to p's user_ns.
index 21b70443aea75ae3212f70e5ce7efbfdf8a4f75b..cb6196e3fa993daa21704d190baf366084e014f7 100644 (file)
@@ -1454,7 +1454,7 @@ int proc_do_static_key(const struct ctl_table *table, int write,
        return ret;
 }
 
-static const struct ctl_table kern_table[] = {
+static const struct ctl_table sysctl_subsys_table[] = {
 #ifdef CONFIG_PROC_SYSCTL
        {
                .procname       = "sysctl_writes_strict",
@@ -1465,15 +1465,6 @@ static const struct ctl_table kern_table[] = {
                .extra1         = SYSCTL_NEG_ONE,
                .extra2         = SYSCTL_ONE,
        },
-#endif
-#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
-       {
-               .procname       = "unaligned-trap",
-               .data           = &unaligned_enabled,
-               .maxlen         = sizeof (int),
-               .mode           = 0644,
-               .proc_handler   = proc_dointvec,
-       },
 #endif
        {
                .procname       = "ngroups_max",
@@ -1489,6 +1480,15 @@ static const struct ctl_table kern_table[] = {
                .mode           = 0444,
                .proc_handler   = proc_dointvec,
        },
+#ifdef CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW
+       {
+               .procname       = "unaligned-trap",
+               .data           = &unaligned_enabled,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec,
+       },
+#endif
 #ifdef CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN
        {
                .procname       = "ignore-unaligned-usertrap",
@@ -1502,7 +1502,7 @@ static const struct ctl_table kern_table[] = {
 
 int __init sysctl_init_bases(void)
 {
-       register_sysctl_init("kernel", kern_table);
+       register_sysctl_init("kernel", sysctl_subsys_table);
 
        return 0;
 }