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

to the 5.15-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-clearing-storage-keys-for-huge-pages.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 6709ad79e125ec8f69d1f649abe88a0c08ad4c0a
Author: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
Date:   Tue Apr 16 13:42:20 2024 +0200

    s390/mm: Fix clearing storage keys for huge pages
    
    [ Upstream commit 412050af2ea39407fe43324b0be4ab641530ce88 ]
    
    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: 3afdfca69870 ("s390/mm: Clear skeys for newly mapped huge guest pmds")
    Reviewed-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240416114220.28489-3-imbrenda@xxxxxxxxxxxxx
    Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/mm/hugetlbpage.c b/arch/s390/mm/hugetlbpage.c
index da36d13ffc162..8631307d3defc 100644
--- a/arch/s390/mm/hugetlbpage.c
+++ b/arch/s390/mm/hugetlbpage.c
@@ -146,7 +146,7 @@ static void clear_huge_pte_skeys(struct mm_struct *mm, unsigned long rste)
 	}
 
 	if (!test_and_set_bit(PG_arch_1, &page->flags))
-		__storage_key_init_range(paddr, paddr + size - 1);
+		__storage_key_init_range(paddr, paddr + size);
 }
 
 void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,




[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