From 3346b4afc5c81d53eae4e7fc7e12ebd6fa573a4e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 4 Aug 2017 02:56:39 +0200 Subject: modutils: make them NOEXEC except depmod Signed-off-by: Denys Vlasenko --- modutils/modprobe-small.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'modutils/modprobe-small.c') 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 @@ /* modprobe-small configs are defined in Config.src to ensure better * "make config" order */ -//applet:IF_LSMOD( IF_MODPROBE_SMALL(APPLET(lsmod, BB_DIR_SBIN, BB_SUID_DROP))) -//applet:IF_MODPROBE(IF_MODPROBE_SMALL(APPLET(modprobe, BB_DIR_SBIN, BB_SUID_DROP))) -// APPLET_ODDNAME:name main location suid_type help -//applet:IF_DEPMOD(IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, depmod))) -//applet:IF_INSMOD(IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, insmod))) -//applet:IF_RMMOD( IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, rmmod))) +//applet:IF_LSMOD( IF_MODPROBE_SMALL(APPLET_NOEXEC( lsmod, lsmod, BB_DIR_SBIN, BB_SUID_DROP, lsmod ))) +//applet:IF_MODPROBE(IF_MODPROBE_SMALL(APPLET_NOEXEC( modprobe, modprobe, BB_DIR_SBIN, BB_SUID_DROP, modprobe))) +// APPLET_ODDNAME:name main location suid_type help +//applet:IF_DEPMOD( IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, depmod ))) +//applet:IF_INSMOD( IF_MODPROBE_SMALL(APPLET_NOEXEC( insmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, insmod ))) +//applet:IF_RMMOD( IF_MODPROBE_SMALL(APPLET_NOEXEC( rmmod, modprobe, BB_DIR_SBIN, BB_SUID_DROP, rmmod ))) +/* noexec speeds up boot with many modules loaded (need SH_STANDALONE=y) */ +/* I measured about ~5 times faster insmod */ +/* depmod is not noexec, it runs longer and benefits from memory trimming via exec */ //kbuild:lib-$(CONFIG_MODPROBE_SMALL) += modprobe-small.o -- cgit v1.2.3