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: <Pine.LNX.4.64.0611081254150.18340@dhcp83-20.boston.redhat.com>
Date:	Wed, 8 Nov 2006 13:04:31 -0500 (EST)
From:	Jason Baron <jbaron@...hat.com>
To:	Ingo Molnar <mingo@...e.hu>
cc:	linux-kernel@...r.kernel.org, arjan@...radead.org,
	rdreier@...co.com
Subject: Re: locking hierarchy based on lockdep


On Wed, 8 Nov 2006, Ingo Molnar wrote:

> 
> * Jason Baron <jbaron@...hat.com> wrote:
> 
> > > this would certainly be the simplest thing to do - we could extend 
> > > /proc/lockdep with the list of 'immediately after' locks separated by 
> > > commas. (that list already exists: it's the lock_class.locks_after list)
> >
> > So below is patch that does what you suggest, although i had to add 
> > the concept of 'distance' to the patch since the locks_after list 
> > loses this dependency info afaict. i also wrote a user space program 
> > to sort the locks into cluster of interelated locks and then sorted 
> > within these clusters...the results show one large clump of 
> > locks...perhaps there are a few locks that time them all together like 
> > scheduler locks...but i couldn't figure out which ones to exclude to 
> > make the list look really pretty (also, there could be a bug in my 
> > program :). Anyways i'm including my test program and its output 
> > too...
> 
> nice!
> 
> small detail: i'm wondering why 'distance' is needed explicitly? The 
> dependency graph as it is represented by locks_after should be a full 
> representation of all locking dependencies. What is the intended 
> definition of 'distance' - the distance from the root of the dependency 
> tree? (Maybe i'm misunderstanding what you are trying to achieve.)
> 

'distance' is associated with a link, and is meant to represent the number 
of intervening locks. So a distance of 1 b/w say lock a and b is to say 
there is no intervening lock, whereas 2 would mean there is 1 
intervening lock etc.

The reason i added this was that in my algorithm to order locks, say i 
come to lock a, which has lock b and lock c in its 'after' list. I don't 
know at that point if lock b needs to come before c, or maybe that c has 
to come before b.

You are right though, i think that the data in the locks after lists is 
sufficient to re-create the entire graph, since its acyclic, but by simply 
printing out nodes of distance '1', the algorithm is greatly simplified. 
Otherwise, i'd have to first reconstruct the graph...

Also, i was only looking for a link to be label as distance 1, or not...so 
we only need to associate 1 bit of information with each link, if you are 
concerned about struture bloat.

thanks,

-jason
-
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