linux-next: build failure after merge of the kspp tree
Hi all,
After merging the kspp tree, today's linux-next build (x86_64 allmodconfig) failed like this:
In file included from include/linux/string.h:253,
from include/linux/bitmap.h:11,
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:22,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/skbuff.h:15,
from include/linux/tcp.h:17,
from drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:33:In function 'fortify_memcpy_chk',
inlined from 'mlx5e_insert_vlan' at drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:211:2,
inlined from 'mlx5e_sq_xmit_wqe' at drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:496:4:include/linux/fortify-string.h:325: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]
325 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/string.h:253,
from include/linux/bitmap.h:11,
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:22,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/netdevice.h:24,
from include/trace/events/xdp.h:8,
from include/linux/bpf_trace.h:5,
from drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:33:
In function 'fortify_memcpy_chk',
inlined from 'mlx5e_xmit_xdp_frame' at drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:344:3:
include/linux/fortify-string.h:325: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]
325 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Caused by various commits in the mlx5 driver interacting with the new memcpy checking.
I have disabled CONFIG_MLX5_CORE_EN for today while this gets sorted out properly.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 18 lines · Stephen Rothwell
Hi all,
After merging the kspp tree, today's linux-next build (
x86_64allmodconfig) failed like this:In file included from
include/linux/string.h:253,from include/linux/bitmap.h:11, 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:22, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:65, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/skbuff.h:15, from include/linux/tcp.h:17, from drivers/net/ethernet/mellanox/mlx5/core/en_tx.c:33:
Quoted 6 lines
In function '
fortify_memcpy_chk',
inlined from 'mlx5e_insert_vlan' atdrivers/net/ethernet/mellanox/mlx5/core/en_tx.c:211:2,
inlined from 'mlx5e_sq_xmit_wqe' atdrivers/net/ethernet/mellanox/mlx5/core/en_tx.c:496:4:include/linux/fortify-string.h:325:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe usestruct_group()? [-Werror=attribute-warning]325 | __write_overflow_field(p_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This should be fixed by:
https://lore.kernel.org/linux-hardening/[email protected]/
(I was expecting this to be in netdev by now.)
Quoted 13 lines
In file included from
include/linux/string.h:253,from include/linux/bitmap.h:11, 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:22, from arch/x86/include/asm/timex.h:5, from include/linux/timex.h:65, from include/linux/time32.h:13, from include/linux/time.h:60, from include/linux/ktime.h:24, from include/linux/timer.h:6, from include/linux/netdevice.h:24,
Quoted 8 lines
from include/trace/events/xdp.h:8,
from include/linux/bpf_trace.h:5,
from drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:33:
In function 'fortify_memcpy_chk',
inlined from 'mlx5e_xmit_xdp_frame' at drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c:344:3:
include/linux/fortify-string.h:325: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]
325 | __write_overflow_field(p_size_field, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~This should be fixed in:
https://lore.kernel.org/linux-hardening/[email protected]/
(Again, this was expected to be in netdev by now.)
Quoted 5 lines
Caused by various commits in the mlx5 driver interacting with the new memcpy checking.
I have disabled
CONFIG_MLX5_CORE_ENfor today while this gets sorted out properly.
Thanks!
-Kees
Signature · 1 line
Kees Cook
Hi Kees,
Quoted 9 lines · On Sun, 30 Jan 2022 20:04:00 -0800 Kees Cook <[email protected]> wrote:
This should be fixed by:
https://lore.kernel.org/linux-hardening/[email protected]/
(I was expecting this to be in netdev by now.)This should be fixed in:
https://lore.kernel.org/linux-hardening/[email protected]/
(Again, this was expected to be in netdev by now.)
yeah, neither has made it yet. However, it would not have helped as I am merging the kspp tree very early so that new bugs get fixed in the trees that introduce them. These 2 are in Linus tree (for a long time) and so it would be better if these fixes went int the net tree and then Linus' tree as bug fixes.
I will use these in the merge of the kspp tree from tomorrow until they appear earlier (or you could put them back in your tree). Cross tree
dependencies are a pain :-( BTW Linus would have the same problem I
am having if he merges your tree during the merge window before he merges the net-next tree ...
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 11 lines · Stephen Rothwell
Quoted 9 lines · On Sun, 30 Jan 2022 20:04:00 -0800 Kees Cook <[email protected]> wrote:
This should be fixed by:
https://lore.kernel.org/linux-hardening/[email protected]/
(I was expecting this to be in netdev by now.)This should be fixed in:
https://lore.kernel.org/linux-hardening/[email protected]/
(Again, this was expected to be in netdev by now.)
Quoted 5 lines
yeah, neither has made it yet. However, it would not have helped as I am merging the kspp tree very early so that new bugs get fixed in the trees that introduce them. These 2 are in Linus tree (for a long time) and so it would be better if these fixes went int the net tree and then Linus' tree as bug fixes.
Okay, understood. I'll leave them in my tree until I see them duplicated in their respective trees (or in Linus's tree).
Quoted 5 lines
I will use these in the merge of the kspp tree from tomorrow until they appear earlier (or you could put them back in your tree). Cross tree
dependencies are a pain :-( BTW Linus would have the same problem I
am having if he merges your tree during the merge window before he merges the net-next tree ...
Yeah, I'm used to going "late" in the -rc1 from these kinds of things. :)
Thanks!
Signature · 1 line
Kees Cook
Quoted 12 lines · Kees Cook
Quoted 11 lines · Stephen Rothwell
Quoted 9 lines · On Sun, 30 Jan 2022 20:04:00 -0800 Kees Cook <[email protected]> wrote:
This should be fixed by:
https://lore.kernel.org/linux-hardening/[email protected]/
(I was expecting this to be in netdev by now.)This should be fixed in:
https://lore.kernel.org/linux-hardening/[email protected]/
(Again, this was expected to be in netdev by now.)
Quoted 6 lines
Quoted 5 lines
yeah, neither has made it yet. However, it would not have helped as I am merging the kspp tree very early so that new bugs get fixed in the trees that introduce them. These 2 are in Linus tree (for a long time) and so it would be better if these fixes went int the net tree and then Linus' tree as bug fixes.
I need proper fixes tags to submit to net, can you provide ?
another option is to use a shared branch with those fixes and pull it to both net-next and kspp.
let me know what option do you prefer.
-Saeed.
Quoted 4 lines · Saeed Mahameed
Quoted 3 lines · Kees Cook
Quoted 2 lines · Stephen Rothwell
Quoted 1 line · On Sun, 30 Jan 2022 20:04:00 -0800 Kees Cook <[email protected]> wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
yeah, neither has made it yet. However, it would not have helped as I am merging the kspp tree very early so that new bugs get fixed in the trees that introduce them. These 2 are in Linus tree (for a long time) and so it would be better if these fixes went int the net tree and then Linus' tree as bug fixes.
I need proper fixes tags to submit to net, can you provide ?
Sure! See above.
Quoted 2 lines
another option is to use a shared branch with those fixes and pull it to both net-next and kspp.
It's just a handful left now, so I think we'll avoid this for now.
Thanks!
Signature · 1 line
Kees Cook