testsuite: add check for kmod_load_resources
[thirdparty/kmod.git] / NEWS
CommitLineData
819a125c
LDM
1kmod 27
2=======
3
4- Improvements
5 - Link to libcrypto rather than requiring openssl
6
7 - Print a better error message when kernel doesn't support module unload
8
9 - Use PKCS#7 instead of CMS for parsing module signature to be
10 compatible with LibreSSL and OpenSSL < 1.1.0
11
12 - Teach modinfo to parse modules.builtin.modinfo. When using Linux kernel
13 >= v5.2-rc1 it's possible to get module information from this new file. Now
14 modinfo is able to show it instead of an error message that the module is
15 built-in:
16
17 Before:
18 $ modinfo ext4
19 modinfo: ERROR: Module ext4 not found.
20
21 After:
22 $ modinfo ext4
23 name: ext4
24 filename: (builtin)
25 softdep: pre: crc32c
26 license: GPL
27 description: Fourth Extended Filesystem
28 author: Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
29 alias: fs-ext4
30 alias: ext3
31 alias: fs-ext3
32 alias: ext2
33 alias: fs-ext2
34
35- Bug fixes
36 - Do not link python bindings with libpython to be compatible with
37 python3.8
38
39 - Fix module removal with `modprobe -r` when a dependency is built-in.
40 Now it properly ignores them and proceed with removal of other
41 dependencies
42
43 - Fix propagation of return code from install/remove commands to the
44 the probe function. The return values of kmod_module_probe_insert_module()
45 have very specific meanings, do not confuse the caller by return codes
46 from system()
47
48 - Fix softdep config parsing leading to buffer overflow
49
58133a96
LDM
50kmod 26
51=======
52
53- Improvements
54 - Add more error-checking in library functions and remove warnings on newer
55 toolchains
56
57 - Depmod now handles parallel invoctions better by protecting the temporary
58 files being used
59
60 - Improvements to testsuite and added tests to check the our behavior
61 regardless of the features enabled in the kernel, or libraries we link to
62
63 - Teach the --show-exports option to modprobe. This works similarly to
64 --show-modversions, but it reports the exported symbols from that module.
65 Under the hood this reads the .symtab and .strtab section rather than
66 __versions so it shows useful data even if kernel is configured without
67 modversions (CONFIG_MODVERSIONS)
68
69 - Teach pkcs7 parsing to modinfo by using openssl. This allows modinfo to
70 correctly parse the signature appended to a module by the kernel build
71 system when configured with CONFIG_MODULE_SIG_ALL, or when externally
72 signed by the distro. Traditionally modules were signed and a struct
73 was appended together with the signature to the end of the module.
74 This has changed on the kernel for pkcs#7 and now the structure isn't
75 filled out with useful information. So we have to parse the signature
76 block in order to return useful data to the user.
77
78 If kmod is linked with openssl we parse the signature and return the
79 fields as we do for other signatures. An example of the relevant part
80 on the output of modinfo is below:
81
82 Before:
83 sig_id: PKCS#7
84 signer:
85 sig_key:
86 sig_hashalgo: md4
87 After:
88 sig_id: PKCS#7
89 signer: Fedora kernel signing key
90 sig_key: 51:C4:0C:6D:7E:A5:6C:D8:8F:B4:3A:DF:91:78:4F:18:BC:D5:E4:C5
91 sig_hashalgo: sha256
92
93 If kmod is not linked to openssl we just start printing "unknonwn" in the
94 sig_hashalgo field rather than the bogus value.
95
96
aca4eca1
LDM
97kmod 25
98=======
99
100- Improvements
101 - Add module signature to modinfo output
102
103 - Add support for external directories in depmod: now there's a new
104 "external" keyword parsed by depmod when calculating the dependencies.
105 It allows to add modules to other directories which are not relative
106 to where the modules are commonly installed. This results in
107 modules.dep and friends now understanding absolute paths rather than
108 relative paths only. For more information see depmod.d(1).
109
110 - Add support for CONFIG_MODULE_REL_CRCS
111
112 - Add missing documentation references in man pages
113
114 - Handle the case in which module has a .TOC symbol already while
115 calculating dependencies
116
117 - Improve testsuite and allow to use mkosi to run testsuite in different
118 distros
119
ef4257b5
LDM
120kmod 24
121=======
122
123- Improvements:
124 - Add more information on dependency loop
125
126 - Sanitize use of strcpy and allow to grow from small strings on stack
127 (common case) to bigger strings on heap when needed
128
129- Bug fixes
130 - Fix wrong dependency loops being reported by depmod
131
132 - Fix crashes when reporting dependency loops
133
134 - Fix parsing kernel command line containing quotes
135
136 - Fix leaks on error paths
137
a29268d0
LDM
138kmod 23
139=======
140
141- Improvements:
142 - Don't add comment to modules.devname if it would otherwise be empty
143 to play nice with tools detecting empty files
144
145 - Allow building with BSD sed, that doesn't have -E flag
146
147 - Ignore .TOC. symbols in depmod parsing as it's for PPC64 the
148 equivalent of _GLOBAL_OFFSET_TABLE_
149
150 - Teach modinfo about PKCS#7 module signatures: it doesn't add any
151 other info besides telling the user the module is signed since
152 kernel doesn't add other info on the module section
153
154- Bug fixes
155
156 - Fix -s and -p compat options to insmod triggering force flag
157
158 - Fix long lines from /proc/modules not being handled correctly by
159 kmod_module_new_from_loaded() and kmod_module_get_size() and several
160 other library functions that use them
161
162 - Fix crash on modinfo while checking for available signature of
163 unknown type
164
165 - Fix documentation generation with gtk-doc
166
42f32b8a
LDM
167kmod 22
168=======
169
170- Tools:
171 - Change defaul log level for tools to WARNING rather than ERROR and update
172 some log levels for current messages
173
174 - depmod doesn't fallback to uname if a bad version is passed in the command
175 line anymore. We just exit with an error.
176
177 - insmod was taught the -f flag, just like in modprobe. It was previously
178 silently ignoring it.
179
180- libkmod
181 - New kmod_get_dirname() API to get the module directory set in the
182 context
183
184- Bug fixes:
185 - Fix return code in error path of kmod_module_insert_module(). We were
186 previously returning ENOSYS rather than ENOENT.
187
2bfcd7ef
LDM
188kmod 21
189=======
190
191- New features:
192 - kmod tool started to learn the "insert" and "remove" commands that
193 are the simplified versions of the older modprobe tool. These
194 commands are still work in progress so they are hidden behind a
195 --enable-experimental flag during build. It should not be enabled
196 unless you know what you're doing.
197 - kmod tool now prints the relevant configuration options it was built
198 with when the "--version" argument is passed. This helps to mitigate
199 problems for example when the user is trying to load a compressed
200 module but kmod was built without support for the compression method.
201
202- Improvements to testsuite:
203 - Cache built modules so it is easier to run "make check" on build
204 servers by distro maintainers. If kmod is configured with
205 --disable-test-modules the modules from cache will be used by
206 "make check". No changes to the tests are needed and all of them
207 can run fine.
208
d9c71758
LDM
209kmod 20
210=======
211- Bug fixes:
212 - Handle bogus values from ELF, making sure they don't overflow while
213 parsing the file
214 - Fix leak in depmod when -b flag is passed multiple times
215 - Multiple minor fixes from static analysis by coverity and
216 clang-analyze
217 - Fix race between loading modules and checking if it's loaded in the
218 kernel
219
220- New features:
221 - There's a change in behavior regarding builtin modules: we now only
222 consider as builtin those that are present in modules.builtin index.
223 Previously we were also checking the presence of
224 /sys/module/<module-name>, but this is racy and only modules that
225 contain parameters are the ones creating a directory in sysfs.
226
227 Now some commands will start to fail, e.g. "modprobe vt". Since vt
228 can't be compiled as a module it's not present in modules.builtin
229 index. Previously we would report at as builtin, but now we fail
230 because we couldn't find the module.
231
232- Improvements:
233 - Integration of gcov into the build. Currently libkmod is at ~70%
234 covered and tools at ~50% by tests in the testsuite. Utility
235 functions and structures in shared have more than 90% of coverage.
236 - Upload build to coverity
237
238- Improvements to testsuite:
239 - Fix parsing return codes of init_module() calls
240 - Add tests for utility functions in shared/
241 - Add tests for kmod_module_remove_module()
242 - Add playground, in which our own modules are compiled
243 - Port all tests to use modules from module-playground instead of
244 copying prebuilt modules to the repository
245 - Properly handle binaries that exit with no output
246 - Besides comparing the output of commands, allow to copy to
247 stdout/stderr
248
f9e2167b
LDM
249kmod 19
250=======
251
252- Bug fixes:
253 - Fix missing CLOEXEC in library
254 - Fix error message while opening kmod's index
255
256- New features:
257 - Add kmod(8) man page
258 - Allow to build with libc's without be32toh()
259 - Move code around separating common code and data structures into a
260 shared directory. This allows to share more code between library and
3b058610 261 tools, making the binary size of tools smaller.
f9e2167b 262 - Clarify tools vs library licenses
3b058610 263 - static-nodes: when writing in tmpfiles format, indicate that
f9e2167b
LDM
264 creation of static nodes should only happen at boot. This is used and
265 required by systemd-217+.
266
267- Improvements to testsuite:
268 - Add tests for newly created shared/ code
269 - Improve how tests are declared so there's less boilerplate code for
270 each test.
271
ae58de0f
LDM
272kmod 18
273=======
274
275- Bug fixes:
276 - Fix leaks in error paths
277 - Fix use-after-free in hash implementation causing a wrong index to be
278 generated by depmod with out-of-tree modules
279
280- New features:
281 - Calling depmod with modules creating a dependency loop will now make
282 depmod return an error and not update the indexes. This is to protect
283 the current index not being overridden by another index that may cause
284 a boot failure, depending on the buggy module. It's a necessary
285 change in behavior regarding previous kmod releases and
286 module-init-tools. The error message was also improved to output
287 the modules that caused the dependency cycle.
288
289- Improvements to testsuite:
290 - Fix and improve expected-fail test
291 - Add tests for hashmap implementation
292
49d8e0b5
LDM
293kmod 17
294=======
295
296- Bug fixes:
297 - Fix matching a "." in kernel cmdline, making garbage in the command
298 line be parsed as kmod options
299 - Fix man pages to clarify we don't fallback to parsing modules.dep
300 but instead we depend on modules.dep.bin (generated by depmod) to
301 be present
302 - Fix ELF parsing on 32 bit systems assigning the wrong class.
303 - Fix partial matches of search directives in depmod. Previously having
304 a line in depmod.conf such as "search foo foobar built-in" would cause
305 unpretictable results because foo is a partial match of foobar as well.
306 - Fix unaligned access in modinfo when getting the signature from a
307 module
308 - Make sure softdeps are treated as optional dependencies
309
310- New features:
311 - Accept special files given to "-C" switch in modprobe. This way it's
312 possible to skip system configuration with "modprobe -C /dev/null"
313 - Do not require xsltproc on released tarballs
314 - Don't use Werror anymore
315 - Add experimental python bindings, merged from python-kmod repository
316 (https://github.com/agrover/python-kmod)
317 - Parse softdeps exported by the kernel as
318 /lib/modules/`uname -r`/modules.softdep
319
320- Improvements to testsuite:
321 - Check the list of loaded modules after a test
322
7ab88044
LDM
323kmod 16
324=======
325
8f67ab53
LDM
326- Bug fixes:
327 - Fix usage of readdir_r()
36c4bb92 328 - Add some missing checks for memory allocation errors
8f67ab53 329
7ab88044
LDM
330- New features:
331 - Remove option from libkmod to allow waiting on module removal if
332 the module is being used. It's dangerous since it can block the
333 caller indefinitely.
8f67ab53
LDM
334 - Improve compatibility with musl libc
335 - Add fallback implementation for compilers without _Static_assert(),
336 e.g. gcc < 4.6
337 - Minor optimizations to the hash table
338 - Make depmod warn if a module has incorrect devname specification
36c4bb92 339 - Use cleanup attribute
7ab88044 340
b3e19ce9
LDM
341kmod 15
342=======
343
344- Bug fixes:
345 - kmod static-nodes doesn't fail if modules.devname isn't available
18811d22
LDM
346 - Fix getting boolean parameter from kernel cmdline in case the value
347 is omitted
348 - Fix some mkdir_p() corner cases (used in testsuite and static-nodes)
b3e19ce9
LDM
349
350- New features:
351 - kmod static-nodes creates parent directories if given a -o option
18811d22
LDM
352 - kmod binary statically links to libkmod - if distro is only interested
353 in the kmod tool (for example in an initrd) it can refrain from
354 installing the library
355 - Add shell completion for kmod tool
b3e19ce9 356
3b38c7fc
LDM
357kmod 14
358=======
359
360- Bug fixes:
361 - Fix some format strings
362 - Protect against NULL being passed around to index
363 - Avoid calling syscall() with -1 when finit_module() is not available,
364 since this doesn't always work
365 - Fix not being able to remove alias due to checking the module's
366 refcount
367 - Minor fixes and refactors
368
369- New features:
370 - Improve libkmod documentation, particularly on how flags are dealt
371 with.
372 - Remove ability to build a static libkmod
373 - Add static-nodes command to kmod that parses modules.devname
374 generating output in useful formats
375
abb910eb
LDM
376kmod 13
377=======
378
379- Bug fixes:
380 - Add the long option --symbol-prefix option to depmod (it was absent)
381 and fix its behavior
382 - Don't abort if there's a bogus line in configuration file like "alias
383 psmouse off". Some distros are carrying this since the days of
384 modutils
385
386- New features:
387 - Add support for finit_module(2). If the module is load straight from
388 the disk and without compression we use finit_module() syscall when
389 available, falling back to init_module() otherwise
390 - kmod_module_get_info() also returns the signature if the module is
391 signed and modinfo uses it
392 - Use secure_getenv if available
393 - rmmod understands builtin modules, just like modprobe does
394 - Improve compatibility with musl-libc
395 - Test cases exit with success when receiving a signal if they are
396 xfail tests
397
6feba028
LDM
398kmod 12
399=======
400
401- Bug fixes:
402 - Fix removing vermagic from module when told to force load a module
403 - Fix removing __versions section when told to force load a module: we
404 need to mangle the section header, not the section.
405 - modinfo no longer fails while loading a module from file when path
406 contains ".ko" substring
407
c599606f
LDM
408kmod 11
409=======
410
411- Improvements to testsuite:
412 - Fix testsuite defining symbols twice on 32 bit systems
413 - Allow to check generated files against correct ones
414
415- New features:
416 - libkmod now keeps a file opened after the first call to
417 kmod_module_get_{info,versions,symbols,dependency_symbols}. This
418 reduces signficantly the amount of time depmod tool takes to
419 execute. Particularly if compressed modules are used.
420 - Remove --with-rootprefix from build system. It was not a great idea
421 after all and should not be use since it causes more harm then
422 benefits.
423 - Hide --wait option on rmmod. This feature is being targeted for
424 removal from kernel. rmmod still accepts this option, but it's hidden
7ab88044 425 now: man page and usage() say nothing about it and if it's used,
c599606f
LDM
426 user will get a 10s sleep. This way we can check and help if anyone
427 is using this feature.
428 - Refactor message logging on all tools, giving proper prefix, routing
429 everything to syslog when asked for, etc.
430
431- Bug fixes:
432 - Fix parsing of modules.order when using compressed modules
433 - Usage messages go to stdout instead of stderr
434 - Fix memory leak in hash implementation
435
40758602
LDM
436kmod 10
437=======
438
439- New features:
440 - Read coresize from /sys if supported
441
a7fbae03
JE
442 - Add flag to kmod_module_probe_insert() to apply blacklisting during
443 probe only if mod is an alias. Now modprobe uses this flag by default.
40758602 444 This is needed to fix a change in behavior regarding module-init-tools
a7fbae03 445 and ultimately makes us loading a blacklisted module.
40758602
LDM
446
447- Better formatting in man pages
448
a7fbae03 449- Add option to disable building man pages at build time
40758602 450
a7fbae03 451- Fixes in the testsuite and refactoring of LDPRELOAD'ed libraries
40758602
LDM
452
453- Re-licensing testsuite as LGPL
454
62081c0f
LDM
455kmod 9
456======
457
a7fbae03 458- Improvements to the testsuite:
62081c0f
LDM
459 - Check for correct handling of softdep loops
460 - Check for correct handling of install command loops
461
462- Bug fixes:
463 - Fix build with compilers that don't support --gc-sections
a7fbae03
JE
464 - Handle errors when dealing with gzipped modules
465 - depmod now handles errors while writing indices, so it doesn't end up
466 with a corrupted index without telling the user
62081c0f 467
46684bc2
LDM
468kmod 8
469======
470
471- No new features, small bug fixes only.
a7fbae03 472 - Fix a bug in "modprobe -c" output: be compatible with
46684bc2
LDM
473 module-init-tools
474
a7fbae03
JE
475 - Give a useful error message when init_module fails due to bad
476 parameter or unknown symbols
46684bc2
LDM
477
478 - Fix doc generation
479
8885ced0
LDM
480kmod 7
481======
482
483- Re-order dirs for configuration files to match the change in systemd and
484 udev: now the priority is:
485 1. /etc/modprobe.d
486 2. /run/modprobe.d
487 3. /lib/modprobe.d
488
a7fbae03
JE
489- Fix setting CFLAGS/LDFLAGS in build system. This prevented us from not
490 allowing the user to set his preferences.
8885ced0
LDM
491
492- Bug fixes:
493 - Return same error codes of module-init-tools when removing modules
494 with modprobe
495 - Fix builtin output in "--show-depends" when target kernel is not the
496 same of the running kernel
497 - 'modprobe -r' always look at all command line arguments
498 - Fix '-q' usage in modprobe
8885ced0 499
26906fe7
LDM
500kmod 6
501======
502
503- New API in libkmod:
504 - kmod_module_apply_filter(): a generic function to apply filters in a
505 list of modules. This deprecates the use of
506 kmod_module_get_filtered_blacklist()
507
508- More tests in testsuite
509
510- Add compatibility with uClibc again
511
512- Lookup modules.builtin.bin to decide if a module is built in kernel
513
514- Downgrade some log messages so we don't annoy people with useless messages
515
516- Bug fixes:
517 - Flag --ignore-loaded was not being properly handled
518 - Infinite loop with softdeps
519 - Infinite loop with dumb user configuration with install commands
520 - Fix leak in index when there's a partial match
521
522- Move repository and tarballs to kernel.org
523
e479598b
LDM
524kmod 5
525======
526
527- Break libkmod's API to insert a module like modprobe does. It now accepts
528 extra an extra argument to print its action and acceptable flags were
529 sanitized.
530
531- Share more code between modprobe and libkmod: using the new version of
532 kmod_module_probe_insert_module() it's possible to share a great amount of
533 code between modprobe and libkmod
534
535- modprobe no longer works with paths: it only accepts module names and/or
536 aliases now.
537
538- testsuite was added to repository, allowing automated tests to be run and
539 easing the way bugs are reproduced.
540
541- modprobe: when dumping configuration ('-c' option) separate config
542 and indexes by adding a commented line between them.
543
544- Fix bugs wrt normalizing aliases and module names
545
546- Fix bug wrt inserting an alias that resolves to multiple modules: we should
547 not stop on the first error, but rather continue to try loading other
548 modules.
549
550- Fix unaligned memory access in hash function, causing depmod to output wrong
551 information in ARMv5
552
553- Fix man page build and install: now they are only installed if tools are
554 enabled
555
b53b7e32
LDM
556kmod 4
557======
558
559- New APIs in libkmod to:
560 - Get configuration lists: blacklists, install commands, remove
561 commands, aliases, options and softdeps
562 - Dump indexes
563
564- Several bugs fixed in libkmod, modprobe, depmod and modinfo
565
566- API documentation: if configure with run with --enable-gtk-doc, the API doc
567 will be generated by make. Gtk-doc is required for that.
568
569- Man pages are built, which replace man pages from module-init-tools
570
571- 'include' and 'config' options in *.conf files were deprecated
572
573- configure is not run by autogen.sh. Instead, a common set of options is
574 printed. If you are hacking on kmod, consider using bootstrap-configure
575 script.
576
577- 'modprobe -c' works as expected now. As opposed to module-init-tools, it
578 dumps the parsed configuration, not only the file contents.
579
b30a71b8
LDM
580kmod 3
581======
582
583- New APIs in libkmod to:
584 - Get symbols from module, parsing the ELF section
585 - Get dependency symbols
586 - Check if resources are still valid or if libkmod must be reloaded
587 - Insert module like modprobe, checking (soft-)dependencies, commands,
588 blacklist. It can run commands by itself and to call a callback
589 function.
590
591- Support to load modules compressed with xz
592
593- Tools are now bundled together in a single tool called kmod. It can be
594 called using symlinks with the same names as tools from module-init-tools.
595 E.g: /usr/bin/lsmod -> /usr/bin/kmod. With this we are aiming to complete a
596 1:1 replacement of module-init-tools.
597
598- The only missing tool, depmod, was added to kmod together with the necessary
599 APIs in libkmod.
600
601- If a program using libkmod runs for a long time, as for example udev, it must
602 check if it doesn't have to re-load libkmod. A new helper function was added
603 in libkmod to check if context is still valid and udev is already using it.
604
605- An 'unaligned access' bug was fixed. So those architecture that does not
606 handle unaligned access can use kmod, too.
607
acc18b14
LDM
608kmod 2
609======
610
611Some bugs fixed: the worst of them was with an infinite loop when an alias
612matched more than one module.
613
614- New APIs in libkmod to:
615 - Get soft dependencies
616 - Get info from module files parsing ELF
617 - Get modversions from files parsing ELF
618
619- Support to load gzipped kernel modules: kmod can be compiled with support to
620 gzipped modules by giving the --enable-zlib flag
621
622- Support to forcefully load modules, both vermagic and modversion
623
624- Support to force and nowait removal flags
625
626- Configuration files are parsed in the same order as modprobe: files are
627 sorted alphabetically (independently of their dir) and files with the same
628 name obey a precedence order
629
630- New tool: kmod-modinfo
631
632- kmod-modprobe gained several features to be a 1:1 replacement for modprobe.
633 The only missing things are the options '--showconfig' and '-t / -l'. These
634 last ones have been deprecated long ago and they will be removed from
635 modprobe. A lot of effort has been put on kmod-modprobe to ensure it
636 maintains compabitility with modprobe.
637
638- linux-modules@vger.kernel.org became the official mailing list for kmod
639
89eba7cb
LDM
640kmod 1
641======
ecd40ee4 642
89eba7cb
LDM
643First version of kmod and its library, libkmod.
644
645In the libkmod it's currently possible to:
646 - List modules currently loaded
647 - Get information about loaded modules such as initstate, refcount,
648 holders, sections, address and size
649 - Lookup modules by alias, module name or path
650 - Insert modules: options from configuration and extra options can be
651 passed, but flags are not implemented, yet
652 - Remove modules
653 - Filter list of modules using blacklist
654 - For each module, get the its list of options and install/remove
655 commands
656 - Indexes can be loaded on startup to speedup lookups later
657
658Tools provided with the same set of options as in module-init-tools:
659 - kmod-lsmod
660 - kmod-insmod
661 - kmod-rmmod
662 - kmod-modprobe, with some functionality still missing (use of softdep,
663 dump configuration, show modversions)