From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/mm: Fix pti_clone_entry_text() for i386
Date: Thu, 01 Aug 2024 13:03:52 -0000 [thread overview]
Message-ID: <172251743219.2215.3718826163204561626.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 3db03fb4995ef85fc41e86262ead7b4852f4bcf0
Gitweb: https://git.kernel.org/tip/3db03fb4995ef85fc41e86262ead7b4852f4bcf0
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Thu, 01 Aug 2024 12:42:25 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 01 Aug 2024 14:52:56 +02:00
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>
---
arch/x86/mm/pti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 48c5032..bfdf5f4 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);
}
/*
next reply other threads:[~2024-08-01 13:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 13:03 tip-bot2 for Peter Zijlstra [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-01 10:55 tip-bot2 for Peter Zijlstra
2024-08-06 4:52 ` Guenter Roeck
2024-08-06 8:50 ` Peter Zijlstra
2024-08-06 14:25 ` Guenter Roeck
2024-08-06 14:56 ` Peter Zijlstra
2024-08-06 15:05 ` Peter Zijlstra
2024-08-06 15:46 ` Peter Zijlstra
2024-08-06 15:59 ` Peter Zijlstra
2024-08-06 16:42 ` Guenter Roeck
2024-08-06 18:48 ` Peter Zijlstra
2024-08-06 19:12 ` Guenter Roeck
2024-08-06 20:16 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=172251743219.2215.3718826163204561626.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®