[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <163882786606.11128.8257479627147747846.tip-bot2@tip-bot2>
Date: Mon, 06 Dec 2021 21:57:46 -0000
From: "tip-bot2 for Joerg Roedel" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Joerg Roedel <jroedel@...e.de>, Borislav Petkov <bp@...e.de>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/mm] x86/realmode: Add comment for Global bit usage in
trampoline_pgd
The following commit has been merged into the x86/mm branch of tip:
Commit-ID: 9de4999050b5f2e847c84372c6a1aa1fe32bb269
Gitweb: https://git.kernel.org/tip/9de4999050b5f2e847c84372c6a1aa1fe32bb269
Author: Joerg Roedel <jroedel@...e.de>
AuthorDate: Thu, 02 Dec 2021 16:32:23 +01:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Sat, 04 Dec 2021 13:50:08 +01:00
x86/realmode: Add comment for Global bit usage in trampoline_pgd
Document the fact that using the trampoline_pgd will result in the
creation of global TLB entries in the user range of the address
space.
Signed-off-by: Joerg Roedel <jroedel@...e.de>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lkml.kernel.org/r/20211202153226.22946-2-joro@8bytes.org
---
arch/x86/mm/init.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 1895986..4ba024d 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -714,6 +714,11 @@ static void __init memory_map_bottom_up(unsigned long map_start,
static void __init init_trampoline(void)
{
#ifdef CONFIG_X86_64
+ /*
+ * The code below will alias kernel page-tables in the user-range of the
+ * address space, including the Global bit. So global TLB entries will
+ * be created when using the trampoline page-table.
+ */
if (!kaslr_memory_enabled())
trampoline_pgd_entry = init_top_pgt[pgd_index(__PAGE_OFFSET)];
else
Powered by blists - more mailing lists