1. 08 Jun, 2023 1 commit
    • Luis Chamberlain's avatar
      sysctl: move umh sysctl registration to its own file · 861dc0b4
      Luis Chamberlain authored
      Move the umh sysctl registration to its own file, the array is
      already there. We do this to remove the clutter out of kernel/sysctl.c
      to avoid merge conflicts.
      
      This also lets the sysctls not be built at all now when CONFIG_SYSCTL
      is not enabled.
      
      This has a small penalty of 23 bytes but soon we'll be removing
      all the empty entries on sysctl arrays so just do this cleanup
      now:
      
      ./scripts/bloat-o-meter vmlinux.base vmlinux.1
      add/remove: 2/0 grow/shrink: 0/1 up/down: 49/-26 (23)
      Function                                     old     new   delta
      init_umh_sysctls                               -      33     +33
      __pfx_init_umh_sysctls                         -      16     +16
      sysctl_init_bases                            111      85     -26
      Total: Before=21256914, After=21256937, chg +0.00%
      Acked-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      861dc0b4
  2. 30 May, 2023 2 commits
    • Luis Chamberlain's avatar
      signal: move show_unhandled_signals sysctl to its own file · 01e6aac7
      Luis Chamberlain authored
      The show_unhandled_signals sysctl is the only sysctl for debug
      left on kernel/sysctl.c. We've been moving the syctls out from
      kernel/sysctl.c so to help avoid merge conflicts as the shared
      array gets out of hand.
      
      This change incurs simplifies sysctl registration by localizing
      it where it should go for a penalty in size of increasing the
      kernel by 23 bytes, we accept this given recent cleanups have
      actually already saved us 1465 bytes in the prior commits.
      
      ./scripts/bloat-o-meter vmlinux.3-remove-dev-table vmlinux.4-remove-debug-table
      add/remove: 3/1 grow/shrink: 0/1 up/down: 177/-154 (23)
      Function                                     old     new   delta
      signal_debug_table                             -     128    +128
      init_signal_sysctls                            -      33     +33
      __pfx_init_signal_sysctls                      -      16     +16
      sysctl_init_bases                             85      59     -26
      debug_table                                  128       -    -128
      Total: Before=21256967, After=21256990, chg +0.00%
      Reviewed-by: default avatarJoel Granados <j.granados@samsung.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      01e6aac7
    • Luis Chamberlain's avatar
      sysctl: remove empty dev table · 996ef312
      Luis Chamberlain authored
      Now that all the dev sysctls have been moved out we can remove the
      dev sysctl base directory. We don't need to create base directories,
      they are created for you as if using 'mkdir -p' with register_syctl()
      and register_sysctl_init(). For details refer to sysctl_mkdir_p()
      usage.
      
      We save 90 bytes with this changes:
      
      ./scripts/bloat-o-meter vmlinux.2.remove-sysctl-table vmlinux.3-remove-dev-table
      add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-90 (-90)
      Function                                     old     new   delta
      sysctl_init_bases                            111      85     -26
      dev_table                                     64       -     -64
      Total: Before=21257057, After=21256967, chg -0.00%
      
      The empty dev table has been in place since the v2.5.0 days because
      back then ordering was essentialy. But later commit 7ec66d06
      ("sysctl: Stop requiring explicit management of sysctl directories"),
      merged as of v3.4-rc1, the entire ordering of directories was replaced
      by allowing sysctl directory autogeneration. This new mechanism
      introduced on v3.4 allows for sysctl directories to automatically be
      created for sysctl tables when they are needed and automatically removes
      them when no sysctl tables use them. That commit also added a dedicated
      struct ctl_dir as a new type for these autogenerated directories.
      Reviewed-by: default avatarJoel Granados <j.granados@samsung.com>
      Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
      996ef312
  3. 24 May, 2023 8 commits
  4. 14 May, 2023 13 commits
  5. 13 May, 2023 16 commits