diff options
| author | Olof Johansson <olof@lixom.net> | 2019-12-06 00:16:58 +0300 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2019-12-06 00:18:54 +0300 |
| commit | 942e6f8a8314e5550e254519dfba4ccd5170421d (patch) | |
| tree | 75ec655b440fbc1c454247af38b5596dd8c78de9 /include/linux/vmalloc.h | |
| parent | 336bab731be76a90291697e51d2aed0ad67d7cb5 (diff) | |
| parent | b08baef02b26cf7c2123e4a24a2fa1fb7a593ffb (diff) | |
| download | linux-942e6f8a8314e5550e254519dfba4ccd5170421d.tar.xz | |
Merge mainline/master into arm/fixes
This brings in the mainline tree right after armsoc contents was merged
this release cycle, so that we can re-run savedefconfig, etc.
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux/vmalloc.h')
| -rw-r--r-- | include/linux/vmalloc.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 4e7809408073..a4b241102771 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -22,6 +22,18 @@ struct notifier_block; /* in notifier.h */ #define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */ #define VM_NO_GUARD 0x00000040 /* don't add guard page */ #define VM_KASAN 0x00000080 /* has allocated kasan shadow memory */ + +/* + * VM_KASAN is used slighly differently depending on CONFIG_KASAN_VMALLOC. + * + * If IS_ENABLED(CONFIG_KASAN_VMALLOC), VM_KASAN is set on a vm_struct after + * shadow memory has been mapped. It's used to handle allocation errors so that + * we don't try to poision shadow on free if it was never allocated. + * + * Otherwise, VM_KASAN is set for kasan_module_alloc() allocations and used to + * determine which allocations need the module shadow freed. + */ + /* * Memory with VM_FLUSH_RESET_PERMS cannot be freed in an interrupt or with * vfree_atomic(). @@ -93,6 +105,7 @@ extern void *vzalloc(unsigned long size); extern void *vmalloc_user(unsigned long size); extern void *vmalloc_node(unsigned long size, int node); extern void *vzalloc_node(unsigned long size, int node); +extern void *vmalloc_user_node_flags(unsigned long size, int node, gfp_t flags); extern void *vmalloc_exec(unsigned long size); extern void *vmalloc_32(unsigned long size); extern void *vmalloc_32_user(unsigned long size); |
