module: Allow to disable modsign in kernel cmdline
PATCH v2 1/1 module: Allow to disable modsign in kernel cmdline
This option allows to disable modsign completely at the beginning, and turn off by set the kernel cmdline no_modsig_enforce when CONFIG_MODULE_SIG_FORCE is enabled.
Yet another change allows to always show the current status of modsign through /sys/module/module/parameters/sig_enforce.
--- Documentation/admin-guide/kernel-parameters.txt | 6 ++++++ kernel/module.c | 8 ++++++++ 2 files changed, 14 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +6 -0
@@ -3190,6 +3190,12 @@ noirqdebug [X86-32] Disables the code which attempts to detect and disable unhandled interrupt sources. + no_modsig_enforce + [KNL] When CONFIG_MODULE_SIG_FORCE is set, this option + allows to disable modsign completely at the beginning. + This means that modules without (valid) signatures will + success to load. + no_timer_check [X86,APIC] Disables the code which tests for broken timer IRQ sources.
kernel/module.c +8 -0
@@ -269,6 +269,14 @@ static void module_assert_mutex_or_preempt(void)static bool sig_enforce =IS_ENABLED (CONFIG_MODULE_SIG_FORCE );module_param (sig_enforce, bool_enable_only,0644 ); +#ifdef CONFIG_MODULE_SIG_FORCE +static int __init set_no_modsig_enforce (char *str) +{ + sig_enforce = false; +return 1 ; +} +__setup ("no_modsig_enforce" , set_no_modsig_enforce); +#endif /* !CONFIG_MODULE_SIG_FORCE */ /* * Export sig_enforce kernel cmdline parameter to allow other subsystems rely
Signature · 1 line
2.17.1
Randy Dunlap
reviewerHi,
Documentation/admin-guide/kernel-parameters.txt line 3197
Quoted 13 lines · Tianjia Zhang
Documentation/admin-guide/kernel-parameters.txt +5
-0@@ -3190,6 +3190,12 @@ noirqdebug [X86-32] Disables the code which attempts to detect and disable unhandled interrupt sources. + no_modsig_enforce + [KNL] When CONFIG_MODULE_SIG_FORCE is set, this option + allows to disable modsign completely at the beginning. + This means that modules without (valid) signatures will + success to load.
succeed to load.
succeed in loading.
load successfully.
I prefer this one..... ^^^^^^^^^^^^^^^^^^^^^
be loaded successfully.
Documentation/admin-guide/kernel-parameters.txt line 3201
Quoted 4 lines
Documentation/admin-guide/kernel-parameters.txt +1
-0+ no_timer_check [X86,APIC] Disables the code which tests for broken timer IRQ sources.
thanks.
Signature · 1 line
~Randy
Quoted 27 lines · Randy Dunlap
Hi,
Documentation/admin-guide/kernel-parameters.txt line 3197
Quoted 13 lines · Tianjia Zhang
Documentation/admin-guide/kernel-parameters.txt +5
-0@@ -3190,6 +3190,12 @@ noirqdebug [X86-32] Disables the code which attempts to detect and disable unhandled interrupt sources. + no_modsig_enforce + [KNL] When CONFIG_MODULE_SIG_FORCE is set, this option + allows to disable modsign completely at the beginning. + This means that modules without (valid) signatures will + success to load.succeed to load.
succeed in loading.
load successfully.
I prefer this one..... ^^^^^^^^^^^^^^^^^^^^^be loaded successfully.
Quoted 7 lines
Documentation/admin-guide/kernel-parameters.txt line 3201
Quoted 4 lines
Documentation/admin-guide/kernel-parameters.txt +1
-0+ no_timer_check [X86,APIC] Disables the code which tests for broken timer IRQ sources.thanks.
v3 patch has been submitted, thank you for your suggestion.
Thanks,
Tianjia