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 72240EB64DA for ; Mon, 19 Jun 2023 09:53:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 51A528628C; Mon, 19 Jun 2023 11:53:57 +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="RkZsT1yZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CA71E8628C; Mon, 19 Jun 2023 11:53:54 +0200 (CEST) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (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 486BC85FD2 for ; Mon, 19 Jun 2023 11:53:51 +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-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-25edb2433b8so392077a91.1 for ; Mon, 19 Jun 2023 02:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687168429; x=1689760429; 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=xCsjtpkqXUZnLGRoObK6C2USmpkPTN8HyJBucP+QYdg=; b=RkZsT1yZ4VJqWlJT/YzUz3bzQS4kSCoC90+qY/z31fHqUZkyEB7waRox5zeUKbxvR+ gwxDZYpRBXdSCGucsmg913M7St2L8+AW95XTX1i1+4mxatcHxY/1tjBs6672eZqZWP04 AUoA7p81eAicaK3ipTmI6wm/dRBJfBnu52MdMqpJ4GdCnXkKLvPGDh4h19ISzPUIsBr2 QTuugVrKsy+0FJxYLACNfKWUMn9oo3CpYyKqh1/kkO9fcN/YQRP9Nb8MxfcH/D6xWT5M /I9qc0SkpPSY0Zno7SIqKlBcAEKp/T3j0m7f2b1qdutrYtWVXIs7ci4abICClHINklHS TCdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687168429; x=1689760429; 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=xCsjtpkqXUZnLGRoObK6C2USmpkPTN8HyJBucP+QYdg=; b=CGRo4M2rPQeCw8R99tCc3A7WZYez4f7VehuWQKWr6RvByHoaizVzNTiKXuxmboDhaB 6nBvXPbmtA71RheprfqHLTcD1F24ZrCEOhl2yw4F2gdO0uIbIsg73umbZPHprUZVrhI5 NjhI8NrDHUgMPukRwabnHSe1Ms33+UGSXBRtB8qw/9ShZCyHHEPKaLLaTXBfJhiTS8Ea K9HOLdlsoVtoZwfz/H9wPHyj1W7v5ZczSEyjGY5p7ezXaoUTNbFCBaHxJFJU2fVRIWSk zeGRgUj2qE1nse3NYp9NlA2PY791XQo/FnRSPrFsGH2iY8aIxqDJxYQZc4UNmdt1dRJN xcnA== X-Gm-Message-State: AC+VfDzEC7Np3YvUPtQX+i7+fgt8351inIiJWLsgo2gWNxZ74wiLcZxa Sm8we1LInbUGxBZe6bmx/99QHQ== X-Google-Smtp-Source: ACHHUZ7wXs5jImY3nu7bdDpoouYNvaY0cVx28o2t1nTsOiv2qM4FVGkB0FovvU/eXEhElr4g+WNmHg== X-Received: by 2002:a17:90b:4b4c:b0:23b:4bce:97de with SMTP id mi12-20020a17090b4b4c00b0023b4bce97demr11288170pjb.4.1687168429627; Mon, 19 Jun 2023 02:53:49 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:7540:94e3:d1be:6785]) by smtp.gmail.com with ESMTPSA id bi8-20020a170902bf0800b001b3d7205401sm13335643plb.303.2023.06.19.02.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 02:53:49 -0700 (PDT) Date: Mon, 19 Jun 2023 18:53:40 +0900 From: AKASHI Takahiro To: "Schmidt, Malte" Cc: Stefan Herbrechtsmeier , u-boot@lists.denx.de, Malte Schmidt , Stefan Herbrechtsmeier , Etienne Carriere , Ilias Apalodimas , Masahisa Kojima , Sughosh Ganu Subject: Re: [PATCH v1] mkeficapsule: fix efi_firmware_management_capsule_header data type Message-ID: Mail-Followup-To: AKASHI Takahiro , "Schmidt, Malte" , Stefan Herbrechtsmeier , u-boot@lists.denx.de, Malte Schmidt , Stefan Herbrechtsmeier , Etienne Carriere , Ilias Apalodimas , Masahisa Kojima , Sughosh Ganu References: <20230616082805.4652-1-stefan.herbrechtsmeier-oss@weidmueller.com> <8e7a9dff-8404-4ae0-41c2-f7faf25e9422@weidmueller.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8e7a9dff-8404-4ae0-41c2-f7faf25e9422@weidmueller.com> 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 Mon, Jun 19, 2023 at 11:45:49AM +0200, Schmidt, Malte wrote: > Hello Takahir, > > Am 17.06.2023 um 02:33 schrieb AKASHI Takahiro: > > On Fri, Jun 16, 2023 at 10:28:05AM +0200, 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. > > Thank you. > > Just in case, tools/eficapsule.h has the same struct definition > > because I didn't want to include U-Boot's corresponding header > > to avoid including a conflicting header file. > > > > Please fix it as well. > > > > -Takahiro Akashi > Which header should I fix additionally? In include/efi_api.h the correct > type is used, so there is nothing to fix. That is tools/eficapsule.h -Takahiro Akashi > Best Regards > Malte > > > [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[]; > > > } __packed; > > > /* image_capsule_support */ > > > -- > > > 2.30.2 > > > >