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: <7f3362de-baaf-99ee-1b53-55675aaf00fe@gmail.com>
Date:   Thu, 23 May 2019 09:19:46 -0600
From:   David Ahern <dsahern@...il.com>
To:     Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org
Cc:     davem@...emloft.net, mlxsw@...lanox.com,
        jakub.kicinski@...ronome.com, sthemmin@...rosoft.com,
        saeedm@...lanox.com, leon@...nel.org
Subject: Re: [patch net-next 3/7] mlxfw: Propagate error messages through
 extack

On 5/23/19 3:45 AM, Jiri Pirko wrote:
> @@ -57,11 +58,13 @@ static int mlxfw_fsm_state_wait(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
>  	if (fsm_state_err != MLXFW_FSM_STATE_ERR_OK) {
>  		pr_err("Firmware flash failed: %s\n",
>  		       mlxfw_fsm_state_err_str[fsm_state_err]);
> +		NL_SET_ERR_MSG_MOD(extack, "Firmware flash failed");
>  		return -EINVAL;
>  	}
>  	if (curr_fsm_state != fsm_state) {
>  		if (--times == 0) {
>  			pr_err("Timeout reached on FSM state change");
> +			NL_SET_ERR_MSG_MOD(extack, "Timeout reached on FSM state change");

FSM? Is the meaning obvious to users?

>  			return -ETIMEDOUT;
>  		}
>  		msleep(MLXFW_FSM_STATE_WAIT_CYCLE_MS);
> @@ -76,7 +79,8 @@ static int mlxfw_fsm_state_wait(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
>  
>  static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,
>  				 u32 fwhandle,
> -				 struct mlxfw_mfa2_component *comp)
> +				 struct mlxfw_mfa2_component *comp,
> +				 struct netlink_ext_ack *extack)
>  {
>  	u16 comp_max_write_size;
>  	u8 comp_align_bits;
> @@ -96,6 +100,7 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,
>  	if (comp->data_size > comp_max_size) {
>  		pr_err("Component %d is of size %d which is bigger than limit %d\n",
>  		       comp->index, comp->data_size, comp_max_size);
> +		NL_SET_ERR_MSG_MOD(extack, "Component is which is bigger than limit");

Need to drop 'is which'.


...

> @@ -156,6 +163,7 @@ static int mlxfw_flash_components(struct mlxfw_dev *mlxfw_dev, u32 fwhandle,
>  					      &component_count);
>  	if (err) {
>  		pr_err("Could not find device PSID in MFA2 file\n");
> +		NL_SET_ERR_MSG_MOD(extack, "Could not find device PSID in MFA2 file");

same here, is PSID understood by user?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ