tpm: Add recv timeout while running recvmsg

If swtpm becomes unresponsive, guest gets blocked at "recvmsg" on tpm's
data FD. This change adds a timeout to the data fd socket. If swtpm
becomes unresponsive guest waits for "timeout" (secs) and continues to
run after returning an I/O error to tpm commands.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
Praveen K Paladugu
2023-01-31 17:45:02 +00:00
committed by Rob Bradford
parent 934b20a77a
commit 1143d54ee0
4 changed files with 24 additions and 0 deletions
Generated
+1
View File
@@ -1292,6 +1292,7 @@ dependencies = [
"byteorder",
"libc",
"log",
"net_gen",
"thiserror",
"vmm-sys-util",
]