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: Thu, 30 May 2024 05:55:25 +0000
From: "Rout, ChandanX" <chandanx.rout@...el.com>
To: "Zaremba, Larysa" <larysa.zaremba@...el.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"Keller, Jacob E" <jacob.e.keller@...el.com>
CC: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>, "Jesper Dangaard
 Brouer" <hawk@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, "Kitszel,
 Przemyslaw" <przemyslaw.kitszel@...el.com>, John Fastabend
	<john.fastabend@...il.com>, Alexei Starovoitov <ast@...nel.org>, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, Jakub Kicinski
	<kuba@...nel.org>, "bpf@...r.kernel.org" <bpf@...r.kernel.org>, Paolo Abeni
	<pabeni@...hat.com>, Magnus Karlsson <magnus.karlsson@...il.com>, "Bagnucki,
 Igor" <igor.bagnucki@...el.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Kuruvinakunnel, George"
	<george.kuruvinakunnel@...el.com>, "Pandey, Atul" <atul.pandey@...el.com>,
	"Nagraj, Shravan" <shravan.nagraj@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-net 2/3] ice: add flag to
 distinguish reset from .ndo_bpf in XDP rings config



>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
>Zaremba, Larysa
>Sent: Wednesday, May 15, 2024 9:32 PM
>To: intel-wired-lan@...ts.osuosl.org; Keller, Jacob E <jacob.e.keller@...el.com>
>Cc: Fijalkowski, Maciej <maciej.fijalkowski@...el.com>; Jesper Dangaard Brouer
><hawk@...nel.org>; Daniel Borkmann <daniel@...earbox.net>; Zaremba,
>Larysa <larysa.zaremba@...el.com>; Kitszel, Przemyslaw
><przemyslaw.kitszel@...el.com>; John Fastabend
><john.fastabend@...il.com>; Alexei Starovoitov <ast@...nel.org>; David S.
>Miller <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>;
>netdev@...r.kernel.org; Jakub Kicinski <kuba@...nel.org>;
>bpf@...r.kernel.org; Paolo Abeni <pabeni@...hat.com>; Magnus Karlsson
><magnus.karlsson@...il.com>; Bagnucki, Igor <igor.bagnucki@...el.com>;
>linux-kernel@...r.kernel.org
>Subject: [Intel-wired-lan] [PATCH iwl-net 2/3] ice: add flag to distinguish reset
>from .ndo_bpf in XDP rings config
>
>Commit 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") has
>placed ice_vsi_free_q_vectors() after ice_destroy_xdp_rings() in the rebuild
>process. The behaviour of the XDP rings config functions is context-dependent,
>so the change of order has led to
>ice_destroy_xdp_rings() doing additional work and removing XDP prog, when it
>was supposed to be preserved.
>
>Also, dependency on the PF state reset flags creates an additional, fortunately
>less common problem:
>
>* PFR is requested e.g. by tx_timeout handler
>* .ndo_bpf() is asked to delete the program, calls ice_destroy_xdp_rings(),
>  but reset flag is set, so rings are destroyed without deleting the
>  program
>* ice_vsi_rebuild tries to delete non-existent XDP rings, because the
>  program is still on the VSI
>* system crashes
>
>With a similar race, when requested to attach a program,
>ice_prepare_xdp_rings() can actually skip setting the program in the VSI and
>nevertheless report success.
>
>Instead of reverting to the old order of function calls, add an enum argument
>to both ice_prepare_xdp_rings() and ice_destroy_xdp_rings() in order to
>distinguish between calls from rebuild and .ndo_bpf().
>
>Fixes: efc2214b6047 ("ice: Add support for XDP")
>Reviewed-by: Igor Bagnucki <igor.bagnucki@...el.com>
>Signed-off-by: Larysa Zaremba <larysa.zaremba@...el.com>
>---
> drivers/net/ethernet/intel/ice/ice.h      | 11 +++++++++--
> drivers/net/ethernet/intel/ice/ice_lib.c  |  5 +++--
>drivers/net/ethernet/intel/ice/ice_main.c | 22 ++++++++++++----------
> 3 files changed, 24 insertions(+), 14 deletions(-)
>

Tested-by: Chandan Kumar Rout <chandanx.rout@...el.com> (A Contingent Worker at Intel)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ