Patch "arm64: Clear the initial ID map correctly before remapping" has been added to the 6.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

    arm64: Clear the initial ID map correctly before remapping

to the 6.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:
     arm64-clear-the-initial-id-map-correctly-before-rema.patch
and it can be found in the queue-6.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 d3a07929f252ec705204d62fe1c08988799bbb7f
Author: Zenghui Yu <yuzenghui@xxxxxxxxxx>
Date:   Fri Jun 21 17:28:09 2024 +0800

    arm64: Clear the initial ID map correctly before remapping
    
    [ Upstream commit ecc54006f158ae0245a13e59026da2f0239c1b86 ]
    
    In the attempt to clear and recreate the initial ID map for LPA2, we
    wrongly use 'start - end' as the map size and make the memset() almost a
    nop.
    
    Fix it by passing the correct map size.
    
    Fixes: 9684ec186f8f ("arm64: Enable LPA2 at boot if supported by the system")
    Signed-off-by: Zenghui Yu <yuzenghui@xxxxxxxxxx>
    Reviewed-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240621092809.162-1-yuzenghui@xxxxxxxxxx
    Signed-off-by: Will Deacon <will@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm64/kernel/pi/map_kernel.c b/arch/arm64/kernel/pi/map_kernel.c
index 5fa08e13e17e5..f374a3e5a5fe1 100644
--- a/arch/arm64/kernel/pi/map_kernel.c
+++ b/arch/arm64/kernel/pi/map_kernel.c
@@ -173,7 +173,7 @@ static void __init remap_idmap_for_lpa2(void)
 	 * Don't bother with the FDT, we no longer need it after this.
 	 */
 	memset(init_idmap_pg_dir, 0,
-	       (u64)init_idmap_pg_dir - (u64)init_idmap_pg_end);
+	       (u64)init_idmap_pg_end - (u64)init_idmap_pg_dir);
 
 	create_init_idmap(init_idmap_pg_dir, mask);
 	dsb(ishst);




[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