LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Module load (insmod): Unknown symbol (https://www.linuxquestions.org/questions/linux-kernel-70/module-load-insmod-unknown-symbol-4175638880/)

mr.simo 09-21-2018 04:46 AM

Module load (insmod): Unknown symbol
 
Hello,

I am trying to load a third party proprietary driver (successfully compiled) but when I try to load it with insmod, I get the "Unknown symbol" error:

Code:

loading out-of-tree module taints kernel.
Unknown symbol __check_object_size (err 0)
Unknown symbol __stack_chk_guard (err 0)
Unknown symbol kmem_cache_alloc_trace (err 0)
Unknown symbol __stack_chk_fail (err 0)
Unknown symbol _mcount (err 0)

I know this error is related to some missing module, but I don't know how to ensure what module is missing (without looking at modules.symbols into the /lib/module/<kernel-version>/ dir).

Additionally, depmode <driver.ko> returns the error:

Code:

depmod: ERROR: Bad version passed
uname output is:

Code:

Linux hostname 4.9-camera-lt-qcom #1 SMP PREEMPT Fri Jun 30 16:14:43 UTC 2017 aarch64 GNU/Linux
What exactly is causing this error and what is the best way to solve it ?
Thank you in advance.
Best regards,
s

whansard 09-21-2018 07:15 AM

when you're messing with an out of tree kernel module, stuff gets messy. you can only try different versions of the kernel. i just grepped the source for the first symbol in kernel 4.15, and got- include/linux/thread_info.h:extern void __check_object_size(const void *ptr, unsigned long n,
include/linux/thread_info.h: __check_object_size(ptr, n, to_user);
mm/usercopy.c:void __check_object_size(const void *ptr, unsigned long n, bool to_user)
mm/usercopy.c:EXPORT_SYMBOL(__check_object_size);
do you think your version doesn't have those symbols?

mr.simo 09-22-2018 03:46 AM

Hey whansard,

Quote:

I just grepped the source ...
That's what I have done as well but as I understand, these symbols are not related to any driver (I mean that these symbols are not declared in a driver source code from drivers directory).

So from the error I understood that the driver was looking for some other missing part/driver/feature of the kernel, obviously not compiled at that time.
I finally solved (at least it was it seems) using the correct configuration file provided from Linaro (I found it later), without messing with these kind of trouble.

Regards,
Simon

eandrei 02-12-2019 11:56 AM

...


All times are GMT -5. The time now is 04:22 PM.