Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp829218iog; Mon, 13 Jun 2022 14:00:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vcbRNrSANFYGlWDDCBwCEn82CkIyz71HD1UvXVi9VvRvPn01zbxQgE+PcIF53o4nrCXxJA X-Received: by 2002:a17:907:6d83:b0:711:e44b:714 with SMTP id sb3-20020a1709076d8300b00711e44b0714mr1448210ejc.392.1655154038419; Mon, 13 Jun 2022 14:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655154038; cv=none; d=google.com; s=arc-20160816; b=Kg1cQGoSDSNa/alVn5OKk52YXa6Rl3ae5dX4TcWMsasRRdNP8UGuKGSVXep38yZb2i NrnBs8TAmHwRFmItXCAhkkPNwtJJt88h4CfjkMJ710ctw0uMri0+iCVzNv4YuP8FWqdW TbHXsUUsAmtUSb5Z13og05YmKN3R7gGGTP4nB2xCBEIG90EX8g/CQylsTbzgjNBtjvSE 87jC6yy+kY8NF/DW0nzGq5Hj6f1shjIBCjGXZqLpCh7ljIuUW+YZcuAvoBgNlA7InKm2 E396rrvfxMuUW56YQoPqz1bBqYuUBj+IKnwirJRiJCjchIHyTGGCg2gGc/zfR+gx/7QC ak3Q== 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=WaDMv1eR0VBdMqxxxIgVz2Jc7x+Lk8L5CflH0yXuFbw=; b=pnG33wbreOdf5XOY8gqRYxGO+DZhUFKId2e1I4Njjkg3G1KIAUcTwnRRydH0ukVYfI /AQRj1RIvEt5K1NaVs2mT/h365BrnX0ydUdGChDJUMKsTne6+4OsaeNE1L/n06U/78vD CzlF66mlTmU4yBB44TbPE4MKV8ropjdxFhseZFH5+RcmsXLv9yp7qMPj7+GW2u8Rtju6 hDRJ3KVxKuy0FTeaHMVnixAzn7Jn2pD9dubr6SUQFx773NDt417Uz5lkNNT8ts5i5KJ+ OB6jRc7y6VnmefCZ5GXQ8+JXTvbOTEl2moT4E3d6f2ZxVwvnB2nBBtW760ZwTfwmq91r Lc7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CoZZG3fM; 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 x19-20020a05640226d300b0042dc8598056si10343349edd.208.2022.06.13.14.00.12; Mon, 13 Jun 2022 14:00:38 -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=CoZZG3fM; 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 S1351787AbiFMU6j (ORCPT + 99 others); Mon, 13 Jun 2022 16:58:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351355AbiFMUxa (ORCPT ); Mon, 13 Jun 2022 16:53:30 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B19013CF9 for ; Mon, 13 Jun 2022 13:16:31 -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=1655151390; 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=WaDMv1eR0VBdMqxxxIgVz2Jc7x+Lk8L5CflH0yXuFbw=; b=CoZZG3fM8L7Sqtv3f/ALsOBGHe/B6lPSXZLM2+G6YSKnZSUG5bd2sFRQ2tMZEIU/JJ3Hn6 nDTHVEnGeNBdY14vRurowiKqtMOR/Umi+25tZS+ygSDZQ+s5nu0kcFvKT9MafLqk99OLyk lYXrDfhLWnrcPTPSRzytHcxjaB3B4lU= 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 09/32] kasan: clear metadata functions for tag-based modes Date: Mon, 13 Jun 2022 22:14:00 +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,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 Remove implementations of the metadata-related functions for the tag-based modes. The following patches in the series will provide alternative implementations. As of this patch, the tag-based modes no longer collect alloc and free stack traces. This functionality will be restored later in the series. Signed-off-by: Andrey Konovalov --- mm/kasan/tags.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/mm/kasan/tags.c b/mm/kasan/tags.c index 2e200969a4b8..f11c89505c77 100644 --- a/mm/kasan/tags.c +++ b/mm/kasan/tags.c @@ -19,54 +19,25 @@ void kasan_init_object_meta(struct kmem_cache *cache, const void *object) { - struct kasan_alloc_meta *alloc_meta; - - alloc_meta = kasan_get_alloc_meta(cache, object); - if (alloc_meta) - __memset(alloc_meta, 0, sizeof(*alloc_meta)); } void kasan_save_alloc_info(struct kmem_cache *cache, void *object, gfp_t flags) { - struct kasan_alloc_meta *alloc_meta; - - alloc_meta = kasan_get_alloc_meta(cache, object); - if (alloc_meta) - kasan_set_track(&alloc_meta->alloc_track, flags); } void kasan_save_free_info(struct kmem_cache *cache, void *object, u8 tag) { - struct kasan_alloc_meta *alloc_meta; - - alloc_meta = kasan_get_alloc_meta(cache, object); - if (!alloc_meta) - return; - - kasan_set_track(&alloc_meta->free_track, GFP_NOWAIT); } struct kasan_track *kasan_get_alloc_track(struct kmem_cache *cache, void *object) { - struct kasan_alloc_meta *alloc_meta; - - alloc_meta = kasan_get_alloc_meta(cache, object); - if (!alloc_meta) - return NULL; - - return &alloc_meta->alloc_track; + return NULL; } struct kasan_track *kasan_get_free_track(struct kmem_cache *cache, void *object, u8 tag) { - struct kasan_alloc_meta *alloc_meta; - - alloc_meta = kasan_get_alloc_meta(cache, object); - if (!alloc_meta) - return NULL; - - return &alloc_meta->free_track; + return NULL; } -- 2.25.1