path: root/mm/kasan/report_hw_tags.c
diff options
authorAndrey Konovalov <>2020-12-22 12:02:52 -0800
committerLinus Torvalds <>2020-12-22 12:55:08 -0800
commitc0054c565ae598073d6c27762c7d4f7de49a45d9 (patch)
tree26e8cbacc152f42d8d2655eb064c6cebb1dc0dae /mm/kasan/report_hw_tags.c
parent77f57c983065d0569ee1b4af80f07224b439af57 (diff)
kasan: inline kasan_reset_tag for tag-based modes
Using kasan_reset_tag() currently results in a function call. As it's called quite often from the allocator code, this leads to a noticeable slowdown. Move it to include/linux/kasan.h and turn it into a static inline function. Also remove the now unneeded reset_tag() internal KASAN macro and use kasan_reset_tag() instead. Link: Link: Signed-off-by: Andrey Konovalov <> Reviewed-by: Marco Elver <> Reviewed-by: Dmitry Vyukov <> Tested-by: Vincenzo Frascino <> Cc: Alexander Potapenko <> Cc: Andrey Ryabinin <> Cc: Branislav Rankov <> Cc: Catalin Marinas <> Cc: Evgenii Stepanov <> Cc: Kevin Brodsky <> Cc: Vasily Gorbik <> Cc: Will Deacon <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/kasan/report_hw_tags.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/kasan/report_hw_tags.c b/mm/kasan/report_hw_tags.c
index da543eb832cd..57114f0e14d1 100644
--- a/mm/kasan/report_hw_tags.c
+++ b/mm/kasan/report_hw_tags.c
@@ -22,7 +22,7 @@ const char *get_bug_type(struct kasan_access_info *info)
void *find_first_bad_addr(void *addr, size_t size)
- return reset_tag(addr);
+ return kasan_reset_tag(addr);
void metadata_fetch_row(char *buffer, void *row)