From patchwork Wed May 12 06:59:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 435458 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4558004jao; Wed, 12 May 2021 00:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmL3k06qRp4GqYd1rhyc/uaAgs8We7tRhv5CRMMgS7YPGm7wz6HYeujABKZYM+ym3AN+qs X-Received: by 2002:a17:906:168f:: with SMTP id s15mr35388768ejd.220.1620802818409; Wed, 12 May 2021 00:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620802818; cv=none; d=google.com; s=arc-20160816; b=038xo5qk2aa56masWvmYgrCjGLnNsvZypjHGYd7NFXs/9Tfq2oLWtUrmTy5oTzE37Q gz4lvB+xcYdEJsBg/aa38PQcF/6K3UCRDdcb0LnpDTYEGD1/zZQzNlannb1qf8/gXys5 vJJD7ABGPhhO1EOwQ7FUi6cacIJD07p+qOLY/n5D39xOuGpzJ69kYGPvagBACCyyfhLl 9KrWEEkuLAbYuPzMA+RWhSDlFQZFL438jpfuGBSucUFIomj6ScJP5xvyAYSz1gGkxaVF HLQ8b5ZoOZNIlMuxhIoVTRk1A4+2h2jpoK+G2j3ws/l07y8cXVX34Qms1vot6c5U73FB qAEg== 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=z2erKQ7NL6IL6TlWpedTI5S1hpE4C3a+Q3oaVOfGxMs=; b=hyr9cOXMm3TjHpGtwUM42/fxRU8JAZV1CHM3hvaG8HVvczHhItxzOj1IKDSHFBeKWw G+EtKexROeOMuWhyXw3pUskwvQ4GQpshjosUJq18rybcsQEjpH9hpG48Q/jiZgKHjbin Ws6g/jToxCqSEzzq+Afl8Q6JkTwaqLuOAg1mN81u+G/6EvXNySuqf7vco9q12mGsf+pZ eCU2dWx6P2vXR6fSmgJKK0pNjqmd8c3OlW/VveA0O/PaI0bVFlh+cFEBXqRrcwmp6Apz mWok3MjKpRssY0f4aw/S7z745BmJE1+nA17yKL0XI6wJ7UP5fBTZKf7HTzxl+pywGc8i W2ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mWP33jRD; 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 gg17si17978293ejb.131.2021.05.12.00.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 00:00:18 -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=mWP33jRD; 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 56E0982D1C; Wed, 12 May 2021 09:00:13 +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="mWP33jRD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8C51182D1C; Wed, 12 May 2021 09:00:10 +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-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (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 CE68982D03 for ; Wed, 12 May 2021 09:00:06 +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-x42c.google.com with SMTP id c13so4409457pfv.4 for ; Wed, 12 May 2021 00:00:06 -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=z2erKQ7NL6IL6TlWpedTI5S1hpE4C3a+Q3oaVOfGxMs=; b=mWP33jRDfBbRFj4VV+GKg6Dt8s+nTKlqKE2qoQK/qiZwckZ5lrhWcVeVBoPPcp+Avi /264UdrniEGGEbjWpld9yP7pDtyGAhimhKvIlfM1Ckyh55G+ehSqnFUFJ7MAUDjW9Aj4 ZJUdJqrXbvtrHjJbUF9U6BZ2UU1n5DFbvaLmOZPzAkoqEO2Gvl/k0yR7syicuJSyjHCv OGv/dVo+FLvsBjZ8fgUKeFRTPLHHGUc2C3EOhWppAWYZMsSR9dRnV/0Gq9ZFqAo2vDt7 kiPpu+WBDA9Wyc6YHHWJI3XOkKvt85vOH3mzSvz/YgtuRvNOX+L3jFaoD+6383Sa1EFY xXJg== 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=z2erKQ7NL6IL6TlWpedTI5S1hpE4C3a+Q3oaVOfGxMs=; b=gD/cI14aGbtTkfXoBvLBPZgCH8NTnL0BZJymy8hyQewpekTc2LoVexVeAaQcMijUre UpZa6GK8/x8aD0h0CauwpwL66VTZ5qmlhpfnYbcagQ/S9WgV5S3D++123C4YVVwmWW4p Kfnb8hjMEPO2EKLokLRCHnRa9l5l8JWeqe5UCUKS+6lLQv0xFY1fLno2oAvSDjGbNDbT 9X4WnBcR4sDdyJicKljHtB2MyM4lKSh//gT22ndS6ZaoNXXRWWh7NhbdyW1dTVZQbOLK wWuDgCcx1RICIA2qYgHw+satUZc6QfBoGzMU9GDdiQzAX6Rj77TPJs0rkcj36D0QUpCx 3Y0A== X-Gm-Message-State: AOAM530623+5mEhzniqOYO5bToS6RAuFXaKX2QQ2W659xCs/b51tuf7b LiuqwnAS+xRfE0K4GDS1Kg3iYQ== X-Received: by 2002:a05:6a00:1246:b029:27a:7459:2cb9 with SMTP id u6-20020a056a001246b029027a74592cb9mr33855206pfi.53.1620802805182; Wed, 12 May 2021 00:00:05 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id in16sm15956081pjb.14.2021.05.12.00.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 00:00:04 -0700 (PDT) From: Masahisa Kojima To: Heinrich Schuchardt Cc: Alexander Graf , Simon Glass , Ilias Apalodimas , Masahisa Kojima , Dhananjay Phadke , Takahiro Akashi , u-boot@lists.denx.de Subject: [PATCH v4 0/3] PE/COFF measurement support Date: Wed, 12 May 2021 15:59:44 +0900 Message-Id: <20210512065947.23998-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): efi_loader: expose efi_image_parse() even if UEFI Secure Boot is disabled efi_loader: add PE/COFF image measurement efi_loader: add required option to use hash_calculate() include/efi_loader.h | 6 + include/efi_tcg2.h | 9 ++ include/tpm-v2.h | 18 +++ lib/efi_loader/Kconfig | 14 ++ 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 + 9 files changed, 357 insertions(+), 92 deletions(-) -- 2.17.1