Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit79832f0

Browse files
Ard BiesheuvelIngo Molnar
Ard Biesheuvel
authored and
Ingo Molnar
committed
efi/libstub/tpm: Initialize pointer variables to zero for mixed mode
As reported by Jeremy Cline, running the new TPM libstub code in mixedmode (i.e., 64-bit kernel on 32-bit UEFI) results in hangs when invokingthe TCG2 protocol, or when accessing the log_tbl pool allocation.The reason turns out to be that in both cases, the 64-bit pointervariables are not fully initialized by the 32-bit EFI code, and sowe should take care to zero initialize these variables beforehand,or we'll end up dereferencing bogus pointers.Reported-by: Jeremy Cline <jeremy@jcline.org>Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>Cc: Linus Torvalds <torvalds@linux-foundation.org>Cc: Peter Zijlstra <peterz@infradead.org>Cc: Thomas Gleixner <tglx@linutronix.de>Cc: hdegoede@redhat.comCc: jarkko.sakkinen@linux.intel.comCc: javierm@redhat.comCc: linux-efi@vger.kernel.orgCc: tweek@google.comLink:http://lkml.kernel.org/r/20180313140922.17266-2-ard.biesheuvel@linaro.orgSigned-off-by: Ingo Molnar <mingo@kernel.org>
1 parentfc6eabb commit79832f0

File tree

1 file changed

+2
-2
lines changed
  • drivers/firmware/efi/libstub

1 file changed

+2
-2
lines changed

‎drivers/firmware/efi/libstub/tpm.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ void efi_retrieve_tpm2_eventlog_1_2(efi_system_table_t *sys_table_arg)
6868
efi_guid_tlinux_eventlog_guid=LINUX_EFI_TPM_EVENT_LOG_GUID;
6969
efi_status_tstatus;
7070
efi_physical_addr_tlog_location,log_last_entry;
71-
structlinux_efi_tpm_eventlog*log_tbl;
71+
structlinux_efi_tpm_eventlog*log_tbl=NULL;
7272
unsigned longfirst_entry_addr,last_entry_addr;
7373
size_tlog_size,last_entry_size;
7474
efi_bool_ttruncated;
75-
void*tcg2_protocol;
75+
void*tcg2_protocol=NULL;
7676

7777
status=efi_call_early(locate_protocol,&tcg2_guid,NULL,
7878
&tcg2_protocol);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp