Skip to content

Move TPM-specific fields out of trusted_key_options

Srish Srinivasan keyrings linux-integrity linux-security-module lkml stable 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest2 patches 2 repliesIn review
  2. v81 of 2 patches 1 replySuperseded
  3. v71 of 2 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v62 patches4 repliesSuperseded

Changes in v9 from the cover letter

- Resent the full patch set with consistent v9 subject prefix
- Corrected patch 1/2, which was sent as v3 in v8, which caused b4 to flag the series as incomplete

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2keys/trusted_keys: return immediately after TPM unseal failuresecurity/keys/trusted-keys/trusted_tpm1.c+3 -10 replies
2/2keys/trusted_keys: move TPM-specific fields into struct trusted_key_tpminclude/keys/trusted-type.h include/keys/trusted_tpm.h security/keys/trusted-keys/trusted_tpm1.c +1 more+111 -870 replies

Reviews trailers per patch

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

PatchJarkko SakkinenStefan Berger
1/2R-b
2/2R-b R-b

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

Read the v9 thread

Cover letter [PATCH v9 0/2] Move TPM-specific fields out of trusted_key_options

struct trusted_key_options contains fields that are specific to the TPM trusted source, resulting in the accumulation backend-specific fields in the generic options structure.

Move the TPM-specific fields into a new struct trusted_key_tpm and store a pointer to it in the private member of struct trusted_key_options.

As a preparatory change, return immediately after a TPM unseal failure to prevent pcrlock() from overwriting the unseal error.

Changelog:

v9:
- Resent the full patch set with consistent v9 subject prefix
- Corrected patch 1/2, which was sent as v3 in v8, which caused b4 to flag the series as incomplete

v8:
- Rebase onto commit
adc6a9f6d997 ("KEYS: trusted: Fix tpm2_load_cmd() boundary check") to resolve the merge conflicts
- Include Jarkko's Reviewed-by tag

v7:
- Fix a memory leak in the preparatory fix

v6:
- Add a preparatory fix to return immediately after a TPM unseal failure
- Replace explicit cleanup with __free(kfree_sensitive) in the TPM seal and unseal paths, as suggested by Jarkko

v5:
- Rename struct trusted_tpm_options to struct trusted_key_tpm, as suggestedby Jarkko.

v4:
- Rebased onto mainline after tpm-buf memory-safe allocation changes were merged
- Resolved the resulting merge conflicts

v3:
- Exclude the preparatory clean up patch as the problem has been addressed in commit
9ec4175a30eb ("KEYS: trusted: Debugging as a feature")

v2:
- Exclude the bug-fix patch as it has already been applied to 6.19-rc7
- Rename instances of trusted_tpm_options from tpm_opts to private
- Use pr_debug and KERN_DEBUG for logging debug messages (preparatory clean up patch)
- Address other minor comments from Jarkko

Srish Srinivasan (2):
keys/trusted_keys: return immediately after TPM unseal failure keys/trusted_keys: move TPM-specific fields into struct
trusted_key_tpm

 include/keys/trusted-type.h               |  11 --
 include/keys/trusted_tpm.h                |  14 +++
 security/keys/trusted-keys/trusted_tpm1.c | 125 ++++++++++++----------
 security/keys/trusted-keys/trusted_tpm2.c |  50 +++++----
 4 files changed, 113 insertions(+), 87 deletions(-)
Signature · 1 line
2.53.0