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: <f7d12021-fcdd-4b2f-83b9-76db392a2473@amd.com>
Date: Wed, 8 Nov 2023 18:11:41 -0800
From: "Nelson, Shannon" <shannon.nelson@....com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Toke Høiland-Jørgensen <toke@...hat.com>,
 Jesper Dangaard Brouer <hawk@...nel.org>, David Ahern <dsahern@...il.com>,
 netdev@...r.kernel.org, bpf@...r.kernel.org,
 Daniel Borkmann <daniel@...earbox.net>, Alexei Starovoitov <ast@...nel.org>,
 Andrii Nakryiko <andrii@...nel.org>
Subject: Re: BPF/XDP: kernel panic when removing an interface that is an
 xdp_redirect target

On 11/8/2023 5:52 PM, Jakub Kicinski wrote:
> 
> On Wed, 8 Nov 2023 13:30:21 -0800 Nelson, Shannon wrote:
>>> Another source of a bug like this could be that your driver does not in
>>> fact call xdp_do_flush() before exiting its NAPI cycle, so that there
>>> will be packets from the previous cycle in the bq queue, in which case
>>> the assumption mentioned in the linked document obviously breaks down.
>>> But that would also be a driver bug :)
>>
>> We do call the xdp_do_flush() at the end of the NAPI cycle, just before
>> calling napi_complete_done().
> 
> Just to be sure - flush has to happen on every cycle, not only
> before calling napi_complete_done().

Ah, good catch.  The notes in redirect.html say "Before exiting its NAPI 
loop" and "must be called before napi_complete_done()".  I interpreted 
those together.

We'll make sure we do the flush at the end of every budget cycle and see 
what happens.

Thanks all.  This is exactly why talking out your problems with others 
is a very good thing.  And yes, this eventually will make it into an 
upstream patch set - after we do a bunch more testing.

Cheers,
sln

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ