U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] libavb: update to AOSP 1.3.0
@ 2026-07-27 10:08 Igor Opaniuk
  2026-07-27 10:08 ` [PATCH v2 1/2] " Igor Opaniuk
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Igor Opaniuk @ 2026-07-27 10:08 UTC (permalink / raw)
  To: u-boot; +Cc: Mattijs Korpershoek, Tom Rini, Igor Opaniuk

The vendored libavb under lib/libavb/ has been frozen at a ~2019 AOSP
snapshot (AVB version 1.1.0) for about six years. A v1.1.0 library
rejects any vbmeta whose required libavb minor version is greater than 1
with UNSUPPORTED_VERSION, so an image signed by a newer avbtool that uses
a 1.2/1.3 feature fails to verify. This series re-syncs the library to
version 1.3.0 and picks up the accumulated upstream fixes.

The vendored files are taken verbatim from AOSP external/avb commit
a1fe228b8654 ("libavb: support chain partition no ab"), the commit that
introduced version 1.3.0 [1].

Functionality the library now parses:
  - AvbVBMetaImageHeader.rollback_index_location (v1.2)
  - AvbChainPartitionDescriptor flags / DO_NOT_USE_AB (v1.3)
  - AvbHashtreeDescriptor FLAGS_CHECK_AT_MOST_ONCE
  - AVB_HASHTREE_ERROR_MODE_PANIC

Scope / integration impact:
  - The AvbOps callback set is unchanged between 1.1.0 and 1.3.0, so the
    U-Boot integration in common/avb_verify.c needs no changes.
  - The U-Boot port is preserved rather than pulling upstream's
    BoringSSL-oriented crypto restructure (sha/, boringssl/):
    avb_sysdeps.h / avb_sysdeps_posix.c and the flat avb_sha.h /
    avb_sha256.c / avb_sha512.c are kept as-is. The SHA API signatures
    are unchanged, so the retained implementation stays compatible.
  - Per-file licenses are preserved (avb_rsa.c stays MIT OR
    BSD-3-Clause). The Apache-2.0-licensed avb_crc32.c is not imported,
    as it is unused by U-Boot.

Note: patch 1 is a verbatim upstream import and therefore triggers a
number of checkpatch style warnings. The files are intentionally left in
upstream (AOSP) coding style to keep them diffable against external/avb;
they are deliberately not reformatted to U-Boot style.

[1] https://android.googlesource.com/platform/external/avb/+/a1fe228b86543a21739c51352f5ce72f134fccfa

Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
---
Changes in v2:
- libavb: fix the sandbox clang build by giving
  avb_new_cmdline_subst_list() a (void) parameter list
  (-Werror,-Wstrict-prototypes). Reported by Mattijs Korpershoek.
  The import now keeps U-Boot's existing local fix from commit fbfcb614e05
  ("libavb: Fix a warning with clang-15"): avb_new_cmdline_subst_list() is
  kept with a (void) parameter list instead of reverting to upstream's
  empty () form, which clang rejects under -Werror,-Wstrict-prototypes.
- Rebase on current main.

To: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.u-boot-project.org
Cc: Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: Tom Rini <trini@konsulko.com>

---
Igor Opaniuk (2):
      libavb: update to AOSP 1.3.0
      doc: android: refresh AVB provenance and pin libavb reference

 doc/android/avb2.rst                        |   7 +-
 lib/libavb/avb_chain_partition_descriptor.c |   1 +
 lib/libavb/avb_chain_partition_descriptor.h |  16 +-
 lib/libavb/avb_cmdline.c                    |  42 +---
 lib/libavb/avb_descriptor.c                 |  62 ++++--
 lib/libavb/avb_hashtree_descriptor.h        |   3 +
 lib/libavb/avb_property_descriptor.h        |   8 +-
 lib/libavb/avb_rsa.c                        |   6 +-
 lib/libavb/avb_slot_verify.c                | 313 +++++++++++++++-------------
 lib/libavb/avb_slot_verify.h                |   6 +-
 lib/libavb/avb_util.c                       |  46 +++-
 lib/libavb/avb_util.h                       | 140 +++++++------
 lib/libavb/avb_vbmeta_image.c               |   1 +
 lib/libavb/avb_vbmeta_image.h               |   8 +-
 lib/libavb/avb_version.h                    |   2 +-
 15 files changed, 383 insertions(+), 278 deletions(-)
---
base-commit: b635d43bca429500cb8ef20aa151cb5773b9a8a5
change-id: 20260712-avb-libavb-1-3-f273645366da

Best regards,
--  
Igor Opaniuk <igor.opaniuk@gmail.com>


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

end of thread, other threads:[~2026-07-27 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 10:08 [PATCH v2 0/2] libavb: update to AOSP 1.3.0 Igor Opaniuk
2026-07-27 10:08 ` [PATCH v2 1/2] " Igor Opaniuk
2026-07-27 10:08 ` [PATCH v2 2/2] doc: android: refresh AVB provenance and pin libavb reference Igor Opaniuk
2026-07-27 12:29 ` [PATCH v2 0/2] libavb: update to AOSP 1.3.0 Mattijs Korpershoek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox