linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] mm: kence: add __kmem_cache_free to function skip list
@ 2022-08-31  7:30 Feng Tang
  2022-08-31  7:35 ` Marco Elver
  2022-08-31 14:04 ` Hyeonggon Yoo
  0 siblings, 2 replies; 10+ messages in thread
From: Feng Tang @ 2022-08-31  7:30 UTC (permalink / raw)
  To: Andrew Morton, Alexander Potapenko, Marco Elver, Dmitry Vyukov,
	Hyeonggon Yoo, Vlastimil Babka, kasan-dev, linux-mm
  Cc: Feng Tang

When testing the linux-next kernel, kfence's kunit test reported some
errors:

  [   12.812412]     not ok 7 - test_double_free
  [   13.011968]     not ok 9 - test_invalid_addr_free
  [   13.438947]     not ok 11 - test_corruption
  [   18.635647]     not ok 18 - test_kmalloc_aligned_oob_write

Further check shows there is the "common kmalloc" patchset from
Hyeonggon Yoo, which cleanup the kmalloc code and make a better
sharing of slab/slub. There is some function name change around it,
which was not recognized by current kfence function name handling
code, and interpreted as error.

Add new function name "__kmem_cache_free" to make it known to kfence.

Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 mm/kfence/report.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/kfence/report.c b/mm/kfence/report.c
index f5a6d8ba3e21..7e496856c2eb 100644
--- a/mm/kfence/report.c
+++ b/mm/kfence/report.c
@@ -86,6 +86,7 @@ static int get_stack_skipnr(const unsigned long stack_entries[], int num_entries
 		/* Also the *_bulk() variants by only checking prefixes. */
 		if (str_has_prefix(buf, ARCH_FUNC_PREFIX "kfree") ||
 		    str_has_prefix(buf, ARCH_FUNC_PREFIX "kmem_cache_free") ||
+		    str_has_prefix(buf, ARCH_FUNC_PREFIX "__kmem_cache_free") ||
 		    str_has_prefix(buf, ARCH_FUNC_PREFIX "__kmalloc") ||
 		    str_has_prefix(buf, ARCH_FUNC_PREFIX "kmem_cache_alloc"))
 			goto found;
-- 
2.27.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-01 12:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  7:30 [PATCH -next] mm: kence: add __kmem_cache_free to function skip list Feng Tang
2022-08-31  7:35 ` Marco Elver
2022-08-31 11:37   ` Vlastimil Babka
2022-08-31 14:04 ` Hyeonggon Yoo
2022-08-31 14:21   ` Marco Elver
2022-08-31 16:16     ` Vlastimil Babka
2022-09-01  1:26       ` Feng Tang
2022-09-01  8:47         ` Vlastimil Babka
2022-09-01 12:41           ` Feng Tang
2022-08-31 14:44   ` Feng Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox