[LEDE-DEV] [PATCH v2 ubox 0/6] kmodloader: add module alias support

Yousong Zhou yszhou4tech at gmail.com
Fri Jan 13 09:00:29 PST 2017


Aliases are essential information for working with kernel modules.  Netfilter
subsystem will request for ipt_hashlimit and ip6t_hashlimit respectively when
called with

	xt_request_find_match(NFPROTO_IPV{4,6}, "hashlimit", 1)
	
The kernel __request_module() will then invoke user mode modprobe to load them

	/sbin/modprobe -q -- ipt_hashlimit
	/sbin/modprobe -q -- ip6t_hashlimit

where ipt_hashlimit and ip6t_hashlimit are aliases of xt_hashlimit

The patch depends on another patch in the build system to restore alias info
to kernel modules.

v2 <- v1

 - Fixed a missing pair of curly parenthesis after avl_for_each_element, and
   this time the code was checked okay with -Wmisleading-indentation
 - Dropped the now redundant argc < 2 check in load_modprobe()

Yousong Zhou (6):
  kmodloader: remove redundant glob wildcard char
  kmodloader: log to kmsg when loading directories of modules
  kmodloader: modprobe: skip possible command line arguments
  kmodloader: fix out-of-bound access when parsing .modinfo
  kmodloader: add module alias awareness
  kmodloader: make insert_module() idempotent

 kmodloader.c | 184 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 153 insertions(+), 31 deletions(-)

-- 
2.6.4




More information about the Lede-dev mailing list