qemu/backends/tpm
Stefan Berger d2bcaacc17 tpm_emulator: Read control channel response in 2 passes
Error responses from swtpm are typically only 4 bytes long with the
exception of a few commands that return more bytes. Therefore, read the
entire response in 2 steps and stop if the first few bytes indicate an
error response with no subsequent bytes readable. Read the rest in a 2nd
step, if needed. This avoids getting stuck while waiting for too many
bytes in case of an error. The 'getting stuck' condition has not been
observed in practice so far, though.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2615
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-10-18 07:55:08 -04:00
..
Kconfig tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
tpm_backend.c thread-pool: avoid passing the pool parameter every time 2023-04-25 13:17:28 +02:00
tpm_emulator.c tpm_emulator: Read control channel response in 2 passes 2024-10-18 07:55:08 -04:00
tpm_int.h tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
tpm_ioctl.h tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY 2024-10-18 07:53:11 -04:00
tpm_passthrough.c qapi tpm: Elide redundant has_FOO in generated C 2022-12-14 20:05:07 +01:00
tpm_util.c backends/tpm: Remove newline character in trace event 2024-06-10 13:05:27 -04:00
trace-events tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY 2024-10-18 07:53:11 -04:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00