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: <20210421145302.GS975577@paulmck-ThinkPad-P17-Gen-1>
Date:   Wed, 21 Apr 2021 07:53:02 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Marco Elver <elver@...gle.com>
Cc:     Arnd Bergmann <arnd@...nel.org>, David Gow <davidgow@...gle.com>,
        Arnd Bergmann <arnd@...db.de>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        kasan-dev <kasan-dev@...glegroups.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] kcsan: fix printk format string

On Wed, Apr 21, 2021 at 03:59:40PM +0200, Marco Elver wrote:
> On Wed, 21 Apr 2021 at 15:51, Arnd Bergmann <arnd@...nel.org> wrote:
> > From: Arnd Bergmann <arnd@...db.de>
> >
> > Printing a 'long' variable using the '%d' format string is wrong
> > and causes a warning from gcc:
> >
> > kernel/kcsan/kcsan_test.c: In function 'nthreads_gen_params':
> > include/linux/kern_levels.h:5:25: error: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Werror=format=]
> >
> > Use the appropriate format modifier.
> >
> > Fixes: f6a149140321 ("kcsan: Switch to KUNIT_CASE_PARAM for parameterized tests")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> 
> Reviewed-by: Marco Elver <elver@...gle.com>
> 
> Thank you!
> 
> Normally KCSAN patches go through -rcu, but perhaps in this instance
> it should be picked up into -tip/locking/core directly, so it goes out
> with "kcsan: Switch to KUNIT_CASE_PARAM for parameterized tests".
> Paul, Ingo, do you have a preference?

I am good either way.  I have queued it for the moment, but will remove
it if Ingo takes it.

Acked-by: Paul E. McKenney <paulmck@...nel.org>

> Thanks,
> -- Marco
> 
> > ---
> >  kernel/kcsan/kcsan_test.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c
> > index 9247009295b5..a29e9b1a30c8 100644
> > --- a/kernel/kcsan/kcsan_test.c
> > +++ b/kernel/kcsan/kcsan_test.c
> > @@ -981,7 +981,7 @@ static const void *nthreads_gen_params(const void *prev, char *desc)
> >                 const long min_required_cpus = 2 + min_unused_cpus;
> >
> >                 if (num_online_cpus() < min_required_cpus) {
> > -                       pr_err_once("Too few online CPUs (%u < %d) for test\n",
> > +                       pr_err_once("Too few online CPUs (%u < %ld) for test\n",
> >                                     num_online_cpus(), min_required_cpus);
> >                         nthreads = 0;
> >                 } else if (nthreads >= num_online_cpus() - min_unused_cpus) {
> > --
> > 2.29.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ