All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: tpmdd-devel@lists.sourceforge.net,
	linux-security-module@vger.kernel.org,
	Peter Huewe <peterhuewe@gmx.de>,
	Marcel Selhorst <tpmdd@selhorst.net>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tpm: consolidate the TPM startup code
Date: Tue, 20 Jun 2017 13:31:52 -0600	[thread overview]
Message-ID: <20170620193152.GA3368@obsidianresearch.com> (raw)
In-Reply-To: <20170620181334.28363-1-jarkko.sakkinen@linux.intel.com>

On Tue, Jun 20, 2017 at 08:13:34PM +0200, Jarkko Sakkinen wrote:
> Consolidated all the "manual" TPM startup code to a single function
> in order to make code flows a bit cleaner and migrate to tpm_buf.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>  drivers/char/tpm/tpm-interface.c | 67 +++++++++++++++++++++++++---------------
>  drivers/char/tpm/tpm.h           |  6 +---
>  drivers/char/tpm/tpm2-cmd.c      | 32 +------------------
>  3 files changed, 44 insertions(+), 61 deletions(-)

Makes sense to me

> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index d2b4df6d9894..fbef47d8bd06 100644
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -540,6 +540,47 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space,
>  }
>  EXPORT_SYMBOL_GPL(tpm_transmit_cmd);
>  
> +#define TPM_ORD_STARTUP 153
> +#define TPM_ST_CLEAR 1

We should really have a tpm1.h and tpm2.h that has all these various
constants and things instead of open coding them randomly all over..

Jason

WARNING: multiple messages have this Message-ID (diff)
From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe)
To: linux-security-module@vger.kernel.org
Subject: [PATCH] tpm: consolidate the TPM startup code
Date: Tue, 20 Jun 2017 13:31:52 -0600	[thread overview]
Message-ID: <20170620193152.GA3368@obsidianresearch.com> (raw)
In-Reply-To: <20170620181334.28363-1-jarkko.sakkinen@linux.intel.com>

On Tue, Jun 20, 2017 at 08:13:34PM +0200, Jarkko Sakkinen wrote:
> Consolidated all the "manual" TPM startup code to a single function
> in order to make code flows a bit cleaner and migrate to tpm_buf.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
>  drivers/char/tpm/tpm-interface.c | 67 +++++++++++++++++++++++++---------------
>  drivers/char/tpm/tpm.h           |  6 +---
>  drivers/char/tpm/tpm2-cmd.c      | 32 +------------------
>  3 files changed, 44 insertions(+), 61 deletions(-)

Makes sense to me

> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index d2b4df6d9894..fbef47d8bd06 100644
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -540,6 +540,47 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space,
>  }
>  EXPORT_SYMBOL_GPL(tpm_transmit_cmd);
>  
> +#define TPM_ORD_STARTUP 153
> +#define TPM_ST_CLEAR 1

We should really have a tpm1.h and tpm2.h that has all these various
constants and things instead of open coding them randomly all over..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Jarkko Sakkinen
	<jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] tpm: consolidate the TPM startup code
Date: Tue, 20 Jun 2017 13:31:52 -0600	[thread overview]
Message-ID: <20170620193152.GA3368@obsidianresearch.com> (raw)
In-Reply-To: <20170620181334.28363-1-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

On Tue, Jun 20, 2017 at 08:13:34PM +0200, Jarkko Sakkinen wrote:
> Consolidated all the "manual" TPM startup code to a single function
> in order to make code flows a bit cleaner and migrate to tpm_buf.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
>  drivers/char/tpm/tpm-interface.c | 67 +++++++++++++++++++++++++---------------
>  drivers/char/tpm/tpm.h           |  6 +---
>  drivers/char/tpm/tpm2-cmd.c      | 32 +------------------
>  3 files changed, 44 insertions(+), 61 deletions(-)

Makes sense to me

> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index d2b4df6d9894..fbef47d8bd06 100644
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -540,6 +540,47 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space,
>  }
>  EXPORT_SYMBOL_GPL(tpm_transmit_cmd);
>  
> +#define TPM_ORD_STARTUP 153
> +#define TPM_ST_CLEAR 1

We should really have a tpm1.h and tpm2.h that has all these various
constants and things instead of open coding them randomly all over..

Jason

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

  reply	other threads:[~2017-06-20 19:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 18:13 [PATCH] tpm: consolidate the TPM startup code Jarkko Sakkinen
2017-06-20 18:13 ` Jarkko Sakkinen
2017-06-20 18:13 ` Jarkko Sakkinen
2017-06-20 19:31 ` Jason Gunthorpe [this message]
2017-06-20 19:31   ` Jason Gunthorpe
2017-06-20 19:31   ` Jason Gunthorpe
2017-06-20 20:55   ` Jarkko Sakkinen
2017-06-20 20:55     ` Jarkko Sakkinen
2017-06-20 20:55     ` Jarkko Sakkinen
2017-06-20 21:25     ` Stefan Berger
2017-06-20 21:25       ` Stefan Berger
2017-06-20 21:32       ` Jarkko Sakkinen
2017-06-20 21:32         ` Jarkko Sakkinen
2017-06-20 21:38         ` Jarkko Sakkinen
2017-06-20 21:38           ` Jarkko Sakkinen
2017-06-20 22:16           ` Stefan Berger
2017-06-20 22:16             ` Stefan Berger
2017-06-20 21:46     ` Jarkko Sakkinen
2017-06-20 21:46       ` Jarkko Sakkinen
2017-06-20 21:46       ` Jarkko Sakkinen
2017-06-20 20:58   ` [tpmdd-devel] " Ken Goldman
2017-06-20 20:58     ` Ken Goldman
2017-06-20 20:58     ` Ken Goldman

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=20170620193152.GA3368@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=tpmdd@selhorst.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.