Re: include/linux/build_bug.h:78:41: error: static assertion failed: "struct bpf_fib_lookup size check"
From: Arnd Bergmann
Date: Wed Apr 03 2024 - 04:47:03 EST
On Wed, Apr 3, 2024, at 10:10, Anton Protopopov wrote:
> On Wed, Apr 3, 2024 at 10:03 AM Naresh Kamboju
> <naresh.kamboju@xxxxxxxxxx> wrote:
>>
>> The arm footbridge_defconfig failed with gcc-13 and gcc-8 on Linux next
>> starting from next-20240328..next-20240402.
>>
>> arm:
>> build:
>> * gcc-8-footbridge_defconfig - Failed
>> * gcc-13-footbridge_defconfig - Failed
>>
>> Reported-by: Linux Kernel Functional Testing <lkft@xxxxxxxxxx>
>>
>> In file included from include/linux/bitfield.h:10,
>> from arch/arm/include/asm/ptrace.h:13,
>> from arch/arm/include/asm/processor.h:14,
>> from include/linux/prefetch.h:15,
>> from arch/arm/include/asm/atomic.h:12,
>> from include/linux/atomic.h:7,
>> from net/core/filter.c:20:
>> include/linux/build_bug.h:78:41: error: static assertion failed:
>> "struct bpf_fib_lookup size check"
>> 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
>> | ^~~~~~~~~~~~~~
>
> Thanks, I will take a look today
The problem is CONFIG_AEABI=n, which changes the alignment
of sub-word struct members. I had assumed that AEABI is enabled
by default for everything already, but it looks like footbridge
and a couple of other defconfigs still have it turned off:
$ git grep -l CONFIG_ARCH_MULTI_V7.is.not arch/arm/configs/* | xargs git grep -L AEABI
arch/arm/configs/assabet_defconfig
arch/arm/configs/collie_defconfig
arch/arm/configs/footbridge_defconfig
arch/arm/configs/h3600_defconfig
arch/arm/configs/jornada720_defconfig
arch/arm/configs/neponset_defconfig
arch/arm/configs/netwinder_defconfig
arch/arm/configs/rpc_defconfig
arch/arm/configs/spear3xx_defconfig
arch/arm/configs/spear6xx_defconfig
arch/arm/configs/spitz_defconfig
Russell still has machines with an OABI toolchain, but I'm not
aware of anyone else relying on it. It does cause other
problems as well, so I already turned it off a long time ago
for my randconfig testing.
We should probably make it the default for everything, except
whichever defconfig Russell uses:
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1159,7 +1159,7 @@ config ARM_PATCH_IDIV
config AEABI
bool "Use the ARM EABI to compile the kernel" if !CPU_V7 && \
!CPU_V7M && !CPU_V6 && !CPU_V6K && !CC_IS_CLANG && !COMPILE_TEST
- default CPU_V7 || CPU_V7M || CPU_V6 || CPU_V6K || CC_IS_CLANG || COMPILE_TEST
+ default y
help
This option allows for the kernel to be compiled using the latest
ARM ABI (aka EABI). This is only useful if you are using a user
Or we could go one step further and make it 'depends on
EXPERT', short of removing it entirely.
Arnd