cmd: optee_rpmb: make it usable by scripts
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 0 repliesNew
- v24 patches 8 repliesSuperseded
- v13 patches 4 repliesSuperseded
Changes in v3 from the cover letter
- Add patch updating the sandbox tee implementation (3/5) to match the semantics of the real optee-os.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | cmd: optee_rpmb: sanitize TEE_ERROR -> E* translationscmd/ | +3 | 0 replies | |
| 2/5 | optee_ta_avb.h: add TA_AVB_CMD_READ_PERSIST_VALUE2 defineinclude/ | +12 | 0 replies | |
| 3/5 | tee: sandbox: support new TA_AVB_CMD_READ_PERSIST_VALUE2drivers/ | +18 | 0 replies | |
| 4/5 | cmd: optee_rpmb: allocate large enough buffer when reading persistent valuecmd/ | +27 | 0 replies | |
| 5/5 | cmd: optee_rpmb: make it usable by scriptscmd/ | +23 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/5] cmd: optee_rpmb: make it usable by scripts
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 now merged, and its time to update the U-Boot side accordingly.
v3:
- Add patch updating the sandbox tee implementation (3/5) to match the semantics of the real optee-os.
v2: https://lore.kernel.org/u-boot/[email protected]/
- 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/[email protected]/
Rasmus Villemoes (5):
cmd: optee_rpmb: sanitize TEE_ERROR -> E* translations optee_ta_avb.h: add TA_AVB_CMD_READ_PERSIST_VALUE2 define
tee: sandbox: support new TA_AVB_CMD_READ_PERSIST_VALUE2
cmd: optee_rpmb: allocate large enough buffer when reading persistent
value
cmd: optee_rpmb: make it usable by scripts
cmd/optee_rpmb.c | 70 ++++++++++++++++++++++++++------------ drivers/tee/sandbox.c | 20 +++++++++-- include/tee/optee_ta_avb.h | 12 +++++++ 3 files changed, 79 insertions(+), 23 deletions(-)
Signature · 1 line
2.55.0