On 03/19/2013 10:28 AM, Markus Armbruster wrote:
Stefan Berger <stef...@linux.vnet.ibm.com> writes:
I can write an OS that sends a command to the TPM and then shuts down
without waiting for the program to terminate or the even the response
from the TPM to come back . In this case we would need to cancel the
command on exit()l.
Aha, now we're getting somewhere.
Are you talking about the following scenario?
* Guest sends TPM command, QEMU passes it through, QEMU thread blocks in
write() to TPM.
* Guest powers down, QEMU is configured to terminate on powerdown, calls
exit().
* Unless you explicitly cancel the TPM command, $BAD_THINGS can happen.
If yes, please describe at least one instance of $BAD_THINGS for me
again.
BAD_THINGS = If a TPM command is executing as in the scenario you are
describing, the thread will still be caught in the write(), thus the
QEMU process cannot terminate and will be stuck in the thread-join as it
is implemented now. If there was no thread-join QEMU would probably
linger around as a zombie for a while.
Stefan