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: <7d968f29-63d2-4def-9caa-dae489cea7f3@paulmck-laptop>
Date: Thu, 24 Oct 2024 07:42:28 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Jonas Oberhauser <jonas.oberhauser@...weicloud.com>
Cc: Puranjay Mohan <puranjay@...nel.org>,
	Andrea Parri <parri.andrea@...il.com>, bpf@...r.kernel.org,
	lkmm@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: Some observations (results) on BPF acquire and release

On Thu, Oct 24, 2024 at 02:21:15PM +0200, Jonas Oberhauser wrote:
> 
> 
> Am 10/24/2024 um 2:11 PM schrieb Puranjay Mohan:
> > Jonas Oberhauser <jonas.oberhauser@...weicloud.com> writes:
> > 
> > > Am 10/23/2024 um 7:47 PM schrieb Andrea Parri:
> > > > Hi Puranjay and Paul,
> > > > 
> > > > These remarks show that the proposed BPF formalization of acquire and
> > > > release somehow, but substantially, diverged from the corresponding
> > > > LKMM formalization.  My guess is that the divergences mentioned above
> > > > were not (fully) intentional, or I'm wondering -- why not follow the
> > > > latter (the LKMM's) more closely? -  This is probably the first question
> > > > I would need to clarify before trying/suggesting modifications to the
> > > > present formalizations.  ;-)  Thoughts?
> > > > 
> > > 
> > > I'm also curious why the formalization (not just in the semantics but
> > > also how it is structured) is so completely different from LKMM's.
> > 
> 
> Thanks Puranjay for your response!
> 
> 
> > BPF memory model is an instruction level memory model
> 
> You mean BPF has no optimizing byte code compiler?
> Is it guaranteed to stay this way?
> WASM does JIT optimizations as far as I know, which would bring back a lot
> of the complexity of software models like LKMM.

Sadly (at least from a simplicity viewpoint), BPF assembly goes at least
through compiler backends.  So there will be some issues of this sort.
We have started on them, but as Puranjay says, there is more to be done.

							Thanx, Paul

> > much simpler than LKMM
> 
> LKMM has a simple core, roughly like this:
> 
> ppo = ... (* all the ppo related rules that are relevant to you -- some
> fences don't matter and you can just remove them *)
> prop = (coe | fre) (* remove reflexive closure *) ; ...
> hb = [Marked] ; (ppo | rfe | prop & int | prop ; strong-sync) ; [Marked]
> 
> acyclic hb
> (* ... also add the atomicity & sc-per-loc axioms *)
> 
> If you can exclude compiler optimizations, you can remove the Marked bits.
> 
> 
> Best wishes,
> 
>   jonas
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ