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>"
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.