qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V20 6/8] Add support for cancelling of a TPM com


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH V20 6/8] Add support for cancelling of a TPM command
Date: Mon, 04 Feb 2013 17:43:59 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

On 02/04/2013 05:06 PM, Corey Bryant wrote:


On 02/04/2013 01:48 PM, Stefan Berger wrote:
On 02/04/2013 11:02 AM, Corey Bryant wrote:
+    /*
+     * As of Linux 3.7 the tpm_tis driver does not properly cancel
+     * commands for all TPMs.


Any idea what the plan is for this issue?  Is it an ongoing matter of
adding kernel support as unsupported TPMs are identified?


I submitted a patch to the tpmdd-devel mailing list fixing the
cancellation issue with the particular TPM I have on one of my machines.
Kent Yoder modified it to add a fix for yet another TPM (from a
different vendor).

https://github.com/shpedoikal/linux/commit/9f11986de7280f999cad342389b48c29002c0f37


The spec seems not be clear enough as to what bits must be set in the
status register when a TPM command is canceled so that the so far
implemented cancellation detection is insufficient and needs to be
adapted to TPM vendors' implementations. All TIS interfaces are supposed
to support cancellation, though.


It sounds like this is a work in progress at the spec and Linux kernel level. It's certainly not ideal, but I think as long as a message is issued for unsupported TPMs, it shouldn't hold up integration of this support into QEMU.


There may be a misunderstanding here: whether canceling an ongoing TPM command works is not something that QEMU can tell you. We will always find the cancel sysfs entry and we can write a byte into it to trigger the cancellation but whether the driver then detects the cancellation correctly is something different - the problem here is that the thread is waiting inside the driver for the command to complete and periodically check whether it has finished and/or was canceled. I previously used a different machine where cancellation was working but now with the new machine and a different vendor's TPM the cancel sysfs entry cancels the command fine but the driver does not detect the fact that the command was actually canceled and just continues waiting for the command's completion. Also since we don't have access to all TPM vendors' TPMs we cannot tell for sure which ones are working and which ones are not.

   Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]