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: <Y4WcWaVbNptkQiEL@fedora>
Date:   Mon, 28 Nov 2022 21:44:57 -0800
From:   Saeed Mahameed <saeed@...nel.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Jacob Keller <jacob.e.keller@...el.com>,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Saeed Mahameed <saeedm@...dia.com>, netdev@...r.kernel.org,
        Tariq Toukan <tariqt@...dia.com>,
        Emeel Hakim <ehakim@...dia.com>, Raed Salem <raeds@...dia.com>
Subject: Re: [net 13/15] net/mlx5e: MACsec, remove replay window size
 limitation in offload path

On 28 Nov 19:35, Jakub Kicinski wrote:
>On Mon, 28 Nov 2022 15:42:19 -0800 Jacob Keller wrote:
>> > index c19581f1f733..72f8be65fa90 100644
>> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
>> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
>> > @@ -229,22 +229,6 @@ static int macsec_set_replay_protection(struct mlx5_macsec_obj_attrs *attrs, voi
>> >   	if (!attrs->replay_protect)
>> >   		return 0;
>> >
>> > -	switch (attrs->replay_window) {
>> > -	case 256:
>> > -		window_sz = MLX5_MACSEC_ASO_REPLAY_WIN_256BIT;
>> > -		break;
>> > -	case 128:
>> > -		window_sz = MLX5_MACSEC_ASO_REPLAY_WIN_128BIT;
>> > -		break;
>> > -	case 64:
>> > -		window_sz = MLX5_MACSEC_ASO_REPLAY_WIN_64BIT;
>> > -		break;
>> > -	case 32:
>> > -		window_sz = MLX5_MACSEC_ASO_REPLAY_WIN_32BIT;
>> > -		break;
>> > -	default:
>> > -		return -EINVAL;
>> > -	}
>>
>> What sets window_sz now? Looking at the current code wouldn't this leave
>> window_sz uninitialized and this undefined behavior of MLX5_SET? Either
>> you should just forward in attrs->replay_window and remove window_sz
>> local or drop the MLX5_SET call for setting window size?
>
>Damn it, this is a clang warning, I need to rescind the PR :/

Make sense, Jacob found two real issues and this one is critical,
but I don't know how that works for PRs, let me know when you do it so I
will add his reviewed-by tags and address the two issues when is send v2.

another option is that i am currently working on my next PR for net, I can
address those two issues there, but we won't have Jacobs reviewed-by for
the work he already done on this series :/ .. 

Thanks.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ