diff options
| -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; |
