diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-04 02:56:39 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-04 02:56:39 +0200 |
commit | 3346b4afc5c81d53eae4e7fc7e12ebd6fa573a4e (patch) | |
tree | e33011f2b34b79a7c974f0aefc13b9a72378e811 /modutils/modprobe-small.c | |
parent | 4dc86699b57ff35c287ca396d562ec206776694a (diff) | |
download | busybox-w32-3346b4afc5c81d53eae4e7fc7e12ebd6fa573a4e.tar.gz busybox-w32-3346b4afc5c81d53eae4e7fc7e12ebd6fa573a4e.tar.bz2 busybox-w32-3346b4afc5c81d53eae4e7fc7e12ebd6fa573a4e.zip |
modutils: make them NOEXEC except depmod
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils/modprobe-small.c')
-rw-r--r-- | modutils/modprobe-small.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 053a7df89..cd4f554f3 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
@@ -11,12 +11,15 @@ | |||
11 | /* modprobe-small configs are defined in Config.src to ensure better | 11 | /* modprobe-small configs are defined in Config.src to ensure better |
12 | * "make config" order */ | 12 | * "make config" order */ |
13 | 13 | ||
14 | //applet:IF_LSMOD( IF_MODPROBE_SMALL(APPLET(lsmod, BB_DIR_SBIN, BB_SUID_DROP))) | 14 | //applet:IF_LSMOD( IF_MODPROBE_SMALL(APPLET_NOEXEC( lsmod, lsmod, BB_DIR_SBIN, BB_SUID_DROP, lsmod ))) |
15 | //applet:IF_MODPROBE(IF_MODPROBE_SMALL(APPLET(modprobe, BB_DIR_SBIN, BB_SUID_DROP))) | 15 | //applet:IF_MODPROBE(IF_MODPROBE_SMALL(APPLET_NOEXEC( modprobe, modprobe, BB_DIR_SBIN, BB_SUID_DROP, modprobe))) |
16 | // APPLET_ODDNAME:name main location suid_type help | 16 | // APPLET_ODDNAME:name main location suid_type help |
17 | //applet:IF_DEPMOD(IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, depmod))) | 17 | //applet:IF_DEPMOD( IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, depmod ))) |
18 | //applet:IF_INSMOD(IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, insmod))) | 18 | //applet:IF_INSMOD( IF_MODPROBE_SMALL(APPLET_NOEXEC( insmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, insmod ))) |
19 | //applet:IF_RMMOD( IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, rmmod))) | 19 | //applet:IF_RMMOD( IF_MODPROBE_SMALL(APPLET_NOEXEC( rmmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, rmmod ))) |
20 | /* noexec speeds up boot with many modules loaded (need SH_STANDALONE=y) */ | ||
21 | /* I measured about ~5 times faster insmod */ | ||
22 | /* depmod is not noexec, it runs longer and benefits from memory trimming via exec */ | ||
20 | 23 | ||
21 | //kbuild:lib-$(CONFIG_MODPROBE_SMALL) += modprobe-small.o | 24 | //kbuild:lib-$(CONFIG_MODPROBE_SMALL) += modprobe-small.o |
22 | 25 | ||