Bug 10770
Summary: | many modules lacking description: field in modinfo | ||
---|---|---|---|
Product: | Other | Reporter: | Roland Kletzing (devzero) |
Component: | Modules | Assignee: | Alan (alan) |
Status: | RESOLVED CODE_FIX | ||
Severity: | enhancement | CC: | andy.shevchenko, bunk, devzero, xerofoify |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.18-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | modules w/o description |
Description
Roland Kletzing
2008-05-21 10:32:44 UTC
>what about making the description field mandatory for modules and warn about
>that on load or at compile time ?
sorry, i meant "warn about a missing one"
i`m attaching a list of that modules lacking a description. besides that, these 4 modules seem to have duplicate entries (e.g. description, license...) cx23885 fdomain_cs mac80211 wacom if it`s welcomed, i could try helping adding missing descriptions. how should that be submitted? one patch for each is too many patches, changing all in one large patch isn`t better. maybe grouping them in a proper way and sending trough the subsystem maintainer? Created attachment 16263 [details]
modules w/o description
Grabbing as a side project for the winter patch for dups done just an idea - what about enhancing modinfo command or module loader, so that it prints a messeage "this module is lacking the description field. please add one". otherwise, we would never get rid of modules with lacking description.... progress on this?
just as a side-note, here is some suggestion to add warning for missing MODULE_LICENSE - maybe we could use the same way for giving warning about missing module description.
List: linux-kernel
Subject: Re: wish: build time warning for missing MODULE_LICENSE
From: Sam Ravnborg <sam () ravnborg ! org>
Date: 2008-03-30 19:04:30
Message-ID: 20080330190430.GD19733 () uranus ! ravnborg ! org
[Download message RAW]
On Sun, Mar 30, 2008 at 09:01:19PM +0300, Adrian Bunk wrote:
> I just fixed a bug where I had accidentally removed a MODULE_LICENSE()
> from a file.
>
> The problem is that such bugs are currently not discovered until someone
> actually runs a kernel with this module loaded.
>
> Could we get a build time warning/error for a missing MODULE_LICENSE?
Is it something as simple as this you are after?
[My dev box is dead atm so I have not done a kernel build
with this, only a single module].
Sam
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 695b5d6..e8560a0 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1552,6 +1552,8 @@ static void read_symbols(char *modname)
}
license = get_modinfo(info.modinfo, info.modinfo_len, "license");
+ if (!license && !is_vmlinux(modname))
+ warn("modpost: missing MODULE_LICENSE() in %s\n", modname);
while (license) {
if (license_is_gpl_compatible(license))
mod->gpl_compatible = 1;
i had a look with recent 2.6.37-rc7 kernel and things seem to have gotten worse. i built an allmodconfig kernel and there were >3000 modules where roundabout 600 modules lacking description field. so the number of modules has increased, but so has the number of modules without description. Can we close this bug if fixed. This bug is very old and outdated. Cheers Nick > --- Comment #9 from xerofoify@gmail.com ---
> Can we close this bug if fixed. This bug is very old and outdated.
I have no idea of the current status - sorry!
Sam
A 10 second search would show you it's not entirely fixed Can we at least change the kernel version to the newest kernel. Nick modified kernel version. regarding current status - i did a test on my default debian kernel (3.2.63) and from 2845 inspected modules 478 lacking the description field. here are some ugly statistics about the "percentage of module descriptions missing in modinfo" - based on the existing information: 2008: 2145/404 18,8% 2010: 3000/600 20% 2014: 2845/478 16,8% things have gotten slightly better, but even in 2022, 13,2% modules of default kernel lacking description field. tested with 5.15.60-1-pve kernel 2022: 6038/800 13,2% i'm writing this because i came across one or other module without description in the meantime, and i think from a end user perspective, this simply sucks. you can't expect that an end user digs trough code or googles for external documentation to get to the info what's a modules purpose or what it was exactly written for. besides missing description, there are also description which are simply sloppy, i came across this one today and thought this sucks and remembered i did a bugreport for this # modinfo ast filename: /lib/modules/5.15.60-1-pve/kernel/drivers/gpu/drm/ast/ast.ko license: GPL and additional rights description: AST author: Dave Airlie firmware: ast_dp501_fw.bin srcversion: EF69D1CBF8E7D37EC5ED59E alias: pci:v00001A03d00002010sv*sd*bc03sc*i* alias: pci:v00001A03d00002000sv*sd*bc03sc*i* depends: drm,drm_kms_helper,drm_vram_helper,drm_ttm_helper,i2c-algo-bit retpoline: Y intree: Y name: ast vermagic: 5.15.60-1-pve SMP mod_unload modversions parm: modeset:Disable/Enable modesetting (int) mind that others also may not understand, why it's missing from time to time, e.g. https://unix.stackexchange.com/questions/572820/linux-module-descriptions-missing adding a warning message to the build process should imrprove quality , it think. btw, in the meantime, missing license does not generate warning but error now: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/mod/modpost.c?h=v6.0&id=1d6cd39293602e990b016994e51956eded35da7c after all those years.... :) thank you @Vincenzo! https://marc.info/?l=linux-kbuild&m=167836333024600&w=2 It's now a commit 1fffe7a34c89 ("script: modpost: emit a warning when the description is missing") in the kernel. While this bug is marked "Resolved", many modules still needs to be updated, but there is an ongoing work which will be finished at some day. At least a few kernel maintainers now aware of this. |