[Bug 1194501] Unable to boot TW 5.15.12: BPF verification failed for all modules

https://bugzilla.suse.com/show_bug.cgi?id=1194501 https://bugzilla.suse.com/show_bug.cgi?id=1194501#c35 --- Comment #35 from Shung-Hsi Yu <shung-hsi.yu@suse.com> --- (In reply to Fabian Vogt from comment #31)
Yep I think you're right on the point. There seems to be some mismatch between the base BTF (/sys/kernel/btf/vmlinux) and "splitted" BTF on those kernel that fails to load (.BTF section of the .ko file). The struct member/field in comment 29 that got their name messed happens to have the string data inside .ko, where as those with correct name have the string data inside /sys/kernel/btf/vmlinux. More explanation below. From comment 29 we see usb_device_id, match_flags, bcdDevice_lo, and bcdDevice_hi have their name messed up. All of them happens to have name_off (i.e. name offset, such as 1821813 for bcdDevice_lo) >= than str_len (string length, which is 1821787) field of the base BTF header, which is 1821787. That means the string such as "bcdDevice_lo", is stored in .ko rather than /sys/kernel/btf/vmlinux.
The pseudo code for extracting name is something like if name_off < base_btf->str_len: name = (char *) base_btf + base_btf->hdr_len + base_btf->str_pos + name_off else: # name is messed up in this branch name_off = name_off - base_btf->str_len name = (char *) ko_btf + ko_btf->hdr_len + ko_btf->str_pos + name_off So perhaps either str_len in base BTF or str_post in kernel module BTF is wrong -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com