Age | Commit message (Collapse) | Author |
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Allow module options on command line to be disabled on "big" modutils.
Config FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is renamed to
FEATURE_CMDLINE_MODULE_OPTIONS and no longer depends on !MODPROBE_SMALL
(I'm not sure if disabling this is useful on "big" modutils, but at
least the macro can serve as a marker and ensure both implementations
of same feature have consistent behavior.)
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Commit 3a45b87ac36f (modutils: support finit_module syscall) introduced
macro finit_module. But it is not defined for uClibc.
The compilation for busybox fails for MIPS with:
With uClibc, we get following build errors:
modutils/lib.a(modutils.o): In function `bb_init_module':
modutils.c:(.text.bb_init_module+0x94): undefined reference to `finit_module'
modutils.c:(.text.bb_init_module+0xa0): undefined reference to `finit_module'
We can just use syscall() without any need for the
uClibc wrappers.
Newer versions of uClibc-ng (>1.0.20) will remove the
module syscall wrappers.
Found via Buildroot autobuilders:
http://autobuild.buildroot.net/results/556/55655daef23788fb3967f801ec8b79e9bed7122b/build-end.log
function old new delta
bb_delete_module 26 32 +6
bb_init_module 90 95 +5
delete_module 37 - -37
init_module 53 - -53
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 2/0 up/down: 11/-90) Total: -79 bytes
Reported-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
On some systems like Chromium OS, loading modules from non-verified
filesystems is denied. Only finit_module is allowed because an open
fd is passed which can be checked against a verified location.
Change the module loading code to first attempt finit_module and if
that fails for whatever reason, fall back to the existing logic.
On x86_64, this adds ~80 bytes to modutils/modutils.o and ~68 bytes
to modutils/modprobe-small.o.
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This merges the in-memory module info structures of modprobe
and depmod. This allows sharing hashing by modulename code
improving depmod runtime with almost factor of 2x.
function old new delta
get_or_add_modentry - 17 +17
do_modprobe 590 601 +11
moddb_get_or_create - 10 +10
load_modules_dep 195 205 +10
moddb_get - 7 +7
add_probe 81 78 -3
modprobe_main 721 714 -7
depmod_main 553 543 -10
config_file_action 434 421 -13
helper_get_module 160 144 -16
parse_module 343 320 -23
order_dep_list 105 82 -23
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 2/7 up/down: 55/-95) Total: -40 bytes
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Before:
># busybox_old rmmod gtrhfhdfghdf
rmmod: can't unload 'gtrhfhdfghdf': unknown symbol in module, or unknown parameter
After:
># busybox rmmod gtrhfhdfghdf
rmmod: can't unload module 'gtrhfhdfghdf': No such file or directory
function old new delta
modprobe_main 726 721 -5
do_modprobe 599 590 -9
rmmod_main 187 169 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-32) Total: -32 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
filename2modname 67 86 +19
parse_module 374 351 -23
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
process_module 726 719 -7
filename2modname 81 67 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-21) Total: -21 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
parse_cmdline_module_options 102 157 +55
modprobe_main 657 662 +5
insmod_main 68 70 +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 62/0) Total: 62 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
If there are some spaces in the insmod command line, then
this will be splitted in single words as separate elements of
argv. It just needs to chain them together in the options string
passed to the sys_init_module syscall.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
try_to_mmap_module - 121 +121
bb_init_module_24 4514 4578 +64
bb_init_module 119 173 +54
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 239/0) Total: 239 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
do_modprobe 319 339 +20
bb_delete_module 10 26 +16
moderror 62 71 +9
bb_init_module 112 119 +7
modprobe_main 488 494 +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 58/0) Total: 58 bytes
Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
|
|
|
|
|
|
function old new delta
modprobe_main 570 567 -3
insmod_main 101 98 -3
insmod_outputname 4 - -4
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/2 up/down: 0/-10) Total: -10 bytes
text data bss dec hex filename
816784 476 7892 825152 c9740 busybox_old
816778 476 7888 825142 c9736 busybox_unstripped
|
|
|
|
|
|
function old new delta
modprobe_main 559 535 -24
|
|
- a lot faster (linear algorithmic complexity, smaller memory foot print)
- a lot smaller (the old code was overly complicated)
- loading of aliases is now module-init-tools compliant
- blacklisting is done correctly (-b option added)
- module argument quoting done right
- depmod now correctly generates modules.symbols and modules.alias
add/remove: 16/21 grow/shrink: 4/6 up/down: 6930/-9316 Total: -2386 bytes
text data bss dec hex filename
806039 592 6680 813311 c68ff busybox_old
803498 592 6676 810766 c5f0e busybox_unstripped
|