* [merged mm-stable] mm-kasan-use-slab_no_merge-flag-instead-of-an-empty-constructor.patch removed from -mm tree
@ 2025-04-01 22:17 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-04-01 22:17 UTC (permalink / raw)
To: mm-commits, vincenzo.frascino, ryabinin.a.a, glider, dvyukov,
andreyknvl, harry.yoo, akpm
The quilt patch titled
Subject: mm/kasan: use SLAB_NO_MERGE flag instead of an empty constructor
has been removed from the -mm tree. Its filename was
mm-kasan-use-slab_no_merge-flag-instead-of-an-empty-constructor.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: Harry Yoo <harry.yoo@oracle.com>
Subject: mm/kasan: use SLAB_NO_MERGE flag instead of an empty constructor
Date: Tue, 18 Mar 2025 10:59:26 +0900
Use SLAB_NO_MERGE flag to prevent merging instead of providing an empty
constructor. Using an empty constructor in this manner is an abuse of
slab interface.
The SLAB_NO_MERGE flag should be used with caution, but in this case, it
is acceptable as the cache is intended solely for debugging purposes.
No functional changes intended.
Link: https://lkml.kernel.org/r/20250318015926.1629748-1-harry.yoo@oracle.com
Signed-off-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com>
Acked-by: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitriy Vyukov <dvyukov@google.com>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/kasan/kasan_test_c.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/mm/kasan/kasan_test_c.c~mm-kasan-use-slab_no_merge-flag-instead-of-an-empty-constructor
+++ a/mm/kasan/kasan_test_c.c
@@ -1073,14 +1073,11 @@ static void kmem_cache_rcu_uaf(struct ku
kmem_cache_destroy(cache);
}
-static void empty_cache_ctor(void *object) { }
-
static void kmem_cache_double_destroy(struct kunit *test)
{
struct kmem_cache *cache;
- /* Provide a constructor to prevent cache merging. */
- cache = kmem_cache_create("test_cache", 200, 0, 0, empty_cache_ctor);
+ cache = kmem_cache_create("test_cache", 200, 0, SLAB_NO_MERGE, NULL);
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, cache);
kmem_cache_destroy(cache);
KUNIT_EXPECT_KASAN_FAIL(test, kmem_cache_destroy(cache));
_
Patches currently in -mm which might be from harry.yoo@oracle.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-01 22:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 22:17 [merged mm-stable] mm-kasan-use-slab_no_merge-flag-instead-of-an-empty-constructor.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.