Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 710868

Summary: sys-apps/kmod-27: modinfo prefers context even if filename passed
Product: Gentoo Linux Reporter: Denis Kaganovich <mahatma>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Denis Kaganovich 2020-02-26 14:03:41 UTC
sys-apps/kmod-27 modinfo prefer context even if fulename passed

sys-apps/kmod-27, running kernel with some module embedded (intel_menlow, for example). You build new kernel with external same module and want to simple lookup module info - "modinfo /path/to/intel_menlow.ko". You will get stripped embedded info from running kernel, not from new file. More info and suggested patch here:
https://lore.kernel.org/linux-modules/dda23def071a8d087cca3538289de1e0@bspu.by/

Yes, I send patch upstream, but as usual, I make at least formal error, not saying "[PATCH]". But bug is to annoying for everybody who build kernels and use modinfo. In my case it completely broke automatic kernel build results. So, it may be dangerous.

PS command-line workaround: "modinfo --basedir=/dev/null <filename>"
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2020-09-02 23:12:42 UTC
I am not convinced by the patch unless upstream will accept it.

At the moment you can argue that upstream wants that kmod should always return results from current kernel unless different basedir is set. If we would carry that patch and you run kmod tools within builddir you maybe will end up with unexpected results comparing to other distributions.