Bug #1948812 “Bad busybox modinfo output on exactly 3 modules” : Bugs : Ubuntu

Trying on Ubuntu 20.04.3 with linux-modules-5.4.0-88-generic and busybox

    for a in $(find /lib/modules/5.4.0-88-generic/ -name ‘*.ko’)
       [ $(busybox modinfo -F name $a|wc -w) = 1 ] || echo $a

This code should output nothing because every module reports just a name. Instead it outputs exactly three lines:


Let’s try them

     $ busybox modinfo -F name /lib/modules/5.4.0-88-generic/kernel/fs/nfs/nfsv4.ko
This is correct, I put it just for the reference.

     $ busybox modinfo -F name /lib/modules/5.4.0-88-generic/kernel/net/ceph/libceph.ko

The above incorrectly reports one empty line, one literal %s and the name of the module

     $ busybox modinfo -F name /lib/modules/5.4.0-88-generic/kernel/fs/nfs/nfs.ko

This reports a strange format and empty line and then nfs

     $ busybox modinfo -F name /lib/modules/5.4.0-88-generic/kernel/zfs/zfs.ko
     %s creation_txg=%llu target_snap=%llu
Yet another strange format

No other module, except those 3, misbehaved when tried to get a name from busybox modinfo

Just for your information I used the busybox from the package busybox version 1:1.30.1-4ubuntu6.3 amd64 but the very same result was generated by the latest compiled busybox

Read more here: Source link