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: <20170117074509.GI3326@X58A-UD3R>
Date:   Tue, 17 Jan 2017 16:45:09 +0900
From:   Byungchul Park <byungchul.park@....com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     mingo@...nel.org, tglx@...utronix.de, walken@...gle.com,
        boqun.feng@...il.com, kirill@...temov.name,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        iamjoonsoo.kim@....com, akpm@...ux-foundation.org,
        npiggin@...il.com
Subject: Re: [PATCH v4 07/15] lockdep: Implement crossrelease feature

On Tue, Jan 17, 2017 at 08:14:56AM +0100, Peter Zijlstra wrote:
> On Tue, Jan 17, 2017 at 11:05:42AM +0900, Byungchul Park wrote:
> > On Mon, Jan 16, 2017 at 04:10:01PM +0100, Peter Zijlstra wrote:
> > > On Fri, Dec 09, 2016 at 02:12:03PM +0900, Byungchul Park wrote:
> 
> > > > @@ -155,6 +164,9 @@ struct lockdep_map {
> > > >  	int				cpu;
> > > >  	unsigned long			ip;
> > > >  #endif
> > > > +#ifdef CONFIG_LOCKDEP_CROSSRELEASE
> > > > +	struct cross_lock		*xlock;
> > > > +#endif
> > > 
> > > The use of this escapes me; why does the lockdep_map need a pointer to
> > > this?
> > 
> > Lockdep interfaces e.g. lock_acquire(), lock_release() and lock_commit()
> > use lockdep_map as an arg, but crossrelease need to extract cross_lock
> > instances from that.
> 
> > > Why not do something like:
> > > 
> > > struct lockdep_map_cross {
> > > 	struct lockdep_map	map;
> > > 	struct held_lock	hlock;
> > > }
> 
> Using a structure like that, you can pass lockdep_map_cross around just
> fine, since the lockdep_map is the first member, so the pointers are
> interchangeable. At worst we might need to munge a few typecasts.
> 
> But then the cross release code can simply cast to the bigger type and
> have access to the extra data it knows to be there.

Right. I will apply it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ