summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2026-02-26 10:20:12 +0300
committerMimi Zohar <zohar@linux.ibm.com>2026-03-08 15:26:08 +0300
commit658d5c72fc5d14fb52419ecf090ec332f46cf262 (patch)
tree69abdc9d980595b3823cd765ab543a8351d0fd74
parent01baa39cf55fbbd0078f28a215157ecd185a5176 (diff)
downloadlinux-658d5c72fc5d14fb52419ecf090ec332f46cf262.tar.xz
ima: efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG
When configuration settings are disabled the guarded functions are defined as empty stubs, so the check is unnecessary. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Reviewed-by: Aaron Tomlin <atomlin@atomlin.com> Reviewed-by: Nicolas Schier <nsc@kernel.org> [zohar@linux.ibm.com: fixed merge conflict with commit 63e8a44395a4] Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
-rw-r--r--security/integrity/ima/ima_efi.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/integrity/ima/ima_efi.c b/security/integrity/ima/ima_efi.c
index 78191879dd98..bca57d836cb9 100644
--- a/security/integrity/ima/ima_efi.c
+++ b/security/integrity/ima/ima_efi.c
@@ -25,10 +25,8 @@ static const char * const sb_arch_rules[] = {
const char * const *arch_get_ima_policy(void)
{
if (IS_ENABLED(CONFIG_IMA_ARCH_POLICY) && arch_get_secureboot()) {
- if (IS_ENABLED(CONFIG_MODULE_SIG))
- set_module_sig_enforced();
- if (IS_ENABLED(CONFIG_KEXEC_SIG))
- set_kexec_sig_enforced();
+ set_module_sig_enforced();
+ set_kexec_sig_enforced();
return sb_arch_rules;
}
return NULL;