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]
Date:   Fri, 16 Jun 2017 09:07:57 +0800
From:   Boqun Feng <boqun.feng@...il.com>
To:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:     Krister Johansen <kjlx@...pleofstupid.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH tip/sched/core] Add comments to aid in safer usage of
 swake_up.

On Thu, Jun 15, 2017 at 10:56:29AM -0700, Paul E. McKenney wrote:
[...]
> > > 
> > > FWLIW, I agree.  There was a smb_mb() in RT-linux's equivalent of
> > > swait_activate().
> > > 
> > > https://www.spinics.net/lists/linux-rt-users/msg10340.html
> > > 
> > > If the barrier goes in swait_active() then we don't have to require all
> > > of the callers of swait_active and swake_up to issue the barrier
> > > instead.  Handling this in swait_active is likely to be less error
> > > prone.  Though, we could also do something like wq_has_sleeper() and use
> > > that preferentially in swake_up and its variants.
> > > 
> > 
> > I think it makes more sense that we delete the swait_active() in
> > swake_up()? Because we seems to encourage users to do the quick check on
> > wait queue on their own, so why do the check again in swake_up()?
> > Besides, wake_up() doesn't call waitqueue_activie() outside the lock
> > critical section either.
> > 
> > So how about the patch below(Testing is in progress)? Peter?
> 
> It is quite possible that a problem I am seeing is caused by this, but
> there are reasons to believe otherwise.  And in any case, the problem is
> quite rare, taking tens or perhaps even hundreds of hours of rcutorture
> to reproduce.
> 
> So, would you be willing to create a dedicated swait torture test to check
> this out?  The usual approach would be to create a circle of kthreads,
> with each waiting on the previous kthread and waking up the next one.
> Each kthread, after being awakened, checks a variable that its waker
> sets just before the wakeup.  Have another kthread check for hangs.
> 
> Possibly introduce timeouts and random delays to stir things up a bit.
> 
> But maybe such a test already exists.  Does anyone know of one?  I don't
> see anything obvious.
> 

Your waketorture patchset[1] seems to be something similar, at least a
good start ;-)

As we don't know which kind of scenario will trigger the problem easily,
I will play around with different ones, and hopefully we can find a way.

Regards,
Boqun

[1]: https://marc.info/?l=linux-kernel&m=146602969518960

> Interested?
> 
> 							Thanx, Paul
> 
[...]

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ