|
@@ -278,6 +278,16 @@ static bool sig_enforce = IS_ENABLED(CONFIG_MODULE_SIG_FORCE);
|
|
|
module_param(sig_enforce, bool_enable_only, 0644);
|
|
|
#endif /* !CONFIG_MODULE_SIG_FORCE */
|
|
|
|
|
|
+/*
|
|
|
+ * Export sig_enforce kernel cmdline parameter to allow other subsystems rely
|
|
|
+ * on that instead of directly to CONFIG_MODULE_SIG_FORCE config.
|
|
|
+ */
|
|
|
+bool is_module_sig_enforced(void)
|
|
|
+{
|
|
|
+ return sig_enforce;
|
|
|
+}
|
|
|
+EXPORT_SYMBOL(is_module_sig_enforced);
|
|
|
+
|
|
|
/* Block module loading/unloading? */
|
|
|
int modules_disabled = 0;
|
|
|
core_param(nomodule, modules_disabled, bint, 0);
|