Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3953443imw; Mon, 18 Jul 2022 18:17:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s8z45CcZgx3BNh4XB7TQHFGlJvuIa/N4mbT3G/KO68LJlLfApMyCMlmhqvuSXyHwdgfcXC X-Received: by 2002:a05:6402:194b:b0:43a:bc62:69a0 with SMTP id f11-20020a056402194b00b0043abc6269a0mr39567851edz.400.1658193460080; Mon, 18 Jul 2022 18:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658193460; cv=none; d=google.com; s=arc-20160816; b=jixw8jv8IwFNMmMsG36w7ZPGUriGsG82M41lqZE9j5NMeHCNw1V7EcxdWBMHvy+Ifu 5rRsWo12W169xdtbl7KqroYj8FXd1Er+6ebCLDWnt9kycq7FeVO9VjzO1DNuWvRpQJN5 ex9XVye1bOvg5f9T8m2XY7q5PslHEbIeEQP37fETRww5FYcJtyGRBy+c6pVPi+E11DJ/ 7F7ixlFCiYN2cIH2N4LNzvqELBIAMubvLC1go/yyKdrquv6rBIxXSl3BxaB9x0czougj pUdQOm/fZBw5Bw1b7mdEd0SxIxQ+KanoJqVoTic7QRQYbRTaYXF1baSjpJUAOxauOfgM V1XQ== 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=8oJ9fJQdymQKyxJOUtOhtMcD9KzdUX/sibmD9n9qf0w=; b=SO18mevQVscQqKr3w3sJ4LdAEaw34PIfUAPuTXiO+eyfsUwRnXF2zHsl1IL4h6MMsl iXTB35Rf1jNJ/nEc9MCVGSUfuNBAwbrdsoFwW+fowRsowQFbFNdWfACsE1wYRHCVawzS QWPpJftXF6dEl/tNjbBrLS3d+J5vNndCCoatTNy2gnq3eyrA59rNlNVxA240FIO+tqrl aHaBcvvpK2Lzt01NB9aAWZgN0N1gr7Hwf2EPr5E6E+3G0TpAA1IeUFiAmQvEbXN6sKwU cAGuaqKxl+RUtUru2XHDmragVERdvocVVD+nZIutyJHrhp/yYxE5tdSdFIEPdhRWc/mb X5sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LpPHqJwP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw28-20020a1709066a1c00b0072b41b3d3c3si17973170ejc.766.2022.07.18.18.17.15; Mon, 18 Jul 2022 18:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LpPHqJwP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236372AbiGSAK2 (ORCPT + 99 others); Mon, 18 Jul 2022 20:10:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235508AbiGSAKX (ORCPT ); Mon, 18 Jul 2022 20:10:23 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED33F2A404 for ; Mon, 18 Jul 2022 17:10:21 -0700 (PDT) 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=1658189420; 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=8oJ9fJQdymQKyxJOUtOhtMcD9KzdUX/sibmD9n9qf0w=; b=LpPHqJwPdlcxqD01yQHkLskn8y6CFCmYCJ5PgvmIsGygV3R7/EUYmlxGBBkg1+lVVwoLHc LRdff0caowef1Wm6+Idxe6uJ4mBX3N5+hEQZZUNIpHp+IPzUQhsCVlEf6+dzU0PNuaDXs9 IiS7cYE4mUnSsk7Rk49iHxVkf8g78hs= From: andrey.konovalov@linux.dev To: Marco Elver , Alexander Potapenko Cc: Andrey Konovalov , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, Peter Collingbourne , Evgenii Stepanov , Florian Mayer , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm v2 02/33] kasan: rename kasan_set_*_info to kasan_save_*_info Date: Tue, 19 Jul 2022 02:09:42 +0200 Message-Id: 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham 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 set_alloc_info() and kasan_set_free_info() to save_alloc_info() and kasan_save_free_info(). The new names make more sense. Reviewed-by: Marco Elver Signed-off-by: Andrey Konovalov --- mm/kasan/common.c | 8 ++++---- mm/kasan/generic.c | 2 +- mm/kasan/kasan.h | 2 +- mm/kasan/tags.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mm/kasan/common.c b/mm/kasan/common.c index b7351b860abf..4b2bbb6063cb 100644 --- a/mm/kasan/common.c +++ b/mm/kasan/common.c @@ -364,7 +364,7 @@ static inline bool ____kasan_slab_free(struct kmem_cache *cache, void *object, return false; if (kasan_stack_collection_enabled()) - kasan_set_free_info(cache, object, tag); + kasan_save_free_info(cache, object, tag); return kasan_quarantine_put(cache, object); } @@ -423,7 +423,7 @@ void __kasan_slab_free_mempool(void *ptr, unsigned long ip) } } -static void set_alloc_info(struct kmem_cache *cache, void *object, +static void save_alloc_info(struct kmem_cache *cache, void *object, gfp_t flags, bool is_kmalloc) { struct kasan_alloc_meta *alloc_meta; @@ -467,7 +467,7 @@ void * __must_check __kasan_slab_alloc(struct kmem_cache *cache, /* Save alloc info (if possible) for non-kmalloc() allocations. */ if (kasan_stack_collection_enabled()) - set_alloc_info(cache, (void *)object, flags, false); + save_alloc_info(cache, (void *)object, flags, false); return tagged_object; } @@ -513,7 +513,7 @@ static inline void *____kasan_kmalloc(struct kmem_cache *cache, * This also rewrites the alloc info when called from kasan_krealloc(). */ if (kasan_stack_collection_enabled()) - set_alloc_info(cache, (void *)object, flags, true); + save_alloc_info(cache, (void *)object, flags, true); /* Keep the tag that was set by kasan_slab_alloc(). */ return (void *)object; diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c index 437fcc7e77cf..03a3770cfeae 100644 --- a/mm/kasan/generic.c +++ b/mm/kasan/generic.c @@ -358,7 +358,7 @@ void kasan_record_aux_stack_noalloc(void *addr) return __kasan_record_aux_stack(addr, false); } -void kasan_set_free_info(struct kmem_cache *cache, +void kasan_save_free_info(struct kmem_cache *cache, void *object, u8 tag) { struct kasan_free_meta *free_meta; diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index 01c03e45acd4..bf16a74dc027 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -285,7 +285,7 @@ struct slab *kasan_addr_to_slab(const void *addr); depot_stack_handle_t kasan_save_stack(gfp_t flags, bool can_alloc); void kasan_set_track(struct kasan_track *track, gfp_t flags); -void kasan_set_free_info(struct kmem_cache *cache, void *object, u8 tag); +void kasan_save_free_info(struct kmem_cache *cache, void *object, u8 tag); struct kasan_track *kasan_get_free_track(struct kmem_cache *cache, void *object, u8 tag); diff --git a/mm/kasan/tags.c b/mm/kasan/tags.c index 8f48b9502a17..b453a353bc86 100644 --- a/mm/kasan/tags.c +++ b/mm/kasan/tags.c @@ -17,7 +17,7 @@ #include "kasan.h" -void kasan_set_free_info(struct kmem_cache *cache, +void kasan_save_free_info(struct kmem_cache *cache, void *object, u8 tag) { struct kasan_alloc_meta *alloc_meta; -- 2.25.1