android - insmod: init_module failed (Exec format error) -
i'm able compile kernel module galaxy s4 kernel 3.4.xx following errors during module insertion. please shed light on what's missing here.
the kernel module plain helloworld module basic init , cleanup functions.
insmod error:
insmod /data/local/tmp/testhello.ko insmod: init_module '/data/local/tmp/testhello.ko' failed (exec format error)
dmesg logs
<4>[ 2127.554107] tima: lkmauth--launch tzapp check kernel module; module len 71334 <4>[ 2127.554168] tima: lkmauth -- hdr before kreq : e337b000 <4>[ 2127.554199] tima: lkmauth--send cmd (lkmauth) cmdlen(304:320), rsplen(264:320) id 0x00050000, req (0xe352a000), rsp(0xe352a140), module_start_addr(0xe337b000) module_len 71334 <3>[ 2127.581909] tima: lkmauth--verification failed -1 <4>[ 2127.582183] tima: msg=lkm_modified; result (tima_result=msg=lkm_modified;) <6>[2129.417541] [debug_wake_locks]active wake lock msm_otg
your answer right there in dmesg log: s4 kernel hardened accept modules authenticated (i.e. digitally signed). compiled module not signed, init_module failed (though arguably return code have been better - exec format error means elf malformed, technically isn't).
check modules came s4 (/system/lib/modules or /vendor/lib/modules) mod info (on linux), , you'll see elf section signature. feature mainstream linux has added, in 3.7.
Comments
Post a Comment