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: <Z4kfFlUx6GloTh6v@mev-dev.igk.intel.com>
Date: Thu, 16 Jan 2025 16:00:38 +0100
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Moshe Shemesh <moshe@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	Ido Schimmel <idosch@...dia.com>,
	Saeed Mahameed <saeedm@...dia.com>,
	Tariq Toukan <tariqt@...dia.com>, Mark Bloch <mbloch@...dia.com>,
	Maher Sanalla <msanalla@...dia.com>
Subject: Re: [PATCH net] net/mlxfw: Drop hard coded max FW flash image size

On Thu, Jan 16, 2025 at 02:33:16PM +0200, Moshe Shemesh wrote:
> From: Maher Sanalla <msanalla@...dia.com>
> 
> Currently, mlxfw kernel module limits FW flash image size to be
> 10MB at most, preventing the ability to burn recent BlueField-3
> FW that exceeds the said size limit.
> 
> Thus, drop the hard coded limit. Instead, rely on FW's
> max_component_size threshold that is reported in MCQI register
> as the size limit for FW image.
> 
> Fixes: 410ed13cae39 ("Add the mlxfw module for Mellanox firmware flash process")
> Cc: Ido Schimmel <idosch@...dia.com>
> Signed-off-by: Maher Sanalla <msanalla@...dia.com>
> Signed-off-by: Moshe Shemesh <moshe@...dia.com>
> ---
>  drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c
> index 46245e0b2462..43c84900369a 100644
> --- a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c
> +++ b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c
> @@ -14,7 +14,6 @@
>  #define MLXFW_FSM_STATE_WAIT_TIMEOUT_MS 30000
>  #define MLXFW_FSM_STATE_WAIT_ROUNDS \
>  	(MLXFW_FSM_STATE_WAIT_TIMEOUT_MS / MLXFW_FSM_STATE_WAIT_CYCLE_MS)
> -#define MLXFW_FSM_MAX_COMPONENT_SIZE (10 * (1 << 20))
>  
>  static const int mlxfw_fsm_state_errno[] = {
>  	[MLXFW_FSM_STATE_ERR_ERROR] = -EIO,
> @@ -229,7 +228,6 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,
>  		return err;
>  	}
>  
> -	comp_max_size = min_t(u32, comp_max_size, MLXFW_FSM_MAX_COMPONENT_SIZE);
>  	if (comp->data_size > comp_max_size) {
>  		MLXFW_ERR_MSG(mlxfw_dev, extack,
>  			      "Component size is bigger than limit", -EINVAL);

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>

> -- 
> 2.18.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ