From patchwork Tue Apr 27 13:08:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 427945 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp4608601jao; Tue, 27 Apr 2021 06:08:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtdOC2Mj39XSIyk07UNqrde4d/uq0ldoY5wIzDsD6OZK3rRxCFg75ayGUQ6UBSanag/NZb X-Received: by 2002:aa7:c952:: with SMTP id h18mr4275961edt.269.1619528925962; Tue, 27 Apr 2021 06:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619528925; cv=none; d=google.com; s=arc-20160816; b=ct+SPPm+RmuXodvnXc7OcPwSi1VzYQnzSdkzwmoeji7Ny6rdjTuCJoRq56UnsVUBSP 4x58R/fXY3u6mgrBUBP3iHjO9Lfo26GEqaq36ms2FCqbqqU1N455TMnuIu4Dy6J+pgM6 nsab3eV5kq3kK1cDjoCA987gV5xEBwgXqRIyfW6yfER7xCx6X+kS9dGqYdBmYeqA9Hl4 TSZeGEi/61SG/dmKBhpIG8g4RspzYfQjnhk/Jaihs/rjYq8nKMGPNs9uJBpOqB8kLYKS hCA1zHAVOIJCITLm9APjAKULUR/z5+2yfjfRHvhwYO+u57GCobWQniCmS8jmVune2qbh djBw== 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=3KfLvMI7NkPDBuE/nFQlen4e2No5jvozA21SG7piOAU=; b=ZecATbOSr0jkYsj4ZFR8J0ECOA06VMNubpOv69LhSpT63x3Ffj0r90/Ns0b4c5OUGH iJj1t8jmWsyDHWa4xyGdD8Pzbw2n4gtdz4qg2u5wI6oYIIjvG2P3ma1IDLnafI+751ed tW3DF/1tbA23L+nw6yA/UjYDOStW4AghR+A0n5HoOIy1ueARnSWt2oBjEmHzc+xnjuqQ mVVDuwl2tLiP3kL0sjYmgfRWi9OMkr91D4FDZH2gAFFxS1wj0KPnbEteib9vfnSwyFQH aAPC6vUwgzWkcfSDeZ7LChP/VqtY8CUi+HaAg980d4DXwADjxTevpiIkZH4/WW4eyWpL ilnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dtbAqCwV; 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 l17si2432974eda.91.2021.04.27.06.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 06:08:45 -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=dtbAqCwV; 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 7946282B8E; Tue, 27 Apr 2021 15:08:41 +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="dtbAqCwV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C31A0803AB; Tue, 27 Apr 2021 15:08:39 +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-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (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 BBD92803AB for ; Tue, 27 Apr 2021 15:08:36 +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-x533.google.com with SMTP id t22so7039728pgu.0 for ; Tue, 27 Apr 2021 06:08:36 -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=3KfLvMI7NkPDBuE/nFQlen4e2No5jvozA21SG7piOAU=; b=dtbAqCwV5I8P22FgYCMCDCvmGxuE82oKjfxoZFxLBVXOp2K/McLFbYscEJDSe3996w 8fbKkDtbV/V02GJurbiEkvquibOZP3s1KuD5VgRdArA69E+S+8gr2s3YBLowRsmCv0rx y6udNvkmcPq78GRLvIjnkbX4WGVF0xEEu8OUGPOof2fJs33kAscLpuDaRAg3ANRokzRo SBYtdh9djjlKHBw8MWXVR1BVpteM2oZSkDFM+gH38ETq3V4JoKvlPOwnfEgey52VdbVs J4Sfq2ey6L5hhHhFHtxu1tsuZX0YJhBfgauP6siZtXCR7edhakeMJPBrqXFMaEO4Jt9e GlTQ== 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=3KfLvMI7NkPDBuE/nFQlen4e2No5jvozA21SG7piOAU=; b=KbTAXdtvVsBMqq6Z+eK4i/3gh2+pf44e/p8RuRG7IpV9q7q0Za6GGGW2aQBqKV4l5r qWYocjtPPK+qReNNM65/Rq+GYVbNXlZv1WECvq76/SBZ1BkmGydMLM+mX7lBKuqWpX7A HLkcbX3SwK4TUOtLq06PuLrbSII+MQcxQnWKxGgcG3+g2Yv9GxJZrQlVBYuRg+gayj40 Eque62z0d36zCOlLlpHFmg3St9PwNSuBQdygQeBIMkxWkO5C2nsEhPhQVu0R1B2ycZwY ZzGfL2i9QERsTPPcz/UH7VdKgftww51nMirkG48Yl8uEmKeITbNwDd3c/Q7hx72nsDrY 53Ag== X-Gm-Message-State: AOAM531KjAlO0dzjxl8lV6lFVj4lbKGjF3/cqX5s+vXZ9IMXzv1JQ8p4 oEq75yKi7G+cLKSivVB4eAn2oA== X-Received: by 2002:a62:1956:0:b029:25c:69ab:ee46 with SMTP id 83-20020a6219560000b029025c69abee46mr23152594pfz.75.1619528915059; Tue, 27 Apr 2021 06:08:35 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id g1sm14044163pgi.64.2021.04.27.06.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 06:08:33 -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 v2 0/2] PE/COFF measurement support Date: Tue, 27 Apr 2021 22:08:09 +0900 Message-Id: <20210427130811.11121-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 | 9 ++ 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, 354 insertions(+), 99 deletions(-) -- 2.17.1