diff options
Diffstat (limited to 'sys-kernel/cairn-sources/files/5.9.6/hardened-patches/0062-add-vmalloc-alloc_size-attributes.patch')
| -rw-r--r-- | sys-kernel/cairn-sources/files/5.9.6/hardened-patches/0062-add-vmalloc-alloc_size-attributes.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/sys-kernel/cairn-sources/files/5.9.6/hardened-patches/0062-add-vmalloc-alloc_size-attributes.patch b/sys-kernel/cairn-sources/files/5.9.6/hardened-patches/0062-add-vmalloc-alloc_size-attributes.patch new file mode 100644 index 000000000000..9b49597853a6 --- /dev/null +++ b/sys-kernel/cairn-sources/files/5.9.6/hardened-patches/0062-add-vmalloc-alloc_size-attributes.patch @@ -0,0 +1,47 @@ +From 18cc573f3b168fbc81cc849c87deb2e0dd45ec60 Mon Sep 17 00:00:00 2001 +From: Daniel Micay <danielmicay@gmail.com> +Date: Wed, 3 May 2017 12:04:03 -0400 +Subject: [PATCH 062/108] add vmalloc alloc_size attributes + +Signed-off-by: Daniel Micay <danielmicay@gmail.com> +Signed-off-by: Thibaut Sautereau <thibaut.sautereau@ssi.gouv.fr> +Signed-off-by: Levente Polyak <levente@leventepolyak.net> +--- + include/linux/vmalloc.h | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h +index 0221f852a7e1..997313c9068f 100644 +--- a/include/linux/vmalloc.h ++++ b/include/linux/vmalloc.h +@@ -101,18 +101,18 @@ static inline void vmalloc_init(void) + static inline unsigned long vmalloc_nr_pages(void) { return 0; } + #endif + +-extern void *vmalloc(unsigned long size); +-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_32(unsigned long size); +-extern void *vmalloc_32_user(unsigned long size); +-extern void *__vmalloc(unsigned long size, gfp_t gfp_mask); ++extern void *vmalloc(unsigned long size) __attribute__((alloc_size(1))); ++extern void *vzalloc(unsigned long size) __attribute__((alloc_size(1))); ++extern void *vmalloc_user(unsigned long size) __attribute__((alloc_size(1))); ++extern void *vmalloc_node(unsigned long size, int node) __attribute__((alloc_size(1))); ++extern void *vzalloc_node(unsigned long size, int node) __attribute__((alloc_size(1))); ++extern void *vmalloc_32(unsigned long size) __attribute__((alloc_size(1))); ++extern void *vmalloc_32_user(unsigned long size) __attribute__((alloc_size(1))); ++extern void *__vmalloc(unsigned long size, gfp_t gfp_mask) __attribute__((alloc_size(1))); + extern void *__vmalloc_node_range(unsigned long size, unsigned long align, + unsigned long start, unsigned long end, gfp_t gfp_mask, + pgprot_t prot, unsigned long vm_flags, int node, +- const void *caller); ++ const void *caller) __attribute__((alloc_size(1))); + void *__vmalloc_node(unsigned long size, unsigned long align, gfp_t gfp_mask, + int node, const void *caller); + +-- +2.29.2 + |
