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 76D0BEB64D9 for ; Mon, 10 Jul 2023 06:26:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5341B865DE; Mon, 10 Jul 2023 08:26:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org 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=linaro.org header.i=@linaro.org header.b="zkBHrIIU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 62BC6865C1; Mon, 10 Jul 2023 08:26:47 +0200 (CEST) Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 90C9C8556F for ; Mon, 10 Jul 2023 08:26:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6748a616e17so1100449b3a.1 for ; Sun, 09 Jul 2023 23:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688970403; x=1691562403; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=ruzLF/Z6qbPITsO9FenNZ1XeAvShHoZFnwsb3JvGdEo=; b=zkBHrIIUcxRNDtzWLs2643mNa7HVjNWbDVzEAKjCiB03HDWXYy1MhFyBPwiUd5gjQJ fpF7eldfJ/kDKBbi9rU8/onpyqbbr8ePBRAmV14g17b7At+S+74s7M/9ovpue/KUlO34 eHiq+Tm/XWnUVPrfFZdohYjRy/xkDMaSaxWiji6wweepQiy7xV7l1gx577Ojiakp4Q9d oOLaHcOMnhWD/iZkQIClTgv/l0XazDwFLH0BBkUy+dCI0rkGNmJvggC3c/IHKhYiAJCZ IA53b7CJPSaIbKY9xM9OVIrVi3eXSQ3rgIVJtSv5KvGj7A+HP7/Aq4rKxNIi1dtJ6D1c Sfvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688970403; x=1691562403; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ruzLF/Z6qbPITsO9FenNZ1XeAvShHoZFnwsb3JvGdEo=; b=iuxN3KH7MbHknbL5SSf4PKoLknixiM3ImzeoZKDojEk00DC34pkAxv46ltA53ucFL0 YHJ38w0XWHtL96BqDybdYA57K6SaU66mdyWoh7QWQEqrdZQV6D8i0KfaBbzHpHBAyS6o laEQG+lZ9Hstr0GwpXO4Rl0KaCgJx3bboIevxDelNH9ZHDODLi867fDTvgkjUnm2YOdg y9/GAudUAIJyS2iruQ26drXOcS6ryulcse8uowRNIDLtWM0bfRk2dvTOxG5/pWGHWVde ADyPYDf3v35B0fCoxH5FRlZvcJZWsuHZW309K9VGUG2qDF3VZ3Wq/dcQ0uVmeikRfUOM /IZA== X-Gm-Message-State: ABy/qLbiO3QMNzsIr0YYnk5j/T1lFovkRPCdT0PJgOq8idx7zNviZOOG FZSHtJv9Kv4FfmgjJU4q+uOMlQ== X-Google-Smtp-Source: APBJJlEi1iWntpDpuGIV5N2Kg1Blcr3kaCNDE9XALczQz1W71JcEi1O585xijL4bcA6pDkaIOh94Rg== X-Received: by 2002:a05:6a20:7da6:b0:11f:985e:ae2c with SMTP id v38-20020a056a207da600b0011f985eae2cmr14379927pzj.3.1688970402633; Sun, 09 Jul 2023 23:26:42 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:dcbb:ee54:813e:ed94]) by smtp.gmail.com with ESMTPSA id 24-20020aa79158000000b00668738796b6sm6386077pfi.52.2023.07.09.23.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jul 2023 23:26:42 -0700 (PDT) Date: Mon, 10 Jul 2023 15:26:37 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: Stefan Herbrechtsmeier , Malte Schmidt , Malte Schmidt , Stefan Herbrechtsmeier , Etienne Carriere , Ilias Apalodimas , Masahisa Kojima , Sughosh Ganu , u-boot@lists.denx.de Subject: Re: [PATCH v1] mkeficapsule: fix efi_firmware_management_capsule_header data type Message-ID: Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , Stefan Herbrechtsmeier , Malte Schmidt , Malte Schmidt , Stefan Herbrechtsmeier , Etienne Carriere , Ilias Apalodimas , Masahisa Kojima , Sughosh Ganu , u-boot@lists.denx.de References: <20230616082805.4652-1-stefan.herbrechtsmeier-oss@weidmueller.com> <3258c944-f537-6969-6ef3-d13d73767772@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3258c944-f537-6969-6ef3-d13d73767772@gmx.de> 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.8 at phobos.denx.de X-Virus-Status: Clean On Sun, Jul 09, 2023 at 10:31:55AM +0200, Heinrich Schuchardt wrote: > On 6/16/23 10:28, Stefan Herbrechtsmeier wrote: > > From: Malte Schmidt > > > > The data type of item_offset_list shall be UINT64 according to the UEFI [1] > > specifications. > > > > In include/efi_api.h the correct data type is used. The bug was probably > > never noticed because of little endianness. > > > > [1] https://uefi.org/specs/UEFI/2.10/index.html > > > > Signed-off-by: Malte Schmidt > > > > Signed-off-by: Stefan Herbrechtsmeier > > --- > > > > tools/eficapsule.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/eficapsule.h b/tools/eficapsule.h > > index 753fb73313..2099a2e9b8 100644 > > --- a/tools/eficapsule.h > > +++ b/tools/eficapsule.h > > @@ -63,7 +63,7 @@ struct efi_firmware_management_capsule_header { > > uint32_t version; > > uint16_t embedded_driver_count; > > uint16_t payload_item_count; > > - uint32_t item_offset_list[]; > > + uint64_t item_offset_list[]; > > Defining the same structure in two places it bad practice. > https://source.denx.de/u-boot/custodians/u-boot-efi/-/issues/11 I had a good reason for adding a tool-specific header, instead of using headers under 'include' dir, when I posted v7 of "efi_loader: capsule: improve capsule authentication support" patch. The cover letter says, === v7 (Nov 16, 2021) ... * define eficapsule.h and include it from mkeficapsule (patch#3) Hopefully, the tool can now compile on non-linux host. === If I correctly remember, this reflects the comment below and the succeeding discussions: https://lists.denx.de/pipermail/u-boot/2021-November/465859.html -Takahiro Akashi > Reviewed-by: Heinrich Schuchardt > > > } __packed; > > > > /* image_capsule_support */ >