tpm_eventlog.c: fix binary_bios_measurements
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jason Gunthorpe
Reviewed-byQuoted 7 lines · Harald Hoyer
From
57558a66cfadd329cdf63570af7ad1d0fd61010fMon Sep 17 00:00:00 2001
From: Harald Hoyer <[email protected]>
Date: Sat, 6 Feb 2016 15:44:42 +0100
Subject: [PATCH]tpm_eventlog.c: fixbinary_bios_measurementscommit
0cc698af36ff22295dce2f5e46b0cfe605789fa4copied the event, but
This should be a fixes line, see Documentation/
Quoted 13 lines
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.
Signed-off-by Harald Hoyer <[email protected]>drivers/char/tpm/tpm_eventlog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/char/tpm/tpm_eventlog.c +1
-0+++ b/drivers/char/tpm/tpm_eventlog.c@@ -244,7 +244,12 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v)
drivers/char/tpm/tpm_eventlog.c static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) · line 253
Quoted 10 lines
drivers/char/tpm/tpm_eventlog.c +6
-1tempPtr = (char *)&temp_event; -for (i =0 ; i <sizeof (struct tcpa_event ) + temp_event.event_size; i++) +for (i =0 ; i <sizeof (struct tcpa_event )-1 ; i++) +seq_putc (m, tempPtr[i]); + + tempPtr = (char *)v; + +for (i =sizeof (struct tcpa_event )-1 ; i <sizeof (struct tcpa_event ) + temp_event.event_size; i++)seq_putc (m, tempPtr[i]);
Looks reasonable otherwise.
Jason
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
Jarkko Sakkinen
Reviewed-byQuoted 13 lines · Harald Hoyer
Find attached a patch for the tpm kernel driver, which is fixing
/sys/kernel/security/tpm0/binary_bios_measurementsThanks!
Harald Hoyer
From
57558a66cfadd329cdf63570af7ad1d0fd61010fMon Sep 17 00:00:00 2001
From: Harald Hoyer <[email protected]>
Date: Sat, 6 Feb 2016 15:44:42 +0100
Subject: [PATCH]tpm_eventlog.c: fixbinary_bios_measurements
Quoted 6 lines
commit
0cc698af36ff22295dce2f5e46b0cfe605789fa4copied 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.Signed-off-by Harald Hoyer <[email protected]>
PS. Don't send a new patch. I can put the "Fixes:" tag in place.
/Jarkko
Quoted 25 lines
--- drivers/char/tpm/tpm_eventlog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/char/tpm/tpm_eventlog.c +6
-1@@ -244,7 +244,12 @@ static int tpm_binary_bios_measurements_show(struct seq_file *m, void *v) tempPtr = (char *)&temp_event; -for (i =0 ; i <sizeof (struct tcpa_event ) + temp_event.event_size; i++) +for (i =0 ; i <sizeof (struct tcpa_event )-1 ; i++) +seq_putc (m, tempPtr[i]); + + tempPtr = (char *)v; + +for (i =sizeof (struct tcpa_event )-1 ; i <sizeof (struct tcpa_event ) + temp_event.event_size; i++)seq_putc (m, tempPtr[i]);return 0 ;Signature · 1 line
2.7.0
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140