]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: always detect the module compression
authorEmil Velikov <emil.l.velikov@gmail.com>
Mon, 12 Feb 2024 17:23:09 +0000 (17:23 +0000)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 30 Apr 2024 17:33:52 +0000 (12:33 -0500)
commit0c127388070b8d696bb52c783985d4d10f74a5bc
treefb1d85dceb680567d82a732019181e60fc0403bb
parent8cc475f7da3bb6e8e211ebcba141d38527980eb8
libkmod: always detect the module compression

Currently, when built w/o given compression we'll incorrectly report a
"compression_none".

As we reach do_finit_module(), we'll naively assume that the kernel can
handle the compressed module, yet omit the MODULE_INIT_COMPRESSED_FILE
flag.

As result the kernel will barf at us, do_finit_module will fail with non
-ENOSYS and we won't end in the do_init_module codepath (which will also
fail).

In other words: with this change, you can build kmod without zstd, xz
and zlib support and the kernel will load the modules, assuming it
supports the format \o/

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-file.c