[U-Boot] [PATCH] cmd: avb: Fix requested partitions list

Eugeniu Rosca erosca at de.adit-jv.com
Mon Aug 12 13:57:38 UTC 2019


Hi all,

On Mon, Aug 12, 2019 at 02:13:55PM +0300, Igor Opaniuk wrote:
[..]
> Current snapshot of libavb in U-boot is a bit out-dated (~2 years) and
> before introducing patches that can leverage new features from the mainline
> libavb(taking into account that you're referring to Jul 30, 2019 patch
> 36d41d9223 ("Add AVB_SLOT_VERIFY_FLAGS_NO_VBMETA_PARTITION flag"))
> it makes sense to update libavb in U-boot first:
> 
> The best approach I see here (just to summarize what we've already discussed):
> 1. Update libavb to the latest stable version

FWIW, this sounds good. jFYI, U-Boot seems to contain the
android-o-mr1-iot-preview-8 version of libavb (heuristics applied since
commit [1] didn't include any information about the version).

FWIW, in case of an alignment to AOSP, the list of libavb commits to
be backported is shown in [2]. The diff stats is visible in [3].

FWIW w.r.t. integration strategy, we better use
'git cherry-pick --strategy=subtree -Xsubtree=lib/' instead of manual
copying the libavb contents from
https://android.googlesource.com/platform/external/avb/, since the
latter would overwrite local U-Boot fixes like commit [4].

[1] https://gitlab.denx.de/u-boot/u-boot/commit/d8f9d2af96b38f
    ("avb2.0: add Android Verified Boot 2.0 library")

[2] avb (master) git log --oneline --no-merges --no-decorate \
    android-o-mr1-iot-preview-8..5fbb42a189aa -- libavb
36d41d922380 Add AVB_SLOT_VERIFY_FLAGS_NO_VBMETA_PARTITION flag.
3deffc556cfa Fix the identification of vbmeta partition
2ea684dbd612 Adds avb_strncmp helper
31f5f91352e6 Libavb: Check rollback index location against 0.
0a4e345d73f9 Fix a bug that may cause inifinite loop.
d91e04e2c163 Fix a bug that would cause OoB read.
18b535905bab Fix a stack-use-after-scope bug.
5786fa2f2cfa Fix a memory leak bug.
a6c9ad41f779 Fix a bug that would cause OoB memory read.
9ba3b6613b4e Fix AvbSlotVerifyData->cmdline might be NULL
5abd6bc25789 Allow system partition to be absent
8127dae6e4f5 Only automatically initialize new persistent digest values when locked
4f137c38f838 libavb: Use size_t instead of uint32_t for lengths in avb_sha*() functions.
818cf5674077 libavb: Only query partition GUIDs when the cmdline needs them.
49936b4c0109 libavb: Support vbmeta blobs in beginning of partition.
6f4de3181429 libavb: Add ERROR_MODE_MANAGED_RESTART_AND_EIO for managing dm-verity state.
2367b46287bd Implement initialization of new persistent digest values

[3] avb (master) git diff --shortstat \
    android-o-mr1-iot-preview-8..5fbb42a189aa -- libavb
 12 files changed, 704 insertions(+), 208 deletions(-)

[4] https://gitlab.denx.de/u-boot/u-boot/commit/ecc6f6bea6a2
    ("libavb: Handle wrong hashtree_error_mode in avb_append_options()")

-- 
Best Regards,
Eugeniu.


More information about the U-Boot mailing list