Skip to content

Commit b828601

Browse files
hkallweitgregkh
authored andcommitted
efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
[ Upstream commit 45add3c ] 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: 10f0d2f ("efi: Implement generic support for the Memory Attributes table") Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 5148066 commit b828601

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

‎drivers/firmware/efi/memattr.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ static bool entry_is_valid(const efi_memory_desc_t *in, efi_memory_desc_t *out)
6767
return false;
6868
}
6969

70-
if (!(in->attribute & (EFI_MEMORY_RO | EFI_MEMORY_XP))) {
71-
pr_warn("Entry attributes invalid: RO and XP bits both cleared\n");
72-
return false;
73-
}
74-
7570
if (PAGE_SIZE > EFI_PAGE_SIZE &&
7671
(!PAGE_ALIGNED(in->phys_addr) ||
7772
!PAGE_ALIGNED(in->num_pages << EFI_PAGE_SHIFT))) {

0 commit comments

Comments
 (0)