Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp799260rwb; Mon, 26 Sep 2022 06:06:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TWqooz2D1JAxVMx0sYJer4Gc3NN5U5UxqWKO0klQ4iXaxV0BeZxTB/byUE0bGPDenPtsA X-Received: by 2002:a17:906:3197:b0:73d:5e1a:44ac with SMTP id 23-20020a170906319700b0073d5e1a44acmr17830810ejy.512.1664197608928; Mon, 26 Sep 2022 06:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664197608; cv=none; d=google.com; s=arc-20160816; b=prLXRM1pO/Em2B6D8EWbNu3HbvGkPFNUE5L9p4BPXKPgHyWbLTeHv2vdESaVoX05SB E53Qxs4dMgl9xtpzApuldxgM5gLltIIZo2lrz9dcXk5/abjKhYXqKC0duRLGKVhW3Q/x T2fZwT5EIw4uNw3gOUsJyZ5WlC/Nt229DvpIx+eo+eG2+hPYkXY6LhhwF2MFTtbXzdIu i3K9jJvWlAkgOkQYC5aR53qDEy2Ed+8yZRnCwJcoS1zROmEnrGL32+V8hgIf4w/UMYXC i9kDM3gvp0AYyvOoZD8O5K1z5goYdMnZEokVIty80I5DFRXl4jnSU+JAgtMR29kPTBkv PqYg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5AbPzSIjwKE9ZS1lEX+MY7imi2GPoHKE2n6j6G8/PCA=; b=EvR6HcSq78RGLRuXr/tSvWbJS7QuUp02wXtRq+ivv8R+EKh+tB6HOTt7FkSuGbXqpV PyMUy52CydiPpMMZnZ6dws2A2DIIejlACku2J+OaL4msWomduwo43zFR1x1JjsfBMale epWhqHjDhx2B9epSvo8RL91CM3TJoWj2KUVsu2ZTfa24dvMJ9kKeWDXntyqfE+0gI175 H6iwdn4+yDZsotrd6U5NTsWY+ZqP0G1U0Y/2xI28irfUTJid0IeXf0t5fOWGl3Gsm8Fb ouUtvkjoieuNbiCug5PJLJ9664+zfcASznPu2nhjKZAwFAmScCJ/RlN06Ew+WXu1yY4i 7w6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=n7Mjmb5c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a50e60c000000b0044efdf9db9fsi13710309edm.68.2022.09.26.06.06.21; Mon, 26 Sep 2022 06:06:48 -0700 (PDT) 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=pass header.i=@linuxfoundation.org header.s=korg header.b=n7Mjmb5c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239060AbiIZMAS (ORCPT + 99 others); Mon, 26 Sep 2022 08:00:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238922AbiIZL45 (ORCPT ); Mon, 26 Sep 2022 07:56:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9FF67A753; Mon, 26 Sep 2022 03:51:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 086F0B80760; Mon, 26 Sep 2022 10:51:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5211AC433C1; Mon, 26 Sep 2022 10:51:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664189465; bh=Fc/MREbXhmqSicKDRHd8xiGwpUeUqcIPl54MgKzE5XI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n7Mjmb5c496CU8tstQINkerewr6u4TvlH717HZ22fzEvO/Y28DEEP80V5NX34tkEA K0PyzgzLt6kxVVadbIw+t1OghxdQil3g2EdJNZOw27jVTzu/bIoI1jEfRBgoXBSTOa CJPffmMJYOvbmZYDyjOuCxxEAYF6JZxXKBRBF2/Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masahiro Yamada , Adam Borowski , Sasha Levin Subject: [PATCH 5.19 196/207] certs: make system keyring depend on built-in x509 parser Date: Mon, 26 Sep 2022 12:13:05 +0200 Message-Id: <20220926100815.371137182@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100806.522017616@linuxfoundation.org> References: <20220926100806.522017616@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Masahiro Yamada [ Upstream commit 2154aca21408752eaa3eeaf2ba6e942724ff2a4d ] Commit e90886291c7c ("certs: make system keyring depend on x509 parser") is not the right fix because x509_load_certificate_list() can be modular. The combination of CONFIG_SYSTEM_TRUSTED_KEYRING=y and CONFIG_X509_CERTIFICATE_PARSER=m still results in the following error: LD .tmp_vmlinux.kallsyms1 ld: certs/system_keyring.o: in function `load_system_certificate_list': system_keyring.c:(.init.text+0x8c): undefined reference to `x509_load_certificate_list' make: *** [Makefile:1169: vmlinux] Error 1 Fixes: e90886291c7c ("certs: make system keyring depend on x509 parser") Signed-off-by: Masahiro Yamada Tested-by: Adam Borowski Signed-off-by: Sasha Levin --- certs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certs/Kconfig b/certs/Kconfig index bf9b511573d7..1f109b070877 100644 --- a/certs/Kconfig +++ b/certs/Kconfig @@ -43,7 +43,7 @@ config SYSTEM_TRUSTED_KEYRING bool "Provide system-wide ring of trusted keys" depends on KEYS depends on ASYMMETRIC_KEY_TYPE - depends on X509_CERTIFICATE_PARSER + depends on X509_CERTIFICATE_PARSER = y help Provide a system keyring to which trusted keys can be added. Keys in the keyring are considered to be trusted. Keys may be added at will -- 2.35.1