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: <20190703093233.GA4436@kroah.com>
Date:   Wed, 3 Jul 2019 11:32:33 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Mark Brown <broonie@...nel.org>, Takashi Iwai <tiwai@...e.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] debugfs: log errors when something goes wrong

On Wed, Jul 03, 2019 at 11:10:44AM +0200, Rafael J. Wysocki wrote:
> On Wed, Jul 3, 2019 at 9:17 AM Greg Kroah-Hartman
> <gregkh@...uxfoundation.org> wrote:
> >
> > As it is not recommended that debugfs calls be checked, it was pointed
> > out that major errors should still be logged somewhere so that
> > developers and users have a chance to figure out what went wrong.  To
> > help with this, error logging has been added to the debugfs core so that
> > it is not needed to be present in every individual file that calls
> > debugfs.
> >
> > Reported-by: Mark Brown <broonie@...nel.org>
> > Reported-by: Takashi Iwai <tiwai@...e.de>
> > Cc: "Rafael J. Wysocki" <rafael@...nel.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> Generally speaking
> 
> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> > ---
> >  fs/debugfs/inode.c | 25 ++++++++++++++++++++-----
> >  1 file changed, 20 insertions(+), 5 deletions(-)
> >
> > diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
> > index f04c8475d9a1..7f43c8acfcbf 100644
> > --- a/fs/debugfs/inode.c
> > +++ b/fs/debugfs/inode.c
> > @@ -2,8 +2,9 @@
> >  /*
> >   *  inode.c - part of debugfs, a tiny little debug file system
> >   *
> > - *  Copyright (C) 2004 Greg Kroah-Hartman <greg@...ah.com>
> > + *  Copyright (C) 2004,2019 Greg Kroah-Hartman <greg@...ah.com>
> >   *  Copyright (C) 2004 IBM Inc.
> > + *  Copyright (C) 2019 Linux Foundation <gregkh@...uxfoundation.org>
> >   *
> >   *  debugfs is for people to use instead of /proc or /sys.
> >   *  See ./Documentation/core-api/kernel-api.rst for more details.
> > @@ -294,8 +295,10 @@ static struct dentry *start_creating(const char *name, struct dentry *parent)
> >
> >         error = simple_pin_fs(&debug_fs_type, &debugfs_mount,
> >                               &debugfs_mount_count);
> > -       if (error)
> > +       if (error) {
> > +               pr_err("Unable to pin filesystem for file '%s'\n", name);
> 
> But I'm not sure about the log level here.  Particularly, why would
> pr_info() not work?

It could, but it is an error in that debugfs didn't do what was asked of
it.  I really don't care either way, the odds of anyone ever seeing this
message is almost none :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ