linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tytso@mit.edu
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Lutomirski <luto@amacapital.net>,
	Florian Weimer <fweimer@redhat.com>,
	linux-kernel@vger.kernel.org, Kees Cook <kees@outflux.net>
Subject: Re: [PATCH] random: Add "initialized" variable to proc
Date: Thu, 1 May 2014 15:05:49 +0000	[thread overview]
Message-ID: <20140501150549.GA24388@thunk.org> (raw)
In-Reply-To: <1be5350d-89f9-44b9-8d1b-e3e591741940@email.android.com>

On Wed, Apr 30, 2014 at 09:05:00PM -0700, H. Peter Anvin wrote:
> 
> Giving the guest a seed would be highly useful, though.  There are a
> number of ways to do that; changing the boot protocol is probably
> only useful if Qemu itself bouts the kernel as opposed to an in-VM
> bootloader.

So how about simply passing a memory address and an optional offset on
the boot command line?  That way the hypervisor can drop the seed in
some convenient real memory location, and the kernel can just copy it
someplace safe, or in the case of kernel ASLR, the relocator can use
it to seed its CRNG, and then after it relocates the kernel, it can
crank the CRNG to pass a seed to the kernel's urandom driver.

That way, we don't have to do something which is ACPI or DT dependent.
Maybe there will be embedded architectures where using DT might be
more convenient, but this would probably be simplest for KVM/qumu-based
VM's, I would think.

     	     	   	      		- Ted

  reply	other threads:[~2014-05-01 15:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-28 19:52 [PATCH] random: Add "initialized" variable to proc Florian Weimer
2014-04-28 21:41 ` Theodore Ts'o
2014-04-29 17:51   ` Florian Weimer
2014-04-29 18:26     ` Theodore Ts'o
2014-04-30 20:52       ` Andy Lutomirski
2014-05-01  2:06         ` Theodore Ts'o
2014-05-01  4:05           ` H. Peter Anvin
2014-05-01 15:05             ` tytso [this message]
2014-05-01 15:35               ` Andy Lutomirski
2014-05-01 18:53                 ` Andy Lutomirski
2014-05-01 18:59                   ` random: Providing a seed value to VM guests H. Peter Anvin
2014-05-01  5:37           ` [PATCH] random: Add "initialized" variable to proc H. Peter Anvin
2014-05-01 14:33             ` Jason Cooper

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=20140501150549.GA24388@thunk.org \
    --to=tytso@mit.edu \
    --cc=fweimer@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kees@outflux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    /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).