Patch "KVM: s390: pv: fix index value of replaced ASCE" 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

    KVM: s390: pv: fix index value of replaced ASCE

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:
     kvm-s390-pv-fix-index-value-of-replaced-asce.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 b295b7e4014dd96e83bfd9f8778f82dd01044ef5
Author: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
Date:   Wed Jul 5 13:19:37 2023 +0200

    KVM: s390: pv: fix index value of replaced ASCE
    
    [ Upstream commit c2fceb59bbda16468bda82b002383bff59de89ab ]
    
    The index field of the struct page corresponding to a guest ASCE should
    be 0. When replacing the ASCE in s390_replace_asce(), the index of the
    new ASCE should also be set to 0.
    
    Having the wrong index might lead to the wrong addresses being passed
    around when notifying pte invalidations, and eventually to validity
    intercepts (VM crash) if the prefix gets unmapped and the notifier gets
    called with the wrong address.
    
    Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
    Fixes: faa2f72cb356 ("KVM: s390: pv: leak the topmost page table when destroy fails")
    Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
    Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
    Message-ID: <20230705111937.33472-3-imbrenda@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index ff40bf92db43a..a2c872de29a66 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -2791,6 +2791,7 @@ int s390_replace_asce(struct gmap *gmap)
 	page = alloc_pages(GFP_KERNEL_ACCOUNT, CRST_ALLOC_ORDER);
 	if (!page)
 		return -ENOMEM;
+	page->index = 0;
 	table = page_to_virt(page);
 	memcpy(table, gmap->table, 1UL << (CRST_ALLOC_ORDER + 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