From: Lukas Wunner <lukas@wunner.de>
To: Alistair Francis <alistair23@gmail.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
bhelgaas@google.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org,
Alistair Francis <alistair.francis@wdc.com>
Subject: Re: [PATCH] PCI/DOE: Expose the DOE protocols via sysfs
Date: Mon, 31 Jul 2023 19:52:16 +0200 [thread overview]
Message-ID: <20230731175216.GA19517@wunner.de> (raw)
In-Reply-To: <CAKmqyKOj9JxKcGbEEiTv_nxQSh+7cM-4uz6Z5uGFYdZyjeQ_5Q@mail.gmail.com>
On Mon, Jul 31, 2023 at 11:30:29AM -0400, Alistair Francis wrote:
> Yep, a big benefit is lspci or other userspace tools to be able to see
> what DOE protocols are supported.
Fair enough, but please make that motivation explicit in the commit
message.
> I also have plans to expose DOE mailboxes to userspace. That way we
> can run the SPDM requester code (using libspdm) in userspace to
> communicate with devices using SPDM. That will allow device
> authentication for example.
That duplicates our effort to bring up authentication in the kernel:
https://github.com/l1k/linux/commits/doe
We had a lengthy debate on the pros and cons of doing SPDM in-kernel
versus in user space. We realized that when resuming a device from
D3cold or recovering it after reset, the user space component performing
SPDM authentication might reside on the device (disk, network) being
resumed or reset, preventing its execution.
When resuming from system sleep, devices need to be reauthenticated
during the ->resume_noirq phase, i.e. with device interrupts disabled,
as drivers are allowed access to devices already in that phase.
So authentication (and encryption establishment) needs to happen this
early, when user space isn't available yet.
See the commit message of "PCI/CMA: Reauthenticate devices on reset
and resume" on the above-linked branch for details.
Thanks,
Lukas
next prev parent reply other threads:[~2023-07-31 17:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 3:57 [PATCH] PCI/DOE: Expose the DOE protocols via sysfs Alistair Francis
2023-07-25 15:00 ` Jonathan Cameron
2023-07-31 15:24 ` Alistair Francis
2023-07-25 16:30 ` Lukas Wunner
2023-07-27 8:38 ` Jonathan Cameron
2023-07-31 15:30 ` Alistair Francis
2023-07-31 17:52 ` Lukas Wunner [this message]
2023-08-01 14:03 ` Alistair Francis
2023-07-31 17:59 ` Lukas Wunner
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=20230731175216.GA19517@wunner.de \
--to=lukas@wunner.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=alistair.francis@wdc.com \
--cc=alistair23@gmail.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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).