[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190611185656.GB4659@kroah.com>
Date: Tue, 11 Jun 2019 20:56:56 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Kees Cook <keescook@...omium.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lkdtm: no need to check return value of debugfs_create
functions
On Tue, Jun 11, 2019 at 11:44:53AM -0700, Kees Cook wrote:
> On Tue, Jun 11, 2019 at 08:32:13PM +0200, Greg Kroah-Hartman wrote:
> > When calling debugfs functions, there is no need to ever check the
> > return value. The function can work or not, but the code logic should
> > never do something different based on this.
>
> What is the user-visible feedback when, say, debugfs_create_file()
> fails?
All of the memory in your system is now gone and it would have long
locked up a while before this call ever happened :)
And no user functionality should ever change if a debugfs call fails, or
succeeds, this is debugging only.
> And what happens when debugfs_create_file() passes in a NULL root?
The file ends up in the root of debugfs. But as this can only happen if
the system is dead, I wouldn't worry about it.
thanks,
greg k-h
Powered by blists - more mailing lists