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: <CAJ-ks9=xqXsEp1_PP82qr_WDm_OF_uW2eKQfqC5+aDapWdoJ2w@mail.gmail.com>
Date: Tue, 11 Feb 2025 11:02:59 -0500
From: Tamir Duberstein <tamird@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: David Gow <davidgow@...gle.com>, Petr Mladek <pmladek@...e.com>, 
	Steven Rostedt <rostedt@...dmis.org>, Rasmus Villemoes <linux@...musvillemoes.dk>, 
	Sergey Senozhatsky <senozhatsky@...omium.org>, Andrew Morton <akpm@...ux-foundation.org>, 
	Shuah Khan <shuah@...nel.org>, Geert Uytterhoeven <geert@...ux-m68k.org>, linux-kernel@...r.kernel.org, 
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v7 1/3] scanf: remove redundant debug logs

On Tue, Feb 11, 2025 at 10:58 AM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Tue, Feb 11, 2025 at 10:50:33AM -0500, Tamir Duberstein wrote:
> > On Tue, Feb 11, 2025 at 10:42 AM Andy Shevchenko
> > <andriy.shevchenko@...ux.intel.com> wrote:
> > > On Tue, Feb 11, 2025 at 10:13:37AM -0500, Tamir Duberstein wrote:
> > > > The test already prints the same information on failure; remove
> > > > redundant pr_debug() logs.
>
> ...
>
> > > > -     pr_debug("\"%s\", \"%s\" ->\n", str, fmt);                              \
> > >
> > > What *if* the n_args == 0 here?
> >
> > Then there's no assertion in this block, so the test cannot possibly fail here.
>
> Correct, but I'm talking about this in a scope of the removed debug print.
> I.o.w. how would we even know that this was the case?
>
> (I'm not objecting removal, what I want from you is to have a descriptive and
>  explanatory commit message that's answers to "why is this needed?" and "why is
>  it safe to do?")

The true answer to "why is this needed" is Petr requested it in
https://lore.kernel.org/all/Z6s2eqh0jkYHntUL@pathway.suse.cz/ (again,
lore is having issues):

On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek <pmladek@...e.com> wrote:
>
> [...]
>
> But when thinking more about it. I think that even pr_debug() is not
> the right solution.
>
> IMHO, we really want to print these details only when the test fails.
>
> Best Regards,
> Petr

The commit message already answers "why is it safe to do":

> The test already prints the same information on failure; remove
> redundant pr_debug() logs.

Perhaps what you're asking for is an assertion to be added if n_args
== 0? I think that would make sense. Does it belong in this series?

Tamir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ