Skip to content

sysctl: first set of kernel/sysctl cleanups

Luis Chamberlain linux-fsdevel lkml 1 version Applied

Status from this message: [merged] dnotify-move-dnotify-sysctl-to-dnotifyc.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest9 patches 12 repliesApplied 9/9

Changes in v2 from the cover letter

* 0-day compile issues
* added reviewed-by tags
* enhanced commit logs
* Added patch by Stephen Kitt

Patches in v2 All 9 applied

#Subject and filesSizeRepliesApplied
1/9sysctl: add a new register_sysctl_init() interfacefs/proc/proc_sysctl.c include/linux/sysctl.h+36 -02 repliesApplied
2/9sysctl: Move some boundary constants from sysctl.c to sysctl_valsfs/proc/proc_sysctl.c include/linux/sysctl.h kernel/sysctl.c+29 -294 repliesApplied
3/9hung_task: Move hung_task sysctl interface to hung_task.cinclude/linux/sched/sysctl.h kernel/hung_task.c kernel/sysctl.c+79 -771 replyApplied
4/9watchdog: move watchdog sysctl interface to watchdog.ckernel/sysctl.c kernel/watchdog.c+101 -961 replyApplied
5/9sysctl: make ngroups_max constkernel/sysctl.c+2 -20 repliesApplied
6/9sysctl: use const for typically used max/min proc sysctlskernel/sysctl.c+26 -270 repliesApplied
7/9sysctl: use SYSCTL_ZERO to replace some static int zero useskernel/sysctl.c+7 -70 repliesApplied
8/9aio: move aio sysctl to aio.cfs/aio.c include/linux/aio.h kernel/sysctl.c+29 -231 replyApplied
9/9dnotify: move dnotify sysctl to dnotify.cfs/notify/dnotify/dnotify.c include/linux/dnotify.h kernel/sysctl.c+20 -121 replyApplied

Reviews trailers per patch

6 of 9 patches have a Reviewed-by or Acked-by.

PatchKees CookJan KaraPetr Mladek
1/9R-b
2/9R-b
3/9R-b R-b
4/9R-b R-b
5/9
6/9
7/9
8/9R-b
9/9A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/9] sysctl: first set of kernel/sysctl cleanups

Finally had time to respin the series of the work we had started last year on cleaning up the kernel/sysct.c kitchen sink. People keeps stuffing their sysctls in that file and this creates a maintenance burden. So this effort is aimed at placing sysctls where they actually belong.

I'm going to split patches up into series as there is quite a bit of work.

This first set adds register_sysctl_init() for uses of registerting a sysctl on the init path, adds const where missing to a few places, generalizes common values so to be more easy to share, and starts the move of a few kernel/sysctl.c out where they belong.

The majority of rework on v2 in this first patch set is 0-day fixes. Eric W. Biederman's feedback is later addressed in subsequent patch sets.

I'll only post the first two patch sets for now. We can address the rest once the first two patch sets get completely reviewed / Acked. Since the sysctls are all over the place I can either put up a tree to keep track of these changes and later send a pull request to Linus or we can have them trickle into Andrew's tree. Let me know what folks prefer.

Changes in v2:

* 0-day compile issues
* added reviewed-by tags
* enhanced commit logs
* Added patch by Stephen Kitt

Stephen Kitt (1):
sysctl: make ngroups_max const

Xiaoming Ni (8):
sysctl: add a new register_sysctl_init() interface
sysctl: Move some boundary constants from sysctl.c to sysctl_vals
hung_task: Move hung_task sysctl interface to hung_task.c
watchdog: move watchdog sysctl interface to watchdog.c
sysctl: use const for typically used max/min proc sysctls
sysctl: use SYSCTL_ZERO to replace some static int zero uses
aio: move aio sysctl to aio.c
dnotify: move dnotify sysctl to dnotify.c

 fs/aio.c                     |  31 +++-
 fs/notify/dnotify/dnotify.c  |  21 ++-
 fs/proc/proc_sysctl.c        |  35 ++++-
 include/linux/aio.h          |   4 -
 include/linux/dnotify.h      |   1 -
 include/linux/sched/sysctl.h |  14 +-
 include/linux/sysctl.h       |  15 +-
 kernel/hung_task.c           |  81 +++++++++-
 kernel/sysctl.c              | 285 ++++++-----------------------------
 kernel/watchdog.c            | 101 +++++++++++++
 10 files changed, 322 insertions(+), 266 deletions(-)
Signature · 1 line
2.33.0