Re: [PATCH v5] kernel/time: move timer sysctls to its own file

From: Luis Chamberlain
Date: Wed Feb 02 2022 - 20:18:15 EST


On Thu, Feb 03, 2022 at 01:21:46AM +0100, Thomas Gleixner wrote:
> In other words, invite everyone to add random sysctls as they see fit
> w/o a central review authority.

Everyone already can do that already. We can't stop that.

> That's not an improvement at all. Quite
> the contrary.

The idea is to move them to the respective subsystem / driver.

To be clear the argument put forwards to move sysctls out of one file
was not started by tangmeng but by me and that work is already mostly
merged for at least all the fs stuff. The rest of the patches coming
through is help to move the other stuff to other areas.

The truth is kernel/sysctl.c as of the last 2 kernel releases before
*was* huge and it can lead to tons of conflicts when doing merges.
This makes it hard to maintain and even review changes.

*Today* all filesystem syctls now get reviewed by fs folks. They are
all tidied up there.

In the future x86 folks can review their sysctls. But for no reason
should I have to review every single knob. That's not scalable.

> That aside, I'm tired of this because this is now at V5 and you still
> failed to fix the fallout reported by the 0-day infrastructure vs. this
> part of the patch:
>
> > +static int __init timer_sysctl_init(void)
> > +{
> > + register_sysctl_init("kernel", timer_sysctl);
> > + return 0;
> > +}
>
> kernel/time/timer.c: In function 'timer_sysctl_init':
> >> kernel/time/timer.c:284:9: error: implicit declaration of function 'register_sysctl_init'; did you mean 'timer_sysctl_init'? [-Werror=implicit-function-declaration]
> 284 | register_sysctl_init("kernel", timer_sysctl);
> | ^~~~~~~~~~~~~~~~~~~~
>

That's an issue with the patch being tested on a tree where that
routine is not present?

Luis