Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(268)

Unified Diff: arch/x86/include/asm/kasan.h

Issue 325780043: mm/kasan: support per-page shadow memory to reduce memory consumption
Patch Set: mm/kasan: support per-page shadow memory to reduce memory consumption Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « arch/arm64/mm/kasan_init.c ('k') | arch/x86/include/asm/processor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: arch/x86/include/asm/kasan.h
diff --git a/arch/x86/include/asm/kasan.h b/arch/x86/include/asm/kasan.h
index f527b02a0ee3c802d68161a8054a08b7e6ec3b4f..91a29edf9856a4587171d92cebf6f7c86de0b56c 100644
--- a/arch/x86/include/asm/kasan.h
+++ b/arch/x86/include/asm/kasan.h
@@ -18,14 +18,22 @@
*/
#define KASAN_SHADOW_END (KASAN_SHADOW_START + (1ULL << (__VIRTUAL_MASK_SHIFT - 3)))
+#define HAVE_KASAN_PER_PAGE_SHADOW 1
+#define KASAN_PSHADOW_SIZE ((1ULL << (47 - PAGE_SHIFT)))
+#define KASAN_PSHADOW_START (kasan_pshadow_offset + \
+ (0xffff800000000000ULL >> PAGE_SHIFT))
+#define KASAN_PSHADOW_END (KASAN_PSHADOW_START + KASAN_PSHADOW_SIZE)
+
#ifndef __ASSEMBLY__
#ifdef CONFIG_KASAN
void __init kasan_early_init(void);
void __init kasan_init(void);
+void __init kasan_init_late(void);
#else
static inline void kasan_early_init(void) { }
static inline void kasan_init(void) { }
+static inline void kasan_init_late(void) { }
#endif
#endif
« no previous file with comments | « arch/arm64/mm/kasan_init.c ('k') | arch/x86/include/asm/processor.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b