Busybox modprobe hitch with kernel 5.10
Denys Vlasenko
vda.linux at googlemail.com
Sun Jan 3 01:44:18 UTC 2021
On Sat, Jan 2, 2021 at 2:48 AM Qu Wenruo <wqu at suse.com> wrote:
> On 2021/1/1 下午7:05, Denys Vlasenko wrote:
> > I propose this simple fix:
> >
> > if (not_a_good_ELF_image(image_ptr)) {
> > + if (!not_GZIP_signature(image_ptr)
> > + || !not_BZIP2_signature(image_ptr)
> > + || !not_XZ_signature(image_ptr))
> > printk(KERN_ERR "Module has invalid ELF header\n");
> > }
> >
>
> There are several problems.
>
> Firstly, what if a valid compressed file is passed in but without a
> valid ELF header?
> Now we fall back to old behavior where user has no clue at all.
>
> Secondly, you are going to add new decompression related headers and
> extra refactor, which is never a small fix.
> Especially considering how complex the compressed signature can be.
gz, bz2 and xz signatures are trivial.
> Finally, what if the decompression module is compressed?
> Just consider this: if xz support is compiled as a module, and that
> modules is also xz compressed?
>
> If you really want to make finit_modules() to support compressed module,
> purpose a new system call other than changing something which already
> has a clear and simple spec.
I decided to just wait when inevitably someone adds that support.
I'm not planning to modify busybox modprobe to avoid generating
the dmesg message.
More information about the busybox
mailing list