[PATCH v5 0/9] Prepare TPM driver for Trenchboot

Jarkko Sakkinen posted 9 patches 21 hours ago
drivers/char/tpm/tpm-buf.c                | 141 ++++++----
drivers/char/tpm/tpm-chip.c               |  13 +-
drivers/char/tpm/tpm-sysfs.c              |  21 +-
drivers/char/tpm/tpm.h                    |   2 -
drivers/char/tpm/tpm1-cmd.c               | 185 +++++--------
drivers/char/tpm/tpm2-cmd.c               | 313 ++++++++++------------
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                       |  65 ++---
security/keys/trusted-keys/trusted_tpm1.c |  34 ++-
security/keys/trusted-keys/trusted_tpm2.c | 241 +++++++----------
12 files changed, 544 insertions(+), 674 deletions(-)
[PATCH v5 0/9] Prepare TPM driver for Trenchboot
Posted by Jarkko Sakkinen 21 hours ago
Overview
========

Prepare TPM driver for Trenchboot by making tpm-buf easy to compile as an
independent compilation unit, and generally be IO and memory agnostic.
This allows Trenchboot easily use this code to build and parse TPM 1.2 and
TPM 2.0 commands.

Goals and scope
===============

This patch set contains only changes, which are acceptable to the mainline
driver without existence of Trenchboot feature.

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 (9):
  tpm: Cap the number of PCR banks
  tpm: Use -EPERM as fallback error code in tpm_ret_to_err
  KEYS: trusted: Use tpm_ret_to_err() in trusted_tpm2
  tpm2-sessions: Remove 'attributes' from tpm_buf_append_auth
  tpm2-sessions: Unmask tpm_buf_append_hmac_session()
  KEYS: trusted: Open code tpm2_buf_append()
  tpm-buf: check for corruption in tpm_buf_append_handle()
  tpm-buf: Remove chip parameter from tpm_buf_append_handle
  tpm-buf: Enable managed and stack allocations.

 drivers/char/tpm/tpm-buf.c                | 141 ++++++----
 drivers/char/tpm/tpm-chip.c               |  13 +-
 drivers/char/tpm/tpm-sysfs.c              |  21 +-
 drivers/char/tpm/tpm.h                    |   2 -
 drivers/char/tpm/tpm1-cmd.c               | 185 +++++--------
 drivers/char/tpm/tpm2-cmd.c               | 313 ++++++++++------------
 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                       |  65 ++---
 security/keys/trusted-keys/trusted_tpm1.c |  34 ++-
 security/keys/trusted-keys/trusted_tpm2.c | 241 +++++++----------
 12 files changed, 544 insertions(+), 674 deletions(-)

-- 
2.39.5