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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200125101130.449a8e4d@lwn.net>
Date:   Sat, 25 Jan 2020 10:11:30 -0700
From:   Jonathan Corbet <corbet@....net>
To:     "Theodore Y. Ts'o" <tytso@....edu>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jason Baron <jbaron@...mai.com>, Will Deacon <will@...nel.org>,
        linux-kernel@...r.kernel.org, kernel-team@...roid.com
Subject: Re: [PATCH v3] dynamic_debug: allow to work if debugfs is disabled

On Fri, 24 Jan 2020 20:42:31 -0500
"Theodore Y. Ts'o" <tytso@....edu> wrote:

> On Fri, Jan 24, 2020 at 08:29:40AM +0100, Greg Kroah-Hartman wrote:
> > > It's likely that people who normally use
> > > distribution kernels where debugfs is disabled will have scripts which
> > > are hard-coded to look in /proc, and then when they build a kernel
> > > with debugfs enabled, the /proc entry will go **poof**, and their
> > > script will break.  
> > 
> > **poof** they didn't test it :)
> > 
> > Seriously, I am doing this change to make it _easier_ for those people
> > who want debugfs disabled, yet want this type of debugging.  This is
> > much better than having no debugging at all.
> > 
> > Don't put extra complexity in the kernel for when it can be trivially
> > handled in userspace, you know this :)  
> 
> It's also trivial to handle this in the kernel by potentially having
> the control file appear in two places.  Consider what it would be like
> to explain this in the Linux documentation --- "the control file could
> be here, or it could be there", depending on how the kernel is
> configured.  The complexity of documenting this, and the complexity in
> userspace; and we have to have the code in the source code for the
> file to be in the appear in both places *anyway*.

FWIW, avoiding the need to document something like this has been a
motivating factor behind a number of my patches over the years.

Moving a control knob based on kernel configuration is a user-hostile
feature.  Scripts can be made to cope with this kind of behavior in one
place; if you let such things accumulate in a system, though, it gets to
the point where it's really hard for anybody to keep track of all the
pieces and be sure that their code will work.

If dynamic debug is meant to be a feature supported on all kernels, it
should, IMO, be lifted out of debugfs and made into a proper feature - with
a compatibility link left behind in debugfs for as long as it's needed, of
course.

</sermon> :)

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ