1
0
Fork 0
alistair23-linux/arch/x86/realmode/rm
Andrey Ryabinin ef7f0d6a6c x86_64: add KASan support
This patch adds arch specific code for kernel address sanitizer.

16TB of virtual addressed used for shadow memory.  It's located in range
[ffffec0000000000 - fffffc0000000000] between vmemmap and %esp fixup
stacks.

At early stage we map whole shadow region with zero page.  Latter, after
pages mapped to direct mapping address range we unmap zero pages from
corresponding shadow (see kasan_map_shadow()) and allocate and map a real
shadow memory reusing vmemmap_populate() function.

Also replace __pa with __pa_nodebug before shadow initialized.  __pa with
CONFIG_DEBUG_VIRTUAL=y make external function call (__phys_addr)
__phys_addr is instrumented, so __asan_load could be called before shadow
area initialized.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Konstantin Serebryany <kcc@google.com>
Cc: Dmitry Chernenkov <dmitryc@google.com>
Signed-off-by: Andrey Konovalov <adech.fo@gmail.com>
Cc: Yuri Gribov <tetra2005@gmail.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Jim Davis <jim.epost@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:41 -08:00
..
.gitignore x86, realmode: realmode.bin infrastructure 2012-05-08 11:41:48 -07:00
Makefile x86_64: add KASan support 2015-02-13 21:21:41 -08:00
bioscall.S x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
copy.S x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
header.S x86-64, reboot: Allow reboot=bios and reboot-cpu override on x86-64 2012-06-17 10:51:01 -07:00
realmode.h x86, realmode: Move end signature into header.S 2012-05-21 00:02:45 -07:00
realmode.lds.S x86, realmode: don't copy real_mode_header 2012-05-08 11:48:45 -07:00
reboot.S x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
regs.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
stack.S x86, realmode: fix 64-bit wakeup sequence 2012-05-08 11:48:11 -07:00
trampoline_32.S x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
trampoline_64.S x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
trampoline_common.S x86, realmode: Move not-common bits out of trampoline_common.S 2012-05-16 13:44:10 -07:00
video-bios.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
video-mode.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
video-vesa.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
video-vga.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
wakemain.c x86, realmode: flattened rm hierachy 2012-05-08 11:48:45 -07:00
wakeup.h x86, suspend: On wakeup always initialize cr4 and EFER 2012-09-26 15:06:22 -07:00
wakeup_asm.S x86, suspend: Correct the restore of CR4, EFER; skip computing EFLAGS.ID 2012-10-02 08:42:31 +02:00