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: <20170207195308.GY30506@linux.vnet.ibm.com>
Date:   Tue, 7 Feb 2017 11:53:08 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Waiman Long <longman@...hat.com>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v3 0/3] locking/spinlock_debug: Change it to a mostly
 fair lock

On Tue, Feb 07, 2017 at 02:46:31PM -0500, Waiman Long wrote:
> On 02/07/2017 04:48 AM, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@...radead.org> wrote:
> >
> >> On Thu, Feb 02, 2017 at 09:15:26AM -0500, Waiman Long wrote:
> >>>  v2->v3:
> >>>   - Keep the original v1 patches but move patch 3 of v2 in front so
> >>>     as to disable GENERIC_LOCKBREAK when DEBUG_LOCK_ALLOC is on.
> >>>
> >>>  v1->v2:
> >>>   - Pack lockup and break_lock into a single 4-byte slot so as not
> >>>     to in increase spinlock size when GENERIC_LOCKBREAK is
> >>>     on. Hopefully that will be enough to fix a frame size too large
> >>>     warning in 0-day build.
> >>>   - Add a new patch to disable GENERIC_LOCKBREAK when DEBUG_LOCK_ALLOC
> >>>     is on.
> >>>
> >>> The current debug spinlock implementation is a TATAS unfair lock. This
> >>> can occasionally lead to system lockup with a debug kernel because
> >>> of the unfairness of the lock rather than inherent locking problem.
> >>>
> >>> This patch set changes the debug spinlock implementation to a
> >>> mostly fair spinlock based on the MCS lock similar to what is done
> >>> in qspinlock. It also includes a patch that disable GENERIC_LOCKBREAK
> >>> when DEBUG_LOCK_ALLOC is on.
> >>
> >> An alternative is to just delete the thing entirely..
> >>
> >> Ingo, much of what this thing does seems to be superseded by both
> >> lockdep and a reliable NMI watchdog. Is there still value in
> >> spinlock_debug?
> > So there's still early stages when the NMI watchdog is not running, and 
> > spinlock-debug can detect lockups in raw locks that lockdep does not cover, right?
> >
> > But yeah ... it would simplify things all around, so I'm not unsympathetic to the 
> > idea...
> >
> > I've Cc:-ed a few other locking gents.
> >
> > Thanks,
> >
> > 	Ingo
> 
> I have no problem deleting the debug_spinlock code entirely. I can
> update the patch to delete the code if you guys think that is the right
> thing to do.
> 
> Cheers,
> Longman

My usual question is "how often does the spinlock_debug code find a
problem that would be hard to find otherwise?"  Probably unanswerable
given the nature of Linux-kernel development, but I figured I would ask
anyway.  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ