Merge pull request #20 from steelannelida/kasan

Kasan
kernel: add support for  .init_array.* constructors

Note: We don't use SORT_BY_INIT_PRIORITY() here to avoid
randconfig build failures with old binutils which may not
support it. In this use case SORT() will give us the same
result as SORT_BY_INIT_PRIORITY(), so we use it.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Merge pull request #24 from steelannelida/kasan

mm: kasan: fix redzone shadow poisoning in Slub
mm: kasan: built kasan without stackprotector.

Patch 'x86_64: load_percpu_segment: read irq_stack_union.gs_base before load_segment'
were supposed to fix boot hang with when kernel uses stackprotector
feature. But that fix doesn't work with certain kernel config options
(CONFIG_PARAVIRT). Reodering code doesn't save us from calling __asan_load
in between load_segment() and wrmsrl() calls. So we got hang again.

Building kasan internal without stackprotector seems is the only option now.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Revert "x86_64: load_percpu_segment: read irq_stack_union.gs_base before load_segment"

This reverts commit 7ff5e1af9c6f541cdb595b02790d9aaed1131e52.

After previous commit we don't need this patch anymore.
Let's restore the original code.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
mm: kasan: reduce stack usage of memhooks

check_memory_region() is always inline function.
Obviously we don't need inline it in memhooks, so
use __asan_loadN/__asan_storeN instead.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
x86_64: kasan: Add SPARSEMEM_VMEMMAP kconfig dependency

We use vmmemap_populate() to setup shadow memory, so we
depend on SPARSEMEM_VMEMMAP.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
mm: kasan: rename kasan_pre_ctor()/kasan_post_ctor()

Function's name should describe what the function does
but not the place where it is called.

kasan_unpoison_object_data()/kasan_poison_object_data()
seems like a better names.

Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
Merge pull request #23 from aryabinin/kasan

kernel: add support for  .init_array.* constructors
Merge pull request #25 from aryabinin/kasan_fixes

kasan fixes mostly
Merge branch 'kasan' of https://github.com/steelannelida/kasan into kasan
Merge pull request #26 from steelannelida/kasan

Fix memset tests
Merge branch 'kasan' of https://github.com/google/kasan into kasan