From patchwork Wed Apr 28 12:19:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 428604 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp555951jao; Wed, 28 Apr 2021 05:20:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznrAKd1YibU+T2XiRoJ1SD8C0wXX0KwVLabYItj6VTQexx4S5ctGDW/zj2iFqOGNswGaNb X-Received: by 2002:a05:6402:447:: with SMTP id p7mr10848104edw.89.1619612431754; Wed, 28 Apr 2021 05:20:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619612431; cv=none; d=google.com; s=arc-20160816; b=vfBWa6QKv6JGmEWucSjPzy2Si28xr4QpyHpwJ0VwaC46OtNgg48BM+6sMZnDogoVGo o46s6+wYEXWR8W+crd2AKxA084+DtZwbWCeVs2Su5oStxvsaLDBdya/OtcPUEkpmsPXp oxrT7PbQ314iuSPsndMU1InQOcndIltIZxoxv4uXpagMtDk/86m2ypvJ/yBb87EBmTb1 w+1GNzwQnj+NimpZRTlaxvriTLiBSl+5S6uv0I5Vz8b1be1jCvoHvZqkesO2F9mSO1nu bXilMA+eqoFXi+1dt6yWXBJDrYtkMe/9inGAuQ6XAKM4MAFuBxmLBbvbeMZZl0Wj9ff9 jpcg== 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=blHQGqyezqZB+WkNgnAKMiTNfC/IYn+knvd2InubnTg=; b=TbdkmldBd29a7Rzx/LJSuubhS5YoAiL+mI7NZwHIndEJX/SqOfV64v7p38Qikwhd8B xugL/KhaXdYxdgd6qLb163noSEZog21fSAQoViywOTj7bIm7hgF9aSBuP6628K8J0HhE mwchlg7HAdyYgLlQBBGROnT0wi6GlRMepVKzijlUfvZYFEjDXuzQ/j+/8Z43xi+r47qJ 3+ZD0CCEvPlDE8kxhtgdPofaZ4/blTP1V1cmEc4si9Au69OWYg1q6EAeTEcJ3crgyLC2 ACkuwjEMC0+Owd+g5tGINnSfOc+LwS/bHpUbZYLeZNjHKG2Qee4B1BfOP3zoGW2Q6SXf hHfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BZiTcpsC; 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 h3si2857539ejq.357.2021.04.28.05.20.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 05:20:31 -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=BZiTcpsC; 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 D266E82CAE; Wed, 28 Apr 2021 14:20:20 +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="BZiTcpsC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BACE982CA6; Wed, 28 Apr 2021 14:20:06 +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-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) (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 D77118188B for ; Wed, 28 Apr 2021 14:19:58 +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-pl1-x634.google.com with SMTP id p17so6811040plf.12 for ; Wed, 28 Apr 2021 05:19:58 -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=blHQGqyezqZB+WkNgnAKMiTNfC/IYn+knvd2InubnTg=; b=BZiTcpsCi4Gw9jEkdjoSnqqapYOxh+rpW3M/q7GA7AD7tAcNy/4jZG9a92VgwyUPiW qVanxwVXTW41Yy7ozXLTHZX5uKYxZpoWToeg1hBLzO7TLBkyS9m+p1SmgL0yLYIw/2Nh BKC+CrsmQSfWcHrrzxtacdfj98i8F6OUL96Y27FLT9rf/SHHovTpAfWdSTNxJ7Bv6lvf xFuVlMckWLChYXRYcCt29iaZYwr6N0Mn8NxlrmuCTXh1tRsSvggfN1529O1C2B99DK/p /AEOFoep6YG2Qds/Tqa/OjB/QN/dRL/GgNBpzridzD5wfjly8BydYnUk72M3dro2mpdP bX7w== 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=blHQGqyezqZB+WkNgnAKMiTNfC/IYn+knvd2InubnTg=; b=pPA+oD0Dgm/imkHSTnJNuW90yx4hOoU7GslV3rs5mMMsRZ1tofrT9cI0biojYLxIk/ O9ozLybFJ8WNYKzNPWhtiAFZ10Umo6cCEQYqRBnhoaNQxQbh0o0md04bdIx9BOCwcj8d Tz17lsp04HKVVBzmEvy5MKc4qchvCT/YKMJVtjnHd9pISQOWLGVjpy5nFkmD3GrXpi5z wz2NhITbqnl5tA9Wj3m0rPDA0WWAKcEAraFiNzWK6DDhmLzl60kh0zfZg4ujRjxrNzGE XBYkMUWq+rA8DZHJ8D6wPJ4AZghBNcOHrMrIKofJxpSX7dxJjWNjHQqLbf2NAuVteM8O gYqw== X-Gm-Message-State: AOAM530EGe9uODO/1Nr3Ayd+NxlPzKv/X39keB1onW63TcQUAlSw3jpw UEDYlnn4oJelLFCMO2xMzeyYCQ== X-Received: by 2002:a17:90a:ac0b:: with SMTP id o11mr18490760pjq.159.1619612397146; Wed, 28 Apr 2021 05:19:57 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id z62sm4910266pfb.110.2021.04.28.05.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 05:19:56 -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 v3 0/2] PE/COFF measurement support Date: Wed, 28 Apr 2021 21:19:43 +0900 Message-Id: <20210428121945.12586-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 (2): 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/efi_loader/Kconfig | 6 + lib/efi_loader/Makefile | 2 +- lib/efi_loader/efi_image_loader.c | 132 +++++++++++++++---- 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, 351 insertions(+), 99 deletions(-) -- 2.17.1