Patch "x86/mm: Fix pti_clone_entry_text() for i386" has been added to the 6.10-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

    x86/mm: Fix pti_clone_entry_text() for i386

to the 6.10-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:
     x86-mm-fix-pti_clone_entry_text-for-i386.patch
and it can be found in the queue-6.10 subdirectory.

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



commit 7b2dbb7688f8b5a467236a644510e7bb7317c5cd
Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Date:   Thu Aug 1 12:42:25 2024 +0200

    x86/mm: Fix pti_clone_entry_text() for i386
    
    [ Upstream commit 3db03fb4995ef85fc41e86262ead7b4852f4bcf0 ]
    
    While x86_64 has PMD aligned text sections, i386 does not have this
    luxery. Notably ALIGN_ENTRY_TEXT_END is empty and _etext has PAGE
    alignment.
    
    This means that text on i386 can be page granular at the tail end,
    which in turn means that the PTI text clones should consistently
    account for this.
    
    Make pti_clone_entry_text() consistent with pti_clone_kernel_text().
    
    Fixes: 16a3fe634f6a ("x86/mm/pti: Clone kernel-image on PTE level for 32 bit")
    Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 48c503208c794..bfdf5f45b1370 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -496,7 +496,7 @@ static void pti_clone_entry_text(void)
 {
 	pti_clone_pgtable((unsigned long) __entry_text_start,
 			  (unsigned long) __entry_text_end,
-			  PTI_CLONE_PMD);
+			  PTI_LEVEL_KERNEL_IMAGE);
 }
 
 /*




[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