Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1003210: Linux kernel module loading failing with "failed to validate module" error

4,873 views
Skip to first unread message

Ben Dooks

unread,
Jan 6, 2022, 5:50:03 AM1/6/22
to
Package: linux-image-5.15.0-2-amd64
Version: 5.15.5-2

Dmesg output when mmc card is inserted:


[137854.880467] mmc0: cannot verify signal voltage switch
[137855.004774] mmc0: new ultra high speed SDR104 SDHC card at address aaaa
[137855.009414] BPF: type_id=6 bits_offset=416
[137855.009418] BPF:
[137855.009419] BPF:Invalid name
[137855.009420] BPF:
[137855.009422] failed to validate module [mmc_block] BTF: -22

# cat /etc/debian_version
bookworm/sid


--
Ben Dooks http://www.codethink.co.uk/
Senior Engineer Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

Martijn van de Streek

unread,
Jan 6, 2022, 12:50:04 PM1/6/22
to
I'm getting very similar errors on boot, when using an encrypted root
file system on LVM. Because it can't load the necessary modules, the
system does not allow me to enter the password to unlock my drive,
making the system unusable unless I boot an older kernel.

Output of lsblk:
------
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 476,9G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda4 8:4 0 300M 0 part /boot
└─sda5 8:5 0 476,1G 0 part
└─sda6_crypt 254:0 0 476,1G 0 crypt
├─Debian-Swap 254:1 0 14,9G 0 lvm
├─Debian-System 254:2 0 78,6G 0 lvm /
└─Debian-Home 254:3 0 382,6G 0 lvm /home
------

Part of the boot log. Other messages with different values for
"bits_offset" and "type_id" also show up, probably one for each module
that's trying to load.

------
Volume group "Debian" not found
Cannot process volume group Debian
BPF:* type_id=86261 bits_offset=960
BPF:
BPF:Invalid name
BPF:
BPF:* type_id=86261 bits_offset=960
BPF:
BPF:Invalid name
BPF:
modprobe: can't load module dm_mod (kernel/drivers/md/dm-mod.ko):
Invalid argument
BPF:* type_id=86261 bits_offset=960
BPF:
BPF:Invalid name
BPF:
cryptsetup: Waiting for encrypted source device UUID=[snip]...
------

-Martijn

Jan Hasebos

unread,
Jan 7, 2022, 6:20:04 PM1/7/22
to
This seems to be affecting all modules that have a .BTF segment. I
cannot connect to Wi-Fi, connect USB hard disks, make tunnels...

----- Wi-Fi -----
[19485.632072] wlp0s20f3: associated
[19488.566876] BPF: type_id=44192 bits_offset=1536
[19488.566890] BPF:
[19488.566894] BPF:Invalid name
[19488.566898] BPF:

[19488.566903] failed to validate module [ccm] BTF: -22
[19488.625747] wlp0s20f3: deauthenticating from xx:xx:xx:xx:xx:xx by
local choice (Reason: 1=UNSPECIFIED)
-----------------

----- USB HD -----
[23635.967096] usb 2-4: new SuperSpeed USB device number 7 using xhci_hcd
[23635.988048] usb 2-4: New USB device found, idVendor=1058,
idProduct=25a2, bcdDevice=10.19
[23635.988063] usb 2-4: New USB device strings: Mfr=1, Product=2,
SerialNumber=3
[23635.988073] usb 2-4: Manufacturer: Western Digital
[23636.572415] BPF:[86240] Invalid name_offset:1510398
[23636.572427] failed to validate module [scsi_common] BTF: -22
[23636.628327] BPF:[86240] Invalid name_offset:1510398
[23636.628336] failed to validate module [scsi_common] BTF: -22
------------------

----- tun -----
[25017.274185] BPF:[86223] ENUM (anon)
[25017.274187] BPF:size=4 vlen=11
[25017.274188] BPF:
[25017.274189] BPF:Invalid name
[25017.274189] BPF:

[25017.274190] failed to validate module [tun] BTF: -22
---------------

-Jan

Fabian Grünbichler

unread,
Jan 9, 2022, 4:00:04 AM1/9/22
to
On Thu, Jan 06, 2022 at 10:18:23AM +0000, Ben Dooks wrote:
> Package: linux-image-5.15.0-2-amd64
> Version: 5.15.5-2
>
> Dmesg output when mmc card is inserted:
>
>
> [137854.880467] mmc0: cannot verify signal voltage switch
> [137855.004774] mmc0: new ultra high speed SDR104 SDHC card at address aaaa
> [137855.009414] BPF: type_id=6 bits_offset=416
> [137855.009418] BPF:
> [137855.009419] BPF:Invalid name
> [137855.009420] BPF:
> [137855.009422] failed to validate module [mmc_block] BTF: -22
>
> # cat /etc/debian_version
> bookworm/sid

see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=998716 for more
info.

the workaround: ensure the booted kernel and the on-disk kernel modules
are from the same build: either reboot (possibly needs to regenerate
initrd first) or downgrade the on-disk kernel to the booted version.

TL;DRL: Debian either needs to start bumping ABI for every upload, or
hard-disable generating split BTF info for kernel modules

Jan Hasebos

unread,
Jan 9, 2022, 3:00:03 PM1/9/22
to
Fabian Grünbichler wrote:
>the workaround: ensure the booted kernel and the on-disk kernel modules
>are from the same build: either reboot[...]

I was reluctant to reboot because the other person couldn't open their
root disk anymore, but for me it started up fine, and now I can load
modules again. Thank you!
0 new messages