Skip to contentSkip to conversation

mm-page_alloc-add-__alloc_size-attributes-for-better-bounds-checking.patch removed from -mm tree

merged [email protected] 1 participant 1 message Nov 11, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/page_alloc: add __alloc_size attributes for better bounds checking
has been removed from the -mm tree. Its filename was
mm-page_alloc-add-__alloc_size-attributes-for-better-bounds-checking.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Kees Cook <[email protected]>
Subject: mm/page_alloc: add __alloc_size attributes for better bounds checking

As already done in GrapheneOS, add the __alloc_size attribute for appropriate page allocator interfaces, to provide additional hinting for better bounds checking, assisting CONFIG_FORTIFY_SOURCE and other compiler optimizations.

Cc Andy Whitcroft <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc David Rientjes <[email protected]>
Cc Dennis Zhou <[email protected]>
Cc Dwaipayan Ray <[email protected]>
Cc Joe Perches <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Lukas Bulwahn <[email protected]>
Cc Miguel Ojeda <[email protected]>
Cc Nathan Chancellor <[email protected]>
Cc Nick Desaulniers <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Alexandre Bounine <[email protected]>
Cc Gustavo A. R. Silva <[email protected]>
Cc Ira Weiny <[email protected]>
Cc Jing Xiangfeng <[email protected]>
Cc John Hubbard <[email protected]>
Cc kernel test robot <[email protected]>
Cc Matt Porter <[email protected]>
Cc Randy Dunlap <[email protected]>
Cc Souptick Joarder <[email protected]>

---

 include/linux/gfp.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/gfp.h renamed from include/linux/gfp.h~mm-page_alloc-add-__alloc_size-attributes-for-better-bounds-checking +2 -2
@@ -608,9 +608,9 @@ static inline struct page *alloc_pages(g
 extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
 extern unsigned long get_zeroed_page(gfp_t gfp_mask);
 
-void *alloc_pages_exact(size_t size, gfp_t gfp_mask);
+void *alloc_pages_exact(size_t size, gfp_t gfp_mask) __alloc_size(1);
 void free_pages_exact(void *virt, size_t size);
-void * __meminit alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask);
+__meminit void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask) __alloc_size(1);
 
 #define __get_free_page(gfp_mask) \
 		__get_free_pages((gfp_mask), 0)

_

Patches currently in -mm which might be from [email protected] are

kasan-test-consolidate-workarounds-for-unwanted-__alloc_size-protection.patch