Patch "efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared" has been added to the 4.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     efi-allow-efi_memory_xp-and-efi_memory_ro-both-to-be.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 868081d42b0d6aa7049490c74e765158ac7ed977
Author: Heiner Kallweit <hkallweit1@xxxxxxxxx>
Date:   Fri Apr 30 16:22:51 2021 +0200

    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@xxxxxxxxx>
    Fixes: 10f0d2f577053 ("efi: Implement generic support for the Memory Attributes table")
    Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/efi/memattr.c b/drivers/firmware/efi/memattr.c
index 9faa09e7c31f..c2b991b9fa9e 100644
--- a/drivers/firmware/efi/memattr.c
+++ b/drivers/firmware/efi/memattr.c
@@ -68,11 +68,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))) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux