public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <graf@amazon.de>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Babis Chalios <bchalios@amazon.es>
Cc: Olivia Mackall <olivia@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Theodore Ts'o <tytso@mit.edu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<virtualization@lists.linux-foundation.org>,
	<xmarcalx@amazon.co.uk>, <aams@amazon.de>, <dwmw@amazon.co.uk>,
	<gregkh@linuxfoundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Eric Biggers <ebiggers@kernel.org>
Subject: Re: [RFC PATCH 0/2] Propagating reseed notifications to user space
Date: Wed, 6 Sep 2023 16:25:44 +0200	[thread overview]
Message-ID: <746f0268-32b7-46fc-bfe5-37cf5b1bf998@amazon.de> (raw)
In-Reply-To: <ZPXsuhXJhN9Q3hfH@zx2c4.com>

[Resending in plain text only. Let's hope it reaches everyone this time :)]

Hey Jason!

On 04.09.23 16:42, Jason A. Donenfeld wrote:
> On Mon, Sep 04, 2023 at 03:44:48PM +0200, Babis Chalios wrote:
>> Hello all,
>>
>> On 23/8/23 11:01, Babis Chalios wrote:
>>> This is an RFC, so that we can discuss whether the proposed ABI works.
>>> Also, I'd like to hear people's opinion on the internal registration
>>> API, 8/24 split etc. If we decide that this approach works, I 'm happy
>>> to add documentation for it, with examples on how user space can make
>>> use of it.
>> Some time has passed since I sent this and I haven't received any
>> comments, so I assume people
> Nope. This still stands:
> https://lore.kernel.org/all/CAHmME9pxc-nO_xa=4+1CnvbnuefbRTJHxM7n817c_TPeoxzu_g@mail.gmail.com/


To recap, that email said:

> Just so you guys know, roughly the order of operations here are going to be:
>
> - vdso vgetrandom v+1
> - virtio fork driver
> - exposing fork events to userspace
>
> I'll keep you posted on those.

I don't quite understand both the relationship of vgetrandom to this nor 
how we could help. I understand how a VDSO vgetrandom could use 
primitives that are very similar (or maybe even identical) to this patch 
set.

What I'm missing is why there is a dependency between them. I don't 
expect user space PRNGs to disappear over night, especially given all 
the heavy lifting and architecture specific code that vDSOs require. So 
if we want to build a solution that allows user space to generically 
solve VM snapshots, we should strive to have a mechanism that works in 
today's environment in addition to making the vgetrandom call safe when 
it emerges.

The last revision of vgetrandom that I found was v14 from January. Is it 
still in active development? And if so, what is the status? The last 
fundamental comment I found in archives was this comment from Linus:


> This should all be in libc. Not in the kernel with special magic vdso
> support and special buffer allocations. The kernel should give good
> enough support that libc can do a good job, but the kernel should
> simply *not* take the approach of "libc will get this wrong, so let's
> just do all the work for it".

to which you replied

> That buffering cannot be done safely currently -- VM forks, reseeding
> semantics, and so forth. Again, discussed in the cover letter of the
> patch if you'd like to engage with those ideas.

My understanding is that this patch set solves exactly that problem in a 
way that is fully compatible with existing user space PRNGs and easy to 
consume as well as add support for in "Enterprise" systems for anyone 
who wishes to do so.

So, where is v15 without VM changes standing? And why exactly should we 
couple vgetrandom with atomic user space reseed notifications? :)


Thanks,

Alex




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879



  parent reply	other threads:[~2023-09-06 14:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-23  9:01 [RFC PATCH 0/2] Propagating reseed notifications to user space Babis Chalios
2023-08-23  9:01 ` [RFC PATCH 1/2] random: emit reseed notifications for PRNGs Babis Chalios
2023-08-23  9:08   ` Greg KH
2023-08-23  9:27     ` Babis Chalios
2023-08-23 10:06       ` Greg KH
     [not found]         ` <89ce1064-e4a3-461f-8a78-88e72e5b6419@amazon.es>
2023-08-23 10:20           ` Alexander Graf
2023-08-23 10:25           ` Greg KH
2023-08-23 10:37             ` Alexander Graf
2023-08-23  9:01 ` [RFC PATCH 2/2] virtio-rng: implement entropy leak feature Babis Chalios
2023-09-04 13:44 ` [RFC PATCH 0/2] Propagating reseed notifications to user space Babis Chalios
2023-09-04 14:42   ` Jason A. Donenfeld
2023-09-04 14:54     ` Babis Chalios
2023-09-06 14:25     ` Alexander Graf [this message]
2023-09-17 13:34 ` Yann Droneaud
2023-09-18  8:32   ` Alexander Graf

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=746f0268-32b7-46fc-bfe5-37cf5b1bf998@amazon.de \
    --to=graf@amazon.de \
    --cc=Jason@zx2c4.com \
    --cc=aams@amazon.de \
    --cc=bchalios@amazon.es \
    --cc=dwmw@amazon.co.uk \
    --cc=ebiggers@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=jasowang@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=olivia@selenic.com \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xmarcalx@amazon.co.uk \
    --cc=xuanzhuo@linux.alibaba.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