linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Janne Karhunen <janne.karhunen@gmail.com>
Cc: linux-integrity@vger.kernel.org,
	David Safford <david.safford@ge.com>,
	Pascal Van Leeuwen <pvanleeuwen@verimatrix.com>,
	James Bottomley <James.Bottomley@hansenpartnership.com>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	open list <linux-kernel@vger.kernel.org>,
	Mimi Zohar <zohar@linux.ibm.com>
Subject: Re: [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes()
Date: Wed, 16 Oct 2019 19:23:28 +0300	[thread overview]
Message-ID: <20191016162312.GA6279@linux.intel.com> (raw)
In-Reply-To: <CAE=Ncrb_7wQsv0_EvZWe5-WA2UU_GywgfnVo7hC-FDTY6bzpFQ@mail.gmail.com>

On Wed, Oct 16, 2019 at 02:16:20PM +0300, Janne Karhunen wrote:
> On Wed, Oct 16, 2019 at 1:41 PM Jarkko Sakkinen
> <jarkko.sakkinen@linux.intel.com> wrote:
> 
> > > > get_random_bytes().  TPM could have a bug (making results predicatable),
> > > > backdoor or even an inteposer in the bus. Salting gives protections
> > > > against these concerns.
> > >
> > > The current issue in the randomness from my point of view is that
> > > encrypted filesystems, ima etc in common deployments require high
> > > quality entropy just few seconds after the system has powered on for
> > > the first time. It is likely that people want to keep their keys
> > > device specific, so the keys need to be generated on the first boot
> > > before any of the filesystems mount.
> >
> > This patch does not have the described issue.
> 
> My understanding was that you wanted to make the tpm_get_random() an
> alternative to get_random_bytes(), and one reason why one might want
> to do this is to work around the issues in get_random_bytes() in early
> init as it may not be properly seeded. But sure, if you this wasn't
> among the problems being solved then forget it.

I'm trying to get a framework on how rng's should be used in the
kernel. There doesn't seem to be one.

/Jarkko

      reply	other threads:[~2019-10-16 16:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 12:47 [PATCH] tpm: Salt tpm_get_random() result with get_random_bytes() Jarkko Sakkinen
2019-10-15 17:04 ` Jason Gunthorpe
2019-10-16 10:38   ` Jarkko Sakkinen
2019-10-16 10:43     ` Jarkko Sakkinen
2019-10-16 16:09       ` Jason Gunthorpe
2019-10-17 16:21         ` Jarkko Sakkinen
2019-10-16  7:02 ` Janne Karhunen
2019-10-16 10:41   ` Jarkko Sakkinen
2019-10-16 11:16     ` Janne Karhunen
2019-10-16 16:23       ` Jarkko Sakkinen [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=20191016162312.GA6279@linux.intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=arnd@arndb.de \
    --cc=david.safford@ge.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=janne.karhunen@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=pvanleeuwen@verimatrix.com \
    --cc=zohar@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).