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: <9f778faa-76a3-f7af-d0f7-63d989934c59@intel.com>
Date:   Mon, 28 Nov 2022 15:37:06 -0800
From:   Jacob Keller <jacob.e.keller@...el.com>
To:     Saeed Mahameed <saeed@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>
CC:     Saeed Mahameed <saeedm@...dia.com>, <netdev@...r.kernel.org>,
        Tariq Toukan <tariqt@...dia.com>,
        Raed Salem <raeds@...dia.com>, Emeel Hakim <ehakim@...dia.com>
Subject: Re: [net 10/15] net/mlx5e: MACsec, fix update Rx secure channel
 active field



On 11/24/2022 12:10 AM, Saeed Mahameed wrote:
> From: Raed Salem <raeds@...dia.com>
> 
> The main functionality for this operation is to update the
> active state of the Rx security channel (SC) if the new
> active setting is different from the current active state
> of this Rx SC, however the relevant active state check is
> done post updating the current active state to match the
> new active state, effectively blocks any offload state
> update for the Rx SC in question.
> 
> Fix by delay the assignment to be post the relevant check.
> 

Makes sense.

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

> Fixes: aae3454e4d4c ("net/mlx5e: Add MACsec offload Rx command support")
> Signed-off-by: Raed Salem <raeds@...dia.com>
> Reviewed-by: Emeel Hakim <ehakim@...dia.com>
> Signed-off-by: Saeed Mahameed <saeedm@...dia.com>
> ---
>   drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
> index b51de07d5bad..9c891a877998 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
> @@ -803,10 +803,10 @@ static int mlx5e_macsec_upd_rxsc(struct macsec_context *ctx)
>   		goto out;
>   	}
>   
> -	rx_sc->active = ctx_rx_sc->active;
>   	if (rx_sc->active == ctx_rx_sc->active)
>   		goto out;
>   
> +	rx_sc->active = ctx_rx_sc->active;
>   	for (i = 0; i < MACSEC_NUM_AN; ++i) {
>   		rx_sa = rx_sc->rx_sa[i];
>   		if (!rx_sa)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ