TPM2 (Trusted Platform Module) userspace development
 help / color / mirror / Atom feed
From: Duncan.Palmer at data61.csiro.au
To: tpm2@lists.01.org
Subject: [tpm2] tpm2_nvwrite hanging on 3.X
Date: Thu, 08 Feb 2018 06:32:41 +0000	[thread overview]
Message-ID: <1518071561427.40356@data61.csiro.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]

Hi,

I've come back to something I stopped work on early last November. I was working with the tpm2_tools master branch at the time, and have moved to 3.X to get support for PCR based authorisation with tpm2_nvread/write. With 3.X, tpm2_nvwrite is hanging when trying to write to the tpm device file. Using the code from last year (sorry, I no longer have a record of what revision this was), it was working fine (see log snippet below).

I'm using the 1.x branch of tpm2-tss, and I configure tpm2-tools with '--with-tcti-device --without-tcti-socket'. I've also had to modify Makefile.am to get this combination to build;


--LIBMARSHAL_CFLAGS = \
--    -DALG_ECMQV=1
++#LIBMARSHAL_CFLAGS = \
++#    -DALG_ECMQV=1


Can anyone comment on this? Should I raise a bug on your tracker?


Regards,
Duncan


tpm2_nvwrite logs from my testing last year;

root(a)tpm:/home/foo/install/bin# ./tpm2_nvdefine -x 0x1500016 -a 0x40000001 -s 32 -t 0x2000A
root(a)tpm:/home/foo/install/bin# ./tpm2_nvlist
1 NV indexes defined.

  0. NV Index: 0x1500016
  {
    Hash algorithm(nameAlg):11
     attributes: ownerwrite|policywrite|ownerread(0xA000200)
     The size of the data area(dataSize):32
     Authorization Policy for R/W/D:
  }

root(a)tpm:/home/foo/install/bin# echo 'foo' > nv.dat
root(a)tpm:/home/foo/install/bin# ./tpm2_nvwrite -x 0x1500016 -a 0x40000001 nv.dat
66 6f 6f 0a

root(a)tpm:/home/foo/install/bin# ./tpm2_nvread -x 0x1500016 -a 0x40000001
000000: 66 6f 6f 0a 00 00 00 00 00 00 00 00 00 00 00 00  foo.............
000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................




 Duncan Palmer
 Senior Software Engineer | Autonomous Systems
 Data61 | CSIRO

             reply	other threads:[~2018-02-08  6:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08  6:32 Duncan.Palmer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-02-08 11:46 [tpm2] tpm2_nvwrite hanging on 3.X Duncan.Palmer
2018-02-08 23:19 Duncan.Palmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1518071561427.40356@data61.csiro.au \
    --to=tpm2@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox