public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: "johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH wireless-next] wifi: mac80211: add __packed to union members of struct ieee80211_rx_status
Date: Tue, 14 Apr 2026 00:55:27 +0000	[thread overview]
Message-ID: <280094f50a534fc998037b21c36ebe11@realtek.com> (raw)
In-Reply-To: <20260411072509.1556635-1-pkshih@realtek.com>

Ping-Ke Shih <pkshih@realtek.com> wrote:
> The arm-linux-gnueabi-gcc compiler, align the field followed by union
> members, causing size of struct ieee80211_rx_status over skb->cb
> (48 bytes). By investigation, the union member starts at offset 32,
> and the offset of next field rate_idx is 36 instead of expected 33, and
> the total size is (unexpected) 52.
> 
> When compiling rtw88 driver, it throws:
> 
> In file included from /work/linux-src/linux-stable/include/linux/string.h:386,
>                  from /work/linux-src/linux-stable/include/linux/bitmap.h:13,
>                  from /work/linux-src/linux-stable/include/linux/cpumask.h:11,
>                  from /work/linux-src/linux-stable/include/linux/smp.h:13,
>                  from /work/linux-src/linux-stable/include/linux/lockdep.h:14,
>                  from /work/linux-src/linux-stable/include/linux/mutex.h:17,
>                  from /work/linux-src/linux-stable/include/linux/kernfs.h:11,
>                  from /work/linux-src/linux-stable/include/linux/sysfs.h:16,
>                  from /work/linux-src/linux-stable/include/linux/kobject.h:20,
>                  from /work/linux-src/linux-stable/include/linux/dmi.h:6,
>                  from pci.c:5:
> In function 'fortify_memcpy_chk',
>     inlined from 'rtw_pci_rx_napi.constprop' at pci.c:1095:4:
> /work/linux-src/linux-stable/include/linux/fortify-string.h:569:25: warning: call to
> '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st
> parameter); maybe use struct_group()? [-Wattribute-warning]
>   569 |                         __write_overflow_field(p_size_field, size);
>       |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> After this patch, the size of struct ieee80211_rx_status is 48.
> 
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> Because of size assertion of rtw88's efuse map [1], I found
> arm-linux-gnueabi-gcc compiler throws this warning, but x86 gcc is absolutely
> silent and expected without this patch.
> 
> [1]
> https://lore.kernel.org/linux-wireless/7c65e315-5a2e-455e-87ee-8fc6d60ed807@gmail.com/T/#m43fdf8a1
> c2b8cff92c1ef50faab7993522647162

I'd note that discussion thread [2] of original kernel test robot.
Arnd pointed out the cause is CONFIG_AEABI is not set, and he said
nobody should be using ARM OABI any more. 

Maybe, we can ignore the CPU and skip this patch.

[2] https://lore.kernel.org/lkml/6b6310b8-2b0d-4390-992e-5ccd81cef2e0@app.fastmail.com/



  reply	other threads:[~2026-04-14  0:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-11  7:25 [PATCH wireless-next] wifi: mac80211: add __packed to union members of struct ieee80211_rx_status Ping-Ke Shih
2026-04-14  0:55 ` Ping-Ke Shih [this message]
2026-04-16 11:53   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=280094f50a534fc998037b21c36ebe11@realtek.com \
    --to=pkshih@realtek.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox