linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Anton Ivanov <anton.ivanov@kot-begemot.co.uk>
To: Benjamin Beichler <Benjamin.Beichler@uni-rostock.de>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-um@lists.infradead.org
Cc: linux-crypto@vger.kernel.org, "Stephan Müller" <smueller@chronox.de>
Subject: Re: jitterentropy vs. simulation
Date: Mon, 4 Dec 2023 12:50:28 +0000	[thread overview]
Message-ID: <2ea67aa8-3a6c-0f2e-93c6-446ea28f8b2f@kot-begemot.co.uk> (raw)
In-Reply-To: <6cffe622-bf4b-4cba-bfac-037c5aa89a25@uni-rostock.de>



On 04/12/2023 12:06, Benjamin Beichler wrote:
> Am 01.12.2023 um 19:35 schrieb Johannes Berg:
>> [I guess we should keep the CCs so other see it]
>>
>>> Looking at the stuck check it will be bogus in simulations.
>>
>> True.
>>
>>> You might as well ifdef that instead.
>>>
>>> If a simulation is running insert the entropy regardless and do not compute the derivatives used in the check.
>>
>> Actually you mostly don't want anything inserted in that case, so it's
>> not bad to skip it.
>>
>> I was mostly thinking this might be better than adding a completely
>> unrelated ifdef. Also I guess in real systems with a bad implementation
>> of random_get_entropy(), the second/third derivates might be
>> constant/zero for quite a while, so may be better to abort?
> Maybe dump question: could we simply implement a timex.h for UM which delegates in non-timetravel mode to the x86 variant 

Sounds reasonable.

> and otherwise pull some randomness from the host or from a file/pipe configurable from the UML commandline for random_get_entropy()?

Second one.

We can run haveged in pipe mode and read from the pipe. Additionally, this will allow deterministic simulation if need be. You can record the haveged output and use it for more than one simulation.

> 
> I would say, if the random jitter is truly deterministic for a simulation, that seems to be good enough.
> 
> Said that, it would be nice to be able to configure all random sources to pull entropy from some file that we are able to configure from the command line, but that is a different topic.
> 
>>
>> In any case, I couldn't figure out any way to not configure this into
>> the kernel when any kind of crypto is also in ...
>>
>> johannes
>>
>>
> 
> 
> 
> 
> 

-- 
Anton R. Ivanov
https://www.kot-begemot.co.uk/


      reply	other threads:[~2023-12-04 12:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01 10:21 jitterentropy vs. simulation Johannes Berg
2023-12-01 18:03 ` Anton Ivanov
2023-12-01 18:35   ` Johannes Berg
2023-12-01 19:25     ` Simo Sorce
2023-12-01 20:04       ` Johannes Berg
2023-12-04  8:52     ` Stephan Mueller
2023-12-04 10:24       ` Johannes Berg
2023-12-04 10:35         ` Stephan Mueller
2023-12-04 12:06     ` Benjamin Beichler
2023-12-04 12:50       ` Anton Ivanov [this message]

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=2ea67aa8-3a6c-0f2e-93c6-446ea28f8b2f@kot-begemot.co.uk \
    --to=anton.ivanov@kot-begemot.co.uk \
    --cc=Benjamin.Beichler@uni-rostock.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=smueller@chronox.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).