Open pete842 opened 2 years ago
You can also "fix" the issue by compiling with CONFIG_WERROR disabled. This is done on the arch linux package so I assume it is fine.
@pete842 See commit 86cffecdeaa2, which disabled this warning in v5.16 and was not backported to the 5.15 stable branch.
@tsautereau-anssi thank you, I will have a look 👌
Hi,
It seems after
gcc
update from version 10.3.0 to 11.2.0, I am not able to compile the kernel anymoreWhen I try to compile the linux kernel 5.15.25 with linux-hardened patches using gcc 11.2.0, I get the following output:
As this suggests, the only impact of the patch on this issue is the addition of
__attribute__((alloc_size(1)))
at function__kmalloc(size_t size, gfp_t flags)
in./include/linux/slab.h:428
. I can confirm that removing this and this only does "fix the problem".Everything works fine when using gcc version 10.4.0.
I'm fully aware that this is not directly linked to the patch itself, and it most likely has to do with a gcc regression or something. However, I was hopping not being alone with this issue, and hopefully find some help here.
My guess is that this is a bogus warning / false positive.