]> Git Repo - linux.git/commit
x86/kasan: Use the same shadow offset for 4- and 5-level paging
authorAndrey Ryabinin <[email protected]>
Fri, 29 Sep 2017 14:08:18 +0000 (17:08 +0300)
committerIngo Molnar <[email protected]>
Fri, 20 Oct 2017 11:07:09 +0000 (13:07 +0200)
commit12a8cc7fcf54a8575f094be1e99032ec38aa045c
tree72e1c6c0390c1e78617129e4fe9fafb215fd52d4
parent83e3c48729d9ebb7af5a31a504f3fd6aff0348c4
x86/kasan: Use the same shadow offset for 4- and 5-level paging

We are going to support boot-time switching between 4- and 5-level
paging. For KASAN it means we cannot have different KASAN_SHADOW_OFFSET
for different paging modes: the constant is passed to gcc to generate
code and cannot be changed at runtime.

This patch changes KASAN code to use 0xdffffc0000000000 as shadow offset
for both 4- and 5-level paging.

For 5-level paging it means that shadow memory region is not aligned to
PGD boundary anymore and we have to handle unaligned parts of the region
properly.

In addition, we have to exclude paravirt code from KASAN instrumentation
as we now use set_pgd() before KASAN is fully ready.

[[email protected]: clenaup, changelog message]
Signed-off-by: Andrey Ryabinin <[email protected]>
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Documentation/x86/x86_64/mm.txt
arch/x86/Kconfig
arch/x86/kernel/Makefile
arch/x86/mm/kasan_init_64.c
This page took 0.056357 seconds and 4 git commands to generate.