Re: [PATCH net] wifi: mac80211_hwsim: reject undersized HWSIM_ATTR_TX_INFO
From: Johannes Berg
Date: Tue Jul 21 2026 - 07:45:17 EST
On Sat, 2026-07-11 at 17:15 +0200, Ibrahim Hashimov wrote:
> hwsim_tx_info_frame_received_nl() casts the HWSIM_ATTR_TX_INFO
> attribute payload to a `struct hwsim_tx_rate *` and then
> unconditionally walks IEEE80211_TX_MAX_RATES (4) entries of it:
[snip]
Way too much text. Please edit manually, LLMs like to be super verbose.
> [HWSIM_ATTR_TX_INFO] = { .type = NLA_BINARY,
> .len = IEEE80211_TX_MAX_RATES *
> sizeof(struct hwsim_tx_rate)},
So, you found the policy, why not fix that instead?
johannes