zeule / asus-ec-sensors

Linux HWMON sensors driver for ASUS motherboards to get sensor readings from the embedded controller
GNU General Public License v2.0
45 stars 21 forks source link

Warning/Message about missing __x86_indirect_alt_call_rax when installing on 5.15 kernel #29

Open simonvanderveldt opened 2 years ago

simonvanderveldt commented 2 years ago

Hi Eugene,

Thanks for the work on this module! I just emerged the ebuild you linked in the readme and I got an warning message about needs unknown symbol __x86_indirect_alt_call_rax. I'm on the stable kernel in gentoo (sys-kernel/gentoo-kernel-bin to be precise), which is currently at version 5.15.63. Modprobing it works fine though, and it also shows the sensor values in sensors, so not really sure if this is relevant?

I can't post the exact error unfortunately, since I cleared my terminal and for some reason re-emerging the module doesn't show the error anymore, even after unmerging it.

zeule commented 2 years ago

Hey Simon, this might be caused by symbol trimming by the kernel. Is CONFIG_TRIM_UNUSED_KSYMS set?

simonvanderveldt commented 2 years ago

Seems like it isn't, I get no results for

zcat /proc/config.gz | grep -i CONFIG_TRIM_UNUSED_KSYMS

The gentoo-kernel kernels are using Fedora's kernel config, for 5.15.63 that's https://src.fedoraproject.org/rpms/kernel/raw/ec69da7a42b5b7c3da91572ef22097b069ddbd01/f/kernel-x86_64-fedora.config

zeule commented 2 years ago

Help string for this option says it is enabled by default. I imagine the kernels trims symbols, but after you installed this module, its imports went into the list of used symbols in /lib/modules/${KVER}/build/ and now are guarded against trimming.

simonvanderveldt commented 2 years ago

From all the checks I did it seems to be disabled, make menuconfig shows N as well (although the .config file is very different from the Fedora one, so not sure what's going on there). But then why would I get that warning?

Anyway, I guess it doesn't matter, either it's disabled or it's enabled and the symbol's now been added to the table so should be fine now?

zeule commented 2 years ago

As far as I understand, you can check the exported symbols, used by modules, in /lib/modules/${KVER}/build/modules-only.symvers.

Sorry, I can't suggest any other explanation apart from symbol trimming, but I'm a noob kernel developer. And it seem strange that a binary kernel would enable symbol trimming.