From patchwork Thu May 13 14:48:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 437336 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp395980jao; Thu, 13 May 2021 07:48:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrvRx9NA48SYv1+eau1e3qAiJjxz0Vo4Z7sQ0ZDbZEWvSaPwHS2Hy3owbvbRabSvmrTip2 X-Received: by 2002:a17:906:b0cb:: with SMTP id bk11mr44773411ejb.310.1620917305630; Thu, 13 May 2021 07:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620917305; cv=none; d=google.com; s=arc-20160816; b=XadQyt9V5FxbEVeiZ1tW65NdJcCx5cLQkIHYDXarwhnNRekUZW11nTKmoQe55e3sM+ D+uxIZ6mi7hrEea9UDHj6vnoW9hu6R1VcC0Jowqzj0P/LKFtiM02fDW15FeUas60Oxug xPOlDs5n/jNJ4nfvy6IzTX/xdyT296io1icHh6qtKUv20nZ9NEVuvsvZFqU8oEJIrtuM jwqmKQLI9dLoyqjMUh08+aSqpo0LIj4Yf+X9TUD06eA3KMi7tSN/SZE1pPtwBgAmLEVZ VqkQKxrmiBRiArqzC0y0uTz+Gij7NUeGBTO56+n0/MRpkkKt8+wFe56Iuj0em3SlWC7G KBJQ== 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=WsTH5ddfLuCcSrHZ+cqESJ5wNkbsefF0cDMaVczySeY=; b=ibGYv8Pi7Q6KYck0qVMAqoPCcZjVWc1h9lYrY/fQcMLY/wuIA7VGYHYm6sIue7/8Hq V7rGKIjNAhGHpPgmVRyhJB6k0KdZELlFe0W3aXfvF5XdlAUmB1CiRwYgMCA+8jX1RKOG 762RS0as3J8sQN1Z0n7fNOh1tENwkxxmnaE/01Gk/lCKBG8GSNgonUYG1vt8zQjWtsSJ rTk+jxcBr7trocTk+ZVm0vSptEUZRO20kwuFOlIqj4FcsRgSyYm/IcXcT7PqoeRid/ni xVq3V+P7ApTtegjWhssIzBT7WtZFVY+sKh3bAFVuQdWiTOA2EIx1u+aIzDXKYiedAvWY GEAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="dmd/bcFX"; 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 r15si2406638edo.469.2021.05.13.07.48.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 07:48:25 -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="dmd/bcFX"; 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 37D0781D48; Thu, 13 May 2021 16:48:23 +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="dmd/bcFX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2FE3581D48; Thu, 13 May 2021 16:48:21 +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-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (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 238E2819C3 for ; Thu, 13 May 2021 16:48:18 +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-x42f.google.com with SMTP id a5so14935623pfa.11 for ; Thu, 13 May 2021 07:48:18 -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=WsTH5ddfLuCcSrHZ+cqESJ5wNkbsefF0cDMaVczySeY=; b=dmd/bcFXZJ8bBXAjSttvHX2d0RJrXYeJQ2Wur6Vq07ljxvSI9wPUMPUCUjAmcGCEUc MP4pMNDGoIcOqhtNu6AtFUbdaumVLB3XxLxjpnKmaSyeWDwZJqOkOPPyiJjITtYtChXE Qximx8lbz6nvWI1dtVsmdG/vqB873pLCF49bPDghPJPWcuaDkpK5KgWsh21LpEUd/jqD xnb5OIQx34XgBfaompDwmN7IiVM4W075czlSL5pQu0SYXl48NaSelO1V+4I9XgCKXb8X PIZ+tGPO0g+vJ94EbV8ncKtmb3y0BF9hXlYTLN4KOPBUEhZj5yNvRq71BYo6IebNDKeu /3JA== 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=WsTH5ddfLuCcSrHZ+cqESJ5wNkbsefF0cDMaVczySeY=; b=C2UE/8lQxhr/kNyrFPMI0mEAEQPrGoUPa55L4/XClCBbSx7jU/Ot8+wcblrrjhuvX6 HQ5AmhvMUn0Zdu8FuEi3qPubtOtRJ5sT7MJ5lOdcFHBKg+LnLttKDMCaptOEyPAwzIVc fJZKT1CM2w9VVOvyxgbGwkvcDum4j2ncM5jvCR5kj4PXXPUfByUEG/uMLx2jNf428YAy j86aFfcKTDU93cYzwX0nFR78wU64tMApv81nNXvHLIh10o42S90tIGnIaFAxYP5Ky6rS r1GicNT+mElcY6DFUq8i8OsWRY/L8rjDHZKTKEzQDd5jqNWOYGJkTF8LDeFz9TfM/1bf uDbg== X-Gm-Message-State: AOAM531z68paNP78SC9O3HcAAnD++rOEz7mpjcFuXzNW63Piu9egbNLi MCOl3vf6GsWhpey5p0x4arkjog== X-Received: by 2002:a17:90a:da06:: with SMTP id e6mr5538482pjv.183.1620917296515; Thu, 13 May 2021 07:48:16 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id j27sm2547906pgb.54.2021.05.13.07.48.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 07:48:15 -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 v7 0/3] PE/COFF measurement support Date: Thu, 13 May 2021 23:48:07 +0900 Message-Id: <20210513144810.17261-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 | 9 ++ 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, 357 insertions(+), 93 deletions(-) -- 2.17.1