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

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

The issue results from the change in 937d234 (tpm2_nv(read|write): query tpm
for max buffer size). On my platform, the max buffer size determined by
tpm2_util_nv_max_buffer_size() is 0.

I'll happily hack around this for now, however is this something worth raising
further? I'm using an Intel NUC (model NUC5i7RYH) which has recently gone out
of production, so unless this is very unexpected and likely to impact other
platforms, I'm guessing it's not worth worrying too much about.

Regards,
Dunk


Duncan Palmer
Senior Software Engineer | Autonomous Systems
Data61 | CSIRO


________________________________________
From: tpm2 <tpm2-bounces(a)lists.01.org> on behalf of Duncan.Palmer(a)data61.csiro.au <Duncan.Palmer(a)data61.csiro.au>
Sent: 08 February 2018 21:46
To: tpm2(a)lists.01.org
Subject: [ExternalEmail] Re: [tpm2] tpm2_nvwrite hanging on 3.X

I get the same behaviour on master., tho it builds without issues.

Duncan Palmer
Senior Software Engineer | Autonomous Systems
Data61 | CSIRO
E duncan.palmer(a)csiro.au
Queensland Centre for Advanced Technologies (QCAT),
1 Technology Court, Pullenvale QLD, 4069
www.data61.csiro.au

CSIRO’s Digital Productivity business unit and NICTA have joined forces to create digital powerhouse Data61

________________________________________
From: tpm2 <tpm2-bounces(a)lists.01.org> on behalf of Duncan.Palmer(a)data61.csiro.au <Duncan.Palmer(a)data61.csiro.au>
Sent: 08 February 2018 16:32
To: tpm2(a)lists.01.org
Subject: [ExternalEmail] [tpm2] tpm2_nvwrite hanging on 3.X

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
_______________________________________________
tpm2 mailing list
tpm2(a)lists.01.org
https://lists.01.org/mailman/listinfo/tpm2
_______________________________________________
tpm2 mailing list
tpm2(a)lists.01.org
https://lists.01.org/mailman/listinfo/tpm2

             reply	other threads:[~2018-02-08 23:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 23:19 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  6:32 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=1518131951781.81366@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