[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190110123008.GA13625@andrea>
Date: Thu, 10 Jan 2019 13:30:08 +0100
From: Andrea Parri <andrea.parri@...rulasolutions.com>
To: Dmitry Vyukov <dvyukov@...gle.com>
Cc: "Paul E. McKenney" <paulmck@...ux.ibm.com>,
Anatol Pomozov <anatol.pomozov@...il.com>,
Florian Westphal <fw@...len.de>,
LKML <linux-kernel@...r.kernel.org>,
Andrey Konovalov <andreyknvl@...gle.com>,
Alan Stern <stern@...land.harvard.edu>,
Luc Maranget <luc.maranget@...ia.fr>,
Will Deacon <will.deacon@....com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: seqcount usage in xt_replace_table()
> For seqcounts we currently simply ignore all accesses within the read
> section (thus the requirement to dynamically track read sections).
> What does LKMM say about seqlocks?
LKMM does not currently model seqlocks, if that's what you're asking;
c.f., tools/memory-model/linux-kernel.def for a list of the currently
supported synchronization primitives.
LKMM has also no notion of "data race", it insists that the code must
contain no unmarked accesses; we have been discussing such extensions
since at least Dec'17 (we're not quite there!, as mentioned by Paul).
My opinion is that ignoring all accesses within a given read section
_can_ lead to false negatives (in every possible definition of "data
race" and "read sections" I can think of at the moment ;D):
P0 P1
read_seqbegin() x = 1;
r0 = x;
read_seqretry() // =0
ought to be "racy"..., right? (I didn't audit all the callsites for
read_{seqbegin,seqretry}(), but I wouldn't be surprised to find such
pattern ;D ... "legacy", as you recalled).
Andrea
Powered by blists - more mailing lists