Patch "s390/mm: Fix storage key clearing for guest huge pages" has been added to the 6.1-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

    s390/mm: Fix storage key clearing for guest huge pages

to the 6.1-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:
     s390-mm-fix-storage-key-clearing-for-guest-huge-page.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 792c602c079d209e491606136067695ab2631d7c
Author: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
Date:   Tue Apr 16 13:42:19 2024 +0200

    s390/mm: Fix storage key clearing for guest huge pages
    
    [ Upstream commit 843c3280686fc1a83d89ee1e0b5599c9f6b09d0c ]
    
    The function __storage_key_init_range() expects the end address to be
    the first byte outside the range to be initialized. I.e. end - start
    should be the size of the area to be initialized.
    
    The current code works because __storage_key_init_range() will still loop
    over every page in the range, but it is slower than using sske_frame().
    
    Fixes: 964c2c05c9f3 ("s390/mm: Clear huge page storage keys on enable_skey")
    Reviewed-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240416114220.28489-2-imbrenda@xxxxxxxxxxxxx
    Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 662cf23a1b44b..59657e0363e7c 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -2642,7 +2642,7 @@ static int __s390_enable_skey_hugetlb(pte_t *pte, unsigned long addr,
 		return 0;
 
 	start = pmd_val(*pmd) & HPAGE_MASK;
-	end = start + HPAGE_SIZE - 1;
+	end = start + HPAGE_SIZE;
 	__storage_key_init_range(start, end);
 	set_bit(PG_arch_1, &page->flags);
 	cond_resched();




[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