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] [thread-next>] [day] [month] [year] [list]
Message-ID: <721f07ab-4dc1-4802-957d-1e71524ac31a@intel.com>
Date: Tue, 9 Apr 2024 16:26:16 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Michael Chan <michael.chan@...adcom.com>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <pavan.chebbi@...adcom.com>,
	<andrew.gospodarek@...adcom.com>, Kalesh AP
	<kalesh-anakkur.purayil@...adcom.com>, Somnath Kotur
	<somnath.kotur@...adcom.com>
Subject: Re: [PATCH net-next 1/7] bnxt_en: Skip ethtool RSS context
 configuration in ifdown state



On 4/9/2024 2:54 PM, Michael Chan wrote:
> From: Pavan Chebbi <pavan.chebbi@...adcom.com>
> 
> The current implementation requires the ifstate to be up when
> configuring the RSS contexts.  It will try to fetch the RX ring
> IDs and will crash if it is in ifdown state.  Return error if
> !netif_running() to prevent the crash.
> 
> An improved implementation is in the works to allow RSS contexts
> to be changed while in ifdown state.
> 
> Fixes: b3d0083caf9a ("bnxt_en: Support RSS contexts in ethtool .{get|set}_rxfh()")
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
> Reviewed-by: Somnath Kotur <somnath.kotur@...adcom.com>
> Signed-off-by: Pavan Chebbi <pavan.chebbi@...adcom.com>
> Signed-off-by: Michael Chan <michael.chan@...adcom.com>
> ---

Makes sense, though I think you could send this fix directly to net as
its clearly a bug fix and preventing a crash is good.

Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

Thanks,
Jake

>  drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> index 9c49f629d565..68444234b268 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> @@ -1876,6 +1876,11 @@ static int bnxt_set_rxfh_context(struct bnxt *bp,
>  		return -EOPNOTSUPP;
>  	}
>  
> +	if (!netif_running(bp->dev)) {
> +		NL_SET_ERR_MSG_MOD(extack, "Unable to set RSS contexts when interface is down");
> +		return -EAGAIN;
> +	}
> +
>  	if (*rss_context != ETH_RXFH_CONTEXT_ALLOC) {
>  		rss_ctx = bnxt_get_rss_ctx_from_index(bp, *rss_context);
>  		if (!rss_ctx) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ