Patch "tpm: fix byte-order for the value read by tpm2_get_tpm_pt" has been added to the 4.7-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
tpm: fix byte-order for the value read by tpm2_get_tpm_pt
to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tpm-fix-byte-order-for-the-value-read-by-tpm2_get_tpm_pt.patch
and it can be found in the queue-4.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
1b0612b04090e416828c0dd5ed197b0913d834a0Mon Sep 17 00:00:00 2001
From: "[email protected]" <[email protected]>
Date: Thu, 14 Jul 2016 18:07:18 -0700
Subject: tpm: fix byte-order for the value read by tpm2_get_tpm_pt
From: [email protected] <[email protected]>
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.
--- drivers/char/tpm/tpm2-cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm2-cmd.c +1 -1
@@ -703,7 +703,7 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip 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; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.7/tpm-fix-byte-order-for-the-value-read-by-tpm2_get_tpm_pt.patch