You are not logged in.

#1 2021-09-06 09:23:35

DAC324
Member
Registered: 2020-03-12
Posts: 80

Kernel 5.14.1, Nvidia 390.144: failed to validate module BTF: -22

Hello,

Looks like the good old Nvidia driver 390.144 is reaching the end of its days.

I have experimented a bit with the 5.14 kernel. It has a new config option

CONFIG_BPF=y

If CONFIG_BPF is enabled, loading the nvidia driver on boot fails:

Sep 04 11:50:01.776227 gerd-desktop kernel: failed to validate module [nvidia] BTF: -22
Sep 04 11:50:02.022670 gerd-desktop kernel: BPF:[99862] TYPEDEF  
Sep 04 11:50:02.022780 gerd-desktop kernel: BPF:type_id=97039
Sep 04 11:50:02.022813 gerd-desktop kernel: BPF: 
Sep 04 11:50:02.022842 gerd-desktop kernel: BPF:Invalid name
Sep 04 11:50:02.022904 gerd-desktop kernel: BPF:

Problem seems to be an invalid (or empty) name entry

Sep 04 11:50:02.022842 gerd-desktop kernel: BPF:Invalid name

however, there does not seem to be anything related in the sources.

At a first glance, this looks a bit similar to the problem described for kernel 5.13 and the crc32 driver but there, it looks like this driver has an empty BPF record whatsoever.
Hence, the suggested patches Part 1/2 and part 2/2 just handle empty BPF records.
Is there something I can do about

Sep 04 11:50:02.022842 gerd-desktop kernel: BPF:Invalid name

as well?

Thank you very much in advance for all helpful thoughts,
DAC324

Offline

#2 2021-09-06 10:29:50

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: Kernel 5.14.1, Nvidia 390.144: failed to validate module BTF: -22

There is a thread here, best to keep talk about it there

https://bbs.archlinux.org/viewtopic.php?id=262224

Offline

#3 2021-09-06 14:03:17

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 70,064

Re: Kernel 5.14.1, Nvidia 390.144: failed to validate module BTF: -22

CONFIG_BPF isn't new at all (exists since at least 3.13, see https://en.wikipedia.org/wiki/Berkeley_Packet_Filter ) and the initial line is from CONFIG_DEBUG_INFO_BTF (which ain't new either) and should™ not prevent the driver from being loaded.

sudo journalctl -b
lsmod | grep nvidia
sudo modprobe nvidia

I'd say for the moment "here" until we figured whether and what issue exists. The most likely reason is that the nvidia module was compiled against a different linux-header version. We'll see.

Offline

#4 2021-09-18 17:54:34

DAC324
Member
Registered: 2020-03-12
Posts: 80

Re: Kernel 5.14.1, Nvidia 390.144: failed to validate module BTF: -22

Update:
Looks like I made a mistake and did not compile in the right order (i.e., after having installed the correct kernel headers).

Plus, a general remark: The kernel can only be compiled with GCC 11 as of now. GCC 12 still has some bugs, and apparently, this could also be one of them. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101941 for another example.

Last edited by DAC324 (2021-09-18 17:56:18)

Offline

Board footer

Powered by FluxBB