]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tpm: fix byte-order for the value read by tpm2_get_tpm_pt
authorapronin@chromium.org <apronin@chromium.org>
Fri, 15 Jul 2016 01:07:18 +0000 (18:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:21:21 +0000 (15:21 +0200)
commit63cab845dd0839ef680d28629b8e9e1fe75f7575
treeb39ac96ac3c1b1f61a7dc6538c896b49c1d447ff
parentf1a9189e1c804f6695e96f04942cee31470fe25c
tpm: fix byte-order for the value read by tpm2_get_tpm_pt

commit 1b0612b04090e416828c0dd5ed197b0913d834a0 upstream.

The result must be converted from BE byte order, which is used by the
TPM2 protocol. This has not popped out because tpm2_get_tpm_pt() has
been only used for probing.

Fixes: 7a1d7e6dd76a ("tpm: TPM 2.0 baseline support")
Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm2-cmd.c