Skip to content

tpm: Resolve potential blocking-forever issue

Stefan Berger qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 2 repliesIn review
  2. v32 patches 3 repliesSuperseded
  3. v22 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches1 replySuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITYbackends/tpm/tpm_emulator.c backends/tpm/tpm_ioctl.h backends/tpm/trace-events+21 -81 reply
2/2tpm_emulator: Read control channel response in 2 passesbackends/tpm/tpm_emulator.c+45 -161 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDaniel P. Berrangé
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] tpm: Resolve potential blocking-forever issue

In case swtpm was to return a control channel message with an error code it would often return less bytes than the full response. In some cases the current reading of the returned bytes would get stuck since more bytes are expected. Therefore, pass a separate parameter indicating how many bytes to expect in case of an error and read that many bytes in a first step. Check for an error code in the first 4 bytes and return if there is an error. Read the rest in a 2nd step, if needed.

Stefan

Stefan Berger (2):
tpm: Use new ptm_cap_n structure for PTM_GET_CAPABILITY
tpm_emulator: Read control channel response in 2 passes

 backends/tpm/tpm_emulator.c | 73 ++++++++++++++++++++++++++-----------
 backends/tpm/tpm_ioctl.h    | 13 ++++++-
 backends/tpm/trace-events   |  2 +-
 3 files changed, 65 insertions(+), 23 deletions(-)
Signature · 1 line
2.47.0