Skip to contentSkip to conversation

kasan-document-kasan_mempool_poison_object.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 29, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kasan: document kasan_mempool_poison_object
has been removed from the -mm tree. Its filename was
kasan-document-kasan_mempool_poison_object.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Andrey Konovalov <[email protected]>
Subject: kasan: document kasan_mempool_poison_object
Date: Tue, 19 Dec 2023 23:28:47 +0100

Add documentation comment for kasan_mempool_poison_object.

---

 include/linux/kasan.h |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
include/linux/kasan.h renamed from include/linux/kasan.h~kasan-document-kasan_mempool_poison_object +18 -0
@@ -213,6 +213,24 @@ static __always_inline void * __must_che
 }
 
 void __kasan_mempool_poison_object(void *ptr, unsigned long ip);
+/**
+ * kasan_mempool_poison_object - Check and poison a mempool slab allocation.
+ * @ptr: Pointer to the slab allocation.
+ *
+ * This function is intended for kernel subsystems that cache slab allocations
+ * to reuse them instead of freeing them back to the slab allocator (e.g.
+ * mempool).
+ *
+ * This function poisons a slab allocation without initializing its memory and
+ * without putting it into the quarantine (for the Generic mode).
+ *
+ * This function also performs checks to detect double-free and invalid-free
+ * bugs and reports them.
+ *
+ * This function operates on all slab allocations including large kmalloc
+ * allocations (the ones returned by kmalloc_large() or by kmalloc() with the
+ * size > KMALLOC_MAX_SIZE).
+ */
 static __always_inline void kasan_mempool_poison_object(void *ptr)
 {
 	if (kasan_enabled())

_

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

kasan-stop-leaking-stack-trace-handles.patch