Closed smokku closed 1 year ago
can reproduce, facing this when trying to load graphics drivers.
how has this not been fixed yet?
Because the systems I build use static kernels, and Android has a daemon use a module loading library instead of doing it from the command line. I have a TODO item to add module support to scripts/mkroot.sh but haven't done it yet. (It's behind "get 'make tests' running under mkroot", which means running under toysh. I tend not to run questionable stuff as root on my development machine, so "set up test environment for this" was the todo item, and it got buried.)
Thanks for the poke, I'll bump the priority up on the todo list...
Slightly different variant applied as commit 56d89e51ba9e
Slightly different variant applied
My first fix was done this way. But this is just a workaround at a call site and does not fix the real issue with the syscall.
Every other user of ins_mod()
might be tripped by the same bug.
There are no other users, it's a static function in a "pending" command.
https://github.com/landley/toybox/blob/master/toys/pending/README
While trying to load a module,
modprobe
fails to load dependency modules:When I try to load the dependency module, it works fine:
The difference is that the second attempt uses a string instead of NULL as options:
It looks like
syscall(__NR_finit_module
does not like NULLflags
.With the following patch
modprobe
works fine: