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: <CAMRc=Me++Z8DscUqPa6X0a+s6hoO5DR+WLDgDFjUxKZ2cDTVwQ@mail.gmail.com>
Date:   Wed, 23 Mar 2022 16:11:50 +0100
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Brian Norris <briannorris@...omium.org>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Jianqun Xu <jay.xu@...k-chips.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: Drop CONFIG_DEBUG_GPIO

On Tue, Mar 22, 2022 at 5:31 PM Brian Norris <briannorris@...omium.org> wrote:
>
> On Tue, Mar 22, 2022 at 8:00 AM Andy Shevchenko
> <andy.shevchenko@...il.com> wrote:
> > On Tue, Mar 22, 2022 at 4:49 PM Bartosz Golaszewski <brgl@...ev.pl> wrote:
> > > On Tue, Mar 22, 2022 at 3:38 PM Andy Shevchenko
> > > <andy.shevchenko@...il.com> wrote:
> > > > On Fri, Mar 11, 2022 at 4:55 AM Brian Norris <briannorris@...omium.org> wrote:
> > > >
> > > > ...
> > > >
> > > > > Description: it says nothing about enabling extra printk()s. But -DDEBUG
> > > > > does just that; it turns on every dev_dbg()/pr_debug() that would
> > > > > otherwise be silent.
> > > >
> > > > Which is what some and I are using a lot during development.
>
> Well, we could fix that part by updating the documentation, so users
> know what they're getting themselves into.
>
> I'm also curious: does dynamic debug not suit you?
> https://www.kernel.org/doc/html/v4.19/admin-guide/dynamic-debug-howto.html
> TBH, I never remember its syntax, and it seems very easy to get wrong,
> so I often throw in #define's myself, if I want it foolproof. But I'm
> curious others thoughts too.
>
> > > AFAIK this: https://www.kernel.org/doc/local/pr_debug.txt is the right
> > > way to do it?
> >
> > Yes. But it means we need to have a separate option on a per driver
> > (or group of drivers) basis. I don't think it's a good idea right now.
>
> I'm not sure I understand this thought; isn't this the opposite of
> what you're arguing above? (That drivers/gpio/ deserves its own
> Kconfig option for enabling (non-dynamic) debug prints?)
>
> > > https://www.kernel.org/doc/local/pr_debug.txt
> > >
> > > This doesn't mention adding Kconfig options just to enable debug messages.
> > >
> > > > ...
> > > >
> > > > > -ccflags-$(CONFIG_DEBUG_GPIO)   += -DDEBUG
> > > > > -
> > > >
> > > > NAK to this change.
> > > >
> > > > I'm not against enabling might_sleep() unconditionally.
> > > >
> > >
> > > These are already controlled by CONFIG_DEBUG_ATOMIC_SLEEP, no? Or
> > > maybe I can't parse that double negation.
> >
> > The part of the patch that converts might_sleep_if():s is fine with me.
>
> I'm fine with that approach (keep CONFIG_DEBUG_GPIO *only* as a
> print-verbosity/DDEBUG control), even if I think it's a bit odd. My
> main point in the patch is differentiating debug checks (that I want;
> that are silent-by-default; that have their own Kconfig knobs) from
> debug prints (that are noisy by default; that I don't want). So if you
> convince Bartosz and/or Linus, you can get an Ack from me for a
> partial revert.
>
> Regards,
> Brian

I'm about to send my PR for v5.18 so I'll remove this one from my
for-next branch as it's not urgent. Let's discuss it during the next
cycle.

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ