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] [day] [month] [year] [list]
Message-ID: <CAEf4BzbuFzQKF2DBCUmGnLyP4WTPR7CLBxoT8W0_DRSrn_g4ww@mail.gmail.com>
Date:   Thu, 11 Mar 2021 10:56:16 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Björn Töpel <bjorn.topel@...el.com>
Cc:     Jonathan Lemon <jonathan.lemon@...il.com>,
        Björn Töpel <bjorn.topel@...il.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Magnus Karlsson <magnus.karlsson@...el.com>,
        maximmi@...dia.com, ciara.loftus@...el.com
Subject: Re: [PATCH bpf-next 2/2] libbpf: xsk: move barriers from
 libbpf_util.h to xsk.h

On Wed, Mar 10, 2021 at 10:59 PM Björn Töpel <bjorn.topel@...el.com> wrote:
>
> On 2021-03-11 01:06, Jonathan Lemon wrote:
> > On Wed, Mar 10, 2021 at 09:09:29AM +0100, Björn Töpel wrote:
> >> From: Björn Töpel <bjorn.topel@...el.com>
> >>
> >> The only user of libbpf_util.h is xsk.h. Move the barriers to xsk.h,
> >> and remove libbpf_util.h. The barriers are used as an implementation
> >> detail, and should not be considered part of the stable API.
> >
> > Does that mean that anything else which uses the same type of
> > shared rings (bpf ringbuffer, io_uring, zctap) have to implement
> > the same primitives that xsk.h has?
> >
>
> Jonathan, there's a longer explanation on back-/forward-compatibility in
> the commit message [1]. Again, this is for the XDP socket rings, so I
> wont comment on the other rings. I would not assume compatibility
> between different rings (e.g. the bpf ringbuffer and XDP sockets rings),
> not even prior the barrier change.
>
>

BPF ringbuf is using smp_store_release()/smp_load_acquire(), which are
coming from asm/barrier.h. But libbpf abstracts all the low-level
details, so users don't have to use such low-level primitives
directly.

> Björn
>
> [1]
> https://lore.kernel.org/bpf/20210305094113.413544-2-bjorn.topel@gmail.com/
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ