-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cross-built kernel cannot load externally-built modules #51005
Labels
bug
Something isn't working
Comments
atweiden
added a commit
to atweiden/voidpkgs
that referenced
this issue
Jun 26, 2024
CONFIG_DEBUG_INFO_BTF_MODULES is enabled on most/all void kernels, and thus pahole is used when generating BTF information during compilation of external modules. on cross-built kernels, the absence of pahole will remove CONFIG_DEBUG_INFO_BTF_MODULES from /usr/src/kernel-headers-$version/include/generated/autoconf.h when the dkms kernel.d hook runs for the first time (because cross-built kernels have their host tools removed). When this is removed, part of the module struct in include/linux/module.h is missing, resulting in a mismatch in the size of the __this_module struct (.gnu.link_once.this_module section of the .ko) in external modules of exactly 64 bytes. struct module { // ... #ifdef CONFIG_DEBUG_INFO_BTF_MODULES unsigned int btf_data_size; void *btf_data; #endif // ... } fixes void-linux/void-packages#51005 void-linux/void-packages@98f0d74
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Info
Void 6.8.12_2 aarch64-glibc
Package(s) Affected
linux6.8 at minimum, probably other
linux6.*
kernels (rpi-kernel is not affected)if the kernel is built natively, this issue does not occur
Expected behaviour
externally-built (dkms or other mechanism) modules load successfully
Actual behaviour
dmesg:
Steps to reproduce
Notes
Error message introduced by https://lore.kernel.org/lkml/[email protected]/T/
The text was updated successfully, but these errors were encountered: