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:   Wed, 18 Jan 2017 21:49:44 +0900
From:   "byungchul.park" <byungchul.park@....com>
To:     "'Peter Zijlstra'" <peterz@...radead.org>
Cc:     "'Boqun Feng'" <boqun.feng@...il.com>, <mingo@...nel.org>,
        <tglx@...utronix.de>, <walken@...gle.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 15/15] lockdep: Crossrelease feature documentation

> -----Original Message-----
> From: byungchul.park [mailto:byungchul.park@....com]
> Sent: Wednesday, January 18, 2017 9:15 PM
> To: 'Peter Zijlstra'
> Cc: 'Boqun Feng'; 'mingo@...nel.org'; 'tglx@...utronix.de';
> 'walken@...gle.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 15/15] lockdep: Crossrelease feature documentation
> 
> > -----Original Message-----
> > From: Peter Zijlstra [mailto:peterz@...radead.org]
> > Sent: Wednesday, January 18, 2017 9:08 PM
> > To: Byungchul Park
> > Cc: Boqun Feng; mingo@...nel.org; tglx@...utronix.de; walken@...gle.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 15/15] lockdep: Crossrelease feature
> documentation
> >
> > On Wed, Jan 18, 2017 at 08:54:28PM +0900, Byungchul Park wrote:
> > > On Wed, Jan 18, 2017 at 12:03:17PM +0100, Peter Zijlstra wrote:
> > > > On Wed, Jan 18, 2017 at 07:53:47PM +0900, Byungchul Park wrote:
> > > > > On Wed, Jan 18, 2017 at 02:42:30PM +0800, Boqun Feng wrote:
> > > > > > On Fri, Dec 09, 2016 at 02:12:11PM +0900, Byungchul Park wrote:
> > > > > > [...]
> > > > > > > +Example 1:
> > > > > > > +
> > > > > > > +   CONTEXT X		   CONTEXT Y
> > > > > > > +   ---------		   ---------
> > > > > > > +   mutext_lock A
> > > > > > > +			   lock_page B
> > > > > > > +   lock_page B
> > > > > > > +			   mutext_lock A /* DEADLOCK */
> > > > > >
> > > > > > s/mutext_lock/mutex_lock
> > > > >
> > > > > Thank you.
> > > > >
> > > > > > > +Example 3:
> > > > > > > +
> > > > > > > +   CONTEXT X		   CONTEXT Y
> > > > > > > +   ---------		   ---------
> > > > > > > +			   mutex_lock A
> > > > > > > +   mutex_lock A
> > > > > > > +   mutex_unlock A
> > > > > > > +			   wait_for_complete B /* DEADLOCK */
> > > > > >
> > > > > > I think this part better be:
> > > > > >
> > > > > >    CONTEXT X		   CONTEXT Y
> > > > > >    ---------		   ---------
> > > > > >    			   mutex_lock A
> > > > > >    mutex_lock A
> > > > > >    			   wait_for_complete B /* DEADLOCK */
> > > > > >    mutex_unlock A
> > > > > >
> > > > > > , right? Because Y triggers DEADLOCK before X could run
> > mutex_unlock().
> > > > >
> > > > > There's no different between two examples.
> > > >
> > > > There is..
> > > >
> > > > > No matter which one is chosen, mutex_lock A in CONTEXT X cannot be
> > passed.
> > > >
> > > > But your version shows it does mutex_unlock() before CONTEXT Y does
> > > > wait_for_completion().
> > > >
> > > > The thing about these diagrams is that both columns are assumed to
> > have
> > > > the same timeline.
> > >
> > > X cannot acquire mutex A because Y already acquired it.
> > >
> > > In order words, all statements below mutex_lock A in X cannot run.
> >
> > But your timeline shows it does, which is the error that Boqun pointed
> > out.
> 
> I am sorry for not understanding what you are talking about.
> 
> Do you mean that I should remove all statements below mutex_lock A in X?
> 
> Or should I move mutex_unlock as Boqun said? What will change?

Anyway, I will change it as he said even though I don't understand what is
different between them. :/ But I am just curious. It would be appreciated
if you answer my question.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ