Hi, On 07/08/2020 19:23, Jean-Philippe Brucker wrote:
Hi, [Adding the linux-arm-kernel list on Cc] It looks like this "__Poly8_t" type is internal to GCC (provided in arm_neon.h) and clang has its own internals. I managed to reproduce this with an arm64 allyesconfig kernel (+BTF), but don't know how to fix it at the moment. Maybe libbpf should generate defines to translate these intrinsics between clang and gcc? Not very elegant. I'll take another look next week.
indeed, this has only been present in our arm64 kernel builds but I suppose it may surface for different configurations as well. Per Andrii's suggestion, I think blacklisting such types during the dump would be a safe bet for now.
I don't know if there is a room for improvement regarding your a) and b) points, as I think the added complexity is inherent to cross-building. But kernel crashes definitely need to be fixed, as well as the above problem.
If that is the case, I suppose an additional step would be to configure the kernel in such a way so that the generated header files result in the smallest possible file size, while retaining all structures that we require in our eBPF programs.
The kernel crash seems to elude our attempts to reproduce it; it occurs only on a target 32-bit platform device, but a reproducible program does not crash the kernel in a QEMU ARM environment. When we investigate this further we will definitely share our results.
Thanks, Jean
Thanks, -- Jakov Petrina