Search Linux Wireless

Re: [PATCH] uapi: propagate __struct_group() attributes to the container union

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 20 Nov 2023 14:05:08 +0300, Dmitry Antipov wrote:
> Recently the kernel test robot has reported an ARM-specific BUILD_BUG_ON()
> in an old and unmaintained wil6210 wireless driver. The problem comes from
> the structure packing rules of old ARM ABI ('-mabi=apcs-gnu'). For example,
> the following structure is packed to 18 bytes instead of 16:
> 
> struct poorly_packed {
>         unsigned int a;
>         unsigned int b;
>         unsigned short c;
>         union {
>                 struct {
>                         unsigned short d;
>                         unsigned int e;
>                 } __attribute__((packed));
>                 struct {
>                         unsigned short d;
>                         unsigned int e;
>                 } __attribute__((packed)) inner;
>         };
> } __attribute__((packed));
> 
> [...]

Applied to for-linus/hardening, thanks!

[1/1] uapi: propagate __struct_group() attributes to the container union
      https://git.kernel.org/kees/c/4e86f32a13af

Take care,

-- 
Kees Cook





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux