[BusyBox] modutils
Vadim Lebedev
vlebedev at aplio.fr
Tue Dec 19 13:33:18 UTC 2000
Hello
I've been trying to use insmod (modifed by Alcove) on Arm7tdmi/uclinux
platfrom and
stumbled on following problem (which i've fixed):
I've been loading a very large module (400K) and the
create_module syscall was returning ENOMEM, so i've looked into insmod.c and
found out that insmod actually have 2 copies of the module in the memory:
one is create by obj_load and second one by create_image.
when you add to this memory allocated by create_module syscall
you have 1.2 MB requeirement for my module, hence the ENOMEM.
So i've modified insmod.c to load the SHT_PROGBITS typed
sections directly to the memory allocated by the create_module sycall (on
ucLinux it is no
problem all memory is accesible to every program).
The change is pretty simple and is activated by BB_FEATURE_INSMOD_LOADINKMEM
define.
I think the same technique could be used on the normal Linux too, one simply
need
to find out how to map kernel address returned by create_module into user
space (maybe
using mmap on /dev/kmem?) but i didn't investigate much....
My version is avalable at:
http://aplionet.aplio.fr/uclinux/busybox.tar.gz
Enjoy
-----------------------------------------
Vadim Lebedev
Chief Software Engineer
Aplio SA.
mail:vlebedev at aplio.fr
http://www.aplio.com
------------------------------------------
More information about the busybox
mailing list