https://bugzilla.redhat.com/show_bug.cgi?id=1962841
Bug ID: 1962841
Summary: kmod should not ship /usr/sbin/weak-modules because it
is useless and dangerous for DKMS modules
Product: Fedora
Version: 33
Status: NEW
Component: kmod
Assignee: kmod-maint(a)lists.fedoraproject.org
Reporter: cks-rhbugzilla(a)cs.toronto.edu
QA Contact: extras-qa(a)fedoraproject.org
CC: jonathan(a)jonmasters.org,
kmod-maint(a)lists.fedoraproject.org,
skozina(a)redhat.com, ykaliuta(a)redhat.com
Target Milestone: ---
Classification: Fedora
Description of problem:
Fedora specifically adds the /usr/sbin/weak-modules script to the kmod RPM;
it's not part of the upstream version. However, weak-modules does not work
properly on Fedora, as it believes that a module built for one kernel version
can be compatible with another kernel version, and will create
/lib/modules/*/weak-updates symlinks reflecting this under at least some
circumstances. After these symlinks exist, modprobe of the relevant module(s)
will fail with eg:
version magic '5.11.15-200.fc33.x86_64 SMP mod_unload ' should be
'5.10.23-200.fc33.x86_64 SMP mod_unload '
Fedora does not set CONFIG_MODVERSIONS in its kernel configurations, so I
believe this will always fail and as a result /usr/sbin/weak-modules's checks
are irrelevant and evidently incorrect.
This failure is sufficiently well known that the upstream DKMS manpage contains
a warning that everyone writing a dkms.conf must specifically disable running
/usr/sbin/weak-modules on Fedora (the 'NO_WEAK_MODULES' setting and the
discussion of it in the manpage). It should come as no surprise that not all
dkms.conf files contain this setting.
This issue is especially dangerous because it seems to primarily affects people
when they are reverting to a previous kernel, where some of their modules may
not load.
Version-Release number of selected component (if applicable):
kmod-27-3.fc33.x86_64
How reproducible:
Completely.
Steps to Reproduce:
1. Install a DKMS module with a dkms.conf that doesn't specify
NO_WEAK_MODULES=yes. It will modprobe on your current kernel.
2. Install a kernel upgrade.
3. Reboot into the current kernel (not the new upgraded kernel) and observe
that your DKMS module no longer modprobes, failing with a version magic error.
4. see that /lib/modules/$(uname -r)/weak-modules contains a symlink for your
DKMS module that points to /lib/modules/<new-kernel>/.../<dkms-module>.ko.xz.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.