Improve U-Boot's TPM handling in the non-EFI case
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest6 patches 6 repliesIn review
- v33 patches 1 replySuperseded
- v23 patches 21 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 4 replies | Superseded |
Changes in v4 from the cover letter
- reword commit message
- include Ilias' patches for unifying event logs in the series
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | test: include mapmem.h explicitlytest/ | +1 | 0 replies | |
| 2/6 | tpm: print all PCRs from pcr_readcmd/ test/ | +53 | 2 replies | |
| 3/6 | tpm: allocate tpm event log if missingboot/ boot/ include/ +3 more | +188 | 1 reply | |
| 4/6 | tpm: unify the tcg2 eventlog structuresinclude/ lib/ | +34 | 1 reply | |
| 5/6 | tpm: unify the eventlog initializationinclude/ lib/ lib/ | +21 | 0 replies | |
| 6/6 | Fix tcg2_measurement_init calllib/ | +2 | 2 replies |
Reviews trailers per patch
2 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass | Ilias Apalodimas |
|---|---|---|
| 1/6 | R-b | |
| 2/6 | A-b | |
| 3/6 | ||
| 4/6 | ||
| 5/6 | ||
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/6] Improve U-Boot's TPM handling in the non-EFI case
With EFI U-Boot always allocates a buffer for the TPM event log. If a previous bootloader stage started an event log, U-Boot would copy the entries to that allocated buffer.
Without EFI U-Boot wants to reuse the event log memory from a previous bootloader stage instead. If U-Boot is first component to start the event log, e.g. when used in qemu there would be no memory allocated for the event log.
So allocate memory in tcg2_log_prepare_buffer() if no event log was found and no buffer was allocated already.
Also copy the address of the event log into the device tree for the kernel so the event log is accessible from Linux userspace too.
Changes in v4:
- reword commit message
- include Ilias' patches for unifying event logs in the series
Changes in v3:
- fix test failure
- sync description with cover letter
Changes in v2:
- fix return value handling
- imply DEVRES in config TPM
- use fdt_getprop for reading property
- don't wrap #include in #if
- fix memory leak in error case of tcg2_log_prepare_buffer
- handle NULL elog parameter in tcg2_measurement_term
- use CONFIG_TPM2_EVENT_LOG_SIZE
- pass log_size instead of position in dt
Ilias Apalodimas (2):
tpm: unify the tcg2 eventlog structures
tpm: unify the eventlog initialization
Ludwig Nussel (4):
test: include mapmem.h explicitly
tpm: print all PCRs from pcr_read
tpm: allocate tpm event log if missing
Fix tcg2_measurement_init call
boot/bootm.c | 18 ++--- boot/image-fdt.c | 69 +++++++++++++++++ cmd/tpm-v2.c | 69 ++++++++++++----- include/tpm-common.h | 2 + include/tpm_tcg2.h | 44 +++++------ lib/Kconfig | 1 + lib/efi_loader/efi_tcg2.c | 97 +++++------------------- lib/tpm_tcg2.c | 151 ++++++++++++++++++++++++++++++------- test/boot/measurement.c | 1 + test/py/tests/test_tpm2.py | 9 +-- 10 files changed, 296 insertions(+), 165 deletions(-)
Signature · 4 lines
2.43.0 base-commit: 3cdce049f90d77c3f9221f1eb73922384c8972c3 branch: us-tpm4