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] [thread-next>] [day] [month] [year] [list]
Date: Thu, 25 Apr 2024 11:44:46 +0000
From: "Rout, ChandanX" <chandanx.rout@...el.com>
To: "Zaremba, Larysa" <larysa.zaremba@...el.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "intel-wired-lan@...ts.osuosl.org"
	<intel-wired-lan@...ts.osuosl.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: "Fijalkowski, Maciej" <maciej.fijalkowski@...el.com>, "Tantilov, Emil S"
	<emil.s.tantilov@...el.com>, "Czapnik, Lukasz" <lukasz.czapnik@...el.com>,
	Eric Dumazet <edumazet@...gle.com>, "Brady, Alan" <alan.brady@...el.com>,
	Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "David S. Miller"
	<davem@...emloft.net>, "Kuruvinakunnel, George"
	<george.kuruvinakunnel@...el.com>, "Nagraj, Shravan"
	<shravan.nagraj@...el.com>, "Pandey, Atul" <atul.pandey@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH RESEND iwl-net] ice: Interpret
 .set_channels() input differently



>-----Original Message-----
>From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
>Zaremba, Larysa
>Sent: Thursday, April 18, 2024 3:29 PM
>To: Nguyen, Anthony L <anthony.l.nguyen@...el.com>; intel-wired-
>lan@...ts.osuosl.org; linux-kernel@...r.kernel.org; netdev@...r.kernel.org
>Cc: Fijalkowski, Maciej <maciej.fijalkowski@...el.com>; Tantilov, Emil S
><emil.s.tantilov@...el.com>; Zaremba, Larysa <larysa.zaremba@...el.com>;
>Czapnik, Lukasz <lukasz.czapnik@...el.com>; Eric Dumazet
><edumazet@...gle.com>; Brady, Alan <alan.brady@...el.com>; Michal
>Swiatkowski <michal.swiatkowski@...ux.intel.com>; Jakub Kicinski
><kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; David S. Miller
><davem@...emloft.net>
>Subject: [Intel-wired-lan] [PATCH RESEND iwl-net] ice: Interpret .set_channels()
>input differently
>
>A bug occurs because a safety check guarding AF_XDP-related queues in
>ethnl_set_channels(), does not trigger. This happens, because kernel and ice
>driver interpret the ethtool command differently.
>
>How the bug occurs:
>1. ethtool -l <IFNAME> -> combined: 40
>2. Attach AF_XDP to queue 30
>3. ethtool -L <IFNAME> rx 15 tx 15
>   combined number is not specified, so command becomes {rx_count = 15,
>   tx_count = 15, combined_count = 40}.
>4. ethnl_set_channels checks, if there are any AF_XDP of queues from the
>   new (combined_count + rx_count) to the old one, so from 55 to 40, check
>   does not trigger.
>5. ice interprets `rx 15 tx 15` as 15 combined channels and deletes the
>   queue that AF_XDP is attached to.
>
>Interpret the command in a way that is more consistent with ethtool manual
>[0] (--show-channels and --set-channels).
>
>Considering that in the ice driver only the difference between RX and TX queues
>forms dedicated channels, change the correct way to set number of channels
>to:
>
>ethtool -L <IFNAME> combined 10 /* For symmetric queues */ ethtool -L
><IFNAME> combined 8 tx 2 rx 0 /* For asymmetric queues */
>
>[0] https://man7.org/linux/man-pages/man8/ethtool.8.html
>
>Fixes: 87324e747fde ("ice: Implement ethtool ops for channels")
>Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
>Signed-off-by: Larysa Zaremba <larysa.zaremba@...el.com>
>---
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 22 ++++++--------------
> 1 file changed, 6 insertions(+), 16 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