Exec format error on new Linux kernel Module

2.4k Views Asked by At

-PROBLEM DESCRITION
I’ve compiled a new uvcdriver.ko https://github.com/Giuliano69/uvc_driver-for-Quanta-HD-User-Facing-0x0408-0x4035- but I’m facing this error once I try to install the module

giuliano@Astra2A:~$ sudo rmmod uvcvideo && sudo modprobe uvcvideo
modprobe: ERROR: could not insert 'uvcvideo': Exec format error

        

and dmesg shows:

[25961.151982] usbcore: registered new interface driver uvcvideo   
[26323.125534] usbcore: deregistering interface driver uvcvideo   
[26323.189294] uvcvideo: disagrees about version of symbol module_layout

Googling on internet, the problem seems to happens when we want to use a module compiled for a different kernel version.

These are the TWO modinfo from the old and new uvcvideo modules https://pastebin.com/tSj8Exm6

Basically
OLD module: vermagic: 5.15.0-56-generic SMP mod_unload modversions
NEW module: vermagic: 5.15.64 SMP mod_unload modversions

-HOST CONFIGURATION

I’m using this kernel

giuliano@Astra2A:~$ cat /proc/version_signature
Ubuntu 5.15.0-56.62-generic 5.15.64

BUT on the closest kernel I found on Ubuntu archive is 5,15 and seems to be different: https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/linus--linux/refs/tags

to allow Eclipse to compile the kernel, I had to pass this commands:

scripts/config --disable CONFIG_SYSTEM_REVOCATION_KEYS  
scripts/config --disable SYSTEM_REVOCATION_KEYS  
scripts/config --disable SYSTEM_TRUSTED_KEYS 

the kernel is compiling without errors and the uvcvideo.ko is produced

-kindly ASK

-WHERE cane I found an Ubuntu kernel SOURCE to exactly match the version I’m running ?
-HOW can FORCE the uvcdriver.c to match mi kernel version ?
-Have I got OTHER ways to make the kernel module I’m compiling, match my running system ?

0

There are 0 best solutions below