Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp321713pxm; Wed, 2 Mar 2022 16:20:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3lP5O7lD8vi3ClpgvDpUd61kS+nr2Ny08w9XCTXcseCndKcgHWTKFYwr48syDf9+gTa2m X-Received: by 2002:a63:2b48:0:b0:36c:54fb:43c3 with SMTP id r69-20020a632b48000000b0036c54fb43c3mr27653427pgr.611.1646266827304; Wed, 02 Mar 2022 16:20:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646266827; cv=none; d=google.com; s=arc-20160816; b=XTfCBtVYYkO7P6YNGK/bNkMWBOfZNnKp1Wwiju8mBqiSA6poeZHQtw0wg4FVH9nZqz xdFkKNS+Hn/+hTKC0c8XJ+CxyWtOGnKcHqy15lAfpYf1vCIesqy/40qdN/ujDv/ERdri KjUnLkKHnN/xl7GyOgSLJ3u5dXCGMMwhJlLURjPku2QoAsPkM0ilM51Ase5yFQezowvI 6+Ue/gmW6fH2QiMgubeezNhSYT74CU+DS7kRS1kQCvjnzXRZzgoB52Z7/3JE/dGB5S8v LWocZTC6LRODdMkV0zRSACWMnUx3Ez8RIHFerLkXg57M0R9dSm6sXSD/EB5SD/5dWsJi 9Q2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/qOrM9Ost/e3M5mYf3qg7gFNISCBGPyiXg0v046DQbk=; b=swKSUgoz9joiY6JXmUzhMsCO2voyeNEUCjN4Dt2kgnmccYC2UJ9AAh6igcHmYPLIv5 jHV9hdEbYaKLivv5u8Fmfx8zDN7qbpMYtLk7yxXjZB6T16k/pU8YSMZpvS5PbJiIaLo2 lZLjLtcn2GYFanNu6YRTujeYP0scab/cIxXZ+rfCDApFVQnE7ICdIr8HtlMGI7B6P/aH M9PZ+58863qWzAVIn2CqT6glANWWnZkFQKZCuKnioTDeDGPuzVkDxV7s75kzfoD6GWMO bGkM/h6lgwLhv2JwY2QerRFVbc2dL73I8Pc2RMYJdZ1r3irHOJxIv9ZAwrKr8wsAcgu8 MJNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=G2aWvWA0; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id nv9-20020a17090b1b4900b001bcc2e0cf11si472660pjb.124.2022.03.02.16.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 16:20:27 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=G2aWvWA0; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 124891E6966; Wed, 2 Mar 2022 15:33:40 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243233AbiCBQkB (ORCPT + 99 others); Wed, 2 Mar 2022 11:40:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240001AbiCBQjq (ORCPT ); Wed, 2 Mar 2022 11:39:46 -0500 Received: from out1.migadu.com (out1.migadu.com [IPv6:2001:41d0:2:863f::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CECDCD316 for ; Wed, 2 Mar 2022 08:39:01 -0800 (PST) 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 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; -- 2.25.1