alistair23-linux/arch/x86
Andrey Ryabinin bebf56a1b1 kasan: enable instrumentation of global variables
This feature let us to detect accesses out of bounds of global variables.
This will work as for globals in kernel image, so for globals in modules.
Currently this won't work for symbols in user-specified sections (e.g.
__init, __read_mostly, ...)

The idea of this is simple.  Compiler increases each global variable by
redzone size and add constructors invoking __asan_register_globals()
function.  Information about global variable (address, size, size with
redzone ...) passed to __asan_register_globals() so we could poison
variable's redzone.

This patch also forces module_alloc() to return 8*PAGE_SIZE aligned
address making shadow memory handling (
kasan_module_alloc()/kasan_module_free() ) more simple.  Such alignment
guarantees that each shadow page backing modules address space correspond
to only one module_alloc() allocation.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-13 21:21:42 -08:00
..
boot x86_64: kasan: add interceptors for memset/memmove/memcpy functions 2015-02-13 21:21:41 -08:00
configs x86/kconfig/defconfig: Enable CONFIG_FHANDLE=y 2014-12-08 12:04:17 +01:00
crypto crypto: add missing crypto module aliases 2015-01-13 22:29:11 +11:00
ia32 all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
include kasan: enable stack instrumentation 2015-02-13 21:21:41 -08:00
kernel kasan: enable instrumentation of global variables 2015-02-13 21:21:42 -08:00
kvm Fairly small update, but there are some interesting new features. 2015-02-13 09:55:09 -08:00
lguest x86: Avoid building unused IRQ entry stubs 2014-12-16 14:08:14 +01:00
lib x86_64: kasan: add interceptors for memset/memmove/memcpy functions 2015-02-13 21:21:41 -08:00
math-emu
mm kasan: enable instrumentation of global variables 2015-02-13 21:21:42 -08:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-12-10 15:48:20 -05:00
oprofile percpu: Resolve ambiguities in __get_cpu_var/cpumask_var_t 2014-08-28 08:58:57 -04:00
pci ACPI and power management updates for v3.20-rc1 2015-02-10 15:09:41 -08:00
platform x86: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:37 -08:00
power nosave: consolidate __nosave_{begin,end} in <asm/sections.h> 2014-10-09 22:26:04 -04:00
purgatory Merge branches 'x86-build-for-linus', 'x86-cleanups-for-linus' and 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-10 12:35:46 -08:00
realmode x86_64: add KASan support 2015-02-13 21:21:41 -08:00
syscalls x86: hook up execveat system call 2014-12-13 12:42:51 -08:00
tools x86, build: replace Perl script with Shell script 2015-01-26 13:37:18 -08:00
um all arches, signal: move restart_block to struct task_struct 2015-02-12 18:54:12 -08:00
vdso x86_64: add KASan support 2015-02-13 21:21:41 -08:00
video
xen xen: mark grant mapped pages as foreign 2015-01-28 14:03:12 +00:00
.gitignore x86/build: Add arch/x86/purgatory/ make generated files to gitignore 2014-10-09 09:29:46 +02:00
Kbuild kexec: create a new config option CONFIG_KEXEC_FILE for new syscall 2014-08-29 16:28:16 -07:00
Kconfig x86_64: add KASan support 2015-02-13 21:21:41 -08:00
Kconfig.cpu
Kconfig.debug
Makefile x86/raid6: correctly check for assembler capabilities 2015-02-04 08:35:51 +11:00
Makefile.um
Makefile_32.cpu