lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200513141421.GP11244@42.do-not-panic.com>
Date:   Wed, 13 May 2020 14:14:22 +0000
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     "Eric W. Biederman" <ebiederm@...ssion.com>,
        Al Viro <viro@...IV.linux.org.uk>,
        Kees Cook <keescook@...omium.org>
Cc:     Xiaoming Ni <nixiaoming@...wei.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Helge Deller <deller@....de>,
        Parisc List <linux-parisc@...r.kernel.org>, yzaikin@...gle.com,
        linux-fsdevel@...r.kernel.org,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>
Subject: Re: linux-next: manual merge of the vfs tree with the parisc-hd tree

On Wed, May 13, 2020 at 08:42:30AM -0500, Eric W. Biederman wrote:
> Luis Chamberlain <mcgrof@...nel.org> writes:
> 
> > On Tue, May 12, 2020 at 12:40:55PM -0500, Eric W. Biederman wrote:
> >> Luis Chamberlain <mcgrof@...nel.org> writes:
> >> 
> >> > On Tue, May 12, 2020 at 06:52:35AM -0500, Eric W. Biederman wrote:
> >> >> Luis Chamberlain <mcgrof@...nel.org> writes:
> >> >> 
> >> >> > +static struct ctl_table fs_base_table[] = {
> >> >> > +	{
> >> >> > +		.procname	= "fs",
> >> >> > +		.mode		= 0555,
> >> >> > +		.child		= fs_table,
> >> >> > +	},
> >> >> > +	{ }
> >> >> > +};
> >> >>   ^^^^^^^^^^^^^^^^^^^^^^^^ You don't need this at all.
> >> >> > > +static int __init fs_procsys_init(void)
> >> >> > +{
> >> >> > +	struct ctl_table_header *hdr;
> >> >> > +
> >> >> > +	hdr = register_sysctl_table(fs_base_table);
> >> >>               ^^^^^^^^^^^^^^^^^^^^^ Please use register_sysctl instead.
> >> >> 	AKA
> >> >>         hdr = register_sysctl("fs", fs_table);
> >> >
> >> > Ah, much cleaner thanks!
> >> 
> >> It is my hope you we can get rid of register_sysctl_table one of these
> >> days.  It was the original interface but today it is just a
> >> compatibility wrapper.
> >> 
> >> I unfortunately ran out of steam last time before I finished converting
> >> everything over.
> >
> > Let's give it one more go. I'll start with the fs stuff.
> 
> Just to be clear moving the tables out of kernel/sysctl.c is a related
> but slightly different problem.

Sure, but also before we go on this crusade, how about we add a few
helpers:

register_sysctl_kernel()
register_sysctl_vm()
register_sysctl_fs()
register_sysctl_debug()
register_sysctl_dev()

That should make it easier to look for these, and shorter. We *know*
this is a common path, given the size of the existing table.

> Today it looks like there are 35 calls of register_sysctl_table
> and 9 calls of register_sysctl_paths.
> 
> Among them is lib/sysctl_test.c and check-sysctl-docs.
> 
> Meanwhile I can only find 5 calls to register_sysctl in the tree
> so it looks like I didn't get very far converting things over.

While we're on the spring cleaning topic, I've tried to put what I can
think of for TODO items here, anything else? Feel free to edit, its a
wiki after all.

https://kernelnewbies.org/KernelProjects/proc

Feel free to add wishlist items.

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ