From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6FA8AC05027 for ; Wed, 1 Feb 2023 08:33:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 206C985C16; Wed, 1 Feb 2023 09:33:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="3MX9L7hn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E7B685C1A; Wed, 1 Feb 2023 09:33:41 +0100 (CET) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 76FDD85C24 for ; Wed, 1 Feb 2023 09:33:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mkorpershoek@baylibre.com Received: by mail-wm1-x32d.google.com with SMTP id hn2-20020a05600ca38200b003dc5cb96d46so745965wmb.4 for ; Wed, 01 Feb 2023 00:33:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=272xLS7xLjgUdublYCo11XugN6YL1knCgWzQ+lHibGI=; b=3MX9L7hnnWnQipFIdKWdcglUtnMvbxdpsl+mQYVAtYBGlPvYt4SBTM6Y1UY4pDxYqa nxpWCCW7NvIrISKGOH5gytXq6RdS6LPE8M/z0WHcjZ2QvPuOTGgHy8FuDU1BSsb9LDIU xmitld9m2trjilTMMfGmnwzY1/xb2P1Thvf+s+f6B2Ot5Vo9lsbVk/gm523iyhfRlWcQ dLm7noC56mmrcius6nVJObi9WYwjf2Qrem4+67qpjAAak+0mr6zKm1Q1kDQQ+8ghB6qN +yZ7GoDbDfhWSbD4Xwv8GUIcnkZ0+LrFENkuhOE2MLAo6VZcA/pPeFUrhUYytid1d1wr VjqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=272xLS7xLjgUdublYCo11XugN6YL1knCgWzQ+lHibGI=; b=7RpkeOqy3fQdfI+gTP5InFdbUcMQgWXs7mutXLK9o4m9E9YryIga40QbdqPzagzTxt VZHYZ0PHlVldqbI/u24V2PSSULSqoj0PJ0TQczssrYaiFEcAMv+1y1dNKIyHYh6V8IFA 87GpPUgSlcu2QTSWGK0vTNxMiiFHv8/HCL4w2C8iDjb79JuMFyNb+fITMnMf2RrtxTMh z8M59qEgpRQ8IneRtubkXF1V+Yb1zXWqmNRSYOgrfdcg3Od6/UheHYOxqSKyqaSa1kLA dBXEsu0EaOmRZDGe7WJ72KBDHDE6odCXVWj0bXpOZ4lhYUFvFiDmoeSAgqRzUq8hclpt f+jw== X-Gm-Message-State: AO0yUKXGqP/57ILC31747zX36JdT7fi/vQxERuRjBKU7IEYKH4LYqMWd btVOzTiBUhSEtecMDznIipc0pw== X-Google-Smtp-Source: AK7set/8iR/bbFp1knJ1ZKt3YsHcK5GD2Jl4LCjuaOwVKtH8xmVp6LhgHnnZSsKNnO91aB2jGSIT4w== X-Received: by 2002:a05:600c:1e89:b0:3dc:5b48:ee5 with SMTP id be9-20020a05600c1e8900b003dc5b480ee5mr890028wmb.2.1675240401243; Wed, 01 Feb 2023 00:33:21 -0800 (PST) Received: from localhost ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id v2-20020a05600c15c200b003dc54eef495sm971919wmf.24.2023.02.01.00.33.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 00:33:20 -0800 (PST) From: Mattijs Korpershoek To: Simon Glass , Safae Ouajih Cc: u-boot@lists.denx.de, sean.anderson@seco.com, r.stratiienko@gmail.com, glaroque@baylibre.com, khilman@baylibre.com Subject: Re: [PATCH v2 03/17] android: boot: replace android_image_check_header In-Reply-To: References: <20230126160506.1026643-1-souajih@baylibre.com> <20230126160506.1026643-4-souajih@baylibre.com> Date: Wed, 01 Feb 2023 09:33:19 +0100 Message-ID: <87357pkcog.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Thu, Jan 26, 2023 at 17:54, Simon Glass wrote: > On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: >> >> With the new vendor boot image introduced in versions 3 and 4 >> of boot image header, the header check must be done for both boot >> image and vendor boot image. Thus, android_image_check_header() is >> being replaced by is_android_boot_image_header() to only refer to >> boot image header check. >> >> Signed-off-by: Safae Ouajih >> --- >> boot/image-android.c | 8 ++++---- >> boot/image-board.c | 2 +- >> cmd/abootimg.c | 4 ++-- >> drivers/fastboot/fb_mmc.c | 3 +-- >> include/image.h | 2 +- >> 5 files changed, 9 insertions(+), 10 deletions(-) >> > > [..] > >> diff --git a/include/image.h b/include/image.h >> index bcb24d92de..c1594ee169 100644 >> --- a/include/image.h >> +++ b/include/image.h >> @@ -1735,7 +1735,6 @@ int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo); >> struct cipher_algo *image_get_cipher_algo(const char *full_name); >> >> struct andr_boot_img_hdr_v0; >> -int android_image_check_header(const struct andr_boot_img_hdr_v0 *hdr); >> int android_image_get_kernel(const struct andr_boot_img_hdr_v0 *hdr, int verify, >> ulong *os_data, ulong *os_len); >> int android_image_get_ramdisk(const struct andr_boot_img_hdr_v0 *hdr, >> @@ -1750,6 +1749,7 @@ ulong android_image_get_kload(const struct andr_boot_img_hdr_v0 *hdr); >> ulong android_image_get_kcomp(const struct andr_boot_img_hdr_v0 *hdr); >> void android_print_contents(const struct andr_boot_img_hdr_v0 *hdr); >> bool android_image_print_dtb_contents(ulong hdr_addr); >> +bool is_android_boot_image_header(const struct andr_boot_img_hdr_v0 *hdr); > > Please add a full comment > >> >> /** >> * board_fit_config_name_match() - Check for a matching board name >> -- >> 2.34.1 >> > > With that: > > Reviewed-by: Simon Glass > > Regards, > SImon Reviewed-by: Mattijs Korpershoek