* [GIT PULL 0/1] EFI fix for v4.18
@ 2018-07-20 1:28 Ard Biesheuvel
2018-07-20 1:28 ` [PATCH 1/1] x86/efi: Access EFI MMIO data as unencrypted when SEV is active Ard Biesheuvel
0 siblings, 1 reply; 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
* [PATCH 1/1] x86/efi: Access EFI MMIO data as unencrypted when SEV is active
2018-07-20 1:28 [GIT PULL 0/1] EFI fix for v4.18 Ard Biesheuvel
@ 2018-07-20 1:28 ` Ard Biesheuvel
2018-07-22 15:19 ` [tip:efi/urgent] " tip-bot for Brijesh Singh
0 siblings, 1 reply; 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
From: Brijesh Singh <brijesh.singh@amd.com>
SEV guest fails to update the UEFI runtime variables stored in the
flash. commit 1379edd59673 ("x86/efi: Access EFI data as encrypted
when SEV is active") unconditionally maps all the UEFI runtime data
as 'encrypted' (C=1). When SEV is active the UEFI runtime data marked
as EFI_MEMORY_MAPPED_IO should be mapped as 'unencrypted' so that both
guest and hypervisor can access the data.
Fixes: 1379edd59673 ("x86/efi: Access EFI data as encrypted ...")
Cc: <stable@vger.kernel.org> # 4.15.x
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
arch/x86/platform/efi/efi_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 77873ce700ae..5f2eb3231607 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -417,7 +417,7 @@ static void __init __map_region(efi_memory_desc_t *md, u64 va)
if (!(md->attribute & EFI_MEMORY_WB))
flags |= _PAGE_PCD;
- if (sev_active())
+ if (sev_active() && md->type != EFI_MEMORY_MAPPED_IO)
flags |= _PAGE_ENC;
pfn = md->phys_addr >> PAGE_SHIFT;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:efi/urgent] x86/efi: Access EFI MMIO data as unencrypted when SEV is active
2018-07-20 1:28 ` [PATCH 1/1] x86/efi: Access EFI MMIO data as unencrypted when SEV is active Ard Biesheuvel
@ 2018-07-22 15:19 ` tip-bot for Brijesh Singh
0 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Brijesh Singh @ 2018-07-22 15:19 UTC (permalink / raw)
To: linux-tip-commits
Cc: tglx, brijesh.singh, ard.biesheuvel, mingo, linux-kernel,
thomas.lendacky, hpa, torvalds, peterz
Commit-ID: 9b788f32bee6b0b293a4bdfca4ad4bb0206407fb
Gitweb: https://git.kernel.org/tip/9b788f32bee6b0b293a4bdfca4ad4bb0206407fb
Author: Brijesh Singh <brijesh.singh@amd.com>
AuthorDate: Fri, 20 Jul 2018 10:28:46 +0900
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sun, 22 Jul 2018 14:10:38 +0200
x86/efi: Access EFI MMIO data as unencrypted when SEV is active
SEV guest fails to update the UEFI runtime variables stored in the
flash.
The following commit:
1379edd59673 ("x86/efi: Access EFI data as encrypted when SEV is active")
unconditionally maps all the UEFI runtime data as 'encrypted' (C=1).
When SEV is active the UEFI runtime data marked as EFI_MEMORY_MAPPED_IO
should be mapped as 'unencrypted' so that both guest and hypervisor can
access the data.
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Cc: <stable@vger.kernel.org> # 4.15.x
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
Fixes: 1379edd59673 ("x86/efi: Access EFI data as encrypted ...")
Link: http://lkml.kernel.org/r/20180720012846.23560-2-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/platform/efi/efi_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 77873ce700ae..5f2eb3231607 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -417,7 +417,7 @@ static void __init __map_region(efi_memory_desc_t *md, u64 va)
if (!(md->attribute & EFI_MEMORY_WB))
flags |= _PAGE_PCD;
- if (sev_active())
+ if (sev_active() && md->type != EFI_MEMORY_MAPPED_IO)
flags |= _PAGE_ENC;
pfn = md->phys_addr >> PAGE_SHIFT;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [GIT PULL 0/1] EFI fix for v4.18
@ 2018-06-22 6:42 Ard Biesheuvel
0 siblings, 0 replies; 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
end of thread, other threads:[~2018-07-22 15:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20 1:28 [GIT PULL 0/1] EFI fix for v4.18 Ard Biesheuvel
2018-07-20 1:28 ` [PATCH 1/1] x86/efi: Access EFI MMIO data as unencrypted when SEV is active Ard Biesheuvel
2018-07-22 15:19 ` [tip:efi/urgent] " tip-bot for Brijesh Singh
-- strict thread matches above, loose matches on Subject: below --
2018-06-22 6:42 [GIT PULL 0/1] EFI fix for v4.18 Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).