Bug 1445045 - modprobe -f doesn't work if version magic differs
Summary: modprobe -f doesn't work if version magic differs
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-24 19:26 UTC by Jaroslav Škarvada
Modified: 2017-04-26 14:53 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-26 14:53:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jaroslav Škarvada 2017-04-24 19:26:06 UTC
Description of problem:
modprobe -f doesn't ignore version magic

Version-Release number of selected component (if applicable):
kmod-23-1.fc25.x86_64

How reproducible:
Always

Steps to Reproduce:
1. have running kernel with version magic '4.10.10-200.fc25.x86_64 SMP mod_unload '
2. recompile kernel without explicit KERNELRELEASE to have version magic '4.10.12 SMP mod_unload '
3. setenforce 0 # due to bug 1427896
3. modprobe it913x
4. dmesg | tail -1
5. modprobe -f it913x

Actual results:
modprobe: ERROR: could not insert 'it913x': Exec format error
[39896.356652] it913x: version magic '4.10.12 SMP mod_unload ' should be '4.10.10-200.fc25.x86_64 SMP mod_unload '
modprobe: ERROR: could not insert 'it913x': Exec format error

Expected results:
No error for the 5. (i.e. modprobe -f)

Additional info:
It works OK if recompiled with KERNELRELEASE=4.10.10-200.fc25.x86_64

Comment 1 Yauheni Kaliuta 2017-04-26 12:00:59 UTC
# grep CONFIG_MODULE_FORCE_LOAD  /boot/config-4.10.11-200.fc25.x86_64
# CONFIG_MODULE_FORCE_LOAD is not set

It's a kernel config issue.

Comment 2 Josh Boyer 2017-04-26 12:12:18 UTC
Reassigning.

I'll leave it for the kernel team to comment on whether they feel allowing forced modprobe is safe or not.

Comment 3 Justin M. Forbes 2017-04-26 14:53:47 UTC
It is a feature, not an issue.  The kernel team does not support forced modules.


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