* [PATCH] kunit/fortify: Remove __kmalloc_node() test
@ 2024-05-31 18:57 Kees Cook
2024-06-01 21:05 ` Vlastimil Babka
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2024-05-31 18:57 UTC (permalink / raw)
To: Vlastimil Babka; +Cc: Kees Cook, linux-mm, linux-hardening, linux-kernel
__kmalloc_node() is considered an "internal" function to the Slab, so
drop it from explicit testing.
Signed-off-by: Kees Cook <kees@kernel.org>
---
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: linux-mm@kvack.org
Cc: linux-hardening@vger.kernel.org
---
lib/fortify_kunit.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/fortify_kunit.c b/lib/fortify_kunit.c
index 39da5b3bc649..f9cc467334ce 100644
--- a/lib/fortify_kunit.c
+++ b/lib/fortify_kunit.c
@@ -235,9 +235,6 @@ static void fortify_test_alloc_size_##allocator##_dynamic(struct kunit *test) \
kmalloc_array_node(alloc_size, 1, gfp, NUMA_NO_NODE), \
kfree(p)); \
checker(expected_size, __kmalloc(alloc_size, gfp), \
- kfree(p)); \
- checker(expected_size, \
- __kmalloc_node(alloc_size, gfp, NUMA_NO_NODE), \
kfree(p)); \
\
orig = kmalloc(alloc_size, gfp); \
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] kunit/fortify: Remove __kmalloc_node() test
2024-05-31 18:57 [PATCH] kunit/fortify: Remove __kmalloc_node() test Kees Cook
@ 2024-06-01 21:05 ` Vlastimil Babka
0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka @ 2024-06-01 21:05 UTC (permalink / raw)
To: Kees Cook; +Cc: linux-mm, linux-hardening, linux-kernel
On 5/31/24 8:57 PM, Kees Cook wrote:
> __kmalloc_node() is considered an "internal" function to the Slab, so
> drop it from explicit testing.
So is __kmalloc() and so I have the removal of both as part of the cleanup here:
https://lore.kernel.org/all/20240527090127.21979-2-vbabka@suse.cz/
which reminds me I should put it to -next at this point. Review still welcome :)
> Signed-off-by: Kees Cook <kees@kernel.org>
> ---
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Cc: linux-mm@kvack.org
> Cc: linux-hardening@vger.kernel.org
> ---
> lib/fortify_kunit.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/lib/fortify_kunit.c b/lib/fortify_kunit.c
> index 39da5b3bc649..f9cc467334ce 100644
> --- a/lib/fortify_kunit.c
> +++ b/lib/fortify_kunit.c
> @@ -235,9 +235,6 @@ static void fortify_test_alloc_size_##allocator##_dynamic(struct kunit *test) \
> kmalloc_array_node(alloc_size, 1, gfp, NUMA_NO_NODE), \
> kfree(p)); \
> checker(expected_size, __kmalloc(alloc_size, gfp), \
> - kfree(p)); \
> - checker(expected_size, \
> - __kmalloc_node(alloc_size, gfp, NUMA_NO_NODE), \
> kfree(p)); \
> \
> orig = kmalloc(alloc_size, gfp); \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-01 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-31 18:57 [PATCH] kunit/fortify: Remove __kmalloc_node() test Kees Cook
2024-06-01 21:05 ` Vlastimil Babka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox