diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-31 19:16:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-31 19:16:36 -0700 |
commit | 4658000955d1864b54890214434e171949c7f1c5 (patch) | |
tree | 9c2fffb52276dbbe7ce334e683a3262f699d3d10 /include | |
parent | e10994ff38ded64e4cd2267a6e404a4c8632bcf5 (diff) | |
parent | 69786cdb379bbc6eab14cf2393c1abd879316e85 (diff) | |
download | linux-4658000955d1864b54890214434e171949c7f1c5.tar.bz2 |
Merge branch 'mm-kasan-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/kasan changes from Ingo Molnar:
"These are two KASAN changes that factor out (and generalize) x86
specific KASAN code from x86 to mm"
* 'mm-kasan-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/kasan, mm: Introduce generic kasan_populate_zero_shadow()
x86/kasan: Define KASAN_SHADOW_OFFSET per architecture
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kasan.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/kasan.h b/include/linux/kasan.h index 5486d777b706..4b9f85c963d0 100644 --- a/include/linux/kasan.h +++ b/include/linux/kasan.h @@ -10,11 +10,19 @@ struct vm_struct; #ifdef CONFIG_KASAN #define KASAN_SHADOW_SCALE_SHIFT 3 -#define KASAN_SHADOW_OFFSET _AC(CONFIG_KASAN_SHADOW_OFFSET, UL) #include <asm/kasan.h> +#include <asm/pgtable.h> #include <linux/sched.h> +extern unsigned char kasan_zero_page[PAGE_SIZE]; +extern pte_t kasan_zero_pte[PTRS_PER_PTE]; +extern pmd_t kasan_zero_pmd[PTRS_PER_PMD]; +extern pud_t kasan_zero_pud[PTRS_PER_PUD]; + +void kasan_populate_zero_shadow(const void *shadow_start, + const void *shadow_end); + static inline void *kasan_mem_to_shadow(const void *addr) { return (void *)((unsigned long)addr >> KASAN_SHADOW_SCALE_SHIFT) |