From nobody Thu Apr 16 19:12:34 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79FCA38F220; Thu, 26 Feb 2026 07:20:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772090427; cv=none; b=bOJyk86dEp97WL6L47rB7D3a9cdGxNM7B9eK+dypJ2H40ThfauI7Dmj2C1fwPqhLcm5/eXUub/O2LQbtbsNf4tM18IOanC5sYKf3yDTzGImnl/aHg9YxRsilq5ww+VkulIPJV78ow+ZUc+N7MlJIqTqFWypGRey51q6/fy+91Ag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772090427; c=relaxed/simple; bh=LFqBpkOHHrz0+82+lCKyk++cLTVpgpMp3m07f0lNCgQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nMy2XLKP4/Fx91zHI5XCQGylC3J1JILJ+I+kyt7Z8NL8sfd+FXctOq7Ky1YK0MPnax01naAPWJpAzrZ31o2MQKikCINGiTme5WxIws5L2muqnumyzIUDFpEljSBe8PI3YB9OYt+gP4NKBX2RPMGXnqlpsFtiDfOGSyFccVvgtnQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=jT8yfCz3; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="jT8yfCz3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1772090423; bh=LFqBpkOHHrz0+82+lCKyk++cLTVpgpMp3m07f0lNCgQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jT8yfCz3TIppnkqYmB8/TpSvxEhN4jrG2cAyDul0n15YBJ8ggCQjwtQPbiOOLJyG5 z2bxbSx07vjL/gfWaSw/nLHKjCYxrM7c8vXm9bNjbMWZwr5Uexaz49LnvE/I14mg/Z jNC1mgH9K2B321H2bxFGFcA1h7hhGe45PNcWwXR4= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 26 Feb 2026 08:20:12 +0100 Subject: [PATCH 1/2] ima: efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260226-ima-ifdef-v1-1-8b9613edbbdb@weissschuh.net> References: <20260226-ima-ifdef-v1-0-8b9613edbbdb@weissschuh.net> In-Reply-To: <20260226-ima-ifdef-v1-0-8b9613edbbdb@weissschuh.net> To: Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg , Paul Moore , James Morris , "Serge E. Hallyn" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Aaron Tomlin , Nicolas Schier X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772090423; l=1084; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=LFqBpkOHHrz0+82+lCKyk++cLTVpgpMp3m07f0lNCgQ=; b=nAGuJZ+hD7tATfpRDB+PXn1L2Sppj9pwxenqRNLuGBmFSNYr51V69W6Utwz9lEKLgATOQDLvH kfewoqnvE0QCWYsxgMnFHPoexywWkeZBnHkIf3srxtygU9BxU3+Ur4Z X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= When configuration settings are disabled the guarded functions are defined as empty stubs, so the check is unnecessary. Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Mimi Zohar Reviewed-by: Aaron Tomlin Reviewed-by: Nicolas Schier --- security/integrity/ima/ima_efi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/security/integrity/ima/ima_efi.c b/security/integrity/ima/ima_= efi.c index 138029bfcce1..a35dd166ad47 100644 --- a/security/integrity/ima/ima_efi.c +++ b/security/integrity/ima/ima_efi.c @@ -68,10 +68,8 @@ static const char * const sb_arch_rules[] =3D { const char * const *arch_get_ima_policy(void) { if (IS_ENABLED(CONFIG_IMA_ARCH_POLICY) && arch_ima_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; --=20 2.53.0 From nobody Thu Apr 16 19:12:34 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22A4C38E5EA; Thu, 26 Feb 2026 07:20:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772090427; cv=none; b=D4dYD8bf/25lpYkdQV04MGi2IJfBK9fvLp8xfVr88iNu/PYMnuDGv9Z/CFIRnlnBodn9LtACfRR55hMzSvySh68S4HeJAma8Sv8kPVmsM+fdj7dPhxtRKWNxiHTRyziBMrnRf4rk9KwE5qSJ1HXhdVf9zyilJT0LmewLOWMIYsU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772090427; c=relaxed/simple; bh=hGVXNH283Vz12qyYtbmn+Cp6jluvfJ2jA9ujNd1m+MM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mo5qFqMFnBhru8mhkt5ZixjN5oYKvAzQeXQ1ELrVIis9qTFoLigXDAZYLJyAm+PGWbBfkkz9i4DFKwIpf3sl0orkdu32vTtpbaaLr9Tv7PnwEi+NPlwmTNLCSYE2Pm3OeC6rbxzoD+PTf/iEszu4VEXGdaLf3rwt8gpzluv1NSk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=ok3Ub7un; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="ok3Ub7un" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1772090423; bh=hGVXNH283Vz12qyYtbmn+Cp6jluvfJ2jA9ujNd1m+MM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ok3Ub7un4nVRc77yXyUtPQlm2mrep2h8nZA/ZGeNPePQ8CkRmwLhbw8s0BAds4Z0u zbj26mSFuo/d5TWj0IpyP36rn8f5eGiKZj7eeEVlggl7H7l6qqN818GO8nzoYSIyoO XDKg10Du5Q9bCVEAd/ctQ9crDqMrB09PO5TuYijg= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 26 Feb 2026 08:20:13 +0100 Subject: [PATCH 2/2] powerpc/ima: Drop unnecessary check for CONFIG_MODULE_SIG Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260226-ima-ifdef-v1-2-8b9613edbbdb@weissschuh.net> References: <20260226-ima-ifdef-v1-0-8b9613edbbdb@weissschuh.net> In-Reply-To: <20260226-ima-ifdef-v1-0-8b9613edbbdb@weissschuh.net> To: Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg , Paul Moore , James Morris , "Serge E. Hallyn" , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Aaron Tomlin , Nicolas Schier X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772090423; l=974; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=hGVXNH283Vz12qyYtbmn+Cp6jluvfJ2jA9ujNd1m+MM=; b=G/Yhhszig1FESswrq2MsfL5TAZFn0WCOohRmn3HPMOhnbyqu9YUz3c9FlB4SOit5T+vJ4YC8I t1lqaIGPIDPBZFHzXvicJ/TgrCUa8y5xYNyWNbicaLYV8WsOpPoTa9J X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= When CONFIG_MODULE_SIG is disabled set_module_sig_enforced() is defined as an empty stub, so the check is unnecessary. Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Mimi Zohar Reviewed-by: Aaron Tomlin Reviewed-by: Nicolas Schier --- arch/powerpc/kernel/ima_arch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/ima_arch.c b/arch/powerpc/kernel/ima_arch.c index b7029beed847..690263bf4265 100644 --- a/arch/powerpc/kernel/ima_arch.c +++ b/arch/powerpc/kernel/ima_arch.c @@ -63,8 +63,7 @@ static const char *const secure_and_trusted_rules[] =3D { const char *const *arch_get_ima_policy(void) { if (is_ppc_secureboot_enabled()) { - if (IS_ENABLED(CONFIG_MODULE_SIG)) - set_module_sig_enforced(); + set_module_sig_enforced(); =20 if (is_ppc_trustedboot_enabled()) return secure_and_trusted_rules; --=20 2.53.0