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>] [day] [month] [year] [list]
Date: Wed, 24 Jan 2024 06:56:37 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com>
Cc: Jesse Brandeburg <jesse.brandeburg@...el.com>,
 Tony Nguyen <anthony.l.nguyen@...el.com>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
 Mark Rustad <mark.d.rustad@...el.com>, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
 netdev@...r.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH] ixgbe: Fix an error handling path in
 ixgbe_read_iosf_sb_reg_x550()


Le 24/01/2024 à 05:00, Pucha, HimasekharX Reddy a écrit :
> Hi,
>
> Can you share testing hints for this patch.

Hi,

No I can't.

It was spotted by one of my cocci script that tries to find issues 
related to direct return when a function also has an error handling path 
+ manual review so see if it looks like a real issue.

As said in the patch, "This patch is speculative, review with care.". 
That means that it was not tested from my side.
I don't have the hardware, and don't know how to trigger the issue.

All I know is that the code looks wrong *to me*.

Maybe someone at intel.com could give this hint? :)

CJ


> Regards,
> Himasekhar Reddy.
>
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Christophe JAILLET
> Sent: Saturday, January 20, 2024 10:56 PM
> To: Brandeburg, Jesse <jesse.brandeburg@...el.com>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>; David S. Miller <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Jeff Kirsher <jeffrey.t.kirsher@...el.com>; Rustad, Mark D <mark.d.rustad@...el.com>
> Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>; intel-wired-lan@...ts.osuosl.org; kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org; netdev@...r.kernel.org
> Subject: [Intel-wired-lan] [PATCH] ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550()
>
> All error handling paths, except this one, go to 'out' where
> release_swfw_sync() is called.
> This call balances the acquire_swfw_sync() call done at the beginning of
> the function.
>
> Branch to the error handling path in order to correctly release some
> resources in case of error.
>
> Fixes: ae14a1d8e104 ("ixgbe: Fix IOSF SB access issues")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
> This patch is speculative, review with care.
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
> index 6208923e29a2..c1adc94a5a65 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
> @@ -716,7 +716,8 @@ static s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
>   	if ((command & IXGBE_SB_IOSF_CTRL_RESP_STAT_MASK) != 0) {
>   		error = FIELD_GET(IXGBE_SB_IOSF_CTRL_CMPL_ERR_MASK, command);
>   		hw_dbg(hw, "Failed to read, error %x\n", error);
> -		return -EIO;
> +		ret = -EIO;
> +		goto out;
>   	}
>   
>   	if (!ret)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ