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 X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71CC2C433DB for ; Thu, 4 Mar 2021 04:39:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3622764EF6 for ; Thu, 4 Mar 2021 04:39:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232920AbhCDEjE (ORCPT ); Wed, 3 Mar 2021 23:39:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:58214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233601AbhCDEjD (ORCPT ); Wed, 3 Mar 2021 23:39:03 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8EB1B64EF6; Thu, 4 Mar 2021 04:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614832703; bh=VhpGH1pQ0eQ+uq0bM0wtZiGMW7Rptxx0e6s1vM9/0qM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CSSeT0hqSoxoii1c6CWl404vTG3F40T9e+YWoeF/KMqazNy3OKpA4n3mSoRZecYLq P6PetNJ97safnk5tJj5WhFQ9xElCoPQZRhhESfRB1qUHcmghajaQ/Ci52P0DrsV2vv WIkqGQrxidGH28/xs32h8OD1l0EUV6xTiS5olaZk9SU3urIXzBuYH8WIJYJT4i/8m1 /BlFencs5Hj0wc5oCaeaLvYh/l4RNc7qkee5Khp0oNqwazeWw++lr0jSBBSUoZsr7w F+aeU4UE3K2LKvZmoBqmeP6VSLxioZPtuQc5HtM+d13TeIjhsO63CFrKObQfapfccb YVaFrqnO8kdaw== Date: Thu, 4 Mar 2021 06:38:02 +0200 From: Jarkko Sakkinen To: Eric Snowberg Cc: rdunlap@infradead.org, dhowells@redhat.com, dwmw2@infradead.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] certs: Fix wrong kconfig option used for x509_revocation_list Message-ID: References: <20210303034418.106762-1-eric.snowberg@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210303034418.106762-1-eric.snowberg@oracle.com> Precedence: bulk List-ID: X-Mailing-List: keyrings@vger.kernel.org On Tue, Mar 02, 2021 at 10:44:18PM -0500, Eric Snowberg wrote: > This fixes a build issue when x509_revocation_list is not defined. "Fix a" Let's stick to the imperative form in commit messages. > > $ make ARCH=x86_64 O=build64 all > > EXTRACT_CERTS ../ > At main.c:154: > - SSL error:0909006C:PEM routines:get_name:no start line: crypto/pem/pem_lib.c:745 > extract-cert: ../: Is a directory > make[2]: [../certs/Makefile:119: certs/x509_revocation_list] Error 1 (ignored) > > When the new CONFIG_SYSTEM_REVOCATION_LIST was added [1], it was not carried > into the code for preloading the revocation certificates [2]. Change from > using the original CONFIG_SYSTEM_BLACKLIST_KEYRING to the new > CONFIG_SYSTEM_REVOCATION_LIST. > > [1] https://lore.kernel.org/keyrings/EDA280F9-F72D-4181-93C7-CDBE95976FF7@oracle.com/T/#m562c1b27bf402190e7bb573ad20eff5b6310d08f > [2] https://lore.kernel.org/keyrings/EDA280F9-F72D-4181-93C7-CDBE95976FF7@oracle.com/T/#m07e258bf019ccbac23820fad5192ceffa74fc6ab > > Reported-by: Randy Dunlap > Signed-off-by: Eric Snowberg > --- > certs/Makefile | 7 +++++-- > certs/blacklist.c | 4 ++++ > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/certs/Makefile b/certs/Makefile > index e3f4926fd21e..3bc43c88a6d2 100644 > --- a/certs/Makefile > +++ b/certs/Makefile > @@ -4,7 +4,10 @@ > # > > obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o common.o > -obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o revocation_certificates.o common.o > +obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o common.o > +ifeq ($(CONFIG_SYSTEM_REVOCATION_LIST),y) > +obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += revocation_certificates.o > +endif > ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"") > obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o > else > @@ -105,7 +108,7 @@ $(obj)/signing_key.x509: scripts/extract-cert $(X509_DEP) FORCE > $(call if_changed,extract_certs,$(MODULE_SIG_KEY_SRCPREFIX)$(CONFIG_MODULE_SIG_KEY)) > endif # CONFIG_MODULE_SIG > > -ifeq ($(CONFIG_SYSTEM_BLACKLIST_KEYRING),y) > +ifeq ($(CONFIG_SYSTEM_REVOCATION_LIST),y) > > $(eval $(call config_filename,SYSTEM_REVOCATION_KEYS)) > > diff --git a/certs/blacklist.c b/certs/blacklist.c > index 723b19c96256..c9a435b15af4 100644 > --- a/certs/blacklist.c > +++ b/certs/blacklist.c > @@ -21,8 +21,10 @@ > > static struct key *blacklist_keyring; > > +#ifdef CONFIG_SYSTEM_REVOCATION_LIST > extern __initconst const u8 revocation_certificate_list[]; > extern __initconst const unsigned long revocation_certificate_list_size; > +#endif > > /* > * The description must be a type prefix, a colon and then an even number of > @@ -225,6 +227,7 @@ static int __init blacklist_init(void) > */ > device_initcall(blacklist_init); > > +#ifdef CONFIG_SYSTEM_REVOCATION_LIST > /* > * Load the compiled-in list of revocation X.509 certificates. > */ > @@ -237,3 +240,4 @@ static __init int load_revocation_certificate_list(void) > blacklist_keyring); > } > late_initcall(load_revocation_certificate_list); > +#endif > -- > 2.18.4 > > Code change looks good. /Jarkko