All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ilias Apalodimas" <ilias.apalodimas@linaro.org>
To: "Rasmus Villemoes" <ravi@prevas.dk>, <u-boot@lists.u-boot-project.org>
Cc: "Igor Opaniuk" <igor.opaniuk@gmail.com>,
	"Mattijs Korpershoek" <mkorpershoek@kernel.org>,
	"Tom Rini" <trini@konsulko.com>
Subject: Re: [PATCH v2 0/4] cmd: optee_rpmb: make it usable by scripts
Date: Fri, 18 Sep 2026 10:20:35 +0300	[thread overview]
Message-ID: <DLI9DWD1JHZX.3OY4T6LX0EY99@linaro.org> (raw)
In-Reply-To: <20260903212215.2331118-1-ravi@prevas.dk>

Hi Rasmus,

I just noticed the optee patches have been applied.

For the series

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

On Fri Sep 4, 2026 at 12:22 AM EEST, Rasmus Villemoeses wrote:
> This all started by wanting to be able to fetch a "persistent value"
> from RPMB and use that in boot logic. I noticed that the "optee_rpmb
> read_pvalue" subcommand had two flaws in that regard: No way to
> actually store the result in e.g. an environment variable, and having
> to know and provide a "large enough" size of the value.
>
> For the former, it's just a matter of letting the caller provide the
> name of an environment variable to store the result to in lieu of
> printing it.
>
> For the latter, the tee side should have provided a way to know if a
> too small buffer was passed, but that was never actually implemented,
> and instead a silently truncated value would be returned. That has
> been fixed by adding a new variant of the
> TA_AVB_CMD_READ_PERSIST_VALUE method which does yield an error along
> with the proper size to allocate:
> https://github.com/OP-TEE/optee_os/pull/7959 . That is not yet merged,
> but I assume it will be soonish; these patches should not be applied
> until it is.
>
> v2:
>
> - Drop the part touching common/avb_verify.c, now that the old
>   TA_AVB_CMD_READ_PERSIST_VALUE method is not changed. That doesn't
>   mean it shouldn't be updated at some point (the header file promises
>   behaviour which is not actually implemented), but it is out of scope
>   for what I intend to do currently.
>
> - Do make use of the new method in optee_rpmb read_pvalue, and
>   implement the "store result to env var".
>
> v1: https://lore.kernel.org/u-boot/20260828105005.200338-1-ravi@prevas.dk/
>
> Rasmus Villemoes (4):
>   cmd: optee_rpmb: sanitize TEE_ERROR -> E* translations
>   optee_ta_avb.h: add TA_AVB_CMD_READ_PERSIST_VALUE2 define
>   cmd: optee_rpmb: allocate large enough buffer when reading persistent
>     value
>   cmd: optee_rpmb: make it usable by scripts
>
>  cmd/optee_rpmb.c           | 70 ++++++++++++++++++++++++++------------
>  include/tee/optee_ta_avb.h | 12 +++++++
>  2 files changed, 61 insertions(+), 21 deletions(-)


      parent reply	other threads:[~2026-09-18  7:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 21:22 [PATCH v2 0/4] cmd: optee_rpmb: make it usable by scripts Rasmus Villemoes
2026-09-03 21:22 ` [PATCH v2 1/4] cmd: optee_rpmb: sanitize TEE_ERROR -> E* translations Rasmus Villemoes
2026-09-07 12:05   ` Mattijs Korpershoek
2026-09-03 21:22 ` [PATCH v2 2/4] optee_ta_avb.h: add TA_AVB_CMD_READ_PERSIST_VALUE2 define Rasmus Villemoes
2026-09-07 12:07   ` Mattijs Korpershoek
2026-09-07 13:20     ` Rasmus Villemoes
2026-09-16  8:24       ` Rasmus Villemoes
2026-09-18  8:46         ` Ilias Apalodimas
2026-09-18 11:51           ` Rasmus Villemoes
2026-09-03 21:22 ` [PATCH v2 3/4] cmd: optee_rpmb: allocate large enough buffer when reading persistent value Rasmus Villemoes
2026-09-07 12:09   ` Mattijs Korpershoek
2026-09-03 21:22 ` [PATCH v2 4/4] cmd: optee_rpmb: make it usable by scripts Rasmus Villemoes
2026-09-18  7:20 ` Ilias Apalodimas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DLI9DWD1JHZX.3OY4T6LX0EY99@linaro.org \
    --to=ilias.apalodimas@linaro.org \
    --cc=igor.opaniuk@gmail.com \
    --cc=mkorpershoek@kernel.org \
    --cc=ravi@prevas.dk \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.