[PULL v1 00/10] Merge tpm 2026/10/08 v1

Stefan Berger posted 10 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261008212723.3679685-1-stefanb@linux.ibm.com
Maintainers: Stefan Berger <stefanb@linux.vnet.ibm.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
backends/tpm/tpm_emulator.c             | 12 ++++--
backends/tpm/tpm_passthrough.c          |  2 +-
backends/tpm/tpm_util.c                 | 17 ++++++--
hw/tpm/tpm_crb.c                        | 21 +++++++---
hw/tpm/tpm_ppi.c                        | 10 +++++
hw/tpm/tpm_ppi.h                        | 10 +++++
hw/tpm/tpm_tis_common.c                 |  8 ++--
include/system/tpm_util.h               |  3 +-
tests/qtest/tpm-crb-swtpm-test.c        | 10 +++++
tests/qtest/tpm-tests.c                 | 56 +++++++++++++++++++++++++
tests/qtest/tpm-tests.h                 |  8 ++++
tests/qtest/tpm-tis-device-swtpm-test.c | 10 +++++
tests/qtest/tpm-tis-swtpm-test.c        | 10 +++++
tests/qtest/tpm-util.c                  | 55 ++++++++++++++++++++++++
tests/qtest/tpm-util.h                  |  3 ++
15 files changed, 219 insertions(+), 16 deletions(-)
[PULL v1 00/10] Merge tpm 2026/10/08 v1
Posted by Stefan Berger 1 month, 2 weeks ago
The following changes since commit f9587d4045c67cd0d8d8bdcd5d0bb5b6b395b63c:

  Merge tag 'pbouvier/pr/plugins-20261005' of https://gitlab.com/p-b-o/qemu into staging (2026-10-06 11:26:40 +0200)

are available in the Git repository at:

  https://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2026-10-08-1

for you to fetch changes up to 0c2f2309cddf6dcb5a340e7838e2b37e3fc22bf8:

  tests: Add tests with commands with bad length (2026-10-08 17:18:31 -0400)

----------------------------------------------------------------

This PR fixes a couple of issues in TPM-related code.

   Stefan

----------------------------------------------------------------

Stefan Berger (10):
  tpm_util: Pass TPMVersion to function writing fatal error response
  tpm_emulator: Reject TPM responses whose size is too small
  tpm_emulator: Reject sending commands smaller than the request header
  hw/tpm: tis: Only read from response buffer if rw_offset < len
  hw/tpm: tis: Use uint32_t for len to avoid truncating size of command
  hw/tpm: crb: Do not clear internal buffers when backend is busy
  hw/tpm: crb: Avoid potential integer underflow
  hw/tpm: crb: Implement tpm_ppi_uninit and use it in tpm_crb_unrealize
  hw/tpm: crb: Consider response_buffer->len of received response
  tests: Add tests with commands with bad length

 backends/tpm/tpm_emulator.c             | 12 ++++--
 backends/tpm/tpm_passthrough.c          |  2 +-
 backends/tpm/tpm_util.c                 | 17 ++++++--
 hw/tpm/tpm_crb.c                        | 21 +++++++---
 hw/tpm/tpm_ppi.c                        | 10 +++++
 hw/tpm/tpm_ppi.h                        | 10 +++++
 hw/tpm/tpm_tis_common.c                 |  8 ++--
 include/system/tpm_util.h               |  3 +-
 tests/qtest/tpm-crb-swtpm-test.c        | 10 +++++
 tests/qtest/tpm-tests.c                 | 56 +++++++++++++++++++++++++
 tests/qtest/tpm-tests.h                 |  8 ++++
 tests/qtest/tpm-tis-device-swtpm-test.c | 10 +++++
 tests/qtest/tpm-tis-swtpm-test.c        | 10 +++++
 tests/qtest/tpm-util.c                  | 55 ++++++++++++++++++++++++
 tests/qtest/tpm-util.h                  |  3 ++
 15 files changed, 219 insertions(+), 16 deletions(-)

-- 
2.55.0
Re: [PULL v1 00/10] Merge tpm 2026/10/08 v1
Posted by Michael Tokarev 1 month, 1 week ago
On 09.10.2026 00:27, Stefan Berger wrote:
> This PR fixes a couple of issues in TPM-related code.

> Stefan Berger (10):
>    tpm_util: Pass TPMVersion to function writing fatal error response
>    tpm_emulator: Reject TPM responses whose size is too small
>    tpm_emulator: Reject sending commands smaller than the request header
>    hw/tpm: tis: Only read from response buffer if rw_offset < len
>    hw/tpm: tis: Use uint32_t for len to avoid truncating size of command
>    hw/tpm: crb: Do not clear internal buffers when backend is busy
>    hw/tpm: crb: Avoid potential integer underflow
>    hw/tpm: crb: Implement tpm_ppi_uninit and use it in tpm_crb_unrealize
>    hw/tpm: crb: Consider response_buffer->len of received response
>    tests: Add tests with commands with bad length

Hi!

Is there anything in there worth picking up for current qemu-stable
series (10.0.x & 11.1.x)?  It feels like whole pullreq is, but I'm
not sure :)

Thanks,

/mjt
Re: [PULL v1 00/10] Merge tpm 2026/10/08 v1
Posted by Stefan Berger 1 month, 1 week ago

On 10/11/26 3:35 AM, Michael Tokarev wrote:
> On 09.10.2026 00:27, Stefan Berger wrote:
>> This PR fixes a couple of issues in TPM-related code.
> 
>> Stefan Berger (10):
>>    tpm_util: Pass TPMVersion to function writing fatal error response
>>    tpm_emulator: Reject TPM responses whose size is too small
>>    tpm_emulator: Reject sending commands smaller than the request header
>>    hw/tpm: tis: Only read from response buffer if rw_offset < len
>>    hw/tpm: tis: Use uint32_t for len to avoid truncating size of command
>>    hw/tpm: crb: Do not clear internal buffers when backend is busy
>>    hw/tpm: crb: Avoid potential integer underflow
>>    hw/tpm: crb: Implement tpm_ppi_uninit and use it in tpm_crb_unrealize
>>    hw/tpm: crb: Consider response_buffer->len of received response
>>    tests: Add tests with commands with bad length
> 
> Hi!
> 
> Is there anything in there worth picking up for current qemu-stable
> series (10.0.x & 11.1.x)?  It feels like whole pullreq is, but I'm
> not sure :)

Thanks for asking.I just replied to on 3/10 and 6/10 to qemu-stable, 
which would be the most urgent ones.

> 
> Thanks,
> 
> /mjt


Re: [PULL v1 00/10] Merge tpm 2026/10/08 v1
Posted by Richard Henderson 1 month, 2 weeks ago
On 10/8/26 23:27, Stefan Berger wrote:
> The following changes since commit f9587d4045c67cd0d8d8bdcd5d0bb5b6b395b63c:
> 
>    Merge tag 'pbouvier/pr/plugins-20261005' ofhttps://gitlab.com/p-b-o/qemu into staging (2026-10-06 11:26:40 +0200)
> 
> are available in the Git repository at:
> 
>    https://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2026-10-08-1
> 
> for you to fetch changes up to 0c2f2309cddf6dcb5a340e7838e2b37e3fc22bf8:
> 
>    tests: Add tests with commands with bad length (2026-10-08 17:18:31 -0400)
> 
> ----------------------------------------------------------------
> 
> This PR fixes a couple of issues in TPM-related code.

Applied, thanks.

r~