Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3908397imw; Mon, 18 Jul 2022 17:13:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uCLcgleRWuLrNoSpcg3lPPf1aj6ux7f2QiK1AcKBL5/gZaqGiJwDjCvJ46tpR9oFQsntEl X-Received: by 2002:a17:906:4fd0:b0:72e:dd6c:1b95 with SMTP id i16-20020a1709064fd000b0072edd6c1b95mr22447276ejw.323.1658189638746; Mon, 18 Jul 2022 17:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658189638; cv=none; d=google.com; s=arc-20160816; b=i+ql93A6Vs+IUVSkx6jaVpU4wkAuK4rPDZHACTGR//qLl4KKrl1JYqhNAlD07uBi4h YsrtK1XTlQAfjIOsGLsf1njCl/PgjsX3VgS3IeRiigapA5/uqkovYjRcDEnHFsPWomm/ WfWLt64WKYWGJrC3n37qE1IRrai9iDR/qHLZDdARmsxjDEdSLtVxkvONs5fvJfyPi6Ch DiXLTlScZRyRflMcfHi1TcZjQkoWAc8ic/gXvKRHMx93Wq2WXVsaGi+Hq6zIVe7CKd43 rrPlN2PtkM1RqBPLrVdhIXCMix/Y5WnrGQZioYyDnhtRzdJ11t3Y04MRR85JMj1ANupV QYrg== 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=OY6e59NvKBhkMf/4HyAqWSEo1eLRPIhpqy/QZPuprxE=; b=ERsloAzGwa0ywoOaLQuDHKqM1CyayYbP0h4A+yi0luMQb4w9969EfYQTRU6QhsVoyn kCgcLB7FE16Ej2Qw3ilN1gjJsyH5UWgxAiChUB85W0+AVNuHcLuF856A6SbN/5lPbr3e 6TVISnYr/aNEmEFrakTFRUw+m5wzkih4SRCxZv9F/eiBmqMilMIPuHDw2FigF+FKoIPb 0blk8FhmykY4wbDjKw0ZHr42X3G8JjjZyKzdhgsPITGUPqQQWtud6MrHxgtucSiaS7SO KNEiRimw7hji286O1XhzbItY/DN9Br0GSYZdu7rih0yKpni5FOfvM/tlEY1q6qjl1KA3 BV3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Id+3GRXV; 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 dd19-20020a1709069b9300b0072aeac5f74bsi13183113ejc.119.2022.07.18.17.13.33; Mon, 18 Jul 2022 17:13:58 -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=Id+3GRXV; 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 S236545AbiGSALe (ORCPT + 99 others); Mon, 18 Jul 2022 20:11:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236493AbiGSAL2 (ORCPT ); Mon, 18 Jul 2022 20:11:28 -0400 Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E53D432D9A for ; Mon, 18 Jul 2022 17:11: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=1658189485; 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=OY6e59NvKBhkMf/4HyAqWSEo1eLRPIhpqy/QZPuprxE=; b=Id+3GRXV44NqIJN8OV30PNO6hBSFC7FjhRljat8a4c2MIn4hBQ+ZdPHeP2zl0EJvIxKw1k lsfD1V4t93QPV5IrkX0vtNgg9U2ibFr9h2P4Iml4nIrZmypY2FcOy4wMy3qi4JB108+K+v tI95ZUdRvjud8kav8T9t25p8KaBLpoQ= 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 09/33] kasan: clear metadata functions for tag-based modes Date: Tue, 19 Jul 2022 02:09:49 +0200 Message-Id: <1c89671b9041628b86be7907a5edd340ab13222f.1658189199.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 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. Reviewed-by: Marco Elver 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