On Mon, 12 Oct 2026 22:25:05 +0200, Igor Opaniuk 
<[email protected]> wrote:

Hi Igor,

>
> diff --git a/boot/bootmeth_android.c b/boot/bootmeth_android.c
> index 0db08d4f861c..862d0d67a2fe 100644
> --- a/boot/bootmeth_android.c
> +++ b/boot/bootmeth_android.c
> @@ -450,6 +460,35 @@ static int run_avb_verification(struct bootflow *bflow)
>       if (priv->slot)
>               sprintf(slot_suffix, "_%s", priv->slot);
>  
> +     /*
> +      * Hand libavb the buffers boot and vendor_boot were loaded into, so the
> +      * bytes it hashes are the bytes that get booted and the partitions are
> +      * read only once.
> +      */
> +     if (priv->boot_addr) {

Not sure it's  needed boot_addr come from boot_android_normal , in fact a check 
of
loadaddr in boot_android_normal could be better than here or we consider
user should wt properly loadaddr in uboot env

> +             snprintf(partname, sizeof(partname), "boot%s", slot_suffix);
> +             ret = avb_ops_add_preloaded(avb_ops, partname,
> +                                         map_sysmem(priv->boot_addr, 0),
> +                                         priv->boot_img_size,
> +                                         priv->boot_part_size);
> +             if (ret) {
> +                     ret = log_msg_ret("avb preload boot", ret);
> +                     goto out;
> +             }
> +     }
> +     if (priv->vendor_boot_addr) {

missing check of android image version, if android image v2 this value
was not set and come from malloc struct android_priv , we can have any other 
value than 0.

-- 
Guillaume La Roque <[email protected]>

Reply via email to