From patchwork Fri Mar 25 01:13:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12791189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7E5CC433F5 for ; Fri, 25 Mar 2022 01:13:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75A678D002F; Thu, 24 Mar 2022 21:13:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7096C8D0005; Thu, 24 Mar 2022 21:13:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D1958D002F; Thu, 24 Mar 2022 21:13:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 4F24E8D0005 for ; Thu, 24 Mar 2022 21:13:03 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 1CA1E23147 for ; Fri, 25 Mar 2022 01:13:03 +0000 (UTC) X-FDA: 79281134646.10.DABC203 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id A45D14000C for ; Fri, 25 Mar 2022 01:13:02 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 10A4A61857; Fri, 25 Mar 2022 01:13:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C065C340EE; Fri, 25 Mar 2022 01:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1648170781; bh=paBVmYOT32iNH/+OtobHjIYpn5sqthR9XqBVKDVTDpI=; h=Date:To:From:In-Reply-To:Subject:From; b=w48HRkdqxvgxoBaI+i4oPOgcKG4Tn8hc2YYWywdKwNySoHovtoTW4rBCEcxnKdMcn B/RUff1lcYZ0F7JicKej4ayyKdhv36NRazOTXuqrz9caGbze5PbG3PbVA2Cw5hSKt+ mecTQxawY7DoWlVhXHo1ApND9HJV3zKvZ7PdcGHM= Date: Thu, 24 Mar 2022 18:13:00 -0700 To: ryabinin.a.a@gmail.com,glider@google.com,elver@google.com,dvyukov@google.com,andreyknvl@google.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220324180758.96b1ac7e17675d6bc474485e@linux-foundation.org> Subject: [patch 089/114] kasan: rename kasan_access_info to kasan_report_info Message-Id: <20220325011301.6C065C340EE@smtp.kernel.org> X-Stat-Signature: ubgkzr8b385ewjij6d31y3k3kxj9uy1h Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=w48HRkdq; dmarc=none; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: A45D14000C X-HE-Tag: 1648170782-417568 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Andrey Konovalov Subject: kasan: rename kasan_access_info to kasan_report_info 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 Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton --- mm/kasan/kasan.h | 4 ++-- mm/kasan/report.c | 8 ++++---- mm/kasan/report_generic.c | 6 +++--- mm/kasan/report_tags.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) --- a/mm/kasan/kasan.h~kasan-rename-kasan_access_info-to-kasan_report_info +++ a/mm/kasan/kasan.h @@ -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 a #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) --- a/mm/kasan/report.c~kasan-rename-kasan_access_info-to-kasan_report_info +++ a/mm/kasan/report.c @@ -84,7 +84,7 @@ static int __init kasan_set_multi_shot(c } __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_ac 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, si 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; --- a/mm/kasan/report_generic.c~kasan-rename-kasan_access_info-to-kasan_report_info +++ a/mm/kasan/report_generic.c @@ -43,7 +43,7 @@ void *kasan_find_first_bad_addr(void *ad 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(s 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(str 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 --- a/mm/kasan/report_tags.c~kasan-rename-kasan_access_info-to-kasan_report_info +++ a/mm/kasan/report_tags.c @@ -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;