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  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:   Tue, 21 Jan 2020 00:27:35 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Björn Töpel <bjorn.topel@...il.com>,
        netdev@...r.kernel.org, ast@...nel.org
Cc:     Björn Töpel <bjorn.topel@...el.com>,
        bpf@...r.kernel.org, magnus.karlsson@...el.com,
        jonathan.lemon@...il.com
Subject: Re: [PATCH bpf-next] xsk: update rings for load-acquire/store-release
 semantics

On 1/20/20 10:21 AM, Björn Töpel wrote:
> From: Björn Töpel <bjorn.topel@...el.com>
> 
> Currently, the AF_XDP rings uses fences for the kernel-side
> produce/consume functions. By updating rings for
> load-acquire/store-release semantics, the full barrier (smp_mb()) on
> the consumer side can be replaced.
> 
> Signed-off-by: Björn Töpel <bjorn.topel@...el.com>

If I'm not missing something from the ring update scheme, don't you also need
to adapt to STORE.rel ->producer with matching barrier in tools/lib/bpf/xsk.h ?

Btw, alternative model could also be 09d62154f613 ("tools, perf: add and use
optimized ring_buffer_{read_head, write_tail} helpers") for the kernel side
in order to get rid of the smp_mb() on x86.

Thanks,
Daniel

Powered by blists - more mailing lists