|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.5] x86/EFI: fix EFI_MEMORY_WP handling
commit 37bca10a9226959aba160ffb1843042d0c05904e
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Jun 18 08:54:57 2015 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Jun 18 08:54:57 2015 +0200
x86/EFI: fix EFI_MEMORY_WP handling
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Backport: Also fix EFI_MEMORY_XP handling (along the lines of what
master commit abcf15fa8f ["x86: switch default mapping attributes
to non-executable"] does): We must not set the NX bit when the CPU
doesn't support it, as the bit being set may trigger Reserved Bit
faults in that case.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
master commit: af23e79f46583abc18e8cffdec0b69297cfbdff0
master date: 2015-06-10 12:01:35 +0200
---
xen/common/efi/boot.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c
index 3b87f7e..d64a647 100644
--- a/xen/common/efi/boot.c
+++ b/xen/common/efi/boot.c
@@ -1196,8 +1196,8 @@ void __init efi_init_memory(void)
}
if ( desc->Attribute & EFI_MEMORY_WP )
- prot &= _PAGE_RW;
- if ( desc->Attribute & EFI_MEMORY_XP )
+ prot &= ~_PAGE_RW;
+ if ( (desc->Attribute & EFI_MEMORY_XP) && cpu_has_nx )
prot |= _PAGE_NX_BIT;
if ( pfn_to_pdx(emfn - 1) < (DIRECTMAP_SIZE >> PAGE_SHIFT) &&
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.5
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |