diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-15 18:36:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-15 18:36:39 -0400 |
commit | de7f01c22a29502b9bb10c2356f2d971206292d0 (patch) | |
tree | 3908a048295527e68d23af38c1a85287462ae513 | |
parent | 8d1e5133bf260aabdf2cc6facd4a8e696414d16a (diff) | |
parent | c554b89868015d86cd330d9cc10656c3756352a5 (diff) |
Merge tag 'modules-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux
Pull module updates from Jessica Yu:
"Minor code cleanup and also allow sig_enforce param to be shown in
sysfs with CONFIG_MODULE_SIG_FORCE"
* tag 'modules-for-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
module: Allow to always show the status of modsign
module: Do not access sig_enforce directly
-rw-r--r-- | kernel/module.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/module.c b/kernel/module.c index 68469b37d61a..f475f30eed8c 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -274,9 +274,7 @@ static void module_assert_mutex_or_preempt(void) | |||
274 | } | 274 | } |
275 | 275 | ||
276 | static bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE); | 276 | static bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE); |
277 | #ifndef CONFIG_MODULE_SIG_FORCE | ||
278 | module_param(sig_enforce, bool_enable_only, 0644); | 277 | module_param(sig_enforce, bool_enable_only, 0644); |
279 | #endif /* !CONFIG_MODULE_SIG_FORCE */ | ||
280 | 278 | ||
281 | /* | 279 | /* |
282 | * Export sig_enforce kernel cmdline parameter to allow other subsystems rely | 280 | * Export sig_enforce kernel cmdline parameter to allow other subsystems rely |
@@ -2785,7 +2783,7 @@ static int module_sig_check(struct load_info *info, int flags) | |||
2785 | } | 2783 | } |
2786 | 2784 | ||
2787 | /* Not having a signature is only an error if we're strict. */ | 2785 | /* Not having a signature is only an error if we're strict. */ |
2788 | if (err == -ENOKEY && !sig_enforce) | 2786 | if (err == -ENOKEY && !is_module_sig_enforced()) |
2789 | err = 0; | 2787 | err = 0; |
2790 | 2788 | ||
2791 | return err; | 2789 | return err; |