path: root/mm/kasan/report_hw_tags.c
diff options
authorAndrey Konovalov <>2021-02-24 12:05:05 -0800
committerLinus Torvalds <>2021-02-24 13:38:30 -0800
commitf00748bfa0246c428bf93f45267b8f1aa1816098 (patch)
tree3c4db41d0d5b43cabdce169130e72f5ca82de75e /mm/kasan/report_hw_tags.c
parentfb9bf0484af4770240342f4d1b3dd054889cc31e (diff)
kasan: prefix global functions with kasan_
Patch series "kasan: HW_TAGS tests support and fixes", v4. This patchset adds support for running KASAN-KUnit tests with the hardware tag-based mode and also contains a few fixes. This patch (of 15): There's a number of internal KASAN functions that are used across multiple source code files and therefore aren't marked as static inline. To avoid littering the kernel function names list with generic function names, prefix all such KASAN functions with kasan_. As a part of this change: - Rename internal (un)poison_range() to kasan_(un)poison() (no _range) to avoid name collision with a public kasan_unpoison_range(). - Rename check_memory_region() to kasan_check_range(), as it's a more fitting name. Link: Link: Link: Signed-off-by: Andrey Konovalov <> Suggested-by: Marco Elver <> Reviewed-by: Marco Elver <> Reviewed-by: Alexander Potapenko <> Cc: Catalin Marinas <> Cc: Vincenzo Frascino <> Cc: Dmitry Vyukov <> Cc: Will Deacon <> Cc: Andrey Ryabinin <> Cc: Peter Collingbourne <> Cc: Evgenii Stepanov <> Cc: Branislav Rankov <> Cc: Kevin Brodsky <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/kasan/report_hw_tags.c')
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/kasan/report_hw_tags.c b/mm/kasan/report_hw_tags.c
index 57114f0e14d1..42b2168755d6 100644
--- a/mm/kasan/report_hw_tags.c
+++ b/mm/kasan/report_hw_tags.c
@@ -15,17 +15,17 @@
#include "kasan.h"
-const char *get_bug_type(struct kasan_access_info *info)
+const char *kasan_get_bug_type(struct kasan_access_info *info)
return "invalid-access";
-void *find_first_bad_addr(void *addr, size_t size)
+void *kasan_find_first_bad_addr(void *addr, size_t size)
return kasan_reset_tag(addr);
-void metadata_fetch_row(char *buffer, void *row)
+void kasan_metadata_fetch_row(char *buffer, void *row)
int i;
@@ -33,7 +33,7 @@ void metadata_fetch_row(char *buffer, void *row)
buffer[i] = hw_get_mem_tag(row + i * KASAN_GRANULE_SIZE);
-void print_tags(u8 addr_tag, const void *addr)
+void kasan_print_tags(u8 addr_tag, const void *addr)
u8 memory_tag = hw_get_mem_tag((void *)addr);