Hi Rasmus,

Thank you for the patch.

On Fri, Aug 28, 2026 at 12:50, Rasmus Villemoes <[email protected]> wrote:

> The avb_ops.h header file, which has been imported from the upstream
> libavb, says:
>
>    /* Reads a persistent value corresponding to the given |name|. The value is
>     * returned in |out_buffer| which must point to |buffer_size| bytes. On
>     * success |out_num_bytes_read| contains the number of bytes read into
>     * |out_buffer|. If AVB_IO_RESULT_ERROR_INSUFFICIENT_SPACE is returned,
>     * |out_num_bytes_read| contains the number of bytes that would have been 
> read
>     * which can be used to allocate a buffer.
>
> The invoke_func() wrapper does translate a TEE_ERROR_STORAGE_NO_SPACE
> return to AVB_IO_RESULT_ERROR_INSUFFICIENT_SPACE. However, this
> implementation of the read_persistent_value method currently never
> updates *out_num_bytes_read in case of an error.
>
> Also note that currently, at least the upstream optee-os
> implementation of TA_AVB_CMD_READ_PERSIST_VALUE never returns
> TEE_ERROR_STORAGE_NO_SPACE, but instead silently returns a truncated
> value, with no way for the caller to know that happened. A fix has
> been proposed (https://github.com/OP-TEE/optee_os/pull/7959).
>
> Signed-off-by: Rasmus Villemoes <[email protected]>

Reviewed-by: Mattijs Korpershoek <[email protected]>

Ilias, this series touches both AVB and TEE. Can you pick up all 3
patches or do you want me to do so?

If you wish that I pick them up, please ack them first.

Thanks
Mattijs

Reply via email to