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: <CAK8P3a2B4X98VMy-1E=mNX+96Dmika8Y-YdTn5E-_uWqK9JnWQ@mail.gmail.com>
Date:   Mon, 22 Mar 2021 12:22:11 +0100
From:   Arnd Bergmann <arnd@...nel.org>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.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 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.

          Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ