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: <20201005191801.GF29330@paulmck-ThinkPad-P72>
Date:   Mon, 5 Oct 2020 12:18:01 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     Luc Maranget <luc.maranget@...ia.fr>,
        Akira Yokosawa <akiyks@...il.com>, parri.andrea@...il.com,
        will@...nel.org, peterz@...radead.org, boqun.feng@...il.com,
        npiggin@...il.com, dhowells@...hat.com, j.alglave@....ac.uk,
        dlustig@...dia.com, joel@...lfernandes.org,
        viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
        linux-arch@...r.kernel.org
Subject: Re: Bug in herd7 [Was: Re: Litmus test for question from Al Viro]

On Mon, Oct 05, 2020 at 02:19:49PM -0400, Alan Stern wrote:
> On Mon, Oct 05, 2020 at 09:52:23AM -0700, Paul E. McKenney wrote:
> > On Mon, Oct 05, 2020 at 11:53:10AM -0400, Alan Stern wrote:
> > > I tested the new commit -- it does indeed fix the problem.
> > 
> > Beat me to it, very good!  ;-)
> > 
> > But were you using the crypto-control-data litmus test?
> 
> I was not.  The test I used was what you get by starting from the 
> version of crypto-control-data that had the one-liner in P1, and then 
> replacing P0 with:
> 
> P0(int *x, int *y)
> {
> 	int r1;
> 
> 	r1 = READ_ONCE(*x);
> 	smp_mb();
> 	WRITE_ONCE(*y, 1);
> }
> 
> Without the new commit this test is allowed; with the new commit it 
> isn't (as we would expect).  Also, the graphical output from herd7 shows 
> the data dependency in P1 with the commit, and doesn't show it without 
> the commit.
> 
> >  That one still
> > gets me Sometimes:
> > 
> > $ herd7 -version
> > 7.56+02~dev, Rev: 0f3f8188a326d5816a82fb9970fcd209a2678859
> > $ herd7 -conf linux-kernel.cfg ~/paper/scalability/LWNLinuxMM/litmus/manual/kernel/crypto-control-data.litmus
> > Test crypto-control-data Allowed
> > States 2
> > 0:r1=0;
> > 0:r1=1;
> > Ok
> > Witnesses
> > Positive: 1 Negative: 4
> > Condition exists (0:r1=1)
> > Observation crypto-control-data Sometimes 1 4
> > Time crypto-control-data 0.00
> > Hash=10898119bac87e11f31dc22bbb7efe17
> > 
> > Or did I mess something up?
> 
> You didn't mess up anything.  That's the whole point of this litmus 
> test: It should be forbidden because it is an example of OOTA, but LKMM 
> allows it.  Even with Luc's new commit.

OK, got it.

Aside from naming and comment, how about my adding the following?

							Thanx, Paul

------------------------------------------------------------------------

C crypto-control-data-1
(*
 * LB plus crypto-mb-data plus data.
 *
 * Result: Never
 *
 * This is an example of OOTA and we would like it to be forbidden.
 * If you want herd7 to get the right answer, you must use herdtools
 * 0f3f8188a326 (" [herd] Fix dependency definition") or later.
 *)

{}

P0(int *x, int *y)
{
	int r1;

	r1 = READ_ONCE(*x);
	smp_mb();
	WRITE_ONCE(*y, r1);
}

P1(int *x, int *y)
{
	int r2;

	WRITE_ONCE(*x, READ_ONCE(*y));
}

exists (0:r1=1)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ