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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 10:43:49 +0000 (12:43 +0200)
commit2f79474800dca0d8c5f3e9516bdacdbb80414356
treea423bcb9f49920c06d40241899cbe1f59b48e17c
parenta27e61c6a131cae65e2250c670ec378d7947a54e
efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared

[ Upstream commit 45add3cc99feaaf57d4b6f01d52d532c16a1caee ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/efi/memattr.c