rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Alistair Francis <alistair@alistair23.me>, <lukas@wunner.de>,
	<Jonathan.Cameron@huawei.com>, <linux-kernel@vger.kernel.org>,
	<rust-for-linux@vger.kernel.org>, <akpm@linux-foundation.org>,
	<bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
	<linux-cxl@vger.kernel.org>
Cc: <bjorn3_gh@protonmail.com>, <ojeda@kernel.org>,
	<tmgross@umich.edu>, <boqun.feng@gmail.com>,
	<benno.lossin@proton.me>, <a.hindborg@kernel.org>,
	<wilfred.mallawa@wdc.com>, <alistair23@gmail.com>,
	<alex.gaynor@gmail.com>, <gary@garyguo.net>,
	<aliceryhl@google.com>, Alistair Francis <alistair@alistair23.me>
Subject: Re: [RFC 3/6] lib: rspdm: Initial commit of Rust SPDM
Date: Fri, 15 Nov 2024 14:53:53 -0800	[thread overview]
Message-ID: <6737d101993ba_5c832943d@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20241115054616.1226735-4-alistair@alistair23.me>

Alistair Francis wrote:
> This is the initial commit of the Rust SPDM library. It is based on and
> compatible with the C SPDM library in the kernel (lib/spdm).
> 
> Signed-off-by: Alistair Francis <alistair@alistair23.me>
[..]
> diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
> index 690a2a38cb52..744d35d28dc7 100644
> --- a/drivers/pci/Kconfig
> +++ b/drivers/pci/Kconfig
> @@ -128,7 +128,7 @@ config PCI_CMA
>  	select CRYPTO_SHA256
>  	select CRYPTO_SHA512
>  	select PCI_DOE
> -	depends on SPDM
> +	depends on SPDM || RSPDM
>  	help
>  	  Authenticate devices on enumeration per PCIe r6.2 sec 6.31.
>  	  A PCI DOE mailbox is used as transport for DMTF SPDM based
> diff --git a/lib/Kconfig b/lib/Kconfig
> index 4db9bc8e29f8..a47650a6757c 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -754,6 +754,23 @@ config SPDM
>  	  in .config.  Drivers selecting SPDM therefore need to also select
>  	  any algorithms they deem mandatory.
>  
> +config RSPDM
> +	bool "Rust SPDM"
> +	select CRYPTO
> +	select KEYS
> +	select ASYMMETRIC_KEY_TYPE
> +	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
> +	select X509_CERTIFICATE_PARSER
> +	depends on SPDM = "n"

I trust these last 2 diff hunks never actually go upstream, right? I.e.
if the kernel has no SPDM today it should not plan to carry 2
implementations just for language differences.

I am not sure if that is already the plan, but the cover letter seemed
ambiguous with its "maintaining compatibility" statement. On one hand,
that does not make sense when this is brand new upstream code (i.e. C
version is not even in linux-next), and there are no chances for
regressions. Just embrace the attempt to be a Rust library for C
consumers or otherwise help the C version along.

However, if "maintain compatibility" means "make it easy for the
work-in-progress C-effort to switch dependencies", then that makes
sense and is worth clarifying in the next posting.

  parent reply	other threads:[~2024-11-15 22:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15  5:46 [RFC 0/6] lib: Rust implementation of SPDM Alistair Francis
2024-11-15  5:46 ` [RFC 1/6] rust: bindings: Support SPDM bindings Alistair Francis
2024-11-15 17:53   ` Bjorn Helgaas
2024-11-15 18:00     ` Miguel Ojeda
2024-11-15  5:46 ` [RFC 2/6] drivers: pci: Change CONFIG_SPDM to a dependency Alistair Francis
2024-11-15 17:58   ` Bjorn Helgaas
2024-11-22 15:30     ` Jonathan Cameron
2024-11-22 15:36       ` Miguel Ojeda
2024-11-22 17:23       ` Bjorn Helgaas
2024-11-22 18:22         ` Jonathan Cameron
2024-11-15  5:46 ` [RFC 3/6] lib: rspdm: Initial commit of Rust SPDM Alistair Francis
2024-11-15 17:15   ` Miguel Ojeda
2024-11-15 22:53   ` Dan Williams [this message]
2024-11-19  4:24     ` Alistair Francis
2024-11-22 17:31   ` Bjorn Helgaas
2024-11-23 16:14     ` Lukas Wunner
2024-11-15  5:46 ` [RFC 4/6] lib: rspdm: Support SPDM get_version Alistair Francis
2024-11-15  5:46 ` [RFC 5/6] lib: rspdm: Support SPDM get_capabilities Alistair Francis
2024-11-15  5:46 ` [RFC 6/6] lib: rspdm: Support SPDM negotiate_algorithms Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6737d101993ba_5c832943d@dwillia2-xfh.jf.intel.com.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=a.hindborg@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=alistair23@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=benno.lossin@proton.me \
    --cc=bhelgaas@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=wilfred.mallawa@wdc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).