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]
Message-ID: <6158bc09-842d-4e65-9983-d515ea76a000@intel.com>
Date: Tue, 20 Aug 2024 15:47:22 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: Junfeng Guo <junfeng.guo@...el.com>, Przemek Kitszel
	<przemyslaw.kitszel@...el.com>, <kernel-janitors@...r.kernel.org>, Ahmed Zaki
	<ahmed.zaki@...el.com>, <linux-kernel@...r.kernel.org>, Eric Dumazet
	<edumazet@...gle.com>, Marcin Szycik <marcin.szycik@...ux.intel.com>, "Tony
 Nguyen" <anthony.l.nguyen@...el.com>, Qi Zhang <qi.z.zhang@...el.com>, "Jakub
 Kicinski" <kuba@...nel.org>, <netdev@...r.kernel.org>, Paolo Abeni
	<pabeni@...hat.com>, "David S. Miller" <davem@...emloft.net>,
	<intel-wired-lan@...ts.osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH net-next] ice: Fix a 32bit bug

From: Dan Carpenter <dan.carpenter@...aro.org>
Date: Tue, 20 Aug 2024 16:43:46 +0300

> BIT() is unsigned long but ->pu.flg_msk and ->pu.flg_val are u64 type.
> On 32 bit systems, unsigned long is a u32 and the mismatch between u32
> and u64 will break things for the high 32 bits.
> 
> Fixes: 9a4c07aaa0f5 ("ice: add parser execution main loop")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>

> ---
>  drivers/net/ethernet/intel/ice/ice_parser_rt.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_parser_rt.c b/drivers/net/ethernet/intel/ice/ice_parser_rt.c
> index d5bcc266b01e..dedf5e854e4b 100644
> --- a/drivers/net/ethernet/intel/ice/ice_parser_rt.c
> +++ b/drivers/net/ethernet/intel/ice/ice_parser_rt.c
> @@ -377,11 +377,11 @@ static void ice_pg_exe(struct ice_parser_rt *rt)
>  
>  static void ice_flg_add(struct ice_parser_rt *rt, int idx, bool val)
>  {
> -	rt->pu.flg_msk |= BIT(idx);
> +	rt->pu.flg_msk |= BIT_ULL(idx);
>  	if (val)
> -		rt->pu.flg_val |= BIT(idx);
> +		rt->pu.flg_val |= BIT_ULL(idx);
>  	else
> -		rt->pu.flg_val &= ~BIT(idx);
> +		rt->pu.flg_val &= ~BIT_ULL(idx);
>  
>  	ice_debug(rt->psr->hw, ICE_DBG_PARSER, "Pending update for flag %d value %d\n",
>  		  idx, val);

Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ