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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YFiA+2/kgOWOyWHP@kroah.com>
Date:   Mon, 22 Mar 2021 12:35:23 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Johannes Berg <johannes@...solutions.net>,
        Randy Dunlap <rdunlap@...radead.org>,
        Matthew Wilcox <willy@...radead.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Joe Perches <joe@...ches.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] devcoredump: avoid -Wempty-body warnings

On Mon, Mar 22, 2021 at 12:22:11PM +0100, Arnd Bergmann wrote:
> On Mon, Mar 22, 2021 at 11:29 AM Greg Kroah-Hartman
> <gregkh@...uxfoundation.org> wrote:
> > On Mon, Mar 22, 2021 at 11:19:53AM +0100, Arnd Bergmann wrote:
> > > From: Arnd Bergmann <arnd@...db.de>
> > > +      * These should normally not fail, but there is no problem
> > > +      * continuing without the links, so just warn instead of
> > > +      * failing.
> > > +      */
> > > +     WARN_ON_ONCE(sysfs_create_link(&devcd->devcd_dev.kobj, &dev->kobj,
> > > +                                    "failing_device"));
> > >
> > > -     if (sysfs_create_link(&dev->kobj, &devcd->devcd_dev.kobj,
> > > -                           "devcoredump"))
> > > -             /* nothing - symlink will be missing */;
> > > +     WARN_ON_ONCE(sysfs_create_link(&dev->kobj, &devcd->devcd_dev.kobj,
> > > +                                    "devcoredump"));
> >
> > We do not want to reboot machines that have panic-on-warn set,
> 
> Fair enough.
> 
> > so if this really needs a trace dump, please do that instead...
> 
> I don't think the backtrace is needed here, if it ever happens it's either
> going to be -ENOMEM or completely reproducible. I can instead
> do the cast to (void) that Linus suggested, or a simple if(...) dev_warn()
> or dev_warn_once() to have some indication of the failure.

dev_warn() should be fine I think.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ