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: <YbEQG1MrjHreKFmw@bombadil.infradead.org>
Date:   Wed, 8 Dec 2021 12:05:47 -0800
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Xiaoming Ni <nixiaoming@...wei.com>
Cc:     "Eric W. Biederman" <ebiederm@...ssion.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
        keescook@...omium.org, jlayton@...nel.org, bfields@...ldses.org,
        yzaikin@...gle.com, wangle6@...wei.com,
        Joe Perches <joe@...ches.com>
Subject: Re: [PATCH] sysctl: Add a group of macro functions to initcall the
 sysctl table of each feature

On Wed, Dec 08, 2021 at 08:34:26PM +0800, Xiaoming Ni wrote:
> On 2021/12/8 10:44, Luis Chamberlain wrote:
> > On Wed, Dec 08, 2021 at 10:10:08AM +0800, Xiaoming Ni wrote:
> > > Root node of the tree, using "early_initcall":
> > > 	Basic framework,  "fs", "kernel", "debug", "vm", "dev", "net"
> > 
> > register_sysctl_base() and yes these use early_initcall() as-is on
> > linux-next.
> > 
> > > Fork node. Select initcall_level based on the number of directory levels:
> > > 	Registration directory shared by multiple features.
> > 
> > Sure.
> > 
> /proc/sys/kernel/random/
> 	random_table
> 	driver/char/random.c
> /proc/sys/kernel/usermodehelper/
> 	usermodehelper_table
> 	kernel/umh.c
> /proc/sys/kernel/firmware_config/
> 	firmware_config_table
> 	drivers/base/firmware_loader/fallback_table.c
> /proc/sys/kernel/keys/
> 	key_sysctls
> 	security/keys/sysctl.c
> /proc/sys/fs/inotify/
> 	inotify_table
> 	fs/notify/inotify/inotify_user.c
> /proc/sys/fs/fanotify/
> 	fanotify_table
> 	fs/notify/fanotify/fanotify_user.c
> /proc/sys/fs/epoll
> 	epoll_table
> 	fs/eventpoll.c
> 
> I haven't checked all the sysctl subdirectories, but it seems that many are
> not shared by multiple features.
> Most features use the sysctl mechanism simply to create a file interface for
> configuring parameters.
> There are few scenarios for creating directories for other features.
> There may be tree fork nodes, but only a few.
> 
> 
> > > Leaf node, use "late_initcall":
> > > 	File Interface
> > 
> > I am not sure this gives enough guidance. What is the difference between
> > fork node and a leaf node?
> Leaf node:
> a) File, .child = NULL
> b) Directory, which is not shared by multiple features, .child != NULL

If we are going to use that nomenclature then we should document it as such.
Fine by me.

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ