KSPP / linux

Linux kernel source tree (Kernel Self Protection Project)
https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project
Other
80 stars 5 forks source link

Fix error seen under GCC 13 and -fstrict-flex-arrays=3 #299

Closed GustavoARSilva closed 1 year ago

GustavoARSilva commented 1 year ago

In function ‘fortify_memcpy_chk’,
    inlined from ‘_append_tdma’ at /home/gustavo/git/linux/drivers/net/wireless/realtek/rtw89/coex.c:1579:3:
/home/gustavo/git/linux/include/linux/fortify-string.h:583:25: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  583 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GustavoARSilva commented 1 year ago

Patch: https://lore.kernel.org/linux-wireless/20230523113241.2772811-1-arnd@kernel.org/