Building driver results in BTF warning

Latest response

building driver module for older kernels was no issue. But now with a RHEL9 kernel (5.14.0-70.13.1.el9_0.x86_64) the following warning is output.
"Skipping BTF generation for 'my_driver.ko' due to unavailability of vmlinux"
Presumably either something has moved, or something is missing from our installation.


It is just a warning and should be safe to ignore. I assume building the module actually succeeded.

it would appear so, but now I get a "tainted kernel" warning when the module is loaded

That is expected because it was externally built. You can ignore that one, too.

fair enough, but why now with the new kernel. What has changed to cause this, or was it simply not reported before?

The BTF stuff is new in RHEL 9. The kernel config file now has CONFIG_DEBUG_INFO_BTF_MODULES enabled. With this option set, module build process checks to see if vmlinux is available. And if not, the "Skipping BTF generation ..." message is displayed. This is informational only.

Regarding the "tainted kernel", this is not new. Loading externally-built kernel modules can make the kernel "tainted". More detailed info can be found in Why is the kernel "tainted" and ....