[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1ac162bbcb11abdbb0b3c74df3bb1df02a5068ab.camel@sipsolutions.net>
Date: Thu, 20 Nov 2025 10:30:46 +0100
From: Johannes Berg <johannes@...solutions.net>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>, Stanislaw Gruszka
<stf_xl@...pl>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH][next] iwlegacy: Avoid multiple
-Wflex-array-member-not-at-end warnings
On Wed, 2025-11-19 at 17:41 +0900, Gustavo A. R. Silva wrote:
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
Look, I honor your noble goals, but ... it'd be useful if the code
actually worked after :)
> --- a/drivers/net/wireless/intel/iwlegacy/commands.h
> +++ b/drivers/net/wireless/intel/iwlegacy/commands.h
> @@ -2664,10 +2664,12 @@ struct il3945_beacon_notif {
> } __packed;
>
> struct il4965_beacon_notif {
> - struct il4965_tx_resp beacon_notify_hdr;
> __le32 low_tsf;
> __le32 high_tsf;
> __le32 ibss_mgr_status;
> +
> + /* Must be last as it ends in a flexible-array member. */
> + struct il4965_tx_resp beacon_notify_hdr;
> } __packed;
You can't just randomly rearrange firmware API. The __packed and __le32
really ought to have given you a hint here.
johannes
Powered by blists - more mailing lists