5 - Stop adding duplicate information on modules.builtin.alias.bin, just use
6 the modules.builtin.bin index
8 - Speedup depmod, particularly under qemu with emulated arch, by
9 avoiding a lot of open/read/close of modules.alias.bin. On an
10 emulated ARM rootfs, depmod with only 2 modules was taking ~32s
13 - Add kmod_module_new_from_name_lookup() which allows doing a lookup by
14 module name, without considering the aliases. Other than that search
15 order is similar to kmod_module_new_from_lookup().
17 - modinfo learned the --modname option to explicitely show information
18 about the module, even if there is an alias with the same name. This
19 allows showing information about e.g. kernel/lib/crc32.ko, even if
20 kernel also exports a crc32 alias in modules.alias:
22 alias crc32 crc32_pclmul
23 alias crc32 crc32_generic
25 Same behavior will be used to other modules and to aliases provided
28 - depmod.conf learned a new "excludedir" directive so distro/user can
29 configure more directories to be excluded from its search, besides
30 the hardcoded values "build" and "source".
32 - Better group modprobe options on help output under "Management, Query and General".
34 - modprobe learned a --wait <MSEC> option to be used together with -r
35 when removing a module. This allows modprobe to keep trying the
36 removal if it fails because the module is still in use. An exponential backoff
37 time is used for further retries.
39 The wait behavior provided by the kernel when not passing O_NONBLOCK
40 to delete_module() was removed in v3.13 due to not be used and the
41 consequences of having to support it in the kernel. However there may
42 be some users, particularly on testsuites for individual susbsystems, that
43 would want that. So provide a userspace implementation inside modprobe for
44 such users. "rmmod" doesn't have a --wait as it remains a bare minimal over
45 the API provided by the kernel. In future the --wait behavior can be added
46 to libkmod for testsuites not exec'ing modprobe for module removal.
48 - kmod_module_remove_module() learned a new flag to silence output when
49 caller wants to handle them - this is particularly important for the
50 --wait flag to modprobe, as it's not desired to keep seeing error messages
51 while waiting for the module to be unused.
53 - Add SM3 hash algo support to modinfo output, as already available in the kernel.
56 - Fix modinfo output when showing information for a .ko module when running
57 on a kernel that has that module as builtin.
59 - Fix kmod_module_new_from_lookup() returning > 0 rather than 0
60 when it matches an alias.
62 - Fix modinfo segfault when module doesn't exist.
64 - Add missing function in the html documentation: kmod_get_dirname().
66 - Fix modprobe incorrectly handling number of arguments when prepending values from
67 MODPROBE_OPTIONS environment variable.
69 - Fix modprobe -r --remove-dependencies and since "dependencies" was a
70 misnomer, add the preferred argument option: "--remove-holders". This
71 is the same name used by the kernel. It allows users to also remove
72 other modules holding the one that is being removed.
74 - Fix off-by-one in max module name length in depmod.
77 - Start some changes in the out-of-tree test modules in kmod so they are useful
78 for being really inserted in the kernel rather than relying on kmod's mock
79 interface. This helps manual testing and may be used to exercise to test
80 changes in the kernel.
86 - Add support to use /usr/local as a place for configuration files. This makes it easier
87 to install locally without overriding distro files.
90 - Fix `modinfo -F` when module is builtin: when we asked by a specific field from modinfo,
91 it was not working correctly if the module was builtin
93 - Documentation fixes on precedence order of /etc and /run: the correct order is
94 /etc/modprobe.d, /run/modprobe.d, /lib/modprobe.d
96 - Fix the priority order that we use for searching configuration files. The
97 correct one is /etc, /run, /usr/local/lib, /lib, for both modprobe.d
100 - Fix kernel command line parsing when there are quotes present. Grub
101 mangles the command line and changes it from 'module.option="val with
102 spaces"' to '"module.option=val with spaces"'. Although this is weird
103 behavior and grub could have been fixed, the kernel understands it
104 correctly for builtin modules. So change libkmod to also parse it
105 correctly. This also brings another hidden behavior from the kernel:
106 newline in the kernel command line is also allowed and can be used to
109 - Fix a memory leak, overflow and double free on error path
111 - Fix documentation for return value from kmod_module_get_info(): we
112 return the number of entries we added to the list
114 - Fix output of modules.builtin.alias.bin index: we were writing an empty file due to
115 the misuse of kmod_module_get_info()
118 - Retire integration with semaphoreci
120 - Declare the github mirror also as an official upstream source: now besides accepting
121 patches via mailing list, PRs on github are also acceptable
123 - Misc improvements to testsuite, so we can use it reliably regardless
124 of the configuration used: now tests will skip if we don't have the
131 - Add Zstandard to the supported compression formats using libzstd
132 (pass --with-zstd to configure)
135 - Ignore ill-formed kernel command line, e.g. with "ivrs_acpihid[00:14.5]=AMD0020:0"
137 - Fix some memory leaks
138 - Fix 0-length builtin.alias.bin: it needs at least the index header
144 - Link to libcrypto rather than requiring openssl
146 - Print a better error message when kernel doesn't support module unload
148 - Use PKCS#7 instead of CMS for parsing module signature to be
149 compatible with LibreSSL and OpenSSL < 1.1.0
151 - Teach modinfo to parse modules.builtin.modinfo. When using Linux kernel
152 >= v5.2-rc1 it's possible to get module information from this new file. Now
153 modinfo is able to show it instead of an error message that the module is
158 modinfo: ERROR: Module ext4 not found.
166 description: Fourth Extended Filesystem
167 author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
175 - Do not link python bindings with libpython to be compatible with
178 - Fix module removal with `modprobe -r` when a dependency is built-in.
179 Now it properly ignores them and proceed with removal of other
182 - Fix propagation of return code from install/remove commands to the
183 the probe function. The return values of kmod_module_probe_insert_module()
184 have very specific meanings, do not confuse the caller by return codes
187 - Fix softdep config parsing leading to buffer overflow
193 - Add more error-checking in library functions and remove warnings on newer
196 - Depmod now handles parallel invoctions better by protecting the temporary
199 - Improvements to testsuite and added tests to check the our behavior
200 regardless of the features enabled in the kernel, or libraries we link to
202 - Teach the --show-exports option to modprobe. This works similarly to
203 --show-modversions, but it reports the exported symbols from that module.
204 Under the hood this reads the .symtab and .strtab section rather than
205 __versions so it shows useful data even if kernel is configured without
206 modversions (CONFIG_MODVERSIONS)
208 - Teach pkcs7 parsing to modinfo by using openssl. This allows modinfo to
209 correctly parse the signature appended to a module by the kernel build
210 system when configured with CONFIG_MODULE_SIG_ALL, or when externally
211 signed by the distro. Traditionally modules were signed and a struct
212 was appended together with the signature to the end of the module.
213 This has changed on the kernel for pkcs#7 and now the structure isn't
214 filled out with useful information. So we have to parse the signature
215 block in order to return useful data to the user.
217 If kmod is linked with openssl we parse the signature and return the
218 fields as we do for other signatures. An example of the relevant part
219 on the output of modinfo is below:
228 signer: Fedora kernel signing key
229 sig_key: 51:C4:0C:6D:7E:A5:6C:D8:8F:B4:3A:DF:91:78:4F:18:BC:D5:E4:C5
232 If kmod is not linked to openssl we just start printing "unknonwn" in the
233 sig_hashalgo field rather than the bogus value.
240 - Add module signature to modinfo output
242 - Add support for external directories in depmod: now there's a new
243 "external" keyword parsed by depmod when calculating the dependencies.
244 It allows to add modules to other directories which are not relative
245 to where the modules are commonly installed. This results in
246 modules.dep and friends now understanding absolute paths rather than
247 relative paths only. For more information see depmod.d(1).
249 - Add support for CONFIG_MODULE_REL_CRCS
251 - Add missing documentation references in man pages
253 - Handle the case in which module has a .TOC symbol already while
254 calculating dependencies
256 - Improve testsuite and allow to use mkosi to run testsuite in different
263 - Add more information on dependency loop
265 - Sanitize use of strcpy and allow to grow from small strings on stack
266 (common case) to bigger strings on heap when needed
269 - Fix wrong dependency loops being reported by depmod
271 - Fix crashes when reporting dependency loops
273 - Fix parsing kernel command line containing quotes
275 - Fix leaks on error paths
281 - Don't add comment to modules.devname if it would otherwise be empty
282 to play nice with tools detecting empty files
284 - Allow building with BSD sed, that doesn't have -E flag
286 - Ignore .TOC. symbols in depmod parsing as it's for PPC64 the
287 equivalent of _GLOBAL_OFFSET_TABLE_
289 - Teach modinfo about PKCS#7 module signatures: it doesn't add any
290 other info besides telling the user the module is signed since
291 kernel doesn't add other info on the module section
295 - Fix -s and -p compat options to insmod triggering force flag
297 - Fix long lines from /proc/modules not being handled correctly by
298 kmod_module_new_from_loaded() and kmod_module_get_size() and several
299 other library functions that use them
301 - Fix crash on modinfo while checking for available signature of
304 - Fix documentation generation with gtk-doc
310 - Change defaul log level for tools to WARNING rather than ERROR and update
311 some log levels for current messages
313 - depmod doesn't fallback to uname if a bad version is passed in the command
314 line anymore. We just exit with an error.
316 - insmod was taught the -f flag, just like in modprobe. It was previously
317 silently ignoring it.
320 - New kmod_get_dirname() API to get the module directory set in the
324 - Fix return code in error path of kmod_module_insert_module(). We were
325 previously returning ENOSYS rather than ENOENT.
331 - kmod tool started to learn the "insert" and "remove" commands that
332 are the simplified versions of the older modprobe tool. These
333 commands are still work in progress so they are hidden behind a
334 --enable-experimental flag during build. It should not be enabled
335 unless you know what you're doing.
336 - kmod tool now prints the relevant configuration options it was built
337 with when the "--version" argument is passed. This helps to mitigate
338 problems for example when the user is trying to load a compressed
339 module but kmod was built without support for the compression method.
341 - Improvements to testsuite:
342 - Cache built modules so it is easier to run "make check" on build
343 servers by distro maintainers. If kmod is configured with
344 --disable-test-modules the modules from cache will be used by
345 "make check". No changes to the tests are needed and all of them
351 - Handle bogus values from ELF, making sure they don't overflow while
353 - Fix leak in depmod when -b flag is passed multiple times
354 - Multiple minor fixes from static analysis by coverity and
356 - Fix race between loading modules and checking if it's loaded in the
360 - There's a change in behavior regarding builtin modules: we now only
361 consider as builtin those that are present in modules.builtin index.
362 Previously we were also checking the presence of
363 /sys/module/<module-name>, but this is racy and only modules that
364 contain parameters are the ones creating a directory in sysfs.
366 Now some commands will start to fail, e.g. "modprobe vt". Since vt
367 can't be compiled as a module it's not present in modules.builtin
368 index. Previously we would report at as builtin, but now we fail
369 because we couldn't find the module.
372 - Integration of gcov into the build. Currently libkmod is at ~70%
373 covered and tools at ~50% by tests in the testsuite. Utility
374 functions and structures in shared have more than 90% of coverage.
375 - Upload build to coverity
377 - Improvements to testsuite:
378 - Fix parsing return codes of init_module() calls
379 - Add tests for utility functions in shared/
380 - Add tests for kmod_module_remove_module()
381 - Add playground, in which our own modules are compiled
382 - Port all tests to use modules from module-playground instead of
383 copying prebuilt modules to the repository
384 - Properly handle binaries that exit with no output
385 - Besides comparing the output of commands, allow to copy to
392 - Fix missing CLOEXEC in library
393 - Fix error message while opening kmod's index
396 - Add kmod(8) man page
397 - Allow to build with libc's without be32toh()
398 - Move code around separating common code and data structures into a
399 shared directory. This allows to share more code between library and
400 tools, making the binary size of tools smaller.
401 - Clarify tools vs library licenses
402 - static-nodes: when writing in tmpfiles format, indicate that
403 creation of static nodes should only happen at boot. This is used and
404 required by systemd-217+.
406 - Improvements to testsuite:
407 - Add tests for newly created shared/ code
408 - Improve how tests are declared so there's less boilerplate code for
415 - Fix leaks in error paths
416 - Fix use-after-free in hash implementation causing a wrong index to be
417 generated by depmod with out-of-tree modules
420 - Calling depmod with modules creating a dependency loop will now make
421 depmod return an error and not update the indexes. This is to protect
422 the current index not being overridden by another index that may cause
423 a boot failure, depending on the buggy module. It's a necessary
424 change in behavior regarding previous kmod releases and
425 module-init-tools. The error message was also improved to output
426 the modules that caused the dependency cycle.
428 - Improvements to testsuite:
429 - Fix and improve expected-fail test
430 - Add tests for hashmap implementation
436 - Fix matching a "." in kernel cmdline, making garbage in the command
437 line be parsed as kmod options
438 - Fix man pages to clarify we don't fallback to parsing modules.dep
439 but instead we depend on modules.dep.bin (generated by depmod) to
441 - Fix ELF parsing on 32 bit systems assigning the wrong class.
442 - Fix partial matches of search directives in depmod. Previously having
443 a line in depmod.conf such as "search foo foobar built-in" would cause
444 unpretictable results because foo is a partial match of foobar as well.
445 - Fix unaligned access in modinfo when getting the signature from a
447 - Make sure softdeps are treated as optional dependencies
450 - Accept special files given to "-C" switch in modprobe. This way it's
451 possible to skip system configuration with "modprobe -C /dev/null"
452 - Do not require xsltproc on released tarballs
453 - Don't use Werror anymore
454 - Add experimental python bindings, merged from python-kmod repository
455 (https://github.com/agrover/python-kmod)
456 - Parse softdeps exported by the kernel as
457 /lib/modules/`uname -r`/modules.softdep
459 - Improvements to testsuite:
460 - Check the list of loaded modules after a test
466 - Fix usage of readdir_r()
467 - Add some missing checks for memory allocation errors
470 - Remove option from libkmod to allow waiting on module removal if
471 the module is being used. It's dangerous since it can block the
473 - Improve compatibility with musl libc
474 - Add fallback implementation for compilers without _Static_assert(),
476 - Minor optimizations to the hash table
477 - Make depmod warn if a module has incorrect devname specification
478 - Use cleanup attribute
484 - kmod static-nodes doesn't fail if modules.devname isn't available
485 - Fix getting boolean parameter from kernel cmdline in case the value
487 - Fix some mkdir_p() corner cases (used in testsuite and static-nodes)
490 - kmod static-nodes creates parent directories if given a -o option
491 - kmod binary statically links to libkmod - if distro is only interested
492 in the kmod tool (for example in an initrd) it can refrain from
493 installing the library
494 - Add shell completion for kmod tool
500 - Fix some format strings
501 - Protect against NULL being passed around to index
502 - Avoid calling syscall() with -1 when finit_module() is not available,
503 since this doesn't always work
504 - Fix not being able to remove alias due to checking the module's
506 - Minor fixes and refactors
509 - Improve libkmod documentation, particularly on how flags are dealt
511 - Remove ability to build a static libkmod
512 - Add static-nodes command to kmod that parses modules.devname
513 generating output in useful formats
519 - Add the long option --symbol-prefix option to depmod (it was absent)
521 - Don't abort if there's a bogus line in configuration file like "alias
522 psmouse off". Some distros are carrying this since the days of
526 - Add support for finit_module(2). If the module is load straight from
527 the disk and without compression we use finit_module() syscall when
528 available, falling back to init_module() otherwise
529 - kmod_module_get_info() also returns the signature if the module is
530 signed and modinfo uses it
531 - Use secure_getenv if available
532 - rmmod understands builtin modules, just like modprobe does
533 - Improve compatibility with musl-libc
534 - Test cases exit with success when receiving a signal if they are
541 - Fix removing vermagic from module when told to force load a module
542 - Fix removing __versions section when told to force load a module: we
543 need to mangle the section header, not the section.
544 - modinfo no longer fails while loading a module from file when path
545 contains ".ko" substring
550 - Improvements to testsuite:
551 - Fix testsuite defining symbols twice on 32 bit systems
552 - Allow to check generated files against correct ones
555 - libkmod now keeps a file opened after the first call to
556 kmod_module_get_{info,versions,symbols,dependency_symbols}. This
557 reduces significantly the amount of time depmod tool takes to
558 execute. Particularly if compressed modules are used.
559 - Remove --with-rootprefix from build system. It was not a great idea
560 after all and should not be use since it causes more harm then
562 - Hide --wait option on rmmod. This feature is being targeted for
563 removal from kernel. rmmod still accepts this option, but it's hidden
564 now: man page and usage() say nothing about it and if it's used,
565 user will get a 10s sleep. This way we can check and help if anyone
566 is using this feature.
567 - Refactor message logging on all tools, giving proper prefix, routing
568 everything to syslog when asked for, etc.
571 - Fix parsing of modules.order when using compressed modules
572 - Usage messages go to stdout instead of stderr
573 - Fix memory leak in hash implementation
579 - Read coresize from /sys if supported
581 - Add flag to kmod_module_probe_insert() to apply blacklisting during
582 probe only if mod is an alias. Now modprobe uses this flag by default.
583 This is needed to fix a change in behavior regarding module-init-tools
584 and ultimately makes us loading a blacklisted module.
586 - Better formatting in man pages
588 - Add option to disable building man pages at build time
590 - Fixes in the testsuite and refactoring of LDPRELOAD'ed libraries
592 - Re-licensing testsuite as LGPL
597 - Improvements to the testsuite:
598 - Check for correct handling of softdep loops
599 - Check for correct handling of install command loops
602 - Fix build with compilers that don't support --gc-sections
603 - Handle errors when dealing with gzipped modules
604 - depmod now handles errors while writing indices, so it doesn't end up
605 with a corrupted index without telling the user
610 - No new features, small bug fixes only.
611 - Fix a bug in "modprobe -c" output: be compatible with
614 - Give a useful error message when init_module fails due to bad
615 parameter or unknown symbols
622 - Re-order dirs for configuration files to match the change in systemd and
623 udev: now the priority is:
628 - Fix setting CFLAGS/LDFLAGS in build system. This prevented us from not
629 allowing the user to set his preferences.
632 - Return same error codes of module-init-tools when removing modules
634 - Fix builtin output in "--show-depends" when target kernel is not the
635 same of the running kernel
636 - 'modprobe -r' always look at all command line arguments
637 - Fix '-q' usage in modprobe
642 - New API in libkmod:
643 - kmod_module_apply_filter(): a generic function to apply filters in a
644 list of modules. This deprecates the use of
645 kmod_module_get_filtered_blacklist()
647 - More tests in testsuite
649 - Add compatibility with uClibc again
651 - Lookup modules.builtin.bin to decide if a module is built in kernel
653 - Downgrade some log messages so we don't annoy people with useless messages
656 - Flag --ignore-loaded was not being properly handled
657 - Infinite loop with softdeps
658 - Infinite loop with dumb user configuration with install commands
659 - Fix leak in index when there's a partial match
661 - Move repository and tarballs to kernel.org
666 - Break libkmod's API to insert a module like modprobe does. It now accepts
667 extra an extra argument to print its action and acceptable flags were
670 - Share more code between modprobe and libkmod: using the new version of
671 kmod_module_probe_insert_module() it's possible to share a great amount of
672 code between modprobe and libkmod
674 - modprobe no longer works with paths: it only accepts module names and/or
677 - testsuite was added to repository, allowing automated tests to be run and
678 easing the way bugs are reproduced.
680 - modprobe: when dumping configuration ('-c' option) separate config
681 and indexes by adding a commented line between them.
683 - Fix bugs wrt normalizing aliases and module names
685 - Fix bug wrt inserting an alias that resolves to multiple modules: we should
686 not stop on the first error, but rather continue to try loading other
689 - Fix unaligned memory access in hash function, causing depmod to output wrong
692 - Fix man page build and install: now they are only installed if tools are
698 - New APIs in libkmod to:
699 - Get configuration lists: blacklists, install commands, remove
700 commands, aliases, options and softdeps
703 - Several bugs fixed in libkmod, modprobe, depmod and modinfo
705 - API documentation: if configure with run with --enable-gtk-doc, the API doc
706 will be generated by make. Gtk-doc is required for that.
708 - Man pages are built, which replace man pages from module-init-tools
710 - 'include' and 'config' options in *.conf files were deprecated
712 - configure is not run by autogen.sh. Instead, a common set of options is
713 printed. If you are hacking on kmod, consider using bootstrap-configure
716 - 'modprobe -c' works as expected now. As opposed to module-init-tools, it
717 dumps the parsed configuration, not only the file contents.
722 - New APIs in libkmod to:
723 - Get symbols from module, parsing the ELF section
724 - Get dependency symbols
725 - Check if resources are still valid or if libkmod must be reloaded
726 - Insert module like modprobe, checking (soft-)dependencies, commands,
727 blacklist. It can run commands by itself and to call a callback
730 - Support to load modules compressed with xz
732 - Tools are now bundled together in a single tool called kmod. It can be
733 called using symlinks with the same names as tools from module-init-tools.
734 E.g: /usr/bin/lsmod -> /usr/bin/kmod. With this we are aiming to complete a
735 1:1 replacement of module-init-tools.
737 - The only missing tool, depmod, was added to kmod together with the necessary
740 - If a program using libkmod runs for a long time, as for example udev, it must
741 check if it doesn't have to re-load libkmod. A new helper function was added
742 in libkmod to check if context is still valid and udev is already using it.
744 - An 'unaligned access' bug was fixed. So those architecture that does not
745 handle unaligned access can use kmod, too.
750 Some bugs fixed: the worst of them was with an infinite loop when an alias
751 matched more than one module.
753 - New APIs in libkmod to:
754 - Get soft dependencies
755 - Get info from module files parsing ELF
756 - Get modversions from files parsing ELF
758 - Support to load gzipped kernel modules: kmod can be compiled with support to
759 gzipped modules by giving the --enable-zlib flag
761 - Support to forcefully load modules, both vermagic and modversion
763 - Support to force and nowait removal flags
765 - Configuration files are parsed in the same order as modprobe: files are
766 sorted alphabetically (independently of their dir) and files with the same
767 name obey a precedence order
769 - New tool: kmod-modinfo
771 - kmod-modprobe gained several features to be a 1:1 replacement for modprobe.
772 The only missing things are the options '--showconfig' and '-t / -l'. These
773 last ones have been deprecated long ago and they will be removed from
774 modprobe. A lot of effort has been put on kmod-modprobe to ensure it
775 maintains compabitility with modprobe.
777 - linux-modules@vger.kernel.org became the official mailing list for kmod
782 First version of kmod and its library, libkmod.
784 In the libkmod it's currently possible to:
785 - List modules currently loaded
786 - Get information about loaded modules such as initstate, refcount,
787 holders, sections, address and size
788 - Lookup modules by alias, module name or path
789 - Insert modules: options from configuration and extra options can be
790 passed, but flags are not implemented, yet
792 - Filter list of modules using blacklist
793 - For each module, get the its list of options and install/remove
795 - Indexes can be loaded on startup to speedup lookups later
797 Tools provided with the same set of options as in module-init-tools:
801 - kmod-modprobe, with some functionality still missing (use of softdep,
802 dump configuration, show modversions)