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: <CAA5qM4BGmrkwatyO_h3F=ErDZ9t5swuttbt6NkQU-1KDGDiD4g@mail.gmail.com>
Date:   Mon, 7 Feb 2022 14:53:21 -0800
From:   Tong Zhang <ztong0001@...il.com>
To:     Luis Chamberlain <mcgrof@...nel.org>
Cc:     Domenico Andreoli <domenico.andreoli@...ux.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        David Airlie <airlied@...ux.ie>,
        Andrew Morton <akpm@...ux-foundation.org>, amir73il@...il.com,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Arnd Bergmann <arnd@...db.de>, bcrl@...ck.org,
        benh@...nel.crashing.org, clemens@...isch.de, crope@....fi,
        dgilbert@...erlog.com, Greg KH <gregkh@...uxfoundation.org>,
        jack@...e.cz, jani.nikula@...el.com, jani.nikula@...ux.intel.com,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>, jlbec@...lplan.org,
        john.ogness@...utronix.de, joonas.lahtinen@...ux.intel.com,
        Joseph Qi <joseph.qi@...ux.alibaba.com>, julia.lawall@...ia.fr,
        Kees Cook <keescook@...omium.org>, kernel@...force.de,
        Linux Memory Management List <linux-mm@...ck.org>,
        mark@...heh.com, "Martin K. Petersen" <martin.petersen@...cle.com>,
        mm-commits@...r.kernel.org, nixiaoming@...wei.com,
        penguin-kernel@...ove.sakura.ne.jp, peterz@...radead.org,
        phil@...lpotter.co.uk, pjt@...gle.com, pmladek@...e.com,
        rafael@...nel.org, rodrigo.vivi@...el.com, rostedt@...dmis.org,
        senozhatsky@...omium.org, sre@...nel.org, steve@....org,
        surenb@...gle.com, torvalds@...ux-foundation.org, tytso@....edu,
        Al Viro <viro@...iv.linux.org.uk>, wangqing@...o.com,
        Iurii Zaikin <yzaikin@...gle.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Fix regression due to "fs: move binfmt_misc sysctl to its
 own file"

On Mon, Feb 7, 2022 at 1:46 PM Luis Chamberlain <mcgrof@...nel.org> wrote:
>
> OK I think the issue here should have been that declaring this on
> fs/binfmt_misc.c creates the chicken and the egg issue, and so we
> need to do this on built-in code. Instead of your patch can you try
> this instead, it just always creates the sysctl mount always now
> so long as proc sysctl is enabled. It does not do the unregistration
> as we always want the path present as it used to be before as well.
>
> diff --git a/fs/file_table.c b/fs/file_table.c
> index 57edef16dce4..4f4739c9405c 100644
> --- a/fs/file_table.c
> +++ b/fs/file_table.c
> @@ -119,6 +119,7 @@ static struct ctl_table fs_stat_sysctls[] = {
>  static int __init init_fs_stat_sysctls(void)
>  {
>         register_sysctl_init("fs", fs_stat_sysctls);
> +       register_sysctl_mount_point("fs/binfmt_misc");
>         return 0;
>  }
>  fs_initcall(init_fs_stat_sysctls);

I'm looking at the original code, and it seems that if we don't select
CONFIG_BINFMT_MISC at all,
this file won't be created. This would suggest an IF MACRO around
> +       register_sysctl_mount_point("fs/binfmt_misc");
and it should looks like
+#if IS_ENABLED(CONFIG_BINFMT_MISC)
+       register_sysctl_mount_point("fs/binfmt_misc");
+#endif
or if you prefer original style:
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)

- Tong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ