Bug 1194617

Summary: ipheth kernel module fails to load due to BTF error
Product: [openSUSE] openSUSE Tumbleweed Reporter: Shung-Hsi Yu <shung-hsi.yu>
Component: KernelAssignee: Shung-Hsi Yu <shung-hsi.yu>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: jlee, shung-hsi.yu, tonyj
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Shung-Hsi Yu 2022-01-13 02:34:37 UTC
On the 20220110 snapshot of Tumbleweed, the ipheth kernel module (used for iPhone USB tethering) fails to load with error "Invalid argument".

The kernel log has the following error:

    BPF:[103111] STRUCT
    BPF:size=152 vlen=2
    BPF:
    BPF:Invalid name
    BPF:

    failed to validate module [ipheth] BTF: -22

So it looks like the kernel think that the BTF info that comes with ipheth is invalid
Comment 1 Shung-Hsi Yu 2022-01-13 03:11:07 UTC
With bpftool I get the same error, so it's probably didn't went to the verifier stage yet

    $ /usr/sbin/bpftool btf -d dump file ./ipheth.ko.orig
    
    libbpf: Invalid BTF string section
    Error: failed to load BTF from ./ipheth.ko.orig: Invalid argument

But if I manually regenerate the BTF info with `pahole -J ./ipheth.ko`, then bpftool can dump the BTF info just fine

Also the size difference is quite significant, so I wonder if the BTF info is corrupted

    -rw-r--r-- 1 syu users 213K Jan 13 10:57 ipheth.ko.regen
    -rw-r--r-- 1 syu users  33K Jan 13 10:57 ipheth.ko.orig
Comment 2 Shung-Hsi Yu 2022-01-14 00:58:36 UTC
Marking as a duplicate of 1194501

*** This bug has been marked as a duplicate of bug 1194501 ***