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=Bf42eojROr1X+BnmeQLa=zF7EAr4Y3n2exwZXum+rbQ@mail.gmail.com>
Date: Tue, 11 Feb 2025 10:50:33 -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: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.
>
> ...
>
> >  #define _check_numbers_template(arg_fmt, expect, str, fmt, n_args, ap)               \
> >  do {                                                                         \
> > -     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.

> >       for (; n_args > 0; n_args--, expect++) {                                \
> >               typeof(*expect) got = *va_arg(ap, typeof(expect));              \
> > -             pr_debug("\t" arg_fmt "\n", got);                               \
> >               if (got != *expect) {                                           \
> >                       pr_warn("vsscanf(\"%s\", \"%s\", ...) expected " arg_fmt " got " arg_fmt "\n", \
> >                               str, fmt, *expect, got);                        \
> > @@ -689,7 +687,6 @@ do {                                                                              \
> >       total_tests++;                                                          \
> >       len = snprintf(test_buffer, BUF_SIZE, gen_fmt, expect);                 \
> >       got = (fn)(test_buffer, &endp, base);                                   \
> > -     pr_debug(#fn "(\"%s\", %d) -> " gen_fmt "\n", test_buffer, base, got);  \
> >       if (got != (expect)) {                                                  \
> >               fail = true;                                                    \
> >               pr_warn(#fn "(\"%s\", %d): got " gen_fmt " expected " gen_fmt "\n", \
>
> --
> With Best Regards,
> Andy Shevchenko
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ