lkml.org 
[lkml]   [2016]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] tpm: fix byte-order for the value read by tpm2_get_tpm_pt
On Thu, Jul 14, 2016 at 06:07:18PM -0700, Andrey Pronin wrote:
> Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590
> Signed-off-by: Andrey Pronin <apronin@chromium.org>

Please remove the internal commit ID next time. This is also lacking a
description but this time I can write it down.

This not needed for the stable for obvious reasons (only used for
probing).

Fixes: 7a1d7e6dd76a ("tpm: TPM 2.0 baseline support")
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

> ---
> drivers/char/tpm/tpm2-cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
> index a1673dc..a88b31e 100644
> --- a/drivers/char/tpm/tpm2-cmd.c
> +++ b/drivers/char/tpm/tpm2-cmd.c
> @@ -703,7 +703,7 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, u32 *value,
>
> rc = tpm_transmit_cmd(chip, &cmd, sizeof(cmd), desc);
> if (!rc)
> - *value = cmd.params.get_tpm_pt_out.value;
> + *value = be32_to_cpu(cmd.params.get_tpm_pt_out.value);
>
> return rc;
> }
> --
> 2.6.6
>

\
 
 \ /
  Last update: 2016-07-18 21:41    [W:0.045 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site