build warning for include/linux/fortify-string.h

From: Steve French

Date: Wed May 06 2026 - 12:40:51 EST


Is this build warning a known problem?

In file included from /home/smfrench/smb3-kernel/include/linux/string.h:386,
from /home/smfrench/smb3-kernel/include/linux/bitmap.h:13,
from /home/smfrench/smb3-kernel/include/linux/cpumask.h:11,
from
/home/smfrench/smb3-kernel/arch/x86/include/asm/paravirt.h:19,
from
/home/smfrench/smb3-kernel/arch/x86/include/asm/cpuid/api.h:57,
from
/home/smfrench/smb3-kernel/arch/x86/include/asm/processor.h:19,
from /home/smfrench/smb3-kernel/arch/x86/include/asm/timex.h:5,
from /home/smfrench/smb3-kernel/include/linux/timex.h:67,
from /home/smfrench/smb3-kernel/include/linux/time32.h:13,
from /home/smfrench/smb3-kernel/include/linux/time.h:60,
from /home/smfrench/smb3-kernel/include/linux/stat.h:19,
from /home/smfrench/smb3-kernel/include/linux/fs_dirent.h:5,
from
/home/smfrench/smb3-kernel/include/linux/fs/super_types.h:5,
from /home/smfrench/smb3-kernel/include/linux/fs/super.h:5,
from /home/smfrench/smb3-kernel/include/linux/fs.h:5,
from cifssmb.c:17:
In function ‘fortify_memcpy_chk’,
inlined from ‘CIFSSMBQFileInfo’ at cifssmb.c:4093:4:
/home/smfrench/smb3-kernel/include/linux/fortify-string.h:578:25:
warning: call to ‘__read_overflow2_field’ declared with attribute
warning: detected read beyond size of field (2nd parameter); maybe use
struct_group()? [-Wattribute-warning]
578 | __read_overflow2_field(q_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘fortify_memcpy_chk’,
inlined from ‘CIFSSMBUnixQFileInfo’ at cifssmb.c:4267:4:
/home/smfrench/smb3-kernel/include/linux/fortify-string.h:578:25:
warning: call to ‘__read_overflow2_field’ declared with attribute
warning: detected read beyond size of field (2nd parameter); maybe use
struct_group()? [-Wattribute-warning]
578 | __read_overflow2_field(q_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘fortify_memcpy_chk’,
inlined from ‘CIFSSMBUnixQPathInfo’ at cifssmb.c:4352:4:
/home/smfrench/smb3-kernel/include/linux/fortify-string.h:578:25:
warning: call to ‘__read_overflow2_field’ declared with attribute
warning: detected read beyond size of field (2nd parameter); maybe use
struct_group()? [-Wattribute-warning]
578 | __read_overflow2_field(q_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘fortify_memcpy_chk’,
inlined from ‘CIFSSMBQFSAttributeInfo’ at cifssmb.c:5137:4:
/home/smfrench/smb3-kernel/include/linux/fortify-string.h:578:25:
warning: call to ‘__read_overflow2_field’ declared with attribute
warning: detected read beyond size of field (2nd parameter); maybe use
struct_group()? [-Wattribute-warning]
578 | __read_overflow2_field(q_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘fortify_memcpy_chk’,
inlined from ‘CIFSSMBQFSDeviceInfo’ at cifssmb.c:5212:4:
/home/smfrench/smb3-kernel/include/linux/fortify-string.h:578:25:
warning: call to ‘__read_overflow2_field’ declared with attribute
warning: detected read beyond size of field (2nd parameter); maybe use
struct_group()? [-Wattribute-warning]
578 | __read_overflow2_field(q_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘fortify_memcpy_chk’,
inlined from ‘CIFSSMBQFSUnixInfo’ at cifssmb.c:5284:4:
/home/smfrench/smb3-kernel/include/linux/fortify-string.h:578:25:
warning: call to ‘__read_overflow2_field’ declared with attribute
warning: detected read beyond size of field (2nd parameter); maybe use
struct_group()? [-Wattribute-warning]
578 | __read_overflow2_field(q_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CHECK cifssmb.c


--
Thanks,

Steve