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:	Thu, 19 Nov 2009 17:07:02 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ming Lei <tom.leiming@...il.com>,
	Gautham R Shenoy <ego@...ibm.com>
Subject: Re: [PATCH 1/2] lockdep: Include recursive read-locks dependencies
	in the tree

On Wed, Nov 18, 2009 at 11:26:05AM +0100, Peter Zijlstra wrote:
> On Wed, 2009-11-18 at 02:06 +0100, Frederic Weisbecker wrote:
> > Currently, recursive read locks are checked in two ways:
> > 
> > - walk through the locks held by the current task and check possible
> >   deadlock.
> > 
> > - if the recursive read lock is not already present in the lock held
> >   by the current task, check its dependencies against the tree.
> > 
> > But this recursive read lock will never be added to the tree of
> > dependencies. It means that the following sequence:
> > 
> > A = rwlock (Ar: taken as read recursive, Aw: taken as write)
> > B = normal lock
> > 
> >  Ar -> B
> >  B  -> Aw
> > 
> > won't ever be detected as a lock inversion.
> > This patch fixes it by inserting the recursive read locks into the
> > tree of dependencies and enhancing the circular checks (check the
> > class and the read attribute collision).
> 
> There were some very funny corner cases with IRQ state vs recursive
> locks, I don't seen any of that mentioned here.


Ah right. I forgot these cases... I probably need to do some other checks
in check_usage().

I'll have a look at it.

Thanks.

 
> Bot ego and I poked at it at various times, but neither of us managed to
> actually finish it due to getting distracted with other bits I guess.
> 
> http://programming.kicks-ass.net/kernel-patches/cpu-hotplug/
> 
> http://lkml.org/lkml/2009/5/11/203


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ