Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1667097lqg; Sun, 3 Mar 2024 22:57:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWQYFf2Tsvyj5HTHEr3QcR/jcCDuLpTJacu5WcV065KQXFpktwjoASufzVq30XyLvi7b3UbO0JAzOBkSUd8DEXIuCixlJ00JUmie2f6xw== X-Google-Smtp-Source: AGHT+IEh3DG1Yttbw6eDeTQxFVJuAExa5RI2JZSZlwmvr3mGrD8lIGiMKi1AY/5EBlCiyPQSJR7v X-Received: by 2002:a0c:ca05:0:b0:68f:e87e:6be5 with SMTP id c5-20020a0cca05000000b0068fe87e6be5mr10042569qvk.39.1709535434798; Sun, 03 Mar 2024 22:57:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709535434; cv=pass; d=google.com; s=arc-20160816; b=D/hIeIs30Yjzx47oeCfp43Nwsm4dn45k3GfsNivp5JWnF9+QB+mtuJauUlcZjdMoMR 2tYdnkiKQx7JxWDO+VdNIMx+lTzVOQpPpk3RH44A9V1kqxnWDBkwL5mp+wHAAKQZFfZX 592obWbT/fq+kyAQPyGltwf//bMSGJqBLmUzPdIlR6zTjJR26TdPc/RbdA4H8K9watVf iCG1WIu16GadvXODpA8cqUls85KA3dsQzjrQqMGkKAk8GOxCUtpZsn1Q9pDfjQKzZDer evMfJzn+OHFgomd7mgqNr43TRzCB0dfFizPbLrvFs5OCX29/LERhxTBgIqmhHVCscgjB zN8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=e0CvL5PA/rXsMGoCmkgRnAQ1OvIwQ29yN2Ix7hfrlIA=; fh=vFP1ju1V3xr29GshN4DbO6w0T3mfP1mELPn2Pv6xpM8=; b=JQ9OXfGbjW0DxpgYPLn9C/7BsbwxWjs8TAelKby/XF/NoIOfxSjqtUDIZch7XjFNzu S7QxHOz0p7AsbwFp0ByLcDii3uLGS9nfbG+3TEEG+c8VIPdboZUnE2un6FPa+NxZlxYK h9Adv/Mb9nRS6e8L9yTFDqHgqQcE8q2+OzRKLuaXilQriGCKORE3/r1/1nk+ITkruxRP jNmZ8lSRafFf3B0hpqPLqS78uUaBr2tFVAOckuqVHtPvZWEK6Y0WrpLF753x+DJ/Pett LNuab77ktzZS9QdxK9cc5mcYWOrJwzKI+EMtsP5j2FUwfBAAxyHThdtdC8p5DLDhfUmk 41mQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-crypto+bounces-2478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2478-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p8-20020ad45f48000000b0069006d7edccsi9241883qvg.48.2024.03.03.22.57.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 22:57:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-2478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-crypto+bounces-2478-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-crypto+bounces-2478-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 75EB71C20BD3 for ; Mon, 4 Mar 2024 06:57:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05273125A2; Mon, 4 Mar 2024 06:57:11 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [83.223.95.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7081811C89; Mon, 4 Mar 2024 06:57:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.223.95.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709535430; cv=none; b=J25kTagMBnmm02dRiR3aOSXnJzaspIbLZgALpYh+wmrhVphV7MUVN9tNyqBqwhUc4svG58EMFRmdoCNV3E3RLIbUqLgaEsJ86B9jsjG2zbjZz4HJEqpSih5Phx9Yc+VNJa4dcgEeGc1r2DO/hydwuP/KG4UjF1Y+1FkRSW1WF2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709535430; c=relaxed/simple; bh=kop2TSr8/P5YK+OY67Fn7ooNzY6XSya1pVvnxs+jX5I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=o9a1Ei+7QvieDzMVFXXJSze3sIOpfnpHl4JGtI/sb6DLNnfrXpjVrCnPqG8KbGHvtGrXeZ7Vn1B+WxbPxsY8hHGypQYKtVjpq5BrFt1dz0HHXBFchcy2kcYmvaxAhk/veR2wR+TAh3xp0pzVc5aLE37HlsQfzzi9PHKJKYNHiSo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=none smtp.mailfrom=h08.hostsharing.net; arc=none smtp.client-ip=83.223.95.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id A0F87300002C4; Mon, 4 Mar 2024 07:57:03 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 950D437E2F; Mon, 4 Mar 2024 07:57:03 +0100 (CET) Date: Mon, 4 Mar 2024 07:57:03 +0100 From: Lukas Wunner To: Dan Williams Cc: Bjorn Helgaas , David Howells , David Woodhouse , Herbert Xu , "David S. Miller" , Alex Williamson , linux-pci@vger.kernel.org, linux-cxl@vger.kernel.org, linux-coco@lists.linux.dev, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, kvm@vger.kernel.org, Jonathan Cameron , linuxarm@huawei.com, David Box , Dave Jiang , "Li, Ming" , Zhi Wang , Alistair Francis , Wilfred Mallawa , Alexey Kardashevskiy , Tom Lendacky , Sean Christopherson , Alexander Graf Subject: Re: [PATCH 03/12] X.509: Move certificate length retrieval into new helper Message-ID: <20240304065703.GA24373@wunner.de> References: <16c06528d13b2c0081229a45cacd4b1b9cdff738.1695921657.git.lukas@wunner.de> <65205cc1c1f40_ae7e72949d@dwillia2-xfh.jf.intel.com.notmuch> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <65205cc1c1f40_ae7e72949d@dwillia2-xfh.jf.intel.com.notmuch> User-Agent: Mutt/1.10.1 (2018-07-13) On Fri, Oct 06, 2023 at 12:15:13PM -0700, Dan Williams wrote: > Lukas Wunner wrote: > > The upcoming in-kernel SPDM library (Security Protocol and Data Model, > > https://www.dmtf.org/dsp/DSP0274) needs to retrieve the length from > > ASN.1 DER-encoded X.509 certificates. > > > > Such code already exists in x509_load_certificate_list(), so move it > > into a new helper for reuse by SPDM. [...] > > +EXPORT_SYMBOL_GPL(x509_get_certificate_length); > > Given CONFIG_PCI is a bool, is the export needed? Maybe save this export > until the modular consumer arrives, or identify the modular consumer in the > changelog? The x509_get_certificate_length() helper introduced by this patch isn't needed directly by the PCI core, but by the SPDM library. The SPDM library is tristate and is selected by CONFIG_PCI_CMA, which is indeed bool. However SCSI and ATA (both tristate) have explicitly expressed an interest to use the SPDM library. If I drop the export, I'd have to declare the SPDM library bool. I'm leaning towards keeping the SPDM library tristate (and keep the export) to accommodate SCSI, ATA and possibly others. Please let me know if you disagree. Thanks, Lukas