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@lists.fedoraproject.org Reporter: cks-rhbugzilla@cs.toronto.edu QA Contact: extras-qa@fedoraproject.org CC: jonathan@jonmasters.org, kmod-maint@lists.fedoraproject.org, skozina@redhat.com, ykaliuta@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.
https://bugzilla.redhat.com/show_bug.cgi?id=1962841
Harish Pillay hpillay@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hpillay@redhat.com Doc Type|--- |If docs needed, set a value
--- Comment #1 from Harish Pillay hpillay@redhat.com --- https://utcc.utoronto.ca/~cks/space/blog/linux/FedoraWeakUpdatesFailure perhaps this has useful context as well.
https://bugzilla.redhat.com/show_bug.cgi?id=1962841
Justin M. Forbes jforbes@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |MODIFIED CC| |jforbes@redhat.com
--- Comment #2 from Justin M. Forbes jforbes@redhat.com --- This is fixed with https://src.fedoraproject.org/rpms/kmod/c/43ae298bc965ee0089b15519075622f94f.... As I have also requested the latest kmod be shipped to F33 and F34 for zstd compatibility, it should trickle that way.
https://bugzilla.redhat.com/show_bug.cgi?id=1962841
--- Comment #3 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-fa3657ac97 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-fa3657ac97
--- Comment #4 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-437f9ffe2d has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-437f9ffe2d
https://bugzilla.redhat.com/show_bug.cgi?id=1962841
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |ON_QA
--- Comment #5 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-437f9ffe2d has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-437f9ffe2d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-437f9ffe2d
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=1962841
--- Comment #6 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-fa3657ac97 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-fa3657ac97` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-fa3657ac97
See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
https://bugzilla.redhat.com/show_bug.cgi?id=1962841
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ON_QA |CLOSED Fixed In Version| |kmod-29-2.fc34 Resolution|--- |ERRATA Last Closed| |2021-05-28 00:59:52
--- Comment #7 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-437f9ffe2d has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1962841
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|kmod-29-2.fc34 |kmod-29-2.fc34 | |kmod-29-2.fc33
--- Comment #8 from Fedora Update System updates@fedoraproject.org --- FEDORA-2021-fa3657ac97 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report.
kmod-maint@lists.fedoraproject.org