Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp847883iog; Mon, 13 Jun 2022 14:23:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMc+9SFT7Qdr7PxDCKuzobdvCO9YoBzxZqRHhN84fRmdp+1BJdWDz+vuBD7jNa4pFPqgk+ X-Received: by 2002:a05:6402:2788:b0:431:3f86:1d4e with SMTP id b8-20020a056402278800b004313f861d4emr2050838ede.238.1655155437887; Mon, 13 Jun 2022 14:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655155437; cv=none; d=google.com; s=arc-20160816; b=l0pLHL7vRkuXa2voPGG2LdC3NcRht4ZilXVxcDt6vIzQjIE5YjZFxQtPDQwS7oilqr elbwvpsFgu/Bwn1zOuj1bfmJ92Mze8QEvdb5k6KC/MoL0+kqvPtaML74YmyMOjeniNxs U4lCvg6/2rBMFnOjlrl9WEjAeeFTxaHc6nmrGSRgct2KEk4KRX0Hr6RG9TS2MEqBe29G HV+RSDh1RvKuqYL6FONxYyDPgVTj5p9yNX773N+au4y4R1mwT9/clOb8/Rpa30seic5P yryQjNHyITVWiLzldzBPMX0pasl0yNjCb1nURINNtzhLsSAxMmuzx0SaQ9PoJAYmbLGw EBbA== 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=j0yWL0nsrOMOMqm9cWej2oW3wFadR2W9VWyegnjYrXA=; b=ix89yBGS3dUMm27fPuvHmJJjq0EFzapu866iHHmZAfEbhJP7BGbno7wkufESl1qxf+ ozeEfRQIj6mnIdDQJqtc/rvph0X+ICA++swSs3JQKCe3gb18XUAprYpwhPmVEcUz4d7i HZuqI78ztRTcFE0jT3C1fH+UXHL230CzijkAKux+1MHufG9MQS8hX975czwvM8mcuFSL B85bgSF5TEoQw/wTP43jeZ+Y4v+pQFZsozHgLcSFg69Xv4FAHqxYogjMoqiEk7Uvj319 b85NS2Zg+ItI4nWNxlUqaFaFLnFSXsxWtjaLyRB8mXZKpdTWcTIvp+UIMRRBwZKJDOdu W/lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=B7wM0RDK; 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 by7-20020a0564021b0700b00425fc01cf38si7750491edb.457.2022.06.13.14.23.33; Mon, 13 Jun 2022 14:23:57 -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=B7wM0RDK; 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 S1351660AbiFMU6d (ORCPT + 99 others); Mon, 13 Jun 2022 16:58:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347654AbiFMUxR (ORCPT ); Mon, 13 Jun 2022 16:53:17 -0400 Received: from out0.migadu.com (out0.migadu.com [IPv6:2001:41d0:2:267::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF60DFC0 for ; Mon, 13 Jun 2022 13:15:26 -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=1655151325; 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=j0yWL0nsrOMOMqm9cWej2oW3wFadR2W9VWyegnjYrXA=; b=B7wM0RDK6hT1iWd1oUZiXw42RuPFZUK3/bZLcb0cf6S+yJLUMeFAXOOhzQih3C24QAGjKu ePUXricowL++fSJ9e4X99sgTfnTXB5Gb7y6BsYumoyibHSSIGQKAHwJJtceNv7t7xMo8tQ 2bSz7OqlMXc+P6DOs7u4kWu0lyWZllE= 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 02/32] kasan: rename kasan_set_*_info to kasan_save_*_info Date: Mon, 13 Jun 2022 22:13:53 +0200 Message-Id: <50cdd8e8d696a8958b7b59c940561c6ed8042436.1655150842.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.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,T_SCC_BODY_TEXT_LINE 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. 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 968d2365d8c1..753775b894b6 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 610d60d6e5b8..6df8d7b01073 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -284,7 +284,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