Bug 2071969
| Summary: | Loading the nf_conntrack module fails on s390x with "missing module BTF, cannot register kfuncs" | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ondrej Mosnacek <omosnace> |
| Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | acaringi, adscvr, airlied, alciregi, asavkov, bskeggs, hdegoede, hpa, jarodwilson, jbenc, jglisse, jiji, jmarchan, jonathan, josef, kernel-maint, lgoncalv, linville, masami256, mchehab, ptalbert, steved, vmalik, yiche, ykaliuta |
| Target Milestone: | --- | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | s390x | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | kernel-5.18.0-0.rc3.20220421gitb253435746d9a4a.30.fc37 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-04-26 11:09:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ondrej Mosnacek
2022-04-05 10:30:23 UTC
*** Bug 2072313 has been marked as a duplicate of this bug. *** *** Bug 2072320 has been marked as a duplicate of this bug. *** CC Red Hat BPF maintainers - guys, could someone from your team have a look at this? works for me with kernel-5.18.0-0.rc2.23.fc37.x86_64 Can you recheck? The problem is only on the s390x arch. Ok, I see CONFIG_DEBUG_INFO_BTF_MODULES=y, but module in the kernel does not have the section: # llvm-readelf --sections /tmp/nf_conntrack.ko | grep BTF [37] .BTF_ids PROGBITS 0000000000000000 0243ad 00002c 00 A 0 0 1 while it present in both self-built kernel: # llvm-readelf --sections /lib/modules/5.17.0+/kernel/net/netfilter/nf_conntrack.ko | grep -i btf [39] .BTF_ids PROGBITS 0000000000000000 00015d35 [69] .BTF PROGBITS 0000000000000000 0001aedb and x86: # llvm-readelf --sections /tmp/nf_conntrack.ko| grep -i btf [31] .BTF_ids PROGBITS 0000000000000000 035d3e 00002c 00 A 0 0 1 [51] .BTF PROGBITS 0000000000000000 03df80 0572c6 00 0 0 1 Can it be some stripping problem? (it's triggered by the patch c446fdacb10d ("bpf: fix register_btf_kfunc_id_set for !CONFIG_DEBUG_INFO_BTF") which came with 5.18.0-0.rc0.20220325git34af78c4e616.7.fc37)
Hm... so in the kernel.spec there is this:
# skip BTF in kernel modules for s390x
%ifnarch s390x
%define with_kmod_btf --keep-section '.BTF'
%endif
...and on s390x we do have CONFIG_DEBUG_INFO_BTF_MODULES=y, so that probably explains why on s390x the error condition is hit (it is guarded only by CONFIG_DEBUG_INFO_BTF_MODULES and has no idea that we strip out module BTF intentionally).
That snippet was added by:
commit 6a8653ed6b346ed322084e4c38724fefbaf53f9a
Author: Jiri Olsa <jolsa>
Date: Thu Oct 14 13:34:00 2021 +0200
spec: Keep .BTF section in modules
...which explains:
This increases size of each module. Currently there's known
dedup issue on s390x, that makes the size of all modules
double [1] so I'm not enabling it for s390x for the moment.
[...]
[1] https://lore.kernel.org/bpf/20211023120452.212885-1-jolsa@kernel.org/
So either we need to remove the 'ifnarch s390x' condition (perhaps the dedup issue is already fixed?), or somehow make it such that the missing BTF section doesn't lead to an error when it's stripped away intentionally.
Yes, the fix is there efdd3eb8015e ("libbpf: Accommodate DWARF/compiler bug with duplicated structs")
So, the spec workaround can be reverted.
This is already fixed. |