From: Vlastimil Babka <vbabka@suse.cz>
To: Marco Elver <elver@google.com>, Feng Tang <feng.tang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
kasan-dev@googlegroups.com, linux-mm@kvack.org
Subject: Re: [PATCH -next] mm: kence: add __kmem_cache_free to function skip list
Date: Wed, 31 Aug 2022 13:37:38 +0200 [thread overview]
Message-ID: <5d48856b-3fc2-4203-d964-520aa4d5631e@suse.cz> (raw)
In-Reply-To: <CANpmjNPDce6n4scfgwYMz+B2qmJB6+v-2u+Xe5+koxaA=xsmWA@mail.gmail.com>
On 8/31/2022 9:35 AM, Marco Elver wrote:
> On Wed, 31 Aug 2022 at 09:30, Feng Tang <feng.tang@intel.com> wrote:
>>
>> 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>
>
> Reviewed-by: Marco Elver <elver@google.com>
>
> Thank you for catching this.
Thanks, will incorporate there.
>
>> ---
>> 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
>>
>> --
>> You received this message because you are subscribed to the Google Groups "kasan-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20220831073051.3032-1-feng.tang%40intel.com.
next prev parent reply other threads:[~2022-08-31 11:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 7:30 Feng Tang
2022-08-31 7:35 ` Marco Elver
2022-08-31 11:37 ` Vlastimil Babka [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d48856b-3fc2-4203-d964-520aa4d5631e@suse.cz \
--to=vbabka@suse.cz \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=feng.tang@intel.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox