From patchwork Wed Mar 2 16:36:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 12766303 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 11506C433FE for ; Wed, 2 Mar 2022 16:39:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0BCAE8D0009; Wed, 2 Mar 2022 11:39:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 01E9E8D0001; Wed, 2 Mar 2022 11:39:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D8A918D0009; Wed, 2 Mar 2022 11:39:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id C46558D0001 for ; Wed, 2 Mar 2022 11:39:02 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 93B62121FAB for ; Wed, 2 Mar 2022 16:39:02 +0000 (UTC) X-FDA: 79200005724.03.95FB64E Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf04.hostedemail.com (Postfix) with ESMTP id C956340021 for ; Wed, 2 Mar 2022 16:39:01 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1646239140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/qOrM9Ost/e3M5mYf3qg7gFNISCBGPyiXg0v046DQbk=; b=G2aWvWA0mXOV8Xfi1OsPPKcpGyOMuyqdpfpc/ucbBO25DS/utA2Z2XM7mJt5knqzUBT7i8 6Bw1qS92F6mW03fxfSIR6tbK/zZEfxoPo4BidFJ5RN/h2sYWFEr2QWusrzSrX/r64pX265 gEZFrQQfP+rEVwS9SWLMNRQPgO+93WM= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm 17/22] kasan: rename kasan_access_info to kasan_report_info Date: Wed, 2 Mar 2022 17:36:37 +0100 Message-Id: <158a4219a5d356901d017352558c989533a0782c.1646237226.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C956340021 X-Stat-Signature: hga5gfko4zsugwjn5ukmy6und1gwd93n Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=G2aWvWA0; spf=pass (imf04.hostedemail.com: domain of andrey.konovalov@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-HE-Tag: 1646239141-261980 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 Rename kasan_access_info to kasan_report_info, as the latter name better reflects the struct's purpose. Signed-off-by: Andrey Konovalov --- 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(-) diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index 8c9a855152c2..9d2e128eb623 100644 --- a/mm/kasan/kasan.h +++ b/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 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) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 162fd2d6209e..7915af810815 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -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; diff --git a/mm/kasan/report_generic.c b/mm/kasan/report_generic.c index 182239ca184c..efc5e79a103f 100644 --- a/mm/kasan/report_generic.c +++ b/mm/kasan/report_generic.c @@ -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 diff --git a/mm/kasan/report_tags.c b/mm/kasan/report_tags.c index 1b41de88c53e..e25d2166e813 100644 --- a/mm/kasan/report_tags.c +++ b/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;