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: <37a70b40-0952-4a87-b583-8915a2206a11@embeddedor.com>
Date: Tue, 27 Aug 2024 13:25:22 -0600
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Johannes Berg <johannes@...solutions.net>,
 "Gustavo A. R. Silva" <gustavoars@...nel.org>, Kalle Valo
 <kvalo@...nel.org>, Stanislav Yakovlev <stas.yakovlev@...il.com>,
 Ajay Singh <ajay.kathat@...rochip.com>,
 Claudiu Beznea <claudiu.beznea@...on.dev>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
 libertas-dev@...ts.infradead.org, netdev@...r.kernel.org,
 linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] wifi: radiotap: Avoid
 -Wflex-array-member-not-at-end warnings



On 27/08/24 02:22, Johannes Berg wrote:
> On Tue, 2024-08-06 at 12:08 -0600, Gustavo A. R. Silva wrote:
>>
>> +++ b/include/net/ieee80211_radiotap.h
>> @@ -24,31 +24,36 @@
>>    * struct ieee80211_radiotap_header - base radiotap header
>>    */
>>   struct ieee80211_radiotap_header {
>> -	/**
>> -	 * @it_version: radiotap version, always 0
>> -	 */
>> -	uint8_t it_version;
>> -
>> -	/**
>> -	 * @it_pad: padding (or alignment)
>> -	 */
>> -	uint8_t it_pad;
>> -
>> -	/**
>> -	 * @it_len: overall radiotap header length
>> -	 */
>> -	__le16 it_len;
>> -
>> -	/**
>> -	 * @it_present: (first) present word
>> -	 */
>> -	__le32 it_present;
>> +	/* New members MUST be added within the __struct_group() macro below. */
> 
> There cannot be new members without breaking interop with the radiotap
> spec, that comment isn't really useful ;-)

Ah yes; the comment is not meant to be an invitation to add members to
the struct just for the sake of it. It's there to indicate where they
should be added if needed.

> 
>> +	__struct_group(ieee80211_radiotap_header_hdr, hdr, __packed,
> 
> And also, "header header" sounds odd to me really. The header of the
> header? What's what?
> 
> I think perhaps better to call this ieee80211_radiotap_hdr_fixed or so?

Sounds good to me. :)

Thanks for the feedback!
--
Gustavo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ