tpm: Fix missing log size when using bloblist
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user