Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4551808rwb; Tue, 8 Nov 2022 19:40:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM6OiBV76d2DGDFvkNx7Gkjw8XrkgPSjJVZoghDMSw7GtxUladlGb5AReOYKAJ/f2o4k7xOW X-Received: by 2002:a17:902:e352:b0:187:c4c:26ff with SMTP id p18-20020a170902e35200b001870c4c26ffmr55951555plc.162.1667965222954; Tue, 08 Nov 2022 19:40:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667965222; cv=none; d=google.com; s=arc-20160816; b=jXshWjwzF1GqBTF3/QAljItyxt/7QaKLa3GreibMoaraacK858jzYbylhBlXwugFca bpj0MGJtLdeH+dLM1mCE9/jWkvVutxpfWTea+vOuacnhwFnJ1Kzb/iNrL1BSdvxvhE5a dMj8HRqQX21utEkx4NaDG6WreMcFIOBE4eE2iGBiUiORHUDMtM+5s7assl2rligdfe+z Abk/NcWq+Lvee4zxEeiSg7k3RV9fg/kkVb75qSh2/0NQw60eYLK4s6TdFq9GodW7dXtb hK2SOvYC+cd8urOcvMYat6W1zCaRiWBfdkcgVRmqkKsH2pMYkcXE/XXt/kboQToM7/od g91Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :from; bh=mg8/bHYa+/IfZ5sz/GzGGJbcLE18sRWdGW/pDYF26pQ=; b=BsWBydEJvh8voyoT1SbpNDHtSPye+Er5cLzJzX2zl9qe+sK2pq00nxY3Rn2keX/SmP LPK3vn8C2usdnrwK4zc8YJhjyJzaHVV33LZFP+OSyBIjb8bCotSQxgMRta+1h50f+/Lb nKJkWICpHpTIZkpqC7oY4XMb48nfsmOADV5EwFmX7HuQqwpzvWs6aS29l48ibaujJdai teFnpURZXXvr33bsW8AMO3LRjKtyP6ibE8sUVsikh6j3m63qYt+5ga1Wce8+AApagALM DJqxI7dezWyNUJ2M07JWQf1J0fHXprB+hdEjsbqCIVSA98KFLqdVcS33QJ/mki6Wntgz 1ysg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@weissschuh.net header.s=mail header.b="RFw/Vm2E"; 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 d3-20020a63d643000000b0045fd05b2ce8si14282025pgj.239.2022.11.08.19.40.11; Tue, 08 Nov 2022 19:40:22 -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="RFw/Vm2E"; 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 S230075AbiKICuf (ORCPT + 93 others); Tue, 8 Nov 2022 21:50:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiKICue (ORCPT ); Tue, 8 Nov 2022 21:50:34 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFC381F61A; Tue, 8 Nov 2022 18:50:32 -0800 (PST) From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1667962230; bh=COwXzoOJifc0kBYkrsDthoC7PqTOtSdi1o8MWvrZGvg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RFw/Vm2E83YIgHtWCxE5pbYZhS4CloQ/BWpqQZOVwojSlxti2713CWbtT7DfN5yex g+GGsYBsuKhOCeD7QxLbnztD1C/IDyi5+pGFTD9AtpIONjJbQEGJyO1z11FSBTMNjk uEi8dEEMGzSajlt2uIl9vEakOIORMif0rUAKe1AA= To: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , David Howells , David Woodhouse , Jarkko Sakkinen , Eric Snowberg Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Pearson , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [PATCH v2 1/3] certs: log more information on blacklist error Date: Wed, 9 Nov 2022 03:50:17 +0100 Message-Id: <20221109025019.1855-2-linux@weissschuh.net> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221109025019.1855-1-linux@weissschuh.net> References: <20221109025019.1855-1-linux@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=ed25519-sha256; t=1667962214; l=781; s=20211113; h=from:subject; bh=COwXzoOJifc0kBYkrsDthoC7PqTOtSdi1o8MWvrZGvg=; b=9x5DbFNV4IeM4Iy0DtoCRUoozHmclKCE+cEgSF4HGqidC0TEXqxiB6lTgA07FCcRuKVcFFgwwsn5 B8EN0PttAwXE0P3l+2gc7DGNn+b1Zq+W6/XVyg0ViLI7WWqXymfn X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=9LP6KM4vD/8CwHW7nouRBhWLyQLcK1MkP6aTZbzUlj4= Content-Transfer-Encoding: 8bit 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 Without this information these logs are not actionable. Fixes: 6364d106e041 ("certs: Allow root user to append signed hashes to the blacklist keyring") Signed-off-by: Thomas Weißschuh --- 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.38.1