All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] avb: start handling too small buffer for reading persistent values
@ 2026-08-28 10:50 Rasmus Villemoes
  2026-08-28 10:50 ` [PATCH 1/3] cmd: optee_rpmb: sanitize TEE_ERROR -> E* translations Rasmus Villemoes
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rasmus Villemoes @ 2026-08-28 10:50 UTC (permalink / raw)
  To: u-boot
  Cc: Igor Opaniuk, Mattijs Korpershoek, Tom Rini, Ilias Apalodimas,
	Jens Wiklander, Rasmus Villemoes

The avb_ops.h header clearly indicates that it should be possible for
the callers of the read_persistent_value interface to know that they
provided too small a buffer, and the interface should also tell the
callers how big a buffer would need to be.

However, that was never really implemented, neither here nor on the
op-tee side. So if a too small buffer is passed, the caller simply
gets a silently truncated result.

I've proposed a fix on the op-tee side:
https://github.com/OP-TEE/optee_os/pull/7959 . Since that is an ABI
change (returning an error where it previously "succeeded", for some
definition of succeed), the maintainer would like to see client side
updates as well before that can be merged. So here are some of the
changes that would be needed in U-Boot.

I have not yet looked at any of the callers of the
->read_persistent_value method via the avb_ops structure, only the
implementation of that method itself.

Rasmus Villemoes (3):
  cmd: optee_rpmb: sanitize TEE_ERROR -> E* translations
  cmd: optee_rpmb: try to allocate large enough buffer when reading
    persistent value
  avb_verify: read_persistent_value: honour contract regarding too small
    buffer

 cmd/optee_rpmb.c    | 45 ++++++++++++++++++++++++++++++---------------
 common/avb_verify.c |  5 ++++-
 2 files changed, 34 insertions(+), 16 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-02 13:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28 10:50 [PATCH 0/3] avb: start handling too small buffer for reading persistent values Rasmus Villemoes
2026-08-28 10:50 ` [PATCH 1/3] cmd: optee_rpmb: sanitize TEE_ERROR -> E* translations Rasmus Villemoes
2026-09-02 12:45   ` Mattijs Korpershoek
2026-09-02 12:51     ` Rasmus Villemoes
2026-08-28 10:50 ` [PATCH 2/3] cmd: optee_rpmb: try to allocate large enough buffer when reading persistent value Rasmus Villemoes
2026-09-02 12:55   ` Mattijs Korpershoek
2026-08-28 10:50 ` [PATCH 3/3] avb_verify: read_persistent_value: honour contract regarding too small buffer Rasmus Villemoes
2026-09-02 13:03   ` Mattijs Korpershoek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.