stefanberger / swtpm

Libtpms-based TPM emulator with socket, character device, and Linux CUSE interface.
Other
576 stars 143 forks source link

swtpm_setup: Add poll() after write() and before read() to detect errors #804

Closed stefanberger closed 1 year ago

stefanberger commented 1 year ago

In case swtpm does not start properly the write() to it may work but then the read() gets stuck. Detect a failed swtpm by adding a poll() before the read(). Use some extended durations considering possibly busy systems.

A terminating swtpm instance can be caused when an unacceptable profile is passed.