tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: tpmdd-devel@lists.sourceforge.net,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org, jgunthorpe@obsidianresearch.com
Subject: Re: [PATCH v6 1/3] tpm: Introduce flag TPM_TRANSMIT_RAW
Date: Wed, 24 May 2017 15:18:40 -0700	[thread overview]
Message-ID: <20170524221840.lv37joufkdepa5ci@intel.com> (raw)
In-Reply-To: <1495661981-27249-2-git-send-email-stefanb@linux.vnet.ibm.com>

On Wed, May 24, 2017 at 05:39:39PM -0400, Stefan Berger wrote:
> Introduce the flag TPM_TRANSMIT_RAW that allows us to transmit
> a command without recursing into the requesting of locality.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

I'll rename the constant as TPM_TRANSMIT_NO_LOCALITY if you don't mind.

/Jarkko

> ---
>  drivers/char/tpm/tpm-interface.c | 3 ++-
>  drivers/char/tpm/tpm.h           | 1 +
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index 4ed08ab..2eacda2 100644
> --- a/drivers/char/tpm/tpm-interface.c
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -416,7 +416,8 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
>  	/* Store the decision as chip->locality will be changed. */
>  	need_locality = chip->locality == -1;
>  
> -	if (need_locality && chip->ops->request_locality)  {
> +	if (!(flags & TPM_TRANSMIT_RAW) &&
> +	    need_locality && chip->ops->request_locality)  {
>  		rc = chip->ops->request_locality(chip, 0);
>  		if (rc < 0)
>  			goto out_no_locality;
> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> index e81d8c7..25d9858 100644
> --- a/drivers/char/tpm/tpm.h
> +++ b/drivers/char/tpm/tpm.h
> @@ -525,6 +525,7 @@ extern struct idr dev_nums_idr;
>  
>  enum tpm_transmit_flags {
>  	TPM_TRANSMIT_UNLOCKED	= BIT(0),
> +	TPM_TRANSMIT_RAW	= BIT(1),
>  };
>  
>  ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
> -- 
> 2.4.3
> 

  reply	other threads:[~2017-05-24 22:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 21:39 [PATCH v6 0/3] Extend the vTPM proxy driver to pass locality Stefan Berger
     [not found] ` <1495661981-27249-1-git-send-email-stefanb-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-05-24 21:39   ` [PATCH v6 1/3] tpm: Introduce flag TPM_TRANSMIT_RAW Stefan Berger
2017-05-24 22:18     ` Jarkko Sakkinen [this message]
2017-05-24 22:59       ` Stefan Berger
2017-05-24 21:39   ` [PATCH v6 2/3] tpm: vtpm_proxy: Implement request_locality function Stefan Berger
2017-05-24 22:21     ` Jarkko Sakkinen
2017-05-24 23:03       ` Stefan Berger
2017-05-25  0:09         ` Jarkko Sakkinen
2017-06-02  0:34           ` Stefan Berger
2017-06-04 15:43             ` Jarkko Sakkinen
     [not found]               ` <20170604154332.blhrcj43xgcswxvu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-06-04 16:27                 ` Jarkko Sakkinen
2017-06-04 20:09                   ` Stefan Berger
2017-05-24 21:39   ` [PATCH v6 3/3] tpm: vtpm_proxy: Prevent userspace from sending driver command Stefan Berger
2017-05-24 22:22     ` Jarkko Sakkinen
     [not found]       ` <20170524222211.bweuzimsy2vm2lym-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-25  0:10         ` 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=20170524221840.lv37joufkdepa5ci@intel.com \
    --to=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=tpmdd-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).