Extend struct tpm_buf to support sized buffers (TPM2B)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest8 patches 10 repliesIn review
- v5 posting 2/28 patches 7 repliesSuperseded
- v5 posting 1/22 of 8 patches 0 repliesSuperseded
Earlier versions · 5
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 8 patches | 0 replies | Superseded | |
| v3 | 6 patches | 26 replies | Superseded | |
| v2 posting 2/2 | 0 of 6 patches | 0 replies | Superseded | |
| v2 posting 1/2 | 6 patches | 0 replies | Superseded | |
| v1 | 5 patches | 0 replies | Superseded |
Changes in v6 from the cover letter
- 7/8: fixed off-by-one error in the boundary check
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | tpm: Remove unused tpm_buf_tag()include/ | +0 | 1 reply | |
| 2/8 | tpm: Remove tpm_send()drivers/ include/ security/ | +12 | 1 reply | |
| 3/8 | tpm: Move buffer handling from static inlines to real functionsdrivers/ drivers/ include/ | +97 | 1 reply | |
| 4/8 | tpm: Update struct tpm_buf documentation commentsinclude/ | +4 | 2 replies | |
| 5/8 | tpm: Store the length of the tpm_buf data separately.drivers/ drivers/ include/ +2 more | +46 | 1 reply | |
| 6/8 | tpm: TPM2B formatted buffersdrivers/ include/ | +39 | 1 reply | |
| 7/8 | tpm: Add tpm_buf_read_{u8,u16,u32}drivers/ include/ | +83 | 2 replies | |
| 8/8 | KEYS: trusted: tpm2: Use struct tpm_buf for sized bufferssecurity/ | +31 | 1 reply |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Stefan Berger |
|---|---|
| 1/8 | R-b |
| 2/8 | R-b |
| 3/8 | R-b |
| 4/8 | R-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 0/8] Extend struct tpm_buf to support sized buffers (TPM2B)
This patch set extends struct tpm_buf to support TPM2 sized buffers, and adds reader functions for parsing more complex response data. It is implemented to support smooth landing of [2]. Sealing of the TPM2 trusted keys is updated to utilize the new functionality, and thus provides a legit test case for it.
TPM2 sized buffer, i.e. the buffers in TPM2 format, are defined in the section 10.4 of the TPM2 Structures [1] specification.
Here's the smoke test that I've run for TPM2:
/usr/lib/kselftests/run_kselftest.shtpm2_createprimary --hierarchy o -G rsa2048 -c key.ctxt tpm2_evictcontrol -c key.ctxt 0x81000001
keyctl add trusted kmk "new 32 keyhandle=0x81000001" @u keyctl add encrypted 1000100010001000 "new ecryptfs trusted:kmk 64" @u
[1] https://trustedcomputinggroup.org/resource/tpm-library-specification/
[2] https://lore.kernel.org/linux-integrity/[email protected]/
v6:
- 7/8: fixed off-by-one error in the boundary check
v5:
- Fixed glitch in tpm_buf_read() reported by James Bottomley to the v4. Was forgotten from v4.
- Remove a spurious memset() call introduced in v4.
- Allow command buffer tag to be initially set to zero (caused spurious warnings).
v4:
- Cleaned up the bit too spread code changes based on the v3 review.
- For testing instructions see the previous cover letter, and use linux-v6.6.y branch:
https://lore.kernel.org/linux-integrity/[email protected]/
v3:
- Resend with rebase to the latest upstream.
James Bottomley (1):
tpm: Move buffer handling from static inlines to real functions
Jarkko Sakkinen (7):
tpm: Remove unused tpm_buf_tag()
tpm: Remove tpm_send()
tpm: Update struct tpm_buf documentation comments
tpm: Store the length of the tpm_buf data separately.
tpm: TPM2B formatted buffers
tpm: Add tpm_buf_read_{u8,u16,u32}
KEYS: trusted: tpm2: Use struct tpm_buf for sized buffers
drivers/char/tpm/Makefile | 1 + drivers/char/tpm/tpm-buf.c | 222 ++++++++++++++++++++++ drivers/char/tpm/tpm-interface.c | 26 +-- include/keys/trusted_tpm.h | 2 - include/linux/tpm.h | 112 +++-------- security/keys/trusted-keys/trusted_tpm1.c | 23 ++- security/keys/trusted-keys/trusted_tpm2.c | 54 +++--- 7 files changed, 295 insertions(+), 145 deletions(-) create mode 100644 drivers/char/tpm/tpm-buf.c
Signature · 1 line
2.43.0