Skip to content

Commit 3db03fb

Browse files
author
Peter Zijlstra
committed
x86/mm: Fix pti_clone_entry_text() for i386
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: 16a3fe6 ("x86/mm/pti: Clone kernel-image on PTE level for 32 bit") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
1 parent 41e71db commit 3db03fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/mm/pti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ static void pti_clone_entry_text(void)
496496
{
497497
pti_clone_pgtable((unsigned long) __entry_text_start,
498498
(unsigned long) __entry_text_end,
499-
PTI_CLONE_PMD);
499+
PTI_LEVEL_KERNEL_IMAGE);
500500
}
501501

502502
/*

0 commit comments

Comments
 (0)