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]
Date:   Mon, 27 Jan 2020 14:19:34 -0800
From:   Saravana Kannan <saravanak@...gle.com>
To:     Jonathan Corbet <corbet@....net>
Cc:     "Theodore Y. Ts'o" <tytso@....edu>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jason Baron <jbaron@...mai.com>, Will Deacon <will@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Android Kernel Team <kernel-team@...roid.com>
Subject: Re: [PATCH v3] dynamic_debug: allow to work if debugfs is disabled

On Sat, Jan 25, 2020 at 9:11 AM Jonathan Corbet <corbet@....net> wrote:
>
> 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> :)

My 2 cents -- agree with what Ted and Jon have said.

-Saravana

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ