On Tue, Jun 4, 2019 at 2:30 AM Hannes Reinecke <[email protected]> wrote:
>
> Gcc-9 complains for a memset across pointer boundaries, which happens
> as the code tries to allocate a flexible array on the stack.
> Turns out we cannot do this without relying on gcc-isms, so
> this patch converts the stack allocation in proper kzalloc() calls.
>
> Signed-off-by: Hannes Reinecke <[email protected]>
So this patch apparently isn't making it into 5.3?
The gcc-9 warnings are still there, and as annoying as they were
originally. Appended for your viewing "pleasure" once again, in case
you don't have gcc-9 installed..
Linus
---
In file included from ./include/linux/bitmap.h:9,
from ./include/linux/cpumask.h:12,
from ./arch/x86/include/asm/cpumask.h:5,
from ./arch/x86/include/asm/msr.h:11,
from ./arch/x86/include/asm/processor.h:21,
from ./arch/x86/include/asm/cpufeature.h:5,
from ./arch/x86/include/asm/thread_info.h:53,
from ./include/linux/thread_info.h:38,
from ./arch/x86/include/asm/preempt.h:7,
from ./include/linux/preempt.h:78,
from ./include/linux/spinlock.h:51,
from ./include/linux/seqlock.h:36,
from ./include/linux/time.h:6,
from ./include/linux/stat.h:19,
from ./include/linux/module.h:10,
from drivers/scsi/fcoe/fcoe_ctlr.c:10:
In function ‘memset’,
inlined from ‘fcoe_ctlr_vlan_parse’ at drivers/scsi/fcoe/fcoe_ctlr.c:2818:2,
inlined from ‘fcoe_ctlr_vlan_recv’ at drivers/scsi/fcoe/fcoe_ctlr.c:2993:7:
./include/linux/string.h:344:9: warning: ‘__builtin_memset’ offset
[569, 600] from the object at ‘buf’ is out of the bounds of referenced
subobject ‘rdata’ with type ‘struct fc_rport_priv’ at offset 0
[-Warray-bounds]
344 | return __builtin_memset(p, c, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘memset’,
inlined from ‘fcoe_ctlr_vn_parse’ at drivers/scsi/fcoe/fcoe_ctlr.c:2287:2,
inlined from ‘fcoe_ctlr_vn_recv’ at drivers/scsi/fcoe/fcoe_ctlr.c:2760:7:
./include/linux/string.h:344:9: warning: ‘__builtin_memset’ offset
[569, 600] from the object at ‘buf’ is out of the bounds of referenced
subobject ‘rdata’ with type ‘struct fc_rport_priv’ at offset 0
[-Warray-bounds]
344 | return __builtin_memset(p, c, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~