From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 265BAC3DA7D for ; Thu, 5 Jan 2023 13:44:57 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DD18C855A2; Thu, 5 Jan 2023 14:44:54 +0100 (CET) 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="fZwgPhvt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 54018855A5; Thu, 5 Jan 2023 14:44:53 +0100 (CET) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (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 EC7B6855A0 for ; Thu, 5 Jan 2023 14:44:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x630.google.com with SMTP id vm8so83232073ejc.2 for ; Thu, 05 Jan 2023 05:44:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2YdZu67P5Pd+Ob31yUshhwSIbQ1slqh0+zVmCyljSHA=; b=fZwgPhvteJUmquo0gPXXpjcdE98igqRGvZqwHD2G3Sqh7gXefFixcgtjrZ+SkwGlhL 3RwTDdlgbIzF23ljTNq61iaEluySMwy+0kwHD+i2wiCWT0xbEnKbEmojGOrs2vu4buIR EjzBTIBhI9Jky5RJT57qke5Cb9dYg9INIOE0+EtZ0oiWlo+mW1R4uO0fdKadH5hjRInr lPyeAERROFuAK10rly4QR8EYuLyoyF8M3FykBFUTr8D8yrHLP4j1BWb1f/vADTcgSe+K vBNFw345z62ftcl4waR6fGwO21zwAMYbzPKq/TXgIVONSMjvsXfLretEGtVdBH7xMlQY VlGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2YdZu67P5Pd+Ob31yUshhwSIbQ1slqh0+zVmCyljSHA=; b=EZXP9ydjr1ph2pU+tWhnpRd1+9elHRdgVPgB+3qYBXyQIHhXMySZfemAXAZdgnzPAy 3ar1GOhO0K95aqSIiBvuu6zvtwmosGpa2+6Mqth7iDOy1yabiyGXTVQPaVTEFJ9bQzUp qM2XXAu1LFIgRvVWhj/jwuutbZ/6xOkzxGgZZ30QHlhlnOQUe3zuVj+2abNuVXVKyxQo /V0NT6nvHOoGbFgBIolP4d/6o/5i1SZzd+dyh7HSga+r8bfoGBiUgGgmGcXIYZmqJDal pA3syxPivkTWmf6X6YIJZVEWWRk3lYofotvj9mZyJgM+NGLhLbP3Q6Ck62nXxG4kvU0V ND5g== X-Gm-Message-State: AFqh2kpB9asu1kyzoHwy8dRcs47e9F07q3SwKiKzR/ai8e7fACXXrVUG qU6hyNkuivprvHT/frhSrYJ2Ei3C6S91SmoJ X-Google-Smtp-Source: AMrXdXs2mr7FJgjT5jzpbZBTxQkZpu5cC/FbBukH/EIF+DXY52+Cg8ihn6V8JTBvqIjN6smaAqPH3g== X-Received: by 2002:a17:906:380e:b0:7c0:be5d:59a9 with SMTP id v14-20020a170906380e00b007c0be5d59a9mr48102412ejc.20.1672926290605; Thu, 05 Jan 2023 05:44:50 -0800 (PST) Received: from hades (ppp079167090036.access.hol.gr. [79.167.90.36]) by smtp.gmail.com with ESMTPSA id jg34-20020a170907972200b0084cb8589523sm6099163ejc.139.2023.01.05.05.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:44:50 -0800 (PST) Date: Thu, 5 Jan 2023 15:44:48 +0200 From: Ilias Apalodimas To: Eddie James Cc: u-boot@lists.denx.de Subject: Re: [PATCH 0/3] tpm: Support boot measurements Message-ID: References: <20230103204202.417074-1-eajames@linux.ibm.com> <42398bef-dafb-3a2a-f369-f995b6f06c0f@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42398bef-dafb-3a2a-f369-f995b6f06c0f@linux.ibm.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Hi Eddie, On Wed, Jan 04, 2023 at 08:55:06AM -0600, Eddie James wrote: > > On 1/4/23 01:47, Ilias Apalodimas wrote: > > Hi Eddie, > > Thanks for the patch > > > > Looking at the patch there's a lot of code duplication with > > lib/efi_loader/efi_tcg2.c. > > Any reason why we aren't reusing that ? > > > Hi, > > Well the EFI code can't be used directly without configuring to include the > EFI subsystem and exporting a bunch of those functions in a header file > somewhere, so I added the functions in the generic tpm librrary. Now it's a > matter of doing the work to use the generic functions in the EFI system. I > can do that in this series if necesssary, I just haven't gotten to it. Doing it the other way around is easier. Just carve out the functions you want from efi_tcg.c to tpm-v2.c and use them for bootm measurements. Then the rest of the EFI will remain unaffected. Cheers /Ilias > > Thanks, > > Eddie > > > > > > Regards > > /Ilias > > > > On Tue, 3 Jan 2023 at 22:42, Eddie James wrote: > > > This series adds support for measuring the boot images more generically > > > than the existing EFI support. The series includes optional measurement > > > from the bootm command. > > > Eventually the EFI code could be refactored to use the generic functions. > > > > > > Eddie James (3): > > > tpm: Fix spelling for tpmu_ha union > > > tpm: Support boot measurements > > > bootm: Support boot measurement > > > > > > boot/bootm.c | 53 ++++ > > > cmd/bootm.c | 2 + > > > common/Kconfig | 6 + > > > include/efi_tcg2.h | 44 --- > > > include/image.h | 1 + > > > include/tpm-v2.h | 139 ++++++++- > > > lib/tpm-v2.c | 700 +++++++++++++++++++++++++++++++++++++++++++++ > > > 7 files changed, 899 insertions(+), 46 deletions(-) > > > > > > -- > > > 2.31.1 > > >