All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Alexander Graf <graf@amazon.com>
Cc: linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	linux-s390@vger.kernel.org, adrian@parity.io, dwmw@amazon.co.uk,
	acatan@amazon.com, colmmacc@amazon.com, sblbir@amazon.com,
	raduweis@amazon.com, jannh@google.com,
	gregkh@linuxfoundation.org, tytso@mit.edu
Subject: Re: [PATCH RFC v1 0/2] VM fork detection for RNG
Date: Thu, 24 Feb 2022 11:53:02 +0100	[thread overview]
Message-ID: <YhdjjgGgS7SBhSvu@zx2c4.com> (raw)
In-Reply-To: <234d7952-0379-e3d9-5e02-5eba171024a0@amazon.com>

Hi Alex,

Strangely your message never made it to me, and I had to pull this out
of Lore after seeing Daniel's reply to it. I wonder what's up.

On Thu, Feb 24, 2022 at 09:53:59AM +0100, Alexander Graf wrote:
> The main problem with VMGenID is that it is inherently racy. There will 
> always be a (short) amount of time where the ACPI notification is not 
> processed, but the VM could use its RNG to for example establish TLS 
> connections.
> 
> Hence we as the next step proposed a multi-stage quiesce/resume 
> mechanism where the system is aware that it is going into suspend - can 
> block network connections for example - and only returns to a fully 
> functional state after an unquiesce phase:
> 
>    https://github.com/systemd/systemd/issues/20222
> 
> Looking at the issue again, it seems like we completely missed to follow 
> up with a PR to implement that functionality :(.
> 
> What exact use case do you have in mind for the RNG/VMGenID update? Can 
> you think of situations where the race is not an actual concern?

No, I think the race is something that remains a problem for the
situations I care about. There are simpler ways of fixing that -- just
expose a single incrementing integer so that it can be checked every
time the RNG does something, without being expensive, via the same
mechanism -- and then you don't need any complexity. But anyway, that
doesn't exist right now, so this series tries to implement something for
what does exist and is already supported by multiple hypervisors. I'd
suggest sending a proposal for an improved mechanism as part of a
different thread, and pull the various parties into that, and we can
make something good for the future. I'm happy to implement whatever the
virtual hardware exposes.

Jason

WARNING: multiple messages have this Message-ID (diff)
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Alexander Graf <graf@amazon.com>
Cc: linux-s390@vger.kernel.org, tytso@mit.edu, kvm@vger.kernel.org,
	adrian@parity.io, jannh@google.com, gregkh@linuxfoundation.org,
	raduweis@amazon.com, qemu-devel@nongnu.org,
	linux-kernel@vger.kernel.org, acatan@amazon.com,
	linux-crypto@vger.kernel.org, colmmacc@amazon.com,
	sblbir@amazon.com, dwmw@amazon.co.uk
Subject: Re: [PATCH RFC v1 0/2] VM fork detection for RNG
Date: Thu, 24 Feb 2022 11:53:02 +0100	[thread overview]
Message-ID: <YhdjjgGgS7SBhSvu@zx2c4.com> (raw)
In-Reply-To: <234d7952-0379-e3d9-5e02-5eba171024a0@amazon.com>

Hi Alex,

Strangely your message never made it to me, and I had to pull this out
of Lore after seeing Daniel's reply to it. I wonder what's up.

On Thu, Feb 24, 2022 at 09:53:59AM +0100, Alexander Graf wrote:
> The main problem with VMGenID is that it is inherently racy. There will 
> always be a (short) amount of time where the ACPI notification is not 
> processed, but the VM could use its RNG to for example establish TLS 
> connections.
> 
> Hence we as the next step proposed a multi-stage quiesce/resume 
> mechanism where the system is aware that it is going into suspend - can 
> block network connections for example - and only returns to a fully 
> functional state after an unquiesce phase:
> 
>    https://github.com/systemd/systemd/issues/20222
> 
> Looking at the issue again, it seems like we completely missed to follow 
> up with a PR to implement that functionality :(.
> 
> What exact use case do you have in mind for the RNG/VMGenID update? Can 
> you think of situations where the race is not an actual concern?

No, I think the race is something that remains a problem for the
situations I care about. There are simpler ways of fixing that -- just
expose a single incrementing integer so that it can be checked every
time the RNG does something, without being expensive, via the same
mechanism -- and then you don't need any complexity. But anyway, that
doesn't exist right now, so this series tries to implement something for
what does exist and is already supported by multiple hypervisors. I'd
suggest sending a proposal for an improved mechanism as part of a
different thread, and pull the various parties into that, and we can
make something good for the future. I'm happy to implement whatever the
virtual hardware exposes.

Jason


  parent reply	other threads:[~2022-02-24 10:53 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 13:12 [PATCH RFC v1 0/2] VM fork detection for RNG Jason A. Donenfeld
2022-02-23 13:12 ` Jason A. Donenfeld
2022-02-23 13:12 ` [PATCH RFC v1 1/2] random: add mechanism for VM forks to reinitialize crng Jason A. Donenfeld
2022-02-23 13:12   ` Jason A. Donenfeld
2022-02-23 23:16   ` Eric Biggers
2022-02-23 23:16     ` Eric Biggers
2022-02-24  0:54     ` Jason A. Donenfeld
2022-02-24  0:54       ` Jason A. Donenfeld
2022-02-24  1:27       ` Eric Biggers
2022-02-24  1:27         ` Eric Biggers
2022-02-24 11:15         ` Jason A. Donenfeld
2022-02-24 11:15           ` Jason A. Donenfeld
2022-02-23 13:12 ` [PATCH RFC v1 2/2] drivers/virt: add vmgenid driver for reinitializing RNG Jason A. Donenfeld
2022-02-23 13:12   ` Jason A. Donenfeld
2022-02-23 16:36   ` Jason A. Donenfeld
2022-02-23 16:36     ` Jason A. Donenfeld
2022-02-23 16:08 ` [PATCH RFC v1 0/2] VM fork detection for RNG Jason A. Donenfeld
2022-02-23 16:08   ` Jason A. Donenfeld
2022-02-23 16:19   ` Jason A. Donenfeld
2022-02-23 16:19     ` Jason A. Donenfeld
2022-02-24  8:22   ` Laszlo Ersek
2022-02-24 10:43     ` Jason A. Donenfeld
2022-02-24 10:43       ` Jason A. Donenfeld
2022-02-24 10:55     ` Daniel P. Berrangé
2022-02-24 10:55       ` Daniel P. Berrangé
2022-02-24 10:57       ` Jason A. Donenfeld
2022-02-24 10:57         ` Jason A. Donenfeld
2022-02-25 10:40         ` Michael S. Tsirkin
2022-02-25 10:40           ` Michael S. Tsirkin
2022-02-24  8:53 ` Alexander Graf
2022-02-24 10:43   ` Daniel P. Berrangé
2022-02-24 10:43     ` Daniel P. Berrangé
2022-02-24 11:35     ` Alexander Graf
2022-02-24 10:53   ` Jason A. Donenfeld [this message]
2022-02-24 10:53     ` Jason A. Donenfeld

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=YhdjjgGgS7SBhSvu@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=acatan@amazon.com \
    --cc=adrian@parity.io \
    --cc=colmmacc@amazon.com \
    --cc=dwmw@amazon.co.uk \
    --cc=graf@amazon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raduweis@amazon.com \
    --cc=sblbir@amazon.com \
    --cc=tytso@mit.edu \
    /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.