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]
Date:   Sun, 13 Feb 2022 13:10:42 -0800
From:   Tong Zhang <ztong0001@...il.com>
To:     Ido Schimmel <idosch@...sch.org>
Cc:     Domenico Andreoli <domenico.andreoli@...ux.com>,
        Luis Chamberlain <mcgrof@...nel.org>,
        "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 <jani.nikula@...ux.intel.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>, jlbec@...lplan.org,
        john.ogness@...utronix.de,
        Joonas Lahtinen <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 Fasheh <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,
        Phillip Potter <phil@...lpotter.co.uk>,
        Paul Turner <pjt@...gle.com>, pmladek@...e.com,
        rafael@...nel.org, Rodrigo Vivi <rodrigo.vivi@...el.com>,
        rostedt@...dmis.org, senozhatsky@...omium.org, sre@...nel.org,
        steve@....org, Suren Baghdasaryan <surenb@...gle.com>,
        Linus Torvalds <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>,
        regressions@...ts.linux.dev
Subject: Re: [PATCH v2] Fix regression due to "fs: move binfmt_misc sysctl to
 its own file"

On Sun, Feb 13, 2022 at 7:34 AM Ido Schimmel <idosch@...sch.org> wrote:
>
> On Wed, Feb 09, 2022 at 08:49:20AM +0100, Domenico Andreoli wrote:
> >  fs/binfmt_misc.c |    6 +-----
> >  fs/file_table.c  |    2 ++
> >  2 files changed, 3 insertions(+), 5 deletions(-)
> >
> > Index: b/fs/binfmt_misc.c
> > ===================================================================
> > --- a/fs/binfmt_misc.c
> > +++ b/fs/binfmt_misc.c
> > @@ -817,20 +817,16 @@ static struct file_system_type bm_fs_typ
> >  };
> >  MODULE_ALIAS_FS("binfmt_misc");
> >
> > -static struct ctl_table_header *binfmt_misc_header;
> > -
> >  static int __init init_misc_binfmt(void)
> >  {
> >       int err = register_filesystem(&bm_fs_type);
> >       if (!err)
> >               insert_binfmt(&misc_format);
> > -     binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc");
> > -     return 0;
> > +     return err;
> >  }
> >
> >  static void __exit exit_misc_binfmt(void)
> >  {
> > -     unregister_sysctl_table(binfmt_misc_header);
> >       unregister_binfmt(&misc_format);
> >       unregister_filesystem(&bm_fs_type);
> >  }
> > Index: b/fs/file_table.c
> > ===================================================================
> > --- a/fs/file_table.c
> > +++ b/fs/file_table.c
> > @@ -119,6 +119,8 @@ static struct ctl_table fs_stat_sysctls[
> >  static int __init init_fs_stat_sysctls(void)
> >  {
> >       register_sysctl_init("fs", fs_stat_sysctls);
> > +     if (IS_ENABLED(CONFIG_BINFMT_MISC))
> > +             register_sysctl_mount_point("fs/binfmt_misc");
>
> Hi,
>
> kmemleak complains about this:
>
> # cat /sys/kernel/debug/kmemleak
> unreferenced object 0xffff8881045fea88 (size 96):
>   comm "swapper/0", pid 1, jiffies 4294669355 (age 167.804s)
>   hex dump (first 32 bytes):
>     e0 c8 07 88 ff ff ff ff 00 00 00 00 01 00 00 00  ................
>     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
>   backtrace:
>     [<ffffffff81d11637>] __register_sysctl_table+0x117/0x1150
>     [<ffffffff86c3600f>] init_fs_stat_sysctls+0x30/0x33
>     [<ffffffff81002558>] do_one_initcall+0x108/0x690
>     [<ffffffff86bca8bd>] kernel_init_freeable+0x45a/0x4de
>     [<ffffffff83e0757f>] kernel_init+0x1f/0x220
>     [<ffffffff810048cf>] ret_from_fork+0x1f/0x30
>
> >       return 0;
> >  }
> >  fs_initcall(init_fs_stat_sysctls);
> >

Hi Ido,
Thanks for the report. This is a known issue. The fix is proposed here.
https://lore.kernel.org/all/YgRbEG21AUrLSFKX@bombadil.infradead.org/

Thanks,
- Tong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ