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:   Mon, 25 May 2020 16:33:15 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     "Paul E . McKenney" <paulmck@...nel.org>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>,
        Jonathan Lemon <jonathan.lemon@...il.com>
Subject: Re: [PATCH v2 bpf-next 2/7] tools/memory-model: add BPF ringbuf MPSC
 litmus tests

On Fri, May 22, 2020 at 11:51 AM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Thu, May 21, 2020 at 5:34 PM Paul E. McKenney <paulmck@...nel.org> wrote:
> >
> > On Sun, May 17, 2020 at 12:57:22PM -0700, Andrii Nakryiko wrote:
> > > Add 4 litmus tests for BPF ringbuf implementation, divided into two different
> > > use cases.
> > >
> > > First, two unbounded case, one with 1 producer and another with
> > > 2 producers, single consumer. All reservations are supposed to succeed.
> > >
> > > Second, bounded case with only 1 record allowed in ring buffer at any given
> > > time. Here failures to reserve space are expected. Again, 1- and 2- producer
> > > cases, single consumer, are validated.
> > >
> > > Just for the fun of it, I also wrote a 3-producer cases, it took *16 hours* to
> > > validate, but came back successful as well. I'm not including it in this
> > > patch, because it's not practical to run it. See output for all included
> > > 4 cases and one 3-producer one with bounded use case.
> > >
> > > Each litmust test implements producer/consumer protocol for BPF ring buffer
> > > implementation found in kernel/bpf/ringbuf.c. Due to limitations, all records
> > > are assumed equal-sized and producer/consumer counters are incremented by 1.
> > > This doesn't change the correctness of the algorithm, though.
> >
> > Very cool!!!
> >
> > However, these should go into Documentation/litmus-tests/bpf-rb or similar.
> > Please take a look at Documentation/litmus-tests/ in -rcu, -tip, and
> > -next, including the README file.
> >
> > The tools/memory-model/litmus-tests directory is for basic examples,
> > not for the more complex real-world ones like these guys.  ;-)
>
> Oh, ok, I didn't realize there are more litmus tests under
> Documentation/litmus-tests... Might have saved me some time (more
> examples to learn from!) when I was writing mine :) Will check those
> and move everything.
>

Ok, so Documentation/litmus-tests is not present in bpf-next, so I
guess I'll have to split this patch out and post it separately. BTW,
it's not in -rcu tree either, should I post this against linux-next
tree directly?


> >
> >                                                                 Thanx, Paul
> >
>
> [...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ