From patchwork Thu May 13 07:18:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 437272 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp77868jao; Thu, 13 May 2021 00:18:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX2/dD6FmY+LN+NYHydA2xrsGsCT0PAptVClZ6Ar9DyimHaSUVn20BnhJN4PJOaH0auKLW X-Received: by 2002:aa7:cd83:: with SMTP id x3mr47609948edv.373.1620890318030; Thu, 13 May 2021 00:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620890318; cv=none; d=google.com; s=arc-20160816; b=sxmgbCtUMTyKXt0jD6yQNmF2Y4W2eF494548XQeTgbhm47V26aj5MTL2PqTRIARkXk qtaIYrZcSwJbeQDXfwG6/MQJfXZDsKGcTDMjPEetVwzARDfaWr7dSvJPxg0fVe9QySOB 64gE7j9JgukYusbtcJPQRpxtMyjpaCE9ySmeGlDdW36RW0TxF5Z0vXN6SLSDmmxfwh6c NDE/o7nW6weUy050qytFTk8/w/fdawcT5U1WGDMDfBxcRryfPmlTKBOux8xJJ6qn+20S VSS3YoOR9yuuO0CbfdNteOsS5j+ZCwnybQf3SIC+nkzn4fRBFw/jdfXD2AUExRdyS1sA pVsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=vM2OyzCrNUOoXf5UpUmu/UJVFMqrlMF70I0LuI9QARM=; b=IggGAHJuyzftCRO3RmiNjrlWUIgz0hhc7UR3V+0+4qnxHsy25y6BCCtljKmNiKe6qB VWhx3iFYPTANP/pAr7mDObRfy3Z6FLRKRZAxlLJ/i8mJrRNXa2JsabDZScgmjotV7kdf +I3GZAX3LDQw05r8kTWXa9uBRos/3AopbTNnofjOUOYCDSdVyDNfkY9TMLjq776yC1XS l+AZPnpoRoJE5C1eseuBZPScVVajIgNfLwwzQpPtnquXHuBFw2JRuV8xCwhi04Q8bYm8 TMKEijgBNMabGppIzAaAnA1S8gzAWDaLlyReoPXTEDiZ6pslqhYZ75UfXPP8aW00LpPT sv8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjOerfs2; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id l15si2003692edv.180.2021.05.13.00.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:18:38 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjOerfs2; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E3AA82D56; Thu, 13 May 2021 09:18:35 +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="gjOerfs2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 06EDE82AF0; Thu, 13 May 2021 09:18:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) (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 AF51882AF0 for ; Thu, 13 May 2021 09:18:30 +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=masahisa.kojima@linaro.org Received: by mail-pf1-x430.google.com with SMTP id c17so20913321pfn.6 for ; Thu, 13 May 2021 00:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=vM2OyzCrNUOoXf5UpUmu/UJVFMqrlMF70I0LuI9QARM=; b=gjOerfs2AY4BL60XIT5qi0PxtSa/GTadsGtyX1lvw4NUMlTdmwt3Ru5NCvQgrG53BG +zGiJojt+gUmw4EY4QCD2KldI7U6gJdPQC9EBHxM0A6sg/rF/DvuN73nyDUFv3ob9Fyj JmjC/UUJlBuBhwwLwwd2FxXvZhytgwSNu9k6K2cSafvQCXCS3D/gteEPYpnZmI6Ux54U OUzElQ8DeIyksSUHOlg0NntdAlMr9VjNSESi3O+8cBN5wxOryVag6O8s3gj7hPvo4Xbr W63pvfN46Zx0CzFhPwa+pmE2cHbBVO6VOD+fGIAgPOlsHuPnV0yDRYPpHHNub5rlr9oY etVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vM2OyzCrNUOoXf5UpUmu/UJVFMqrlMF70I0LuI9QARM=; b=XoI/peG91T/I4AeaD0q4Xk48LTSkOdmqrMHJH2SzwhL4qlzBrJYljImylmXfU080Xr YpfobOZ22lr+Fpaq3J/15ouC7FsnzRMD9A2RaaxVZNtz5E1qyLvqIRa30UHIrOzXHqKT nTykvVPIUnxf4OueLaqCHJk/tEYEYEx6mcdCUASdo56YTlXg5CiIhzYKvZ2NF8QnfrYl OwMTEFmzu52xOBTJFjDl+bguq+/Wt+zgnQ0SrO8IiOQtAe+lgtDASQr6AdegHVPyPrAW 8DfEYLcr4flpVQ+JVPeW099N6VlfIIrAFZOTVmzBQAL/R4fG0CGdSVLC776E2JHaoY3Q 9KpQ== X-Gm-Message-State: AOAM531UDldoBqAuUWAms0JkSTwgYi6cxW4hr+o38Sr2HFNYBkC7C8TV S+i/GgFkewvhj3JZ2cWN8Rgs/A== X-Received: by 2002:a65:67d5:: with SMTP id b21mr40249260pgs.117.1620890309285; Thu, 13 May 2021 00:18:29 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id cm22sm1625718pjb.32.2021.05.13.00.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 00:18:28 -0700 (PDT) From: Masahisa Kojima To: Heinrich Schuchardt Cc: Alexander Graf , Simon Glass , Ilias Apalodimas , Masahisa Kojima , Dhananjay Phadke , Takahiro Akashi , Alexandru Gagniuc , u-boot@lists.denx.de Subject: [PATCH v6 0/3] PE/COFF measurement support Date: Thu, 13 May 2021 16:18:28 +0900 Message-Id: <20210513071831.9969-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 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.102.4 at phobos.denx.de X-Virus-Status: Clean This patch series add the PE/COFF measurement support. Extending PCR and Event Log is tested with fTPM running as a OP-TEE TA. Unit test will be added in the separate series. Masahisa Kojima (3): lib: fix build error for secure boot and capsule authentication efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled efi_loader: add PE/COFF image measurement include/efi_loader.h | 6 + include/efi_tcg2.h | 9 ++ include/tpm-v2.h | 18 +++ lib/Makefile | 5 +- lib/efi_loader/Kconfig | 6 + lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_image_loader.c | 123 +++++++++++++++--- lib/efi_loader/efi_signature.c | 67 +--------- lib/efi_loader/efi_tcg2.c | 207 ++++++++++++++++++++++++++++-- lib/efi_loader/efi_var_common.c | 3 + 10 files changed, 353 insertions(+), 93 deletions(-) -- 2.17.1