From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD6EBD2D0E9 for ; Tue, 13 Jan 2026 12:46:49 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4dr8BV2S9fz2yZc; Tue, 13 Jan 2026 23:46:26 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1768308386; cv=none; b=IKbw2XnkjCzaR9H46KmFzBfG3VcovoQlFlp7oSHXKBtG4pOgOe83x/CXbH2L8RxdjI2jX5OE4qqV4IukR6HSzGw/+n5zgiaYzgkuyQiHYr8AlmGlDklmMPKlQJZoQ3nmUXWb2i6rerCYcwy4f4iopAs/T1MZHTcCS2PFnYv6bZHi48Z/Obzx14XPhO8OHRWkNx2y7WXMciLsJr3jbTRlGhxuLCvZlicRz8NkCBBuNPkBuULa9F/Pp+ygodE/up/OiomDp4HmdtHXIhtfXt5k6LdIUclfL0YLeiAMO6xD6T9cYbVIoU277mac5aY9NmizG57TJoS1dFwTsTdq6ggg9g== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1768308386; c=relaxed/relaxed; bh=xKWMyxqQoXw9U/ZjygYKipHCZdKBAsJ0p+MhegwGSb4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DHStSOIt4MyQoZY3TZWRugQ5xA2TxvJjx9gIrzkXPoQ9Hb26CqpALLuOHFSlR8vd5b44w4FQHdjTkrhMdQidlwbgQWIYUcPrpAnxWfxZlsT2++ij2HPIF2MUCq1YgQn8DHrsbXD09nJvsYxHC9ET7UEkgLlYYYI2dmnblnWw4ObB0WuWYQEwnndjVD3vXGrWXeXY1dcxymmxBoXuBRYzx9eLU3UlmTSo0pN7pijKUpdEq67iKGi+zy0MeUh5m4kNBL3zb02pD9wwJj3fO8SvVILout7RFJjQXnaNUwg2gdM3WKp+hYsP5cQER5MiZO4Vc0BUcZC+h2DTXs8+uAjRtw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; dkim=pass (1024-bit key; unprotected) header.d=weissschuh.net header.i=@weissschuh.net header.a=rsa-sha256 header.s=mail header.b=m5ECJ6X/; dkim-atps=neutral; spf=pass (client-ip=159.69.126.157; helo=todd.t-8ch.de; envelope-from=linux@weissschuh.net; receiver=lists.ozlabs.org) smtp.mailfrom=weissschuh.net Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=weissschuh.net header.i=@weissschuh.net header.a=rsa-sha256 header.s=mail header.b=m5ECJ6X/; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=weissschuh.net (client-ip=159.69.126.157; helo=todd.t-8ch.de; envelope-from=linux@weissschuh.net; receiver=lists.ozlabs.org) Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4dr8BT4xDJz2xWP for ; Tue, 13 Jan 2026 23:46:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1768307860; bh=cH9hJBEevnJ49scFzUyUrs+duB8iThavsLBCgzxemds=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=m5ECJ6X/QaGYYVd8gwsKPP3oGytpVyG0r3Uure3LqKvDfD7fS93swFK2vKC7qzTnO zFYbmk4LuDfRARPYZL9g9jAh2pluAJo1Spu3BdNBCB4MygUV9lYuGjf6mh3vf9gxTp x7hqYzB44ciHVigcRi1d+0nk8Ev05d0JMTMoOKLo= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 13 Jan 2026 13:28:47 +0100 Subject: [PATCH v4 03/17] ima: efi: Drop unnecessary check for CONFIG_MODULE_SIG/CONFIG_KEXEC_SIG X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260113-module-hashes-v4-3-0b932db9b56b@weissschuh.net> References: <20260113-module-hashes-v4-0-0b932db9b56b@weissschuh.net> In-Reply-To: <20260113-module-hashes-v4-0-0b932db9b56b@weissschuh.net> To: Nathan Chancellor , Arnd Bergmann , Luis Chamberlain , Petr Pavlu , Sami Tolvanen , Daniel Gomez , Paul Moore , James Morris , "Serge E. Hallyn" , Jonathan Corbet , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg , Nicolas Schier , Daniel Gomez , Aaron Tomlin , "Christophe Leroy (CS GROUP)" , Nicolas Schier , Nicolas Bouchinet , Xiu Jianfeng , Nicolas Schier , Christophe Leroy Cc: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= , Arnout Engelen , Mattia Rizzolo , kpcyrd , Christian Heusel , =?utf-8?q?C=C3=A2ju_Mihai-Drosi?= , Sebastian Andrzej Siewior , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-modules@vger.kernel.org, linux-security-module@vger.kernel.org, linux-doc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-integrity@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768307859; l=1076; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=cH9hJBEevnJ49scFzUyUrs+duB8iThavsLBCgzxemds=; b=CON7x2gCVyCQfJTzLvPSJLu+RVHaHl90Rmo7S6bsrPvzOetmH8vys3eBJrk7ccHlghC7itUU1 0QyuXSdksdyD+ykU1MTXaHxR9OmHct0jSB8PawQ2bRSqkoOkmuG6Y9X 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. The specific configuration option for set_module_sig_enforced() is about to change and removing the checks avoids some later churn. Signed-off-by: Thomas Weißschuh --- 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[] = { 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; -- 2.52.0