[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1432310581-11965-1-git-send-email-alpopov@ptsecurity.com>
Date: Fri, 22 May 2015 19:03:01 +0300
From: Alexander Popov <alpopov@...ecurity.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Andrey Ryabinin <a.ryabinin@...sung.com>,
Andrey Konovalov <adech.fo@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
Andy Lutomirski <luto@...capital.net>,
Alexander Kuleshov <kuleshovmail@...il.com>,
Alexander Popov <alpopov@...ecurity.com>,
"Sergey Kovalev" <SKovalev@...ecurity.com>, <x86@...nel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH 1/1] x86_64: fix KASan shadow region page tables
Physical addresses in KASan shadow region page tables need fixup:
kernel halts without it if phys_base is not zero.
Signed-off-by: Alexander Popov <alpopov@...ecurity.com>
---
arch/x86/kernel/head_64.S | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index ae6588b..f7711bb 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -95,6 +95,20 @@ startup_64:
addq %rbp, level2_fixmap_pgt + (506*8)(%rip)
+#ifdef CONFIG_KASAN
+ xor %rax, %rax
+ leaq kasan_zero_pud(%rip), %rbx
+ leaq kasan_zero_pmd(%rip), %rcx
+ leaq kasan_zero_pte(%rip), %rdx
+1:
+ addq %rbp, (%rbx,%rax,8)
+ addq %rbp, (%rcx,%rax,8)
+ addq %rbp, (%rdx,%rax,8)
+ inc %rax
+ cmp $512, %rax
+ jne 1b
+#endif
+
/*
* Set up the identity mapping for the switchover. These
* entries should *NOT* have the global bit set! This also
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists