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: <ZGaOtM0TqmwOkdd6@bombadil.infradead.org>
Date:   Thu, 18 May 2023 13:46:44 -0700
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Joel Granados <j.granados@...sung.com>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        linux-kernel@...r.kernel.org, Iurii Zaikin <yzaikin@...gle.com>,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>,
        Christian Brauner <brauner@...nel.org>,
        linux-fsdevel@...r.kernel.org, Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH 0/2] sysctl: Remove register_sysctl_table from sources

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;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ