Skip to content

Commit de7f01c

Browse files
committed
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
2 parents 8d1e513 + c554b89 commit de7f01c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernel/module.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,7 @@ static void module_assert_mutex_or_preempt(void)
274274
}
275275

276276
static bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE);
277-
#ifndef CONFIG_MODULE_SIG_FORCE
278277
module_param(sig_enforce, bool_enable_only, 0644);
279-
#endif /* !CONFIG_MODULE_SIG_FORCE */
280278

281279
/*
282280
* 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)
27852783
}
27862784

27872785
/* 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())
27892787
err = 0;
27902788

27912789
return err;

0 commit comments

Comments
 (0)