public inbox for linux-integrity@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 0/8] Prepare TPM driver for Trenchboot
@ 2025-11-28  2:53 Jarkko Sakkinen
  2025-11-28  2:53 ` [PATCH v9 1/8] tpm2-sessions: Remove 'attributes' parameter from tpm_buf_append_auth Jarkko Sakkinen
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Jarkko Sakkinen @ 2025-11-28  2:53 UTC (permalink / raw)
  To: linux-integrity
  Cc: ross.philipson, Jonathan McDowell, Stefano Garzarella,
	Jarkko Sakkinen

Overview
========

Start preparing TPM driver for Trenchboot by decoupling tpm_buf from
driver and memory allocation.

Backlog (of stuff that will end up to a follow-up patch sets):

1. Static flat duration table for TPM 1.2. Such feature already landed
   in v6.17 for TPM 2.0. We probably can figure out some sane roof
   values for the legacy standard, right? This allows to share more
   code "via data".
2. Not a blocker for sending subsequent versions of Trenchboot patch set
   but we could look at slicing tpm_tis code at some point of future.
   It could be even that redundant parts could be "merged" after the
   feature lands but this is neither a promise (depends on how things
   look overall).

This patch set does not do a lot heavy-lifting but is beefed enough that
it is better not fatten it up too much anymore. Sane buffering is a
great starting point.

v9:
- Dropped patches that went into 6.19 pull request (and that is main
  reason for sending update so quickly).
- I went through the commit message and polished a bit most of them
- Simplified the patch fixing memory leak in  tpm2_load_cmd.
v8:
- Fixed reported issues.
- Did some focused testing on TPM 1.2 using swtpm to make sure that
  it is working correctly.
v7:
- Fixed reported issues.
v6:
- Fixed a memory leak that I found trom trusted keys.
v5:
- Order sobs correctly.
- Fixed a minor glitch in 9/9.
v4:
- PCR patch has been removed because it does not fly without Trenchboot
  context.
v3:
- I think 6.19 is a better goal for this and thus expanded the series to
  be a generic Trenchboot enablers series. This version also consolidates
  my two separate ongoing series.
v2:
- While including fixes from v1, this patch set has a refocus in order to
  do minimal changes to make code base more compatible  Trenchboot.

Jarkko Sakkinen (8):
  tpm2-sessions: Remove 'attributes' parameter from tpm_buf_append_auth
  tpm2-sessions: Open code tpm_buf_append_hmac_session()
  KEYS: trusted: Replace a redundant instance of tpm2_hash_map
  KEYS: trusted: Fix a memory leak in tpm2_load_cmd
  KEYS: trusted: Open code tpm2_buf_append()
  tpm-buf: Merge TPM_BUF_BOUNDARY_ERROR and TPM_BUF_OVERFLOW
  tpm-buf: Remove chip parameter from tpm_buf_append_handle
  tpm-buf: Enable managed and stack allocations.

 drivers/char/tpm/tpm-buf.c                | 143 ++++++----
 drivers/char/tpm/tpm-sysfs.c              |  21 +-
 drivers/char/tpm/tpm.h                    |   1 -
 drivers/char/tpm/tpm1-cmd.c               | 162 +++++------
 drivers/char/tpm/tpm2-cmd.c               | 319 +++++++++++-----------
 drivers/char/tpm/tpm2-sessions.c          | 129 +++++----
 drivers/char/tpm/tpm2-space.c             |  44 ++-
 drivers/char/tpm/tpm_vtpm_proxy.c         |  30 +-
 include/linux/tpm.h                       |  56 ++--
 security/keys/trusted-keys/trusted_tpm1.c |  36 +--
 security/keys/trusted-keys/trusted_tpm2.c | 245 +++++++----------
 11 files changed, 544 insertions(+), 642 deletions(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-11-28 15:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-28  2:53 [PATCH v9 0/8] Prepare TPM driver for Trenchboot Jarkko Sakkinen
2025-11-28  2:53 ` [PATCH v9 1/8] tpm2-sessions: Remove 'attributes' parameter from tpm_buf_append_auth Jarkko Sakkinen
2025-11-28  2:53 ` [PATCH v9 2/8] tpm2-sessions: Open code tpm_buf_append_hmac_session() Jarkko Sakkinen
2025-11-28  2:53 ` [PATCH v9 3/8] KEYS: trusted: Replace a redundant instance of tpm2_hash_map Jarkko Sakkinen
2025-11-28  9:44   ` Jonathan McDowell
2025-11-28 15:14     ` Jarkko Sakkinen
2025-11-28  2:53 ` [PATCH v9 4/8] KEYS: trusted: Fix a memory leak in tpm2_load_cmd Jarkko Sakkinen
2025-11-28  2:53 ` [PATCH v9 5/8] KEYS: trusted: Open code tpm2_buf_append() Jarkko Sakkinen
2025-11-28  2:53 ` [PATCH v9 6/8] tpm-buf: Merge TPM_BUF_BOUNDARY_ERROR and TPM_BUF_OVERFLOW Jarkko Sakkinen
2025-11-28  2:53 ` [PATCH v9 7/8] tpm-buf: Remove chip parameter from tpm_buf_append_handle Jarkko Sakkinen
2025-11-28  2:54 ` [PATCH v9 8/8] tpm-buf: Enable managed and stack allocations Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox