The patch titled Subject: kasan, slub: reset tag when printing address has been added to the -mm tree. Its filename is kasan-slub-reset-tag-when-printing-address.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/kasan-slub-reset-tag-when-printing-address.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/kasan-slub-reset-tag-when-printing-address.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Kuan-Ying Lee <Kuan-Ying.Lee@xxxxxxxxxxxx> Subject: kasan, slub: reset tag when printing address The address still includes the tags when it is printed. With hardware tag-based kasan enabled, we will get a false positive KASAN issue when we access metadata. Reset the tag before we access the metadata. Link: https://lkml.kernel.org/r/20210804090957.12393-3-Kuan-Ying.Lee@xxxxxxxxxxxx Fixes: aa1ef4d7b3f6 ("kasan, mm: reset tags when accessing metadata") Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee@xxxxxxxxxxxx> Reviewed-by: Marco Elver <elver@xxxxxxxxxx> Cc: Alexander Potapenko <glider@xxxxxxxxxx> Cc: Andrey Konovalov <andreyknvl@xxxxxxxxx> Cc: Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Chinwen Chang <chinwen.chang@xxxxxxxxxxxx> Cc: Nicholas Tang <nicholas.tang@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/slub.c~kasan-slub-reset-tag-when-printing-address +++ a/mm/slub.c @@ -576,8 +576,8 @@ static void print_section(char *level, c unsigned int length) { metadata_access_enable(); - print_hex_dump(level, kasan_reset_tag(text), DUMP_PREFIX_ADDRESS, - 16, 1, addr, length, 1); + print_hex_dump(level, text, DUMP_PREFIX_ADDRESS, + 16, 1, kasan_reset_tag((void *)addr), length, 1); metadata_access_disable(); } _ Patches currently in -mm which might be from Kuan-Ying.Lee@xxxxxxxxxxxx are kasan-kmemleak-reset-tags-when-scanning-block.patch kasan-slub-reset-tag-when-printing-address.patch