Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1443845 > unrolled thread

[PATCH 0/2] tpm: better support for 32-bit tpm2 properties

Started byAndrey Pronin <apronin@chromium.org>
First post2016-07-15 03:10 +0200
Last post2016-07-18 21:00 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] tpm: better support for 32-bit tpm2 properties Andrey Pronin <apronin@chromium.org> - 2016-07-15 03:10 +0200
    [PATCH 1/2] tpm: define constants for tpm2 properties Andrey Pronin <apronin@chromium.org> - 2016-07-15 03:10 +0200
      Re: [PATCH 1/2] tpm: define constants for tpm2 properties Jason Gunthorpe <jgunthorpe@obsidianresearch.com> - 2016-07-15 05:10 +0200
      Re: [PATCH 1/2] tpm: define constants for tpm2 properties Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-07-18 21:00 +0200

#1443845 — [PATCH 0/2] tpm: better support for 32-bit tpm2 properties

FromAndrey Pronin <apronin@chromium.org>
Date2016-07-15 03:10 +0200
Subject[PATCH 0/2] tpm: better support for 32-bit tpm2 properties
Message-ID<rUZND-h3-3@gated-at.bofh.it>
These patches help working with 32-bit TPM2.0-specific properties that
can be read using TPM2_GetCapability(capability = TPM_CAP_TPM_PROPERTIES):
 - TPM_PT_PERMANENT
 - TPM_PT_STARTUP_CLEAR

Andrey Pronin (2):
  tpm: define constants for tpm2 properties
  tpm: fix byte-order for the value read by tpm2_get_tpm_pt

 drivers/char/tpm/tpm.h      | 26 ++++++++++++++++++++++++++
 drivers/char/tpm/tpm2-cmd.c |  2 +-
 2 files changed, 27 insertions(+), 1 deletion(-)

-- 
2.6.6

[toc] | [next] | [standalone]


#1443847 — [PATCH 1/2] tpm: define constants for tpm2 properties

FromAndrey Pronin <apronin@chromium.org>
Date2016-07-15 03:10 +0200
Subject[PATCH 1/2] tpm: define constants for tpm2 properties
Message-ID<rUZNE-h3-15@gated-at.bofh.it>
In reply to#1443845
Change-Id: I47cb1793736781fbea93e5bf80b783e0ac9e8628
Signed-off-by: Andrey Pronin <apronin@chromium.org>
---
 drivers/char/tpm/tpm.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 8890df2..ad3b9d1 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -127,6 +127,32 @@ enum tpm2_capabilities {
 	TPM2_CAP_TPM_PROPERTIES = 6,
 };
 
+enum tpm2_properties {
+	TPM2_PT_NONE			= 0,
+	TPM2_PT_GROUP			= 0x100,
+	TPM2_PT_FIXED			= TPM2_PT_GROUP,
+	TPM2_PT_VAR			= TPM2_PT_GROUP * 2,
+	TPM2_PT_PERMANENT		= TPM2_PT_VAR + 0,
+	TPM2_PT_STARTUP_CLEAR		= TPM2_PT_VAR + 1,
+};
+
+enum tpm2_attr_permanent {
+	TPM2_ATTR_OWNER_AUTH_SET	= BIT(0),
+	TPM2_ATTR_ENDORSEMENT_AUTH_SET	= BIT(1),
+	TPM2_ATTR_LOCKOUT_AUTH_SET	= BIT(2),
+	TPM2_ATTR_DISABLE_CLEAR		= BIT(8),
+	TPM2_ATTR_IN_LOCKOUT		= BIT(9),
+	TPM2_ATTR_TPM_GENERATED_EPS	= BIT(10),
+};
+
+enum tpm2_attr_startup_clear {
+	TPM2_ATTR_PH_ENABLE		= BIT(0),
+	TPM2_ATTR_SH_ENABLE		= BIT(1),
+	TPM2_ATTR_EH_ENABLE		= BIT(2),
+	TPM2_ATTR_PH_ENABLE_NV		= BIT(3),
+	TPM2_ATTR_ORDERLY = BIT(31),
+};
+
 enum tpm2_startup_types {
 	TPM2_SU_CLEAR	= 0x0000,
 	TPM2_SU_STATE	= 0x0001,
-- 
2.6.6

[toc] | [prev] | [next] | [standalone]


#1443904 — Re: [PATCH 1/2] tpm: define constants for tpm2 properties

FromJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date2016-07-15 05:10 +0200
SubjectRe: [PATCH 1/2] tpm: define constants for tpm2 properties
Message-ID<rV1FL-1xr-1@gated-at.bofh.it>
In reply to#1443847
On Thu, Jul 14, 2016 at 06:07:17PM -0700, Andrey Pronin wrote:
> Change-Id: I47cb1793736781fbea93e5bf80b783e0ac9e8628

These commit messages are no good, generally for all your
patches. Drop the internal change-id and provide a suitable
description.

Do not add dead code to the kernel, so this patch should be in a
series that actually uses the new constants.

Jason

[toc] | [prev] | [next] | [standalone]


#1445735 — Re: [PATCH 1/2] tpm: define constants for tpm2 properties

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-07-18 21:00 +0200
SubjectRe: [PATCH 1/2] tpm: define constants for tpm2 properties
Message-ID<rWlVM-1wg-15@gated-at.bofh.it>
In reply to#1443847
On Thu, Jul 14, 2016 at 06:07:17PM -0700, Andrey Pronin wrote:
> Change-Id: I47cb1793736781fbea93e5bf80b783e0ac9e8628
> Signed-off-by: Andrey Pronin <apronin@chromium.org>

I'm not going to apply this. The patch has no value. We only want to
have a subset of constants that are *used* by the kernel.

/Jarkko

> ---
>  drivers/char/tpm/tpm.h | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> index 8890df2..ad3b9d1 100644
> --- a/drivers/char/tpm/tpm.h
> +++ b/drivers/char/tpm/tpm.h
> @@ -127,6 +127,32 @@ enum tpm2_capabilities {
>  	TPM2_CAP_TPM_PROPERTIES = 6,
>  };
>  
> +enum tpm2_properties {
> +	TPM2_PT_NONE			= 0,
> +	TPM2_PT_GROUP			= 0x100,
> +	TPM2_PT_FIXED			= TPM2_PT_GROUP,
> +	TPM2_PT_VAR			= TPM2_PT_GROUP * 2,
> +	TPM2_PT_PERMANENT		= TPM2_PT_VAR + 0,
> +	TPM2_PT_STARTUP_CLEAR		= TPM2_PT_VAR + 1,
> +};
> +
> +enum tpm2_attr_permanent {
> +	TPM2_ATTR_OWNER_AUTH_SET	= BIT(0),
> +	TPM2_ATTR_ENDORSEMENT_AUTH_SET	= BIT(1),
> +	TPM2_ATTR_LOCKOUT_AUTH_SET	= BIT(2),
> +	TPM2_ATTR_DISABLE_CLEAR		= BIT(8),
> +	TPM2_ATTR_IN_LOCKOUT		= BIT(9),
> +	TPM2_ATTR_TPM_GENERATED_EPS	= BIT(10),
> +};
> +
> +enum tpm2_attr_startup_clear {
> +	TPM2_ATTR_PH_ENABLE		= BIT(0),
> +	TPM2_ATTR_SH_ENABLE		= BIT(1),
> +	TPM2_ATTR_EH_ENABLE		= BIT(2),
> +	TPM2_ATTR_PH_ENABLE_NV		= BIT(3),
> +	TPM2_ATTR_ORDERLY = BIT(31),
> +};
> +
>  enum tpm2_startup_types {
>  	TPM2_SU_CLEAR	= 0x0000,
>  	TPM2_SU_STATE	= 0x0001,
> -- 
> 2.6.6
> 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web