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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 46A32C433F5 for ; Fri, 3 Sep 2021 06:20:19 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2D233601FA for ; Fri, 3 Sep 2021 06:20:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2D233601FA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9836782D50; Fri, 3 Sep 2021 08:20:15 +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="tPuJmQzZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D74C182F33; Fri, 3 Sep 2021 08:20:13 +0200 (CEST) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (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 32281829C6 for ; Fri, 3 Sep 2021 08:20:10 +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=ilias.apalodimas@linaro.org Received: by mail-yb1-xb2f.google.com with SMTP id c11so2981624ybn.5 for ; Thu, 02 Sep 2021 23:20:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xqe+zjbD8tIyVAkuDQ9L4CGNl6VvrV37og28C7dTFCE=; b=tPuJmQzZjSFDDJZ7hxrw/4P0hvqzQDhdHHYtmf4rc73xLMEXnbP3hOspz1ZEJ/r2V5 a4VS2jsnre8EEeN8U2KAaE6Slr1eFBcvw3ZAq1mXw8k31+hzOo1TQWG/QFHhwALCUzEB bvoS2nOJlBMsZYT9D/ewFXPZ/LBurjKK87v5Ygc4DJhTcfb+tcH7T162aWamWxKibVIQ Y5qtf7Ikp/Nq41v4xizUHnz9KC2wda43agHr6wepfv46iYYdfFadvN1JhHZmXFE7+zEz C/pIT6Syxi5hBy9T69zbRVso2jUASBTmHrjkDWtEbpimJuhWdYh5bsBDdIHKS32U07bo QB/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xqe+zjbD8tIyVAkuDQ9L4CGNl6VvrV37og28C7dTFCE=; b=SqVPwolo2VB0jHXoQcjzNB7ZQnJYo20qf2lza0NUgetf4Wa4/rtK8jWuRcDU4+b+SE 36SkMrpf/tITemtQnLaKEveT4/3FxHl1UtWduTL1w2qS33UtM0MN3TMSPi9a3fMTCFFg 78IBeOoGmoQQY/3G9RZ+nGKuAVQWoaZuvFm8jxhGOI8qOG88mMNQm6BLgN/N9NSaSfQe 247JUXz35v7yGAWpoIieMiuawNlz1xC7wR7Tfrdtbne0HpSBcnaTn1mBcGEhy3p/zzod /OrUwyMX9SabXNfjLMgXn71inyqIDGySBeXeGHWfLT0YAQ9++6ciSnxYTjVkYtfAzx0y XO5g== X-Gm-Message-State: AOAM533VNmnJP7RWcoa+/EKs+3npoNjdNbavI8s8KLGMSD+OjfhmlYsX 0nj9Xwg4Qw5Yo9JjQwMXiWVhJAnlgHEifRkp7KhWvQ== X-Google-Smtp-Source: ABdhPJwbpgKNaWOZ8RJq3yW8Ht8lcX9Dm89ivUpx/HVdq9CpOispZ7nB2S50bJnb5UPG9xds8imYmYaNq9trwA0WHi8= X-Received: by 2002:a25:fc5:: with SMTP id 188mr2761475ybp.51.1630650008786; Thu, 02 Sep 2021 23:20:08 -0700 (PDT) MIME-Version: 1.0 References: <20210903015552.17180-1-masahisa.kojima@linaro.org> <20210903015552.17180-3-masahisa.kojima@linaro.org> In-Reply-To: <20210903015552.17180-3-masahisa.kojima@linaro.org> From: Ilias Apalodimas Date: Fri, 3 Sep 2021 09:19:32 +0300 Message-ID: Subject: Re: [PATCH 2/3] efi_loader: fix boot_service_capability_min calculation To: Masahisa Kojima Cc: Heinrich Schuchardt , Alexander Graf , Simon Glass , AKASHI Takahiro , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Reviewed-by: Ilias Apalodimas On Fri, 3 Sept 2021 at 04:54, Masahisa Kojima wrote: > > TCG EFI Protocol Specification requires to the input > ProtocolCapability.Size < size of the EFI_TCG2_BOOT_SERVICE_CAPABILITY > up to and including the vendor ID field. > Current implementation does different calculation, let's fix it. > > Signed-off-by: Masahisa Kojima > --- > include/efi_tcg2.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h > index b6b958da51..45788d55d5 100644 > --- a/include/efi_tcg2.h > +++ b/include/efi_tcg2.h > @@ -127,8 +127,8 @@ struct efi_tcg2_boot_service_capability { > efi_tcg_event_algorithm_bitmap active_pcr_banks; > }; > > +/* up to and including the vendor ID(manufacture_id) field */ > #define boot_service_capability_min \ > - sizeof(struct efi_tcg2_boot_service_capability) - \ > offsetof(struct efi_tcg2_boot_service_capability, number_of_pcr_banks) > > #define TCG_EFI_SPEC_ID_EVENT_SIGNATURE_03 "Spec ID Event03" > -- > 2.17.1 >