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: <CYYPR11MB8429521600AB122BE9EBC42FBDD42@CYYPR11MB8429.namprd11.prod.outlook.com>
Date: Mon, 24 Jun 2024 06:47:46 +0000
From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com>
To: poros <poros@...hat.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: ivecera <ivecera@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
	"Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>, open list
	<linux-kernel@...r.kernel.org>, "Joyner, Eric" <eric.joyner@...el.com>,
	"Lobakin, Aleksander" <aleksander.lobakin@...el.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "horms@...nel.org" <horms@...nel.org>, "Marcin
 Domagala" <marcinx.domagala@...el.com>, Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>, "David S. Miller" <davem@...emloft.net>,
	"moderated list:INTEL ETHERNET DRIVERS" <intel-wired-lan@...ts.osuosl.org>
Subject: RE: [Intel-wired-lan] [PATCH net v3] ice: use proper macro for
 testing bit

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Petr Oros
> Sent: Tuesday, June 18, 2024 4:41 PM
> To: netdev@...r.kernel.org
> Cc: ivecera <ivecera@...hat.com>; Eric Dumazet <edumazet@...gle.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; open list <linux-kernel@...r.kernel.org>; Joyner, Eric <eric.joyner@...el.com>; Lobakin, Aleksander <aleksander.lobakin@...el.com>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>; horms@...nel.org; Marcin Domagala <marcinx.domagala@...el.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; David S. Miller <davem@...emloft.net>; moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@...ts.osuosl.org>
> Subject: [Intel-wired-lan] [PATCH net v3] ice: use proper macro for testing bit
>
> Do not use _test_bit() macro for testing bit. The proper macro for this is one without underline.
>
> _test_bit() is what test_bit() was prior to const-optimization. It directly calls arch_test_bit(), i.e. the arch-specific implementation (or the generic one). It's strictly _internal_ and shouldn't be used anywhere outside the actual test_bit() macro.
> 
> test_bit() is a wrapper which checks whether the bitmap and the bit number are compile-time constants and if so, it calls the optimized function which evaluates this call to a compile-time constant as well.
> If either of them is not a compile-time constant, it just calls _test_bit().
> test_bit() is the actual function to use anywhere in the kernel.
>
> IOW, calling _test_bit() avoids potential compile-time optimizations.
>
> The sensors is not a compile-time constant, thus most probably there are no object code changes before and after the patch.
> But anyway, we shouldn't call internal wrappers instead of the actual API.
>
> Fixes: 4da71a77fc3b ("ice: read internal temperature sensor")
> Acked-by: Ivan Vecera <ivecera@...hat.com>
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>
> Signed-off-by: Petr Oros <poros@...hat.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_hwmon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ