The virtual TPM driver must not access the hosts's event log, otherwise we get crashes from that.
Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_eventlog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/char/tpm/tpm_eventlog.c b/drivers/char/tpm/tpm_eventlog.c index fb603a7..e0abf40 100644 --- a/drivers/char/tpm/tpm_eventlog.c +++ b/drivers/char/tpm/tpm_eventlog.c @@ -369,6 +369,9 @@ static int tpm_read_log(struct tpm_chip *chip) { int rc; + if (chip->flags & TPM_CHIP_FLAG_VIRTUAL) + return -EFAULT; + if (chip->log.bios_event_log != NULL) { dev_dbg(&chip->dev, "%s: ERROR - event log already initialized\n", -- 2.4.3 ------------------------------------------------------------------------------ _______________________________________________ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel