summaryrefslogtreecommitdiffstats
path: root/include/linux/kasan.h
diff options
context:
space:
mode:
authorAndrey Ryabinin2015-03-13 00:26:14 +0100
committerLinus Torvalds2015-03-13 02:46:08 +0100
commitd3733e5c98e952d419e77fa721912f09d15a2806 (patch)
treef5ada9a2bbdac2aedc64bd9d2dc112b7caa0e91d /include/linux/kasan.h
parentkasan, module, vmalloc: rework shadow allocation for modules (diff)
downloadkernel-qcow2-linux-d3733e5c98e952d419e77fa721912f09d15a2806.tar.gz
kernel-qcow2-linux-d3733e5c98e952d419e77fa721912f09d15a2806.tar.xz
kernel-qcow2-linux-d3733e5c98e952d419e77fa721912f09d15a2806.zip
kasan, module: move MODULE_ALIGN macro into <linux/moduleloader.h>
include/linux/moduleloader.h is more suitable place for this macro. Also change alignment to PAGE_SIZE for CONFIG_KASAN=n as such alignment already assumed in several places. Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com> Cc: Dmitry Vyukov <dvyukov@google.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kasan.h')
-rw-r--r--include/linux/kasan.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/kasan.h b/include/linux/kasan.h
index 5fa48a21d73e..5bb074431eb0 100644
--- a/include/linux/kasan.h
+++ b/include/linux/kasan.h
@@ -50,15 +50,11 @@ void kasan_krealloc(const void *object, size_t new_size);
void kasan_slab_alloc(struct kmem_cache *s, void *object);
void kasan_slab_free(struct kmem_cache *s, void *object);
-#define MODULE_ALIGN (PAGE_SIZE << KASAN_SHADOW_SCALE_SHIFT)
-
int kasan_module_alloc(void *addr, size_t size);
void kasan_free_shadow(const struct vm_struct *vm);
#else /* CONFIG_KASAN */
-#define MODULE_ALIGN 1
-
static inline void kasan_unpoison_shadow(const void *address, size_t size) {}
static inline void kasan_enable_current(void) {}