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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Apr 2017 15:59:43 +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>,
        <willy@...radead.org>, <npiggin@...il.com>, <kernel-team@....com>
Subject: Re: [PATCH v6 05/15] lockdep: Implement crossrelease feature

On Mon, Apr 24, 2017 at 11:30:51AM +0200, Peter Zijlstra wrote:
> +static void add_xhlock(struct held_lock *hlock)
> +{
> +       unsigned int idx = current->xhlock_idx++;
> +       struct hist_lock *xhlock = &xhlock(idx);
> 
> Yes, I misread that. Then '0' has the oldest entry, which is slightly
> weird. Should we change that?

I will just follow your decision. Do you think I should change it so
that 'xhlock_idx' points to newest one, or ok to keep it unchanged?

> 
> 
> > > > +
> > > > +		if (!xhlock_used(xhlock))
> > > > +			break;
> > > > +
> > > > +		if (before(xhlock->hlock.gen_id, xlock->hlock.gen_id))
> > > > +			break;
> > > > +
> > > > +		if (same_context_xhlock(xhlock) &&
> > > > +		    !commit_xhlock(xlock, xhlock))
> > > 
> > > return with graph_lock held?
> > 
> > No. When commit_xhlock() returns 0, the lock was already unlocked.
> 
> Please add a comment, because I completely missed that. That's at least
> 2 functions deeper.

Yes, I will add a comment.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ