[PATCH v3 0/5] Unsorted tpm2-sessions improvements

Jarkko Sakkinen jarkko at kernel.org
Mon Nov 16 00:50:59 UTC 2026


Collected patches that still make sense from [1] and tweaked where needed.

[1] https://lore.kernel.org/linux-integrity/20260125192526.782202-1-jarkko@kernel.org/#t

CHANGES
=======

v3:
- Add "tpm-buf: Make tpm_buf_read*() fallible".

v2:
- Based on Sashiko feedback I changed "offset += tpm_buf_read_u16()" into
  "rc = tpm_buf_read_u16(...)" and "offset += rc". I'm convinced that this
  was necessary but since it does not have a cost, at least this should
  mute Sashiko.

VERSIONS
========

v1: https://lore.kernel.org/linux-integrity/20261115224722.1450498-1-jarkko@kernel.org/

Cc: keyrings at vger.kernel.org
Cc: linux-integrity at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
Cc: linux-security-module at vger.kernel.org
Cc: Alec Brown <alec.r.brown at oracle.com>
Cc: "Daniel P. Smith" <dpsmith at apertussolutions.com>
Cc: David Howells <dhowells at redhat.com>
Cc: Eric Biggers <ebiggers at kernel.org>
Cc: James Bottomley <James.Bottomley at HansenPartnership.com>
Cc: James Morris <jmorris at namei.org>
Cc: Jarkko Sakkinen <jarkko at kernel.org>
Cc: Jason Gunthorpe <jgg at ziepe.ca>
Cc: Jonathan McDowell <noodles at earth.li>
Cc: Matthew Garrett <mjg59 at srcf.ucam.org>
Cc: Mimi Zohar <zohar at linux.ibm.com>
Cc: Paul Moore <paul at paul-moore.com>
Cc: Peter Huewe <peterhuewe at gmx.de>
Cc: Roberto Sassu <roberto.sassu at huawei.com>
Cc: Ross Philipson <ross.philipson at gmail.com>
Cc: "Serge E. Hallyn" <serge at hallyn.com>

Jarkko Sakkinen (5):
  tpm2-sessions: Drop TPM2_NAME_SIZE
  KEYS: trusted: Open code tpm2_buf_append_auth()
  KEYS: trusted: Remove dead branch from tpm2_unseal_cmd
  tpm2-sessions: Re-orchestrate tpm2_read_public() use
  tpm-buf: Make tpm_buf_read*() fallible

 drivers/char/tpm/tpm-buf.c                |  56 ++--
 drivers/char/tpm/tpm-sysfs.c              |   2 +-
 drivers/char/tpm/tpm2-cmd.c               |   9 +-
 drivers/char/tpm/tpm2-sessions.c          | 306 +++++++++++++---------
 include/linux/tpm.h                       |  18 +-
 include/linux/tpm_buf.h                   |   6 +-
 security/keys/trusted-keys/trusted_tpm2.c |  93 +++----
 7 files changed, 270 insertions(+), 220 deletions(-)

--
2.47.3




More information about the Linux-security-module-archive mailing list