From patchwork Mon Jan 9 19:18:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 712915 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ty4h12M1xz9t0Z for ; Tue, 10 Jan 2017 06:18:41 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cQfSm-0008FR-9B; Mon, 09 Jan 2017 19:18:36 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cQfSk-0008FM-In for tpmdd-devel@lists.sourceforge.net; Mon, 09 Jan 2017 19:18:34 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of HansenPartnership.com designates 66.63.167.143 as permitted sender) client-ip=66.63.167.143; envelope-from=James.Bottomley@HansenPartnership.com; helo=bedivere.hansenpartnership.com; Received: from bedivere.hansenpartnership.com ([66.63.167.143]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1cQfSg-0001Jv-R6 for tpmdd-devel@lists.sourceforge.net; Mon, 09 Jan 2017 19:18:34 +0000 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id D92AA8EE16B; Mon, 9 Jan 2017 11:18:24 -0800 (PST) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tQaaz1twJs15; Mon, 9 Jan 2017 11:18:24 -0800 (PST) Received: from [153.66.254.194] (unknown [50.46.144.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 5954C8EE01C; Mon, 9 Jan 2017 11:18:24 -0800 (PST) Message-ID: <1483989503.2398.13.camel@HansenPartnership.com> From: James Bottomley To: Stefan Berger , Jason Gunthorpe Date: Mon, 09 Jan 2017 11:18:23 -0800 In-Reply-To: References: <1483923513.2644.1.camel@HansenPartnership.com> <20170109154945.GA28023@obsidianresearch.com> <1483978982.2448.7.camel@HansenPartnership.com> <20170109165416.GA13960@obsidianresearch.com> <1483981445.2398.4.camel@HansenPartnership.com> <20170109171430.GA18648@obsidianresearch.com> <7bef4616-cd69-2798-fc1f-f7eee2fb8c98@linux.vnet.ibm.com> <1483986287.2398.5.camel@HansenPartnership.com> <1e9d8540-63b9-e6fe-d643-30705030d49c@linux.vnet.ibm.com> <1483987877.2398.9.camel@HansenPartnership.com> X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 X-Spam-Score: -4.8 (----) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -3.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1cQfSg-0001Jv-R6 Cc: tpmdd-devel@lists.sourceforge.net Subject: Re: [tpmdd-devel] [PATCH] tpm-emulator: add a TPM emulator pass through X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces@lists.sourceforge.net On Mon, 2017-01-09 at 13:52 -0500, Stefan Berger wrote: > On 01/09/2017 01:51 PM, James Bottomley wrote: > > On Mon, 2017-01-09 at 13:41 -0500, Stefan Berger wrote: > > > On 01/09/2017 01:24 PM, James Bottomley wrote: > > > > On Mon, 2017-01-09 at 13:03 -0500, Stefan Berger wrote: > > > > > Examples: > > > > > ./src/vtpmctrl --tpm2 \ > > > > > --spawn /bin/swtpm chardev --tpm2 --fd %fd --tpmstate > > > > > dir=/tmp > > > > git head for swtpm is giving > > > > > > > > Created TPM device /dev/tpm1; vTPM device has fd 4, major/minor > > > > = > > > > 247/1. > > > > chardev: unrecognized option '--tpm2' > > > You need the tpm2-preview branches of libtpms and swtpm. Why you > > > need > > > them is related to the format in which the persistent data are > > > written by the TPM 2 implementation. For QEMU it should probably > > > big > > > endian, but so far it's not. > > > > > > Here's a short wiki of libtpms pointing out the issues. > > > > > > https://github.com/stefanberger/libtpms/wiki > > > > > > https://github.com/stefanberger/libtpms/tree/tpm2-previewa.rev138 > > > https://github.com/stefanberger/swtpm/tree/tpm2-preview > > Basically the synopsis is that it's not yet working well enough to > > run the resource manager smoke tests and I need to continue using > > the ibmswtpm2 as the emulator or run against the real thing for the > > time being. > > Have you tried it ? Git head of the tpm2-preview branch of libtpms isn't building for me: tpm2/ExecCommand.c: In function 'ExecuteCommand': tpm2/ExecCommand.c:434:37: error: 'commandIndex' may be used uninitialized in this function [-Werror=maybe-uninitialized] buffer = MemoryGetResponseBuffer(commandIndex); ^ cc1: all warnings being treated as errors I also think you probably need this patch James --- ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi diff --git a/configure.ac b/configure.ac index e84bc0f..4ab149d 100644 --- a/configure.ac +++ b/configure.ac @@ -125,7 +125,7 @@ openssl) esac AC_ARG_WITH([tpm2], - AC_HELP_STRING([--wih-tpm2], + AC_HELP_STRING([--with-tpm2], [build libtpms with TPM2 support (experimental)]), AC_MSG_RESULT([Building with TPM2 support]) #if test "x$cryptolib" = "xfreebl"; then