On 11/16/2016 10:37 AM, Jarkko Sakkinen wrote:
> On Wed, Nov 16, 2016 at 09:24:05AM -0500, Stefan Berger wrote:
>> The virtual TPM driver must not access the hosts's event log,
>> otherwise we get crashes from that.
>>
>> Signed-off-by: Stefan Berger <[email protected]>
> Can you give me a "Fixes" line (no need to send a new patch)?
I haven't bisected, yet.... but will do that today.
Also I am wondering whether we should introduce a flag
TPM_CHIP_NO_FIRMWARE_LOG that is checked below. The
TPM_CHIP_FLAG_VIRTUAL may not be ideal, also because it is set due to
the device not having a parent device, which may not be related.
Thoughts? That new flag would only be set by the vtpm proxy driver.
Stefan
>
>> ---
>> 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
>>
> /Jarkko
>
------------------------------------------------------------------------------
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel