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: <CAADnVQKUsT3vU_bcPYBNbnD-W5+CkyEcshW7e2c0Ayj-G1D0HA@mail.gmail.com>
Date: Fri, 13 Sep 2024 12:48:37 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Magnus Karlsson <magnus.karlsson@...il.com>, Jakub Kicinski <kuba@...nel.org>
Cc: Maciej Fijalkowski <maciej.fijalkowski@...el.com>, bpf <bpf@...r.kernel.org>, 
	Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Andrii Nakryiko <andrii@...nel.org>, Network Development <netdev@...r.kernel.org>, 
	"Karlsson, Magnus" <magnus.karlsson@...el.com>, Björn Töpel <bjorn@...nel.org>, 
	Dries De Winter <ddewinter@...amedia.com>
Subject: Re: [PATCH bpf] xsk: fix batch alloc API on non-coherent systems

On Thu, Sep 12, 2024 at 4:04 AM Magnus Karlsson
<magnus.karlsson@...il.com> wrote:
>
> On Wed, 11 Sept 2024 at 21:10, Maciej Fijalkowski
> <maciej.fijalkowski@...el.com> wrote:
> >
> > In cases when synchronizing DMA operations is necessary,
> > xsk_buff_alloc_batch() returns a single buffer instead of the requested
> > count. This puts the pressure on drivers that use batch API as they have
> > to check for this corner case on their side and take care of allocations
> > by themselves, which feels counter productive. Let us improve the core
> > by looping over xp_alloc() @max times when slow path needs to be taken.
> >
> > Another issue with current interface, as spotted and fixed by Dries, was
> > that when driver called xsk_buff_alloc_batch() with @max == 0, for slow
> > path case it still allocated and returned a single buffer, which should
> > not happen. By introducing the logic from first paragraph we kill two
> > birds with one stone and address this problem as well.
>
> Thanks Maciej and Dries for finding and fixing this.
>
> Acked-by: Magnus Karlsson <magnus.karlsson@...el.com>

We already did the last bpf and bpf-next/net PRs before the merge window,
so reassigning to netdev.

Acked-by: Alexei Starovoitov <ast@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ