All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] x86_64: kasan: flush tlbs after switching cr3
@ 2015-06-19 17:17 Andrey Ryabinin
  2015-06-19 17:17 ` [PATCH 2/3] x86_64: kasan: fix boot crash on AMD processors Andrey Ryabinin
       [not found] ` <1434734247-29153-3-git-send-email-a.ryabinin@samsung.com>
  0 siblings, 2 replies; 4+ messages in thread
From: Andrey Ryabinin @ 2015-06-19 17:17 UTC (permalink / raw)
  To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner, x86
  Cc: Andrey Konovalov, Andrew Morton, Borislav Petkov, Alexander Popov,
	Dmitry Vyukov, Alexander Potapenko, Andrey Ryabinin, 4.0

load_cr3() doesn't cause tlb_flush if PGE enabled.
This may cause tons of false positive reports spamming
kernel to death.
To fix this __flush_tlb_all() should be called explicitly
after cr3 changed.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: stable@vger.kernel.org # 4.0
---
 arch/x86/mm/kasan_init_64.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/mm/kasan_init_64.c b/arch/x86/mm/kasan_init_64.c
index 0e4a05f..5d26642 100644
--- a/arch/x86/mm/kasan_init_64.c
+++ b/arch/x86/mm/kasan_init_64.c
@@ -208,6 +208,7 @@ void __init kasan_init(void)
 
 	memcpy(early_level4_pgt, init_level4_pgt, sizeof(early_level4_pgt));
 	load_cr3(early_level4_pgt);
+	__flush_tlb_all();
 
 	clear_pgds(KASAN_SHADOW_START, KASAN_SHADOW_END);
 
@@ -234,5 +235,6 @@ void __init kasan_init(void)
 	memset(kasan_zero_page, 0, PAGE_SIZE);
 
 	load_cr3(init_level4_pgt);
+	__flush_tlb_all();
 	init_task.kasan_depth = 0;
 }
-- 
2.4.4

--
To unsubscribe from this list: send the line "unsubscribe stable" in

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-30  5:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-19 17:17 [PATCH 1/3] x86_64: kasan: flush tlbs after switching cr3 Andrey Ryabinin
2015-06-19 17:17 ` [PATCH 2/3] x86_64: kasan: fix boot crash on AMD processors Andrey Ryabinin
     [not found] ` <1434734247-29153-3-git-send-email-a.ryabinin@samsung.com>
     [not found]   ` <CACT4Y+ZRJk+6QHGhN3Vz=Hnv=PjB2P-P-Y9UiZAHNsvO=7v_MA@mail.gmail.com>
     [not found]     ` <20150620131813.GA6534@gmail.com>
2015-06-22 16:06       ` [PATCH 3/3] x86_64: kasan: add message about kasan being initialized Andrey Ryabinin
2015-06-30  5:23         ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.