tpm-rng doesn't produce random data with mocktpm |
||
Issue descriptionThe kernel log gets spammed every 10 seconds with: hwrng: no data available whenever mocktpm is used. This is because tpm-rng is registering a random source, but mocktpm never supplies it with any randomness. The log spamming is annoying, let's deal with it one way or another.
,
Apr 3 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f8290d5ddcaed257980d6bff3c9f7125946c3e05 commit f8290d5ddcaed257980d6bff3c9f7125946c3e05 Author: Thiebaud Weksteen <tweek@google.com> Date: Tue Apr 03 23:12:17 2018 UPSTREAM: tpm: move tpm_eventlog.h outside of drivers folder The generic definitions of data structures in tpm_eventlog.h are required by other part of the kernel (namely, the EFI stub). Signed-off-by: Thiebaud Weksteen <tweek@google.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> BUG= chromium:822509 TEST=Build kernel for Cheza, which uses mocktpm Signed-off-by: Evan Green <evgreen@chromium.org> (cherry picked from commit fd3ec3663718e5f89fbcbc18a67885203fd914a1) Change-Id: I20d7157d9f1590d79f7900ee1f3af011723f4814 Reviewed-on: https://chromium-review.googlesource.com/966874 Reviewed-by: Guenter Roeck <groeck@chromium.org> [modify] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/drivers/char/tpm/tpm_acpi.c [modify] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/drivers/char/tpm/tpm_of.c [modify] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/drivers/char/tpm/tpm-chip.c [modify] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/drivers/char/tpm/tpm2_eventlog.c [modify] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/drivers/char/tpm/tpm-interface.c [modify] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/drivers/char/tpm/tpm.h [rename] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/include/linux/tpm_eventlog.h [modify] https://crrev.com/f8290d5ddcaed257980d6bff3c9f7125946c3e05/drivers/char/tpm/tpm1_eventlog.c
,
Apr 3 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ab1e00f3021571afe34e4d5574679dd984a4dc19 commit ab1e00f3021571afe34e4d5574679dd984a4dc19 Author: Jason Gunthorpe <jgg@ziepe.ca> Date: Tue Apr 03 23:12:21 2018 UPSTREAM: tpm: Move Linux RNG connection to hwrng The tpm-rng.c approach is completely inconsistent with how the kernel handles hotplug. Instead manage a hwrng device for each TPM. This will cause the kernel to read entropy from the TPM when it is plugged in, and allow access to the TPM rng via /dev/hwrng. Signed-off-by: Jason Gunthorpe <jgg@ziepe.ca> Tested-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Note: drivers/char/tpm/tpm.h conflicted because of 1f6cbc95287eb7f903ccf3e67ce1015acf7f1a3e which was just a chromium-specific nearby change. Conflicts: drivers/char/tpm/tpm.h BUG= chromium:822509 TEST=Build kernel for Cheza, which uses mocktpm Signed-off-by: Evan Green <evgreen@chromium.org> (cherry picked from commit 6e592a065d51d26f9d62b8b7501a5114076af8b4) Change-Id: Ie999ad5981883809734bc2f818c16e818e9f97f3 Reviewed-on: https://chromium-review.googlesource.com/966875 Reviewed-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org> [modify] https://crrev.com/ab1e00f3021571afe34e4d5574679dd984a4dc19/drivers/char/hw_random/Makefile [modify] https://crrev.com/ab1e00f3021571afe34e4d5574679dd984a4dc19/drivers/char/tpm/tpm-chip.c [modify] https://crrev.com/ab1e00f3021571afe34e4d5574679dd984a4dc19/drivers/char/hw_random/Kconfig [delete] https://crrev.com/13316b4f2cb2bbac9104c363eccda512fd4a0a0d/drivers/char/hw_random/tpm-rng.c [modify] https://crrev.com/ab1e00f3021571afe34e4d5574679dd984a4dc19/drivers/char/tpm/Kconfig [modify] https://crrev.com/ab1e00f3021571afe34e4d5574679dd984a4dc19/drivers/char/tpm/tpm.h
,
Apr 3 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/13316b4f2cb2bbac9104c363eccda512fd4a0a0d commit 13316b4f2cb2bbac9104c363eccda512fd4a0a0d Author: Evan Green <evgreen@chromium.org> Date: Tue Apr 03 23:12:19 2018 CHROMIUM: Revert "CHROMIUM: tpm-rng: Make hwrng working" This reverts commit d0621b4cd498 ("CHROMIUM: tpm-rng: Make hwrng working") in order to apply upstream commit 6e592a065d51 ("tpm: Move Linux RNG connection to hwrng") That change made the rpm-rng driver load a little later, presumably to avoid some sort of situation where it came up too early. Since the driver is being deleted by the upcoming upstream change, this is no longer needed. Signed-off-by: Evan Green <evgreen@chromium.org> BUG= chromium:822509 TEST=Build kernel for cheza, which uses mocktpm. Change-Id: I0fd1a3ab9d6aa8d4161b278d31523be01ba25358 Reviewed-on: https://chromium-review.googlesource.com/966937 Commit-Ready: Evan Green <evgreen@chromium.org> Tested-by: Evan Green <evgreen@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> [modify] https://crrev.com/13316b4f2cb2bbac9104c363eccda512fd4a0a0d/drivers/char/hw_random/tpm-rng.c
,
Apr 18 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Apr 3 2018