kasan: rename kasan_access_info to kasan_report_info
authorAndrey Konovalov <andreyknvl@google.com>
Fri, 25 Mar 2022 01:13:00 +0000 (18:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Mar 2022 02:06:50 +0000 (19:06 -0700)
Rename kasan_access_info to kasan_report_info, as the latter name better
reflects the struct's purpose.

Link: https://lkml.kernel.org/r/158a4219a5d356901d017352558c989533a0782c.1646237226.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Marco Elver <elver@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/kasan/kasan.h
mm/kasan/report.c
mm/kasan/report_generic.c
mm/kasan/report_tags.c

index 8c9a855152c288ff4efacfb78acc0b61a5b60128..9d2e128eb623f4a6fd85e36805d2caa77fd13d6c 100644 (file)
@@ -132,7 +132,7 @@ enum kasan_report_type {
        KASAN_REPORT_INVALID_FREE,
 };
 
-struct kasan_access_info {
+struct kasan_report_info {
        enum kasan_report_type type;
        void *access_addr;
        void *first_bad_addr;
@@ -276,7 +276,7 @@ static inline void kasan_print_tags(u8 addr_tag, const void *addr) { }
 #endif
 
 void *kasan_find_first_bad_addr(void *addr, size_t size);
-const char *kasan_get_bug_type(struct kasan_access_info *info);
+const char *kasan_get_bug_type(struct kasan_report_info *info);
 void kasan_metadata_fetch_row(char *buffer, void *row);
 
 #if defined(CONFIG_KASAN_STACK)
index 162fd2d6209e7e7fc16395ffe632c7d10d561bed..7915af81081505f9f66c33c1ac1e4886cda08dac 100644 (file)
@@ -84,7 +84,7 @@ static int __init kasan_set_multi_shot(char *str)
 }
 __setup("kasan_multi_shot", kasan_set_multi_shot);
 
-static void print_error_description(struct kasan_access_info *info)
+static void print_error_description(struct kasan_report_info *info)
 {
        if (info->type == KASAN_REPORT_INVALID_FREE) {
                pr_err("BUG: KASAN: double-free or invalid-free in %pS\n",
@@ -392,7 +392,7 @@ static bool report_enabled(void)
        return !test_and_set_bit(KASAN_BIT_REPORTED, &kasan_flags);
 }
 
-static void print_report(struct kasan_access_info *info)
+static void print_report(struct kasan_report_info *info)
 {
        void *tagged_addr = info->access_addr;
        void *untagged_addr = kasan_reset_tag(tagged_addr);
@@ -414,7 +414,7 @@ static void print_report(struct kasan_access_info *info)
 void kasan_report_invalid_free(void *ptr, unsigned long ip)
 {
        unsigned long flags;
-       struct kasan_access_info info;
+       struct kasan_report_info info;
 
        start_report(&flags, true);
 
@@ -437,7 +437,7 @@ bool kasan_report(unsigned long addr, size_t size, bool is_write,
        void *ptr = (void *)addr;
        unsigned long ua_flags = user_access_save();
        unsigned long irq_flags;
-       struct kasan_access_info info;
+       struct kasan_report_info info;
 
        if (unlikely(!report_enabled())) {
                ret = false;
index 182239ca184cdb5cd939aae02e455acd044c0b38..efc5e79a103fa0638611e254ebe15c2d245cffad 100644 (file)
@@ -43,7 +43,7 @@ void *kasan_find_first_bad_addr(void *addr, size_t size)
        return p;
 }
 
-static const char *get_shadow_bug_type(struct kasan_access_info *info)
+static const char *get_shadow_bug_type(struct kasan_report_info *info)
 {
        const char *bug_type = "unknown-crash";
        u8 *shadow_addr;
@@ -95,7 +95,7 @@ static const char *get_shadow_bug_type(struct kasan_access_info *info)
        return bug_type;
 }
 
-static const char *get_wild_bug_type(struct kasan_access_info *info)
+static const char *get_wild_bug_type(struct kasan_report_info *info)
 {
        const char *bug_type = "unknown-crash";
 
@@ -109,7 +109,7 @@ static const char *get_wild_bug_type(struct kasan_access_info *info)
        return bug_type;
 }
 
-const char *kasan_get_bug_type(struct kasan_access_info *info)
+const char *kasan_get_bug_type(struct kasan_report_info *info)
 {
        /*
         * If access_size is a negative number, then it has reason to be
index 1b41de88c53ebe2b413ce57be999aa37023cf8bb..e25d2166e813d6ce421f9a6e2ddfecb05745e305 100644 (file)
@@ -7,7 +7,7 @@
 #include "kasan.h"
 #include "../slab.h"
 
-const char *kasan_get_bug_type(struct kasan_access_info *info)
+const char *kasan_get_bug_type(struct kasan_report_info *info)
 {
 #ifdef CONFIG_KASAN_TAGS_IDENTIFY
        struct kasan_alloc_meta *alloc_meta;