android_kernel_samsung_msm8976/arch/x86
Andrey Ryabinin a37ad26828 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>
[dkeitel@codeaurora.org: resolve trivial merge conflicts]
Git-commit: bebf56a1b176c2e1c9efe44e7e6915532cc682cf
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Change-Id: I4dda6aa06fc53fd018a87ce8b08b62a9712f54fe
2015-05-04 14:03:57 -07:00
..
boot x86_64: add KASan support 2015-05-04 14:03:57 -07:00
configs
crypto crypto: aesni - fix memory usage in GCM decryption 2015-03-26 15:01:00 +01:00
ia32 This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
include x86_64: add KASan support 2015-05-04 14:03:57 -07:00
kernel kasan: enable instrumentation of global variables 2015-05-04 14:03:57 -07:00
kvm KVM: emulate: fix CMPXCHG8B on 32-bit hosts 2015-03-18 13:22:29 +01:00
lguest
lib x86_64: kasan: add interceptors for memset/memmove/memcpy functions 2015-05-04 14:03:56 -07:00
math-emu
mm kasan: enable instrumentation of global variables 2015-05-04 14:03:57 -07:00
net
oprofile
pci PCI: Add NEC variants to Stratus ftServer PCIe DMI check 2015-02-11 14:48:16 +08:00
platform
power
realmode x86_64: add KASan support 2015-05-04 14:03:57 -07:00
syscalls seccomp: fix syscall numbers for x86 and x86_64 2015-03-19 14:52:58 -07:00
tools
um x86, um: actually mark system call tables readonly 2015-01-27 07:52:33 -08:00
vdso x86_64: add KASan support 2015-05-04 14:03:57 -07:00
video
xen
.gitignore
Kbuild
Kconfig x86_64: add KASan support 2015-05-04 14:03:57 -07:00
Kconfig.cpu
Kconfig.debug
Makefile
Makefile.um
Makefile_32.cpu