Bug 10770 - many modules lacking description: field in modinfo
Summary: many modules lacking description: field in modinfo
Status: RESOLVED CODE_FIX
Alias: None
Product: Other
Classification: Unclassified
Component: Modules (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Alan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-21 10:32 UTC by Roland Kletzing
Modified: 2024-05-10 14:18 UTC (History)
4 users (show)

See Also:
Kernel Version: 3.18-rc5
Subsystem:
Regression: No
Bisected commit-id:


Attachments
modules w/o description (3.44 KB, text/plain)
2008-05-24 02:12 UTC, Roland Kletzing
Details

Description Roland Kletzing 2008-05-21 10:32:44 UTC
Problem Description:

more than once i wanted to check "what is this module for?" - but modinfo didn't give any information about that. 

no kernel source available at the customer machine.....and no internet available in the serverroom...

i checked this and i tested modules (suse default install) for description: availability. 

2145 modules tested
1741 modules have the description field
404 modules missing the description field

what about making the description field mandatory for modules and warn about that on load or at compile time ?

that would make sure that each module get`s one sooner or later....
Comment 1 Roland Kletzing 2008-05-21 10:33:51 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"
Comment 2 Roland Kletzing 2008-05-22 13:25:12 UTC
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?
Comment 3 Roland Kletzing 2008-05-24 02:12:40 UTC
Created attachment 16263 [details]
modules w/o description
Comment 4 Alan 2008-09-23 03:51:25 UTC
Grabbing as a side project for the winter
Comment 5 Alan 2008-10-02 07:31:29 UTC
patch for dups done
Comment 6 Roland Kletzing 2008-10-31 05:32:18 UTC
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....
Comment 7 Roland Kletzing 2009-03-13 13:22:29 UTC
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;
Comment 8 Roland Kletzing 2010-12-30 00:15:57 UTC
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.
Comment 9 xerofoify 2014-06-25 18:56:13 UTC
Can we close this bug if fixed. This bug is very old and outdated.
Cheers Nick
Comment 10 Sam Ravnborg 2014-06-25 19:19:24 UTC
> --- 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
Comment 11 Alan 2014-06-25 21:48:20 UTC
A 10 second search would show you it's not entirely fixed
Comment 12 xerofoify 2014-07-07 03:25:45 UTC
Can we at least change the kernel version to the newest kernel.
Nick
Comment 13 Roland Kletzing 2014-11-20 12:18:16 UTC
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%
Comment 14 Roland Kletzing 2022-10-14 10:07:32 UTC
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
Comment 15 Roland Kletzing 2023-03-09 14:00:45 UTC
after all those years.... :)

thank you @Vincenzo!

https://marc.info/?l=linux-kbuild&m=167836333024600&w=2
Comment 16 Andy Shevchenko 2024-05-10 14:18:05 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.