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: <20170906004211.GT11771@tardis>
Date:   Wed, 6 Sep 2017 08:42:11 +0800
From:   Boqun Feng <boqun.feng@...il.com>
To:     Byungchul Park <byungchul.park@....com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Byungchul Park <max.byungchul.park@...il.com>,
        Ingo Molnar <mingo@...nel.org>, Tejun Heo <tj@...nel.org>,
        david@...morbit.com, Johannes Berg <johannes@...solutions.net>,
        oleg@...hat.com,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kernel-team@....com
Subject: Re: [PATCH 4/4] lockdep: Fix workqueue crossrelease annotation

On Wed, Sep 06, 2017 at 08:52:35AM +0900, Byungchul Park wrote:
> On Tue, Sep 05, 2017 at 03:46:43PM +0200, Peter Zijlstra wrote:
> > On Tue, Sep 05, 2017 at 07:58:38PM +0900, Byungchul Park wrote:
> > > On Tue, Sep 05, 2017 at 07:31:44PM +0900, Byungchul Park wrote:
> > > > Recursive-read and the hint I proposed(a.k.a. might) should be used for
> > > > their different specific applications. Both meaning and constraints of
> > > > them are totally different.
> > > > 
> > > > Using a right function semantically is more important than making it
> > > > just work, as you know. Wrong?
> > 
> > > Of course, in the following cases, the results are same:
> > > 
> > >    recursive-read(A) -> recursive-read(A), is like nothing, and also
> > >    might(A)          -> might(A)         , is like nothing.
> > > 
> > >    recursive-read(A) -> lock(A), end in a deadlock, and also
> > >    might(A)          -> lock(A), end in a deadlock.
> > 
> > And these are exactly the cases we need.
> > 
> > > Futhermore, recursive-read-might() can be used if needed, since their
> > > semantics are orthogonal so they can be used in mixed forms.
> > > 
> > > I really hope you accept the new semantics... I think current workqueue
> > > code exactly needs the semantics.
> > 
> > I really don't want to introduce this extra state if we don't have to.
> 
> OK. If the workqueue is only user of the weird lockdep annotations, then
> it might be better to defer introducing the extra state until needed.
> 
> But, the 'might' thing I introduced would be necessary if more users
> want to report deadlocks at the time for crosslocks with speculative
> acquisitions like the workqueue does, since the recursive-read thing
> would generate false dependencies much more than we want, while the

What do you mean by "false dependencies"? AFAICT, recursive-read could
have dependencies to the following cross commit, for example:

	A(a)
			ARR(a)
			RRR(a)
	WFC(X)
			C(X)

This is a deadlock, no?

In my upcoming v2 for recursive-read support, I'm going to make this
detectable. But please note as crossrelease doesn't have any selftests
as normal lockdep stuffs, I may miss something subtle.

Regards,
Boqun

> 'might' thing generate them just as many as we want.
> 

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ