linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] sysctl: Move jiffies converters out of kernel/sysctl.c
@ 2025-10-17  8:32 Joel Granados
  2025-10-17  8:32 ` [PATCH 1/7] sysctl: Allow custom converters from outside sysctl Joel Granados
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Joel Granados @ 2025-10-17  8:32 UTC (permalink / raw)
  To: Kees Cook, Alexander Viro, Christian Brauner, Jan Kara
  Cc: linux-kernel, linux-fsdevel, Joel Granados

Move the jiffies converters into kernel/time/jiffies.c and replace the
pipe-max-size proc_handler converter with a macro based version. This is
all part of the effort to relocate non-sysctl logic out of
kernel/sysctl.c into more relevant subsystems. And is based on the
preparation series in [1].

What was done?
==============

* Moved converter macros (SYSCTL_USER_TO_KERN{,_INT_CONV,UINT_CONV},
  SYSCTL_KERN_TO_USER{,INT_CONV} & SYSCTL_{,U}INT_CONV_CUSTOM) to
  sysctl.h so they can be used in jiffies.c and pipe.c.

* Moved jiffie converters (proc_dointvec_ms_jiffies{,_minmax},
  proc_dointvec{_,_userhz_}jiffies & proc_doulongvec_ms_jiffies_minmax)
  to kernel/time/jiffies.c.

* Replaced do_proc_dopipe_max_size_conv in fs/pipe.c with a macro
  version; no functional changes intended.

Why it is done?
===============

Motivation is to move non-sysctl logic out of kernel/sysctl.c which had
become a dumping ground for ctl_tables until this trend was changed by
the commits leading to (and including) 73184c8e4ff4 ("sysctl: rename
kern_table -> sysctl_subsys_table"). Same motivation as in [1].

Testing
=======

Tested by running sysctl kunit tests and selftests on x86_64 architecture
to ensure no functional regressions.

Comments are greatly appreciated

Best

[1] https://lore.kernel.org/20251016-jag-sysctl_conv-v2-0-a2f16529acc4@kernel.org

Signed-off-by: Joel Granados <joel.granados@kernel.org>
---
Joel Granados (7):
      sysctl: Allow custom converters from outside sysctl
      sysctl: Move INT converter macros to sysctl header
      sysctl: Move UINT converter macros to sysctl header
      sysctl: Move jiffies converters to kernel/time/jiffies.c
      sysctl: Move proc_doulongvec_ms_jiffies_minmax to kernel/time/jiffies.c
      sysctl: Create pipe-max-size converter using sysctl UINT macros
      sysctl: Wrap do_proc_douintvec with the public function proc_douintvec_conv

 fs/pipe.c               |  28 ++---
 include/linux/jiffies.h |  11 ++
 include/linux/sysctl.h  | 145 +++++++++++++++++++---
 kernel/sysctl.c         | 312 +++++++-----------------------------------------
 kernel/time/jiffies.c   | 125 +++++++++++++++++++
 5 files changed, 314 insertions(+), 307 deletions(-)
---
base-commit: 130e5390ba572bffa687f32ed212dac1105b654a
change-id: 20251014-jag-sysctl_jiffies-7f0145ef9b56

Best regards,
-- 
Joel Granados <joel.granados@kernel.org>



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-10-27 10:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17  8:32 [PATCH 0/7] sysctl: Move jiffies converters out of kernel/sysctl.c Joel Granados
2025-10-17  8:32 ` [PATCH 1/7] sysctl: Allow custom converters from outside sysctl Joel Granados
2025-10-17  8:32 ` [PATCH 2/7] sysctl: Move INT converter macros to sysctl header Joel Granados
2025-10-17  8:32 ` [PATCH 3/7] sysctl: Move UINT " Joel Granados
2025-10-17  8:32 ` [PATCH 4/7] sysctl: Move jiffies converters to kernel/time/jiffies.c Joel Granados
2025-10-17  8:32 ` [PATCH 5/7] sysctl: Move proc_doulongvec_ms_jiffies_minmax " Joel Granados
2025-10-17  8:32 ` [PATCH 6/7] sysctl: Create pipe-max-size converter using sysctl UINT macros Joel Granados
2025-10-17  8:32 ` [PATCH 7/7] sysctl: Wrap do_proc_douintvec with the public function proc_douintvec_conv Joel Granados
2025-10-22  9:18   ` kernel test robot
2025-10-27 10:14     ` Joel Granados

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).