Re: [PATCH] KEYS: asym_tpm: Switch to get_random_bytes()
From: Jarkko Sakkinen
Date: Fri Oct 04 2019 - 14:20:17 EST
On Thu, Oct 03, 2019 at 06:08:11PM -0400, Mimi Zohar wrote:
> > At the time when trusted keys was introduced I'd say that it was a wrong
> > design decision and badly implemented code. But you are right in that as
> > far that code is considered it would unfair to speak of a regression.
> >
> > asym-tpm.c on the other hand this is fresh new code. There has been
> > *countless* of discussions over the years that random numbers should
> > come from multiple sources of entropy. There is no other categorization
> > than a bug for the tpm_get_random() there.
>
> This week's LWN article on "5.4 Merge window, part 2" discusses "boot-
> time entropy". This article couldn't have been more perfectly timed.
Do not see any obvious relation to this dicussion. Are you saying that
you should not use the defacto kernel API's but instead bake your own
hacks because even defacto stuff bumps into issues from time to time?
And BTW, at the time you call tpm_get_random(), TPM driver is already
contributing to the entropy pool (registered as hwrng).
/Jarkko