Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7051729rwl; Mon, 9 Jan 2023 17:16:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXuvIT1b2tvyGw+O0RTPq9LLgGeCxnUqU81LqCH4clejoXTlR0oM2S3GRwcSMEfhFT85YJe6 X-Received: by 2002:a05:6a20:4ca1:b0:af:f80a:140f with SMTP id fq33-20020a056a204ca100b000aff80a140fmr67500102pzb.8.1673313378558; Mon, 09 Jan 2023 17:16:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673313378; cv=none; d=google.com; s=arc-20160816; b=eaheJw90Skj4Wi8f4lR9tvYKXAzrop4ru2Ju1PpGvnIIeysBYVBAALK2/EigDXaNNj 5zb5idPFrdQkRJI/CQLWgaWZXfkz8faObWSgTaqX419ldK5+lYTw4FjZj9YiZktYtS62 hqLNN200OoQspxyT8ZpzOIt7BBaQVTgypszhixogIa70Z0DcR1tzIVQo1cEjZ/cgD2U3 2H45c2o2Idy1MQSXeNsWRgn+ufhrVkDqFgQyqNu5GD8CCzfp9nZifhdyhIB2bhrtCehe ifbSPvXM9Vkai27sAWOQNVvHFTYym97kzHCIYzMccRi3kwVTv8wzITD/eAtvoIzLFIa4 L8Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:dkim-signature :from; bh=LvDEGNt5TRT0SknY/E8H38UkL9SN/aTOjdWJcDC2yrg=; b=ETsCTuWcqz7AS/92z835NHo2TwRdqwfBv1Fv1ngF2veiquUNFnd+5m++zGyjS5UgJd I3DGAZ8GUhmhvRq4Oa8ffY9nY1JUj1fiyhX3/hsEjrAhstESodrsVRYXABKPHQ42b2HR gmqaBugoW1c5Sz1krjziWLe1YiLj+6LRSSJ1e36kIgz9NwoFQWgTeuL2qG8+WVGuIkXR oX6Ak1CYbT51dLUGAE/kh2L6DjksF+/fRjBKFt8P8XH7FR2Yd1tp19jvp9Didc9NLOF6 Epmi6AQOnetPeiebYdJcVpZapyYz0oUgBXbCi8bZI6bytfYHemhAQuHSYnGvVc9ZMO3N ZBAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=bhYuK2oe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b17-20020a170903229100b001768a29b9dfsi10817483plh.68.2023.01.09.17.16.11; Mon, 09 Jan 2023 17:16:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b=bhYuK2oe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237728AbjAJAAN (ORCPT + 53 others); Mon, 9 Jan 2023 19:00:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234501AbjAIX75 (ORCPT ); Mon, 9 Jan 2023 18:59:57 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ECEF1D0FE; Mon, 9 Jan 2023 15:59:55 -0800 (PST) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1673308791; bh=1Wy0BHk7SYwdUBaE089VQhP0zqUnmzWkZKjn/dXjACA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=bhYuK2oeJY8gviN3HbJr/bo8VBWAmueZts0nHUoGcq3wDBImKh7MFnh3mRZrmDLX+ 0SMkp+n5/sN1Ia632LjMZfE5fKkV/zMB4MfJ05wQy58ri0JC+j6xtYCUG+SJnjfQp3 7qN5m62yuq9QPbpr1ftpjnboqLplCnonAy03Js54= Date: Mon, 09 Jan 2023 23:59:41 +0000 Subject: [PATCH RESEND v6 1/3] certs: make blacklisted hash available in klog MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: <20221212-keys-blacklist-v6-1-933267a80582@weissschuh.net> References: <20221212-keys-blacklist-v6-0-933267a80582@weissschuh.net> In-Reply-To: <20221212-keys-blacklist-v6-0-933267a80582@weissschuh.net> To: David Howells , David Woodhouse , Jarkko Sakkinen , Paul Moore , James Morris , "Serge E. Hallyn" , =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= Cc: keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Paul Menzel , Mark Pearson , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12-dev-3dd91 X-Developer-Signature: v=1; a=ed25519-sha256; t=1673308789; l=1169; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=1Wy0BHk7SYwdUBaE089VQhP0zqUnmzWkZKjn/dXjACA=; b=c64cfXF9x4RM7Q5bWJbzQNo5OWkOwIZr0wI7+wka2HDRG/48d5yVSzS0LCG0cnzCPOFgUHMulrWd K0BaoTTODZ2RvzZDdadPLf0x0X4UvcdDZDrPF3LICVGlxG1Qv3Gg X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org One common situation triggering this log statement are duplicate hashes reported by the system firmware. These duplicates should be removed from the firmware. Without logging the blacklisted hash triggering the issue however the users can not report it properly to the firmware vendors and the firmware vendors can not easily see which specific hash is duplicated. While changing the log message also use the dedicated ERR_PTR format placeholder for the returned error value. Signed-off-by: Thomas Weißschuh Reviewed-by: Jarkko Sakkinen --- certs/blacklist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certs/blacklist.c b/certs/blacklist.c index 41f10601cc72..6e260c4b6a19 100644 --- a/certs/blacklist.c +++ b/certs/blacklist.c @@ -192,7 +192,7 @@ static int mark_raw_hash_blacklisted(const char *hash) KEY_ALLOC_NOT_IN_QUOTA | KEY_ALLOC_BUILT_IN); if (IS_ERR(key)) { - pr_err("Problem blacklisting hash (%ld)\n", PTR_ERR(key)); + pr_err("Problem blacklisting hash %s: %pe\n", hash, key); return PTR_ERR(key); } return 0; -- 2.39.0