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: Tue, 28 May 2024 08:18:24 +0000
From: "Kuruvinakunnel, George" <george.kuruvinakunnel@...el.com>
To: "Kubiak, Michal" <michal.kubiak@...el.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "Drewek, Wojciech" <wojciech.drewek@...el.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "Kubiak, Michal" <michal.kubiak@...el.com>,
	"Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>, "Rout, ChandanX"
	<chandanx.rout@...el.com>, "Sanigani, SarithaX" <sarithax.sanigani@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net] i40e: Fix XDP program unloading
 while removing the driver

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Michal
> Kubiak
> Sent: Thursday, May 16, 2024 10:11 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: Drewek, Wojciech <wojciech.drewek@...el.com>; netdev@...r.kernel.org;
> Kubiak, Michal <michal.kubiak@...el.com>; Fijalkowski, Maciej
> <maciej.fijalkowski@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-net] i40e: Fix XDP program unloading while
> removing the driver
> 
> The commit 6533e558c650 ("i40e: Fix reset path while removing the driver")
> introduced a new PF state "__I40E_IN_REMOVE" to block modifying the XDP
> program while the driver is being removed.
> Unfortunately, such a change is useful only if the ".ndo_bpf()"
> callback was called out of the rmmod context because unloading the existing XDP
> program is also a part of driver removing procedure.
> In other words, from the rmmod context the driver is expected to unload the XDP
> program without reporting any errors. Otherwise, the kernel warning with callstack
> is printed out to dmesg.
> 
> Example failing scenario:
>  1. Load the i40e driver.
>  2. Load the XDP program.
>  3. Unload the i40e driver (using "rmmod" command).
> 
> Fix this by improving checks in ".ndo_bpf()" to determine if that callback was called
> from the removing context and if the kernel wants to unload the XDP program.
> Allow for unloading the XDP program in such a case.
> 
> Fixes: 6533e558c650 ("i40e: Fix reset path while removing the driver")
> Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
> Signed-off-by: Michal Kubiak <michal.kubiak@...el.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 19 ++++++++++++++-----
>  1 file changed, 14 insertions(+), 5 deletions(-)
> 

Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ