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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+ZNXT1HHDT3aBzMtSouTYbetHcbFz-bVscj=5sbVdsaew@mail.gmail.com>
Date:   Wed, 20 Apr 2022 16:00:07 +0200
From:   Dmitry Vyukov <dvyukov@...gle.com>
To:     paulmck@...nel.org
Cc:     Hillf Danton <hdanton@...a.com>, linux-kernel@...r.kernel.org,
        syzkaller <syzkaller@...glegroups.com>
Subject: Re: [PATCH rcu 04/11] kernel/smp: Provide boot-time timeout for CSD
 lock diagnostics

On Wed, 20 Apr 2022 at 15:41, Paul E. McKenney <paulmck@...nel.org> wrote:
> > > > > > > > Debugging of problems involving insanely long-running SMI handlers
> > > > > > > > proceeds better if the CSD-lock timeout can be adjusted.  This commit
> > > > > > > > therefore provides a new smp.csd_lock_timeout kernel boot parameter
> > > > > > > > that specifies the timeout in milliseconds.  The default remains at the
> > > > > > > > previously hard-coded value of five seconds.
> > > > > > > >
> > > > > > > > Cc: Rik van Riel <riel@...riel.com>
> > > > > > > > Cc: Peter Zijlstra <peterz@...radead.org>
> > > > > > > > Cc: Ingo Molnar <mingo@...nel.org>
> > > > > > > > Cc: Thomas Gleixner <tglx@...utronix.de>
> > > > > > > > Cc: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> > > > > > > > Cc: Juergen Gross <jgross@...e.com>
> > > > > > > > Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
> > > > > > > > ---
> > > > > > > >  Documentation/admin-guide/kernel-parameters.txt | 11 +++++++++++
> > > > > > > >  kernel/smp.c                                    |  7 +++++--
> > > > > > > >  2 files changed, 16 insertions(+), 2 deletions(-)
> > > > > > > >
> > > > > > > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > > > > > > > index 3f1cc5e317ed..645c4c001b16 100644
> > > > > > > > --- a/Documentation/admin-guide/kernel-parameters.txt
> > > > > > > > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > > > > > > > @@ -5377,6 +5377,17 @@
> > > > > > > >     smart2=         [HW]
> > > > > > > >                     Format: <io1>[,<io2>[,...,<io8>]]
> > > > > > > >
> > > > > > > > +   smp.csd_lock_timeout= [KNL]
> > > > > > > > +                   Specify the period of time in milliseconds
> > > > > > > > +                   that smp_call_function() and friends will wait
> > > > > > > > +                   for a CPU to release the CSD lock.  This is
> > > > > > > > +                   useful when diagnosing bugs involving CPUs
> > > > > > > > +                   disabling interrupts for extended periods
> > > > > > > > +                   of time.  Defaults to 5,000 milliseconds, and
> > > > > > > > +                   setting a value of zero disables this feature.
> > > > > > > > +                   This feature may be more efficiently disabled
> > > > > > > > +                   using the csdlock_debug- kernel parameter.
> > > > > > > > +
> > > > > > >
> > > > > > > Can non-responsive CSD lock detected trigger syzbot (warning) report?
> > > > > >
> > > > > > If they enable it by building with CONFIG_CSD_LOCK_WAIT_DEBUG=y, yes.
> > > > >
> > > > > +syzkaller mailing list
> > > > >
> > > > > Currently we don't enable CONFIG_CSD_LOCK_WAIT_DEBUG in syzbot configs.
> > > > > Is it a generally useful debugging feature recommended to be enabled
> > > > > in kernel testing systems?
> > > >
> > > > With the default value for smp.csd_lock_timeout, it detects CPUs that have
> > > > had interrupts disabled for more than five seconds, which can be useful
> > > > for detecting what would otherwise be silent response-time failures.
> > >
> > > The five seconds take precedence over the 143s in reports [1] IMO.
> > > The shorter timeout helps select reproducers which in turn help find answer
> > > to questions there.
> >
> > I've sent https://github.com/google/syzkaller/pull/3090 to enable the config.
> > 5 seconds won't be reliable, I've set it to 100s to match CPU stall timeout.
>
> Thank you, Dmitry!
>
> Is there something I should be doing to enable the RCU CPU stall timeout
> to be reduced?

No.
We just bumped it to a high enough value to not cause false positives.
If it's stalled, it's stalled.


>                                                         Thanx, Paul
>
> > > [1] https://lore.kernel.org/lkml/20220321210140.GK4285@paulmck-ThinkPad-P17-Gen-1/
> > >
> > > >
> > > > > If we enabled it, we also need to figure out where it fits into the
> > > > > timeout hierarchy and adjust smp.csd_lock_timeout:
> > > > > https://github.com/google/syzkaller/blob/master/dashboard/config/linux/bits/x86_64.yml#L15-L40
> > > >
> > > > On this, I must defer to you guys.  I can say that the larger the value
> > > > that you choose for smp.csd_lock_timeout, the nearer the beginnning of
> > > > that group it should go, but you guys knew that already.  ;-)
> > > >
> > > >                                                         Thanx, Paul
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "syzkaller" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller+unsubscribe@...glegroups.com.
> > > To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller/20220419231820.2089-1-hdanton%40sina.com.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ