On Fri, Mar 31, 2023 at 6:20 AM Denys Vlasenko <[email protected]> wrote:

> Kernel does not auto-detect compressed modules.
> We need to call finit_module() with MODULE_INIT_COMPRESSED_FILE flag
> if module is compressed.
>
> Fixed it in git. Please try it now.

This is not working for me. In the best case, finit_module() tries the
MODULE_INIT_COMPRESSED_FILE flag and returns -1 with errno set to
ENOEXEC (Exec format error). It then tries again with the flag set to
zero and returns the same error. Then it continues on to the
init_module() call, which successfully loads the module.

But in the worst case (which seems to happen randomly), finit_module()
tries the MODULE_INIT_COMPRESSED_FILE flag and immediately receives a
SIGKILL, killing busybox and failing to load the module. (See
attachment for dmesg output.)

This is on Artix Linux with their stock kernel 6.2.11. The modules are
zstd compressed and my busybox has the zstd patch applied, but I don't
think that is causing the problem since the random crashes occur when
the kernel is asked to do the decompression. If the code makes it to
the part where busybox does the decompression, all is well.

If I completely disable the `#ifdef __NR_finit_module` block,
everything works just fine. I wonder how many people actually need
this feature -- maybe there could be a build option to disable it? I
didn't find any usage of MODULE_INIT_COMPRESSED_FILE  in the kmod-30
sources, and there is scant mention of it on google or bing.

 - Jeff

Attachment: bb-modprobe.dmesg
Description: Binary data

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to