Linux Integrity Measurement development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: linux-integrity@vger.kernel.org,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Subject: Re: [PATCH URGENT FIX] security: keys: trusted: fix lost handle flush
Date: Fri, 13 Dec 2019 08:49:43 -0500	[thread overview]
Message-ID: <1576244983.3382.9.camel@HansenPartnership.com> (raw)
In-Reply-To: <1576240555.3382.5.camel@HansenPartnership.com>

On Fri, 2019-12-13 at 07:35 -0500, James Bottomley wrote:
> On Fri, 2019-12-13 at 11:10 +0530, Sumit Garg wrote:
[...]
> >  Also, I think we need "#else" part for this API as well.
> 
> No, we shouldn't ... the #else part is only for functions which are
> called when the TPM isn't compiled in.  That should never happen with
> tpm2_flush_context, so if it ever does we want the compile to break.

Just on this bit, it looks like we've given insufficient thought to
what it means to move TPM internals using code outside of the tpm
directory.  I think we really need two include/linux files, one tpm.h
for external code that going to do stuff which it would do anyway even
if a TPM weren't compiled in, like the PCR read and extend.  The other
tpm-internal.h for code that wants access to TPM internal functions
like flushing and session handling and will take care itself of the
case where the TPM isn't compiled in, like the trusted key code does
through Kconfig dependencies.  The test should be easy: if it was
originally in drivers/char/tpm/tpm.h it belongs in include/linux/tpm-
internals.h

James


  reply	other threads:[~2019-12-13 20:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 17:58 [PATCH URGENT FIX] security: keys: trusted: fix lost handle flush James Bottomley
2019-12-12 19:02 ` Jerry Snitselaar
2019-12-13  5:40 ` Sumit Garg
2019-12-13 12:35   ` James Bottomley
2019-12-13 13:49     ` James Bottomley [this message]
2019-12-16  6:17       ` Sumit Garg
2019-12-16  6:58         ` James Bottomley
2019-12-17  2:05 ` Jarkko Sakkinen

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=1576244983.3382.9.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=sumit.garg@linaro.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