Hi Rasmus, Thank you for the patch.
On Fri, Aug 28, 2026 at 12:50, Rasmus Villemoes <[email protected]> wrote: > It is implied by the comments in avb_ops.h and the translation of > TEE_ERROR_STORAGE_NO_SPACE to AVB_IO_RESULT_ERROR_INSUFFICIENT_SPACE > done in common/avb_verify.c:invoke_func() that the > TA_AVB_CMD_READ_PERSIST_VALUE could return TEE_ERROR_STORAGE_NO_SPACE > when the value is longer than the passed buffer size, and that > param[1].u.memref.size would be set to the actual size, so that one > can allocate an appropriate buffer and re-read. > > However, that has AFAICT never been the case; there is no mention of > TEE_ERROR_STORAGE_NO_SPACE in the history of ta/avb/ in > https://github.com/OP-TEE/optee_os.git, and what the code does instead > is to return a value truncated to the given buffer size. In other > words, not only can one not determine the correct buffer size to > allocate, one is not even told that truncation happened. > > A fix is proposed on the op-tee > side (https://github.com/OP-TEE/optee_os/pull/7959), but the > maintainer would like to see at least some callers updated before it > can get merged, which makes sense. > > Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
