From: Thomas Weißschuh Date: Thu, 26 Feb 2026 07:20:12 +0000 (+0100) Subject: ima: efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=658d5c72fc5d14fb52419ecf090ec332f46cf262;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Mimi Zohar Reviewed-by: Aaron Tomlin Reviewed-by: Nicolas Schier [zohar@linux.ibm.com: fixed merge conflict with commit 63e8a44395a4] Signed-off-by: Mimi Zohar --- diff --git a/security/integrity/ima/ima_efi.c b/security/integrity/ima/ima_efi.c index 78191879dd98f..bca57d836cb96 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;