Skip to content
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

Command insmod broken #3

Closed
Bonoboo opened this issue Mar 14, 2016 · 3 comments
Closed

Command insmod broken #3

Bonoboo opened this issue Mar 14, 2016 · 3 comments

Comments

@Bonoboo
Copy link

Bonoboo commented Mar 14, 2016

This command using in CM13 for nicki to load .ko for FM Radio.
When executing manually it gives error and radio won't work.
insmod: failed to load /system/lib/modules/radio-iris-transport.ko: Bad address

If repalce toybox for prebuilt all fine.

@Bonoboo
Copy link
Author

Bonoboo commented Mar 18, 2016

Sorry, already somewhere fixed.

@Bonoboo Bonoboo closed this as completed Mar 18, 2016
@Fighter19
Copy link

Fighter19 commented Sep 6, 2016

I still have this problem with the cm-13.0 branch
It seems that toybuf is not allocated (NULL).

openat(AT_FDCWD, "rk30xxnand_ko.ko.3.0.36+", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
finit_module(3, "", 0)                  = -1 ENOSYS (Function not implemented)
openat(AT_FDCWD, "rk30xxnand_ko.ko.3.0.36+", O_RDONLY|O_LARGEFILE) = 4
fstat64(4, {st_mode=0, st_size=1, ...}) = 0
read(4, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\1\0(\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 168868) = 168868
close(4)                                = 0
init_module(0x4018b000, 168868, NULL)   = -1 EFAULT (Bad address)
futex(0x1fede8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "insmod: ", 8insmod: )                 = 8
write(2, "failed to load rk30xxnand_ko.ko."..., 39failed to load rk30xxnand_ko.ko.3.0.36+) = 39
write(2, ": Bad address", 13: Bad address)           = 13
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
+++ exited with 1 +++
```insmod
Notice
`init_module(0x4018b000, 168868, NULL) `
Pretty sure it shouldn't be NULL.

EDIT:
Got busybox from my stock image. It seems the vermagic is mismatched, maybe this is the reason.

EDIT2:
Tried to force init_module to use "3" as a hardcoded value. strace still returns NULL as being used.

@aheshamsalem
Copy link

Hello,

Can you elaborate on how this issue was solved? I'm trying to add a simple helloWorld.ko that only printK a static string. Nothing shows with dmesg even any plausible error. I only get "klte:/system/lib/modules # insmod helloWorld.ko
insmod: failed to load helloWorld.ko: Bad address"

I checked the module with modinfo and name -r for the running kernel and the vermagic versions match.

Any hints are appreciated!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants