tpm_eventlog.c: fix binary_bios_measurements
authorHarald Hoyer <harald@redhat.com>
Sat, 6 Feb 2016 14:44:42 +0000 (15:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 16:08:47 +0000 (09:08 -0700)
commit062c8a4ff40fedf82c1ec177a63b06c41801c2e9
tree5ab5cac36d8f218b7e9c197d34d2cebcf3b99ba3
parent160f50a3f40f3aa32ec7c7c9d18b3ffb5bdf12e2
tpm_eventlog.c: fix binary_bios_measurements

commit 186d124f07da193a8f47e491af85cb695d415f2f upstream.

The commit 0cc698af36ff ("vTPM: support little endian guests") copied
the event, but without the event data, did an endian conversion on the
size and tried to output the event data from the copied version, which
has only have one byte of the data, resulting in garbage event data.

[jarkko.sakkinen@linux.intel.com: fixed minor coding style issues and
 renamed the local variable tempPtr as temp_ptr now that there is an
 excuse to do this.]

Signed-off-by: Harald Hoyer <harald@redhat.com>
Fixes: 0cc698af36ff ("vTPM: support little endian guests")
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm_eventlog.c