lkml.org 
[lkml]   [2022]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectnew __write_overflow_field compiler warning
From
Date
Hi Kees,

I'm hoping you can help with this. I recently updated to Fedora 36,
which has gcc v12, and I've started seeing this warning pop up when
compiling the ceph.ko:

In file included from ./include/linux/string.h:253,
from ./include/linux/ceph/ceph_debug.h:7,
from fs/ceph/inode.c:2:
In function ‘fortify_memset_chk’,
inlined from ‘netfs_i_context_init’ at ./include/linux/netfs.h:326:2,
inlined from ‘ceph_alloc_inode’ at fs/ceph/inode.c:463:2:
./include/linux/fortify-string.h:242: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]
242 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This doesn't seem to happen with gcc v11. It looks like the code is
doing the right thing. Is there something we need to fix how the netfs
context gets initialized or is this a compiler problem?

FWIW: I'm using:

gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)

Thanks,
--
Jeff Layton <jlayton@kernel.org>

\
 
 \ /
  Last update: 2022-05-17 20:05    [W:0.053 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site