All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/1] EFI fix for v4.18
@ 2018-06-22  6:42 Ard Biesheuvel
  2018-06-22  6:42 ` [PATCH 1/1] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode Ard Biesheuvel
  0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2018-06-22  6:42 UTC (permalink / raw)
  To: linux-efi, Ingo Molnar, Thomas Gleixner
  Cc: ard.biesheuvel, linux-kernel, Hans de Goede

The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40:

  Linux 4.18-rc1 (2018-06-17 08:04:49 +0900)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git tags/efi-urgent

for you to fetch changes up to 9cd00e314dee25f9b2e2c47759988cb353165011:

  efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode (2018-06-22 08:36:20 +0200)

----------------------------------------------------------------
EFI fix for v4.18:
- initialize some efi_physical_addr_t variables to 0 so that buggy 32-bit
  TPM UEFI code that only sets the lower 32 bits will work as expected.

----------------------------------------------------------------
Hans de Goede (1):
      efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode

 drivers/firmware/efi/libstub/tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode
  2018-06-22  6:42 [GIT PULL 0/1] EFI fix for v4.18 Ard Biesheuvel
@ 2018-06-22  6:42 ` Ard Biesheuvel
  2018-06-22  9:00   ` [tip:efi/urgent] " tip-bot for Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2018-06-22  6:42 UTC (permalink / raw)
  To: linux-efi, Ingo Molnar, Thomas Gleixner
  Cc: ard.biesheuvel, Hans de Goede, linux-kernel

From: Hans de Goede <hdegoede@redhat.com>

Commit 79832f0b5f71 ("efi/libstub/tpm: Initialize pointer variables to zero
for mixed mode") fixes a problem with the tpm code on mixed mode (64 bit
kernel on 32 bit UEFI), where 64-bit pointer variables are not fully
initialized by the 32-bit EFI code.

A similar problem applies to the efi_physical_addr_t variables which
are written by the get_event_log EFI call. Even though efi_physical_addr_t
is 64 bit everywhere it seems that some 32 bit UEFI implementations only
fill in the lower 32 bits when passed a pointer to an efi_physical_addr_t
to fill.

This commit initializes these to 0 to, to ensure the upper 32 bits are
0 in mixed mode. This fixes recent kernels sometimes hanging during
early boot on mixed mode UEFI systems.

Cc: <stable@vger.kernel.org> # v4.16+
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 drivers/firmware/efi/libstub/tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c
index caa37a6dd9d4..a90b0b8fc69a 100644
--- a/drivers/firmware/efi/libstub/tpm.c
+++ b/drivers/firmware/efi/libstub/tpm.c
@@ -64,7 +64,7 @@ static void efi_retrieve_tpm2_eventlog_1_2(efi_system_table_t *sys_table_arg)
 	efi_guid_t tcg2_guid = EFI_TCG2_PROTOCOL_GUID;
 	efi_guid_t linux_eventlog_guid = LINUX_EFI_TPM_EVENT_LOG_GUID;
 	efi_status_t status;
-	efi_physical_addr_t log_location, log_last_entry;
+	efi_physical_addr_t log_location = 0, log_last_entry = 0;
 	struct linux_efi_tpm_eventlog *log_tbl = NULL;
 	unsigned long first_entry_addr, last_entry_addr;
 	size_t log_size, last_entry_size;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [tip:efi/urgent] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode
  2018-06-22  6:42 ` [PATCH 1/1] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode Ard Biesheuvel
@ 2018-06-22  9:00   ` tip-bot for Hans de Goede
  0 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Hans de Goede @ 2018-06-22  9:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, hdegoede, hpa, mingo, ard.biesheuvel, torvalds, tglx,
	linux-kernel

Commit-ID:  52e1cf2d19c2e62e6a81b8de3f7320d033917dd5
Gitweb:     https://git.kernel.org/tip/52e1cf2d19c2e62e6a81b8de3f7320d033917dd5
Author:     Hans de Goede <hdegoede@redhat.com>
AuthorDate: Fri, 22 Jun 2018 08:42:22 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 22 Jun 2018 10:58:27 +0200

efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode

Commit:

  79832f0b5f71 ("efi/libstub/tpm: Initialize pointer variables to zero for mixed mode")

fixes a problem with the tpm code on mixed mode (64-bit kernel on 32-bit UEFI),
where 64-bit pointer variables are not fully initialized by the 32-bit EFI code.

A similar problem applies to the efi_physical_addr_t variables which
are written by the ->get_event_log() EFI call. Even though efi_physical_addr_t
is 64-bit everywhere, it seems that some 32-bit UEFI implementations only
fill in the lower 32 bits when passed a pointer to an efi_physical_addr_t
to fill.

This commit initializes these to 0 to, to ensure the upper 32 bits are
0 in mixed mode. This fixes recent kernels sometimes hanging during
early boot on mixed mode UEFI systems.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: <stable@vger.kernel.org> # v4.16+
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180622064222.11633-2-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/libstub/tpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/libstub/tpm.c b/drivers/firmware/efi/libstub/tpm.c
index caa37a6dd9d4..a90b0b8fc69a 100644
--- a/drivers/firmware/efi/libstub/tpm.c
+++ b/drivers/firmware/efi/libstub/tpm.c
@@ -64,7 +64,7 @@ static void efi_retrieve_tpm2_eventlog_1_2(efi_system_table_t *sys_table_arg)
 	efi_guid_t tcg2_guid = EFI_TCG2_PROTOCOL_GUID;
 	efi_guid_t linux_eventlog_guid = LINUX_EFI_TPM_EVENT_LOG_GUID;
 	efi_status_t status;
-	efi_physical_addr_t log_location, log_last_entry;
+	efi_physical_addr_t log_location = 0, log_last_entry = 0;
 	struct linux_efi_tpm_eventlog *log_tbl = NULL;
 	unsigned long first_entry_addr, last_entry_addr;
 	size_t log_size, last_entry_size;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [GIT PULL 0/1] EFI fix for v4.18
@ 2018-07-20  1:28 Ard Biesheuvel
  0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2018-07-20  1:28 UTC (permalink / raw)
  To: linux-efi, Ingo Molnar, Thomas Gleixner
  Cc: Ard Biesheuvel, linux-kernel, Brijesh Singh, Tom Lendacky

The following changes since commit 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe:

  Linux 4.18-rc5 (2018-07-15 12:49:31 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git efi-urgent

for you to fetch changes up to b0d2fc41203d3712585b71d8f14914ff6a266278:

  x86/efi: Access EFI MMIO data as unencrypted when SEV is active (2018-07-17 11:10:56 +0800)

----------------------------------------------------------------
Apply a fix from Brijesh to prevent the [unencrypted] SPI flash from
being mapped with the encryption bit set when running with SEV enabled.

----------------------------------------------------------------
Brijesh Singh (1):
      x86/efi: Access EFI MMIO data as unencrypted when SEV is active

 arch/x86/platform/efi/efi_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-20  1:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22  6:42 [GIT PULL 0/1] EFI fix for v4.18 Ard Biesheuvel
2018-06-22  6:42 ` [PATCH 1/1] efi/libstub/tpm: Initialize efi_physical_addr_t vars to zero for mixed mode Ard Biesheuvel
2018-06-22  9:00   ` [tip:efi/urgent] " tip-bot for Hans de Goede
2018-07-20  1:28 [GIT PULL 0/1] EFI fix for v4.18 Ard Biesheuvel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.