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: <20220128120421.kzo5iduigr7k55bs@quack3.lan>
Date:   Fri, 28 Jan 2022 13:04:21 +0100
From:   Jan Kara <jack@...e.cz>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     kernel test robot <oliver.sang@...el.com>,
        Luis Chamberlain <mcgrof@...nel.org>, Jan Kara <jack@...e.cz>,
        Al Viro <viro@...iv.linux.org.uk>,
        Amir Goldstein <amir73il@...il.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Antti Palosaari <crope@....fi>, Arnd Bergmann <arnd@...db.de>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Benjamin LaHaise <bcrl@...ck.org>,
        Clemens Ladisch <clemens@...isch.de>,
        David Airlie <airlied@...ux.ie>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joel Becker <jlbec@...lplan.org>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Joseph Qi <joseph.qi@...ux.alibaba.com>,
        Julia Lawall <julia.lawall@...ia.fr>,
        Kees Cook <keescook@...omium.org>,
        Lukas Middendorf <kernel@...force.de>,
        Mark Fasheh <mark@...heh.com>, Paul Turner <pjt@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Petr Mladek <pmladek@...e.com>,
        Phillip Potter <phil@...lpotter.co.uk>,
        Qing Wang <wangqing@...o.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Sebastian Reichel <sre@...nel.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        Stephen Kitt <steve@....org>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Xiaoming Ni <nixiaoming@...wei.com>,
        Douglas Gilbert <dgilbert@...erlog.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Jani Nikula <jani.nikula@...el.com>,
        John Ogness <john.ogness@...utronix.de>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Theodore Ts'o <tytso@....edu>,
        Andrew Morton <akpm@...ux-foundation.org>,
        LKML <linux-kernel@...r.kernel.org>, lkp@...ts.01.org,
        kernel test robot <lkp@...el.com>
Subject: Re: [ocfs2] c42ff46f97: sysctl_table_check_failed

On Fri 28-01-22 10:00:29, Linus Torvalds wrote:
> On Fri, Jan 28, 2022 at 8:53 AM kernel test robot <oliver.sang@...el.com> wrote:
> >
> > commit: 46e33fd45a52bf03769906e64d8a8a1ab317777d ("ocfs2: simplify subdirectory
> > registration with register_sysctl()")
> 
> Well, it's apparently commit c42ff46f97c1 ("ocfs2: simplify
> subdirectory registration with register_sysctl()") in mainline now.
> 
> What worries me a bit is that the commit was auto-generated, and when
> reading the commit message it reads as if it wasn't supposed to cause
> any semantic changes at all.
> 
> Is the cause of this that 'nm' is supposed to be a directory, and
> register_sysctl() doesn't handle directories?
> 
> I don't know this code at all, should it have been simplified even
> further with something (TOTALLY UNTESTED) like the attached?

Yep, I've tested the patch and it fixes the failure for me. Feel free to
add:

Tested-by: Jan Kara <jack@...e.cz>

Also the change makes sense to me as far as I'm reading register_sysctl()
so you can also add:

Reviewed-by: Jan Kara <jack@...e.cz>



								Honza

> diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
> index 731558a6f27d..dd77b7aaabf5 100644
> --- a/fs/ocfs2/stackglue.c
> +++ b/fs/ocfs2/stackglue.c
> @@ -661,17 +661,6 @@ static struct ctl_table ocfs2_nm_table[] = {
>  	{ }
>  };
>  
> -static struct ctl_table ocfs2_mod_table[] = {
> -	{
> -		.procname	= "nm",
> -		.data		= NULL,
> -		.maxlen		= 0,
> -		.mode		= 0555,
> -		.child		= ocfs2_nm_table
> -	},
> -	{ }
> -};
> -
>  static struct ctl_table_header *ocfs2_table_header;
>  
>  /*
> @@ -682,7 +671,7 @@ static int __init ocfs2_stack_glue_init(void)
>  {
>  	strcpy(cluster_stack_name, OCFS2_STACK_PLUGIN_O2CB);
>  
> -	ocfs2_table_header = register_sysctl("fs/ocfs2", ocfs2_mod_table);
> +	ocfs2_table_header = register_sysctl("fs/ocfs2/nm", ocfs2_nm_table);
>  	if (!ocfs2_table_header) {
>  		printk(KERN_ERR
>  		       "ocfs2 stack glue: unable to register sysctl\n");

-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ