Fedora Account System
Red Hat Associate
Red Hat Customer
Since the update to kernel-headers-7.3.0-0.rc1.18.fc46 in rawhide, packages fail to build on aarch64 (only) with errors like this: In file included from /usr/include/bits/sigcontext.h:30, from /usr/include/signal.h:301, from /usr/include/sys/param.h:28, from btf.c:13: /usr/include/asm/sigcontext.h:81:9: error: unknown type name ‘__u128’; did you mean ‘__u32’? 81 | __u128 vregs[32]; | ^~~~~~ | __u32 In file included from /usr/include/asm/bpf_perf_event.h:5, from /usr/include/linux/bpf_perf_event.h:11, from libbpf.c:36: /usr/include/asm/ptrace.h:96:9: error: unknown type name ‘__u128’; did you mean ‘__u32’? 96 | __u128 vregs[32]; | ^~~~~~ | __u32 /usr/include/asm/ptrace.h:261:9: error: unknown type name ‘__u128’; did you mean ‘__u32’? 261 | __u128 apiakey; | ^~~~~~ | __u32 /usr/include/asm/ptrace.h:262:9: error: unknown type name ‘__u128’; did you mean ‘__u32’? 262 | __u128 apibkey; | ^~~~~~ | __u32 (... continued with the same issue in other locations ...) I originally noticed this in Rust applications (rust-libbpf-cargo*, udev-hid-bpf, etc.), but it also affects some plain C/C++ apps (bpftool). Reproducible: Always Steps to Reproduce: 1. Attempt to build anything that #include's the affected kernel headers 2. no step two 3. no step three either Actual Results: fails. Expected Results: works?
Ah, this is because the type was changed from __uint128_t to solve alignment issues, and __u128 should usually be there but is only defined when __SIZEOF_INT128__ exists. Which implies something with rustc not defining it. Let me try building bpftools.
Or it could be a stale/alternate types.h like the ones in tools...
Right, so for bpftool upstream linux as you can see changed the type for better alignment control. This shouldn't have a ABI affect on actual arm64.. d4bf9e08d412 arm64: uapi: Use __u128 instead of __uint128_t in UAPI headers At the same time this breaks things that are keeping their own version of linux/types.h if it doesn't have __u128 defined like the uapi/linux/types.h has. Particularly the weird place the kernel/tools exist in, needed a fix: 10a47fb67340 tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures And that is exactly why fedora's bpftool has issues. It needs to sync to upstream bpftool from the kernel sources. So, the larger question is, what else is failing because that is likely the root problem, people have their own linux/type.h that is being used for some reason instead of the kernel provided/installed /usr/include/linux/type.h which provides the definition.
I've requested a stable backport of 10a47fb67340 ("tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures") which at least fixes the problem with older kernel tools building on newer systems, but it will then require the external bpftools tree to pick it up too. This is largely going to have to be fixed in every single failing package.