From: Simon Glass <simon.glass@canonical.com> tcg2_platform_get_log() fails to set *sizep when returning a TPM event log from bloblist. This causes tcg2_log_prepare_buffer() to receive a log size of 0, which then causes all tcg2_log_append_check() calls to fail with "log too large" errors since any event size exceeds the zero-sized buffer. This manifests when running measurement tests after other tests that use the TPM event log bloblist (e.g. bootctl tests), as the bloblist entry exists but its size is not properly returned. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> --- lib/tpm_tcg2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tpm_tcg2.c b/lib/tpm_tcg2.c index bcd3423d923..98fa3acef6e 100644 --- a/lib/tpm_tcg2.c +++ b/lib/tpm_tcg2.c @@ -688,6 +688,7 @@ __weak int tcg2_platform_get_log(struct udevice *dev, void **ptrp, u32 *sizep) ulong addr = map_to_sysmem(ptr); *ptrp = map_physmem(addr, size, MAP_NOCACHE); + *sizep = size; return 0; } -- 2.43.0