efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 30 Apr 2021 14:22:51 +0000 (16:22 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 22 May 2021 12:05:13 +0000 (14:05 +0200)
commit45add3cc99feaaf57d4b6f01d52d532c16a1caee
tree71e4334cf90c9e795a51be8e35d587a949f73f68
parent668a84c1bfb2b3fd5a10847825a854d63fac7baa
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>
drivers/firmware/efi/memattr.c