diff options
author | Peter Zijlstra <peterz@infradead.org> | 2024-08-01 12:42:25 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2024-08-01 14:52:56 +0200 |
commit | 3db03fb4995ef85fc41e86262ead7b4852f4bcf0 (patch) | |
tree | 9a08383c1aaba254be728db490fc7b126190af03 /arch | |
parent | 41e71dbb0e0a0fe214545fe64af031303a08524c (diff) |
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: 16a3fe634f6a ("x86/mm/pti: Clone kernel-image on PTE level for 32 bit")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/mm/pti.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c index 48c503208c79..bfdf5f45b137 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); } /* |