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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z8DnLGnhV3WxpHyW@x130>
Date: Thu, 27 Feb 2025 14:29:00 -0800
From: Saeed Mahameed <saeed@...nel.org>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: "Gustavo A. R. Silva" <gustavoars@...nel.org>,
	Saeed Mahameed <saeedm@...dia.com>,
	Leon Romanovsky <leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-rdma@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH v3][next] net/mlx5e: Avoid a hundred
 -Wflex-array-member-not-at-end warnings

On 27 Feb 12:06, Gustavo A. R. Silva wrote:
>
>>>
>>>-struct mlx5e_umr_wqe {
>>>+struct mlx5e_umr_wqe_hdr {
>>>    struct mlx5_wqe_ctrl_seg       ctrl;
>>>    struct mlx5_wqe_umr_ctrl_seg   uctrl;
>>>    struct mlx5_mkey_seg           mkc;
>>>+};
>>>+
>>>+struct mlx5e_umr_wqe {
>>>+    struct mlx5e_umr_wqe_hdr hdr;
>>
>>You missed or ignored my comment on v0, anyway:
>>
>>Can we have struct mlx5e_umr_wq_hdr defined anonymously within
>>mlx5e_umr_wqe? Let's avoid namespace pollution.
>
>I thought your comment was directed to Jabuk.
>
>I don't see how to avoid that and at the same time changing
>the type of the conflicting object and fix the warnings:
>
>-			struct mlx5e_umr_wqe   umr_wqe;
>+			struct mlx5e_umr_wqe_hdr umr_wqe;
>
>My first patch avoids the need to introduce a bunch of `hdr.`
>changes. However, `hdr` is introduced as an identifier for
>the members grouped in the new type `struct mlx5e_umr_wqe_hdr`.
>
>Of course struct_group_tagged() also creates an anonymous struct,
>which is why we can avoid all those `hdr.` changes in v1.
>

I missed the fact that it was used part of another struct that needed only
the header.

This patch is alright, no need to change anything.

Reviewed-by: Saeed Mahameed <saeedm@...dia.com>

>--
>Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ