Feng Tang
unread,Aug 31, 2022, 3:30:22 AM8/31/22Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Andrew Morton, Alexander Potapenko, Marco Elver, Dmitry Vyukov, Hyeonggon Yoo, Vlastimil Babka, kasa...@googlegroups.com, linu...@kvack.org, 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...@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