summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/memattr.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2021-04-30 17:22:51 +0300
committerArd Biesheuvel <ardb@kernel.org>2021-05-22 15:05:13 +0300
commit45add3cc99feaaf57d4b6f01d52d532c16a1caee (patch)
tree71e4334cf90c9e795a51be8e35d587a949f73f68 /drivers/firmware/efi/memattr.c
parent668a84c1bfb2b3fd5a10847825a854d63fac7baa (diff)
downloadlinux-45add3cc99feaaf57d4b6f01d52d532c16a1caee.tar.xz
efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
UEFI spec 2.9, p.108, table 4-1 lists the scenario that both attributes are cleared with the description "No memory access protection is possible for Entry". So we can have valid entries where both attributes are cleared, so remove the check. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Fixes: 10f0d2f577053 ("efi: Implement generic support for the Memory Attributes table") Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/memattr.c')
-rw-r--r--drivers/firmware/efi/memattr.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c
index 5737cb0fcd44..0a9aba5f9cef 100644
--- a/drivers/firmware/efi/memattr.c
+++ b/drivers/firmware/efi/memattr.c
@@ -67,11 +67,6 @@ static bool entry_is_valid(const efi_memory_desc_t *in, efi_memory_desc_t *out)
return false;
}
- if (!(in->attribute & (EFI_MEMORY_RO | EFI_MEMORY_XP))) {
- pr_warn("Entry attributes invalid: RO and XP bits both cleared\n");
- return false;
- }
-
if (PAGE_SIZE > EFI_PAGE_SIZE &&
(!PAGE_ALIGNED(in->phys_addr) ||
!PAGE_ALIGNED(in->num_pages << EFI_PAGE_SHIFT))) {