From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: linux-kernel@vger.kernel.org, Peter Huewe <peterhuewe@gmx.de>,
Jerry Snitselaar <jsnitsel@redhat.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
Philip Tricca <philip.b.tricca@intel.com>,
linux-integrity@vger.kernel.org,
William Roberts <william.c.roberts@intel.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v2] tpm: return a TPM_RC_COMMAND_CODE response if a command isn't implemented
Date: Thu, 30 Nov 2017 18:38:47 +0200 [thread overview]
Message-ID: <20171130163847.dmsmgms3wkbuptwa@linux.intel.com> (raw)
In-Reply-To: <e7e154f8-d26f-a12a-96b9-603508ae0e21@redhat.com>
On Wed, Nov 29, 2017 at 07:24:48PM +0100, Javier Martinez Canillas wrote:
> Hello Jarkko,
>
> On 11/29/2017 06:57 PM, Jarkko Sakkinen wrote:
> > On Wed, Nov 29, 2017 at 12:08:46PM +0100, Javier Martinez Canillas
> > wrote:
> >> +#define TPM2_RC_LAYER_SHIFT 16 +#define TPM2_RESMGRTPM_RC_LAYER
> >> (11 << TPM2_RC_LAYER_SHIFT)
> >
> > I got this spec from Philip [1].
> >
> > Couple of remarks:
> >
> > * What is the difference between TSS2_RESMGR_RC_LAYER and
> > TSS2_RESMGR_TPM_RC_LAYER?
>
> The difference is the type of error returned in each case. TSS2_RESMGR_RC_LAYER
> means that's an error internal to the TAB/RM and so the response code is one of
> the TSS2_BASE_RC_* error values.
>
> But TSS2_RESMGR_TPM_RC_LAYER means that the resource manager is taking over some
> TPM functionality (i.e: validation) and so the response code is a TSS2_RC_* error
> value, liket is the case for this patch (TPM_RC_COMMAND_CODE).
>
> > * Should the driver code use TSS2 or TPM2 prefix?
> >
>
> That's a very good question. I used TPM2 as prefix instead of TSS2 to keep it
> consistent with the rest of the driver, but probably TSS2 should be used instead
> so people can search more easy the constant in the specification doc.
OK, I'll change the prefix.
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
I'll postpone testing to next week as I try to get v7 of the SGX patch
set done during this week.
I'll add test case or two for this to my smoke test suite (contributions
are of course welcome):
https://github.com/jsakkine-intel/tpm2-scripts
/Jarkko
next prev parent reply other threads:[~2017-11-30 16:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 11:08 [PATCH v2] tpm: return a TPM_RC_COMMAND_CODE response if a command isn't implemented Javier Martinez Canillas
2017-11-29 17:57 ` Jarkko Sakkinen
2017-11-29 18:24 ` Javier Martinez Canillas
2017-11-30 2:13 ` Philip Tricca
2017-11-30 16:39 ` Jarkko Sakkinen
2017-11-30 16:38 ` Jarkko Sakkinen [this message]
2017-11-30 17:21 ` Javier Martinez Canillas
2017-11-30 1:45 ` Philip Tricca
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=20171130163847.dmsmgms3wkbuptwa@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=javierm@redhat.com \
--cc=jgg@ziepe.ca \
--cc=jsnitsel@redhat.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=philip.b.tricca@intel.com \
--cc=william.c.roberts@intel.com \
/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