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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 21 Jun 2023 12:16:14 +0000
From: "Rout, ChandanX" <chandanx.rout@...el.com>
To: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "toke@...nel.org" <toke@...nel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
	"Karlsson, Magnus" <magnus.karlsson@...el.com>, "fred@...udflare.com"
	<fred@...udflare.com>, "Kuruvinakunnel, George"
	<george.kuruvinakunnel@...el.com>, "Nagaraju, Shwetha"
	<shwetha.nagaraju@...el.com>, "Nagraj, Shravan" <shravan.nagraj@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH v3 iwl-next] ice: allow hot-swapping XDP
 programs



>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
>Fijalkowski, Maciej
>Sent: 15 June 2023 17:03
>To: intel-wired-lan@...ts.osuosl.org
>Cc: toke@...nel.org; netdev@...r.kernel.org; Nguyen, Anthony L
><anthony.l.nguyen@...el.com>; Karlsson, Magnus
><magnus.karlsson@...el.com>; fred@...udflare.com
>Subject: [Intel-wired-lan] [PATCH v3 iwl-next] ice: allow hot-swapping XDP
>programs
>
>Currently ice driver's .ndo_bpf callback brings interface down and up
>independently of XDP resources' presence. This is only needed when either
>these resources have to be configured or removed. It means that if one is
>switching XDP programs on-the-fly with running traffic, packets will be
>dropped.
>
>To avoid this, compare early on ice_xdp_setup_prog() state of incoming
>bpf_prog pointer vs the bpf_prog pointer that is already assigned to VSI. Do
>the swap in case VSI has bpf_prog and incoming one are non-NULL.
>
>Lastly, while at it, put old bpf_prog *after* the update of Rx ring's bpf_prog
>pointer. In theory previous code could expose us to a state where Rx ring's
>bpf_prog would still be referring to old_prog that got released with earlier
>bpf_prog_put().
>
>Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
>---
>
>v2->v3:
>- move bpf_prog_put() after ice_rx_ring::xdp_prog update [Toke, Olek]
>v1->v2:
>- fix missing brace (sigh)
>
> drivers/net/ethernet/intel/ice/ice_main.c | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 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