From: Luis Chamberlain <mcgrof@kernel.org>
To: Joel Granados <j.granados@samsung.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org, Iurii Zaikin <yzaikin@google.com>,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
Christian Brauner <brauner@kernel.org>,
linux-fsdevel@vger.kernel.org, Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH 0/2] sysctl: Remove register_sysctl_table from sources
Date: Thu, 18 May 2023 13:46:44 -0700 [thread overview]
Message-ID: <ZGaOtM0TqmwOkdd6@bombadil.infradead.org> (raw)
In-Reply-To: <20230518160705.3888592-1-j.granados@samsung.com>
On Thu, May 18, 2023 at 06:07:03PM +0200, Joel Granados wrote:
> This is part of the general push to deprecate register_sysctl_paths and
> register_sysctl_table. This patchset completely removes register_sysctl_table
> and replaces it with register_sysctl effectively transitioning 5 base paths
> ("kernel", "vm", "fs", "dev" and "debug") to the new call. Besides removing the
> actuall function, I also removed it from the checks done in check-sysctl-docs.
>
> Testing for this change was done in the same way as with previous sysctl
> replacement patches: I made sure that the result of `find /proc/sys/ | sha1sum`
> was the same before and after the patchset.
>
> Have pushed this through 0-day. Waiting on results..
>
> Feedback greatly appreciated.
Thanks so much! I merged this to sysctl-testing as build tests are ongoing. But
I incorporated these minor changes to your first patch as register_sysctl_init()
is more obvious about when we cannot care about the return value.
If the build tests come through I'll push to sysctl-next.
diff --git a/fs/sysctls.c b/fs/sysctls.c
index 228420f5fe1b..76a0aee8c229 100644
--- a/fs/sysctls.c
+++ b/fs/sysctls.c
@@ -31,11 +31,7 @@ static struct ctl_table fs_shared_sysctls[] = {
static int __init init_fs_sysctls(void)
{
- /*
- * We do not check the return code for register_sysctl because the
- * original call to register_sysctl_base always returned 0.
- */
- register_sysctl("fs", fs_shared_sysctls);
+ register_sysctl_init("fs", fs_shared_sysctls);
return 0;
}
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index f784b0fe5689..fa2aa8bd32b6 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2350,10 +2350,10 @@ static struct ctl_table dev_table[] = {
int __init sysctl_init_bases(void)
{
- register_sysctl("kernel", kern_table);
- register_sysctl("vm", vm_table);
- register_sysctl("debug", debug_table);
- register_sysctl("dev", dev_table);
+ register_sysctl_init("kernel", kern_table);
+ register_sysctl_init("vm", vm_table);
+ register_sysctl_init("debug", debug_table);
+ register_sysctl_init("dev", dev_table);
return 0;
}
next prev parent reply other threads:[~2023-05-18 20:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230518160715eucas1p174602d770f0d46e0294b7dba8d6d36dc@eucas1p1.samsung.com>
2023-05-18 16:07 ` [PATCH 0/2] sysctl: Remove register_sysctl_table from sources Joel Granados
[not found] ` <CGME20230518160715eucas1p1973b53732f9b05aabbef2669124eb413@eucas1p1.samsung.com>
2023-05-18 16:07 ` [PATCH 1/2] sysctl: Refactor base paths registrations Joel Granados
2023-05-24 13:29 ` Guenter Roeck
2023-05-24 17:55 ` Luis Chamberlain
[not found] ` <CGME20230518160715eucas1p200672f3771528c6f648704d1c92b578a@eucas1p2.samsung.com>
2023-05-18 16:07 ` [PATCH 2/2] sysctl: Remove register_sysctl_table Joel Granados
2023-05-18 20:46 ` Luis Chamberlain [this message]
2023-05-19 0:26 ` [PATCH 0/2] sysctl: Remove register_sysctl_table from sources Luis Chamberlain
2023-05-22 6:34 ` Joel Granados
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZGaOtM0TqmwOkdd6@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=brauner@kernel.org \
--cc=j.granados@samsung.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).