All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>,
	Kevin Lampis <kevin.lampis@cloud.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Anthony PERARD <anthony.perard@vates.tech>,
	Michal Orzel <michal.orzel@amd.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 2/5] livepatch: Embed public key in Xen
Date: Fri, 20 Jun 2025 11:42:56 +0200	[thread overview]
Message-ID: <aFUtIA5agsSOit3j@macbook.local> (raw)
In-Reply-To: <c7fb63cf-b05e-49ff-9ffe-446231146ba4@suse.com>

On Thu, Jun 05, 2025 at 01:19:00PM +0200, Jan Beulich wrote:
> On 02.06.2025 15:36, Ross Lagerwall wrote:
> > From: Kevin Lampis <kevin.lampis@cloud.com>
> > 
> > Make it possible to embed a public key in Xen to be used when verifying
> > live patch payloads. Inclusion of the public key is optional.
> > 
> > To avoid needing to include a DER / X.509 parser in the hypervisor, the
> > public key is unpacked at build time and included in a form that is
> > convenient for the hypervisor to consume. This is different approach
> > from that used by Linux which embeds the entire X.509 certificate and
> > builds in a parser for it.
> > 
> > A suitable key can be created using openssl:
> > 
> > openssl req -x509 -newkey rsa:2048 -keyout priv.pem -out pub.pem \
> >     -sha256 -days 3650 -nodes \
> >     -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"
> > openssl x509 -inform PEM -in pub.pem -outform PEM -pubkey -nocert -out verify_key.pem
> > 
> > Signed-off-by: Kevin Lampis <kevin.lampis@cloud.com>
> > Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> 
> While reviewing patch 4 it occurred to me: Why embed the key? Can't this
> be specified as (another) boot module?

Then the key itself will need to be signed, and it's extra churn that
we would need to verify at boot.  I'm not opposed to being able to
load the key as a module, but it seems reasonable to also bundle one
in Xen.  If there's interest in passing one as a module it could
always be implemented as a separate feature.  IMO: I don't see both
approaches as being incompatible with each other.

Thanks, Roger.


  reply	other threads:[~2025-06-20  9:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 13:36 [PATCH v3 0/5] LivePatch signing support Ross Lagerwall
2025-06-02 13:36 ` [PATCH v3 1/5] docs: Introduce live patch signing Ross Lagerwall
2025-06-02 13:36 ` [PATCH v3 2/5] livepatch: Embed public key in Xen Ross Lagerwall
2025-06-05 11:02   ` Jan Beulich
2025-06-05 11:19   ` Jan Beulich
2025-06-20  9:42     ` Roger Pau Monné [this message]
2025-06-20  9:39   ` Roger Pau Monné
2025-06-20 10:09     ` Jan Beulich
2025-06-20 10:33       ` Roger Pau Monné
2025-06-02 13:36 ` [PATCH v3 3/5] crypto: Add RSA support Ross Lagerwall
2025-06-05 11:06   ` Jan Beulich
2025-06-20  9:53   ` Roger Pau Monné
2025-06-20 16:11     ` Ross Lagerwall
2025-06-23  7:28       ` Jan Beulich
2025-06-02 13:36 ` [PATCH v3 4/5] livepatch: Load built-in key during boot Ross Lagerwall
2025-06-05 11:17   ` Jan Beulich
2025-06-02 13:36 ` [PATCH v3 5/5] livepatch: Verify livepatch signatures Ross Lagerwall
2025-06-05 11:52   ` Jan Beulich
2025-06-20 10:31   ` Roger Pau Monné
2025-06-20 16:50     ` Ross Lagerwall

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=aFUtIA5agsSOit3j@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=kevin.lampis@cloud.com \
    --cc=michal.orzel@amd.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.