From patchwork Fri May 14 00:53:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 438005 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp26131jam; Thu, 13 May 2021 17:53:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww/USItr1tb33qt//ctUuuX0eR2IpL/GMUtLghSbu6XffAhMnVgGHzTHFudwJFdCCzvmdc X-Received: by 2002:a17:906:c04b:: with SMTP id bm11mr45325591ejb.263.1620953633767; Thu, 13 May 2021 17:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620953633; cv=none; d=google.com; s=arc-20160816; b=F4uHLeA9Se0Md57he1NIqk++48VqFt2vo0o/w5U1nRk6wAIm9++je43XhYhpbeJMD2 aRx9hWQFozFverFJW7OvzFN1XJOhHM2eO+fu/qZ4Aseaer5nBnJ9GLnJy9zOrstatggW Xj+liN+wrbXPcoxqN6fixkvpBHD64hChAo2gw2aKQz+y1sV2pWzOYDOkyJFqsm/7Avn5 B2xzgzizfqFTmOslV3wN9phxG50CxHklzsWEsLLZVR/sFuUtyHpzTLP79B3NVmy3+ekI eHxzm4HorNmnrK5h2wymXlRN9eeZ7PRSDWR8bO8qGicOWovSkU08+7DHDn0g3qH9v6UT 3qAQ== 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=xCsMYGk2xLY1V8G8E1zmXQJ3dOGAkszUjL7Oy1Kc2rg=; b=NTmf1t38gI4U6G+nn7/ezxei/8s8ur9OmCMvhqr/Omausc1wsTBx5tkwzGpVeNMEzC z6EXP1YouIDAR0vvFPbdVr9HYaYyF3Gl0vTnkYtKaCKBsW0fzf/OrgUCKPNpbuKphN4/ g7BfxUsZL307YIHcj0+FymrTJhu/vRzhY50zNjewxAg2mp44tpFOBCP5VT8ImEoXVQK8 C5l+ba9MrIzg9yqY27k1QfgQEzRfC9IvmleuYjj19aH/BS9shNDzm+zF2q/g2/JCijCp PHEVR64I88jP4SMA285mbYKwv9NBkoBafPyE/Ss5+EFHGuLhp4xuJn3/90Gu7MvPcQLg elOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="v/bnjRV1"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id ga2si4472006ejb.249.2021.05.13.17.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 17:53:53 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="v/bnjRV1"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 A6BD281D48; Fri, 14 May 2021 02:53:49 +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="v/bnjRV1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F3F481E1C; Fri, 14 May 2021 02:53:47 +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-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) (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 E88FB81CDE for ; Fri, 14 May 2021 02:53:43 +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-pg1-x52a.google.com with SMTP id y32so22835216pga.11 for ; Thu, 13 May 2021 17:53:43 -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=xCsMYGk2xLY1V8G8E1zmXQJ3dOGAkszUjL7Oy1Kc2rg=; b=v/bnjRV11gu3X6BBFiJMHu12TyqbQNtoFWZPAlY90z/Kd1osIMsQQq1IGeGTIs5N70 kMDUT2JLVp/c1d1UADAbOm6Qxyv+1OPq7sws27sAm/s1T3KG3DR5AQdsfzE5Tw9/nfvv ISNdcw9LO4L7z6JNEi8LTi2lyxHZKrkkvp2FcRZNBJkCy7BcfMoJOo4U3HKFreiRFvPr tPLJr1EeMxlafeVG7BqIFcWBS3w07QmWJGxUC4LoYPsCGi/8YAfmiB6U8cZQKBC/ZxTX oOkXc8i3u3iBtyonvHccl05hVig6szFGBNwdp1vJMZ19oFvtWUcrBiYpM0abmi708Oah b/3Q== 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=xCsMYGk2xLY1V8G8E1zmXQJ3dOGAkszUjL7Oy1Kc2rg=; b=AnEj0Vq9UIrBAXFFTuSLxNqBO1mCBGxnPuXgIZvlgviGczZdZzc3z4nrMOAAqR0zU1 chzmhejATq9sXCdh1LtpYLIQide8n8AprKsb7aJX9APzXbN9OgdGVILqfl56di/7N5dg VebQDiYXQLJuTqAfqqX/Q9jJKJgFO2rSRCj5liqnqnSKt/roynyLY4dvhAKjQb4fwpJU AGcto1o1/qRLkOSOiE8hn6oyudTni2KkHUHvOSkfgByc+serDFMvZ//1GqWVD/s0MnBZ XIgNH+oerd4KkEVxJl8in0sIH8YIumFccuQO8iMGpNWETcohKZMCoiIkf7dDVDrux72B hmyQ== X-Gm-Message-State: AOAM532yh/NbqHyAwRrTmAWzhBEJAH2Oiho9HnDHg9CaWXhPy7FBaVKi cCn09H7wX5MYano4CbV0HXU+Zw== X-Received: by 2002:a63:570b:: with SMTP id l11mr44108517pgb.193.1620953622286; Thu, 13 May 2021 17:53:42 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id k8sm3086578pfp.99.2021.05.13.17.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 17:53:41 -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 v8 0/3] PE/COFF measurement support Date: Fri, 14 May 2021 09:53:34 +0900 Message-Id: <20210514005337.5243-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: introduce HASH_CALCULATE option efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled efi_loader: add PE/COFF image measurement common/Kconfig.boot | 1 + include/efi_loader.h | 6 + include/efi_tcg2.h | 9 ++ include/tpm-v2.h | 18 +++ lib/Kconfig | 3 + lib/Makefile | 2 +- lib/efi_loader/Kconfig | 8 ++ 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 + 12 files changed, 356 insertions(+), 93 deletions(-) -- 2.17.1