Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1857883rdb; Mon, 9 Oct 2023 05:25:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5WlvHjYdavA009/fC2G6SeX8Io0gRo8ath88xB63PzCrkoUXS8VMJ6Yt+o4MYlXVjHTBs X-Received: by 2002:a05:6808:6249:b0:3a8:5133:4832 with SMTP id dt9-20020a056808624900b003a851334832mr15813305oib.23.1696854338954; Mon, 09 Oct 2023 05:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696854338; cv=none; d=google.com; s=arc-20160816; b=Kv7A80g+wgqUG2eQSfiL40+hF8lh3YYJch/fmmeJB2GdZlOndhfOo0VohtXxKmklyI EsAusvvtvL6g2hIazGC9fNYlQ9up3sz4+I/s5J2QfCU3ZkdX4oTooH0pfg3F8ARJ12kM tMtp/enl4bIqlXGCWxDS6TjruBTgA2yiIbNPYE5+SYDuzPJ81WWbWWzyLR1nVGTm7Wim NJWIMh0vZ7BfO8JJUwO/KCGdbi+E1N3clJD8GrfAaVpQTG4UYRg+tql6RV4Sf5gyKaJJ nAef+ilfO77BeGLTpeImbhAc0lZcsku9K5N5U30LXUK2FIt23o+G36FW5In+MiF7dDk5 seEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/XMSmBSmrIghDRAMwSWs7YuLmGLdnz0rmjgVzyIhrZM=; fh=D7uhrQnmQG6xf11gbvfi3iQ1A4p/6GZN4OQA8frEvwo=; b=nGYg0xVnBr3TA1S8A+YLPd6Lu5SZbX449DOEfLzzlsneddXvCNehdR1SqkOi1gPFrx rnwON9D34sUOtN6RQoXfCiv3/slWxCA5Yg8iKZK+htHyMCZC4KAcDsz5w2f+yHD1w6d2 NeXkzHJUjVQ8ZGJW4ficmFNx8O/DHS/ZAc8mkqf3uBu07DoY3sLueuJuxtgUhBriRGiF xpV5wMue5zKxDm4JNOjGUb3c1naIC9WGtcAHN7Y0RhLZgx9EHzSerTWg5dBwKmec9Gtg dJkyAWQzwb46pYYOZo4cjFALRdpF5gclF61jc332l75kapVtYHmzpsfWk4YcKLJ9llvB l3UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ucsvcSIw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 20-20020a631654000000b00578b6e2f462si8906035pgw.351.2023.10.09.05.25.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 05:25:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ucsvcSIw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0C9F180A95AE; Mon, 9 Oct 2023 05:25:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346530AbjJIMZD (ORCPT + 99 others); Mon, 9 Oct 2023 08:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346489AbjJIMZB (ORCPT ); Mon, 9 Oct 2023 08:25:01 -0400 Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AD0199 for ; Mon, 9 Oct 2023 05:25:00 -0700 (PDT) Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1e5602c12e5so2714087fac.3 for ; Mon, 09 Oct 2023 05:25:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696854297; x=1697459097; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/XMSmBSmrIghDRAMwSWs7YuLmGLdnz0rmjgVzyIhrZM=; b=ucsvcSIwxxBSjkrF+W4Dy8XDMtzGVfrR7SCBz2AuejbwVjB81oXCxWs3dskHri12NP A9QyXG5UUPsJ+zDXhrF+Hrq77ZpEKI2ap/GyPm3xV4g6fCatSHsqJx/f8tLouYhpIaDW zRhvVBdh82/m06q18atKyfDXL21RqJWiDVFu9DaDhiBWEKaMf7F2WxuE92NEy9FoZuf0 nKWZdoN4wLqATyZ/4EkI07vt4DZAOdlGWbjBvuVsuQCZpquSaWlMXpAxjJKlhKETz3gI d/o/SAKmVRdxfU8fjXJRqyu3tdL5vszGQxunoal1SOPvZBNMzAg7nKmlXYAcGb+MMEJK P+ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696854297; x=1697459097; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/XMSmBSmrIghDRAMwSWs7YuLmGLdnz0rmjgVzyIhrZM=; b=nvZ08hu+Q1mid4LKCNvNxkUK6PKCw8XV+UxPJPkF4PBxpoczn5oXMpXf1Pcz/At4ED WQEB8zMVfQ314nwGjm05UApdn9MnRnX9+/bxRSxG5XBbRrgRBYWXmHUcBC7fcpByuJDu tTyO7MzyqbaDReLjAe2ytw6chMHnukCjckwHsWc2LE4sRjItXb1k9bZo8lxytkUhBvz+ qBKLRicxDyYMKPTwfhViHeFWPI/pPvyi7Oj43dVYhFbixJyp2nu0DQB17/dWRkdAd+Cv MJ0bWZontJ/IHrbpRM/nwXIyf/Gy7Up4bSQ/FmQEtfww3B3T2JJNnAFj0g77jqGnX1/C QzTg== X-Gm-Message-State: AOJu0Yw+hyHJI0Qj597tUDbFqBp0wd1Mc/nrnt9dPRsseYNJMBskf59Q sgIu/opWMsSns8F1XpOzlb7jFXv07iZxBppE0QihsA== X-Received: by 2002:a05:6870:5252:b0:1e1:6cee:26b6 with SMTP id o18-20020a056870525200b001e16cee26b6mr19546563oai.8.1696854296959; Mon, 09 Oct 2023 05:24:56 -0700 (PDT) MIME-Version: 1.0 References: <6e2367e7693aa107f05c649abe06180fff847bb4.1694625260.git.andreyknvl@google.com> In-Reply-To: <6e2367e7693aa107f05c649abe06180fff847bb4.1694625260.git.andreyknvl@google.com> From: Alexander Potapenko Date: Mon, 9 Oct 2023 14:24:21 +0200 Message-ID: Subject: Re: [PATCH v2 19/19] kasan: use stack_depot_put for tag-based modes To: andrey.konovalov@linux.dev Cc: Marco Elver , Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 09 Oct 2023 05:25:10 -0700 (PDT) On Wed, Sep 13, 2023 at 7:18=E2=80=AFPM wrote: > > From: Andrey Konovalov > > Make tag-based KASAN modes to evict stack traces from the stack depot "Make tag-based KASAN modes evict stack traces from the stack depot" (without "to") > Internally, pass STACK_DEPOT_FLAG_GET to stack_depot_save_flags (via > kasan_save_stack) to increment the refcount when saving a new entry > to stack ring and call stack_depot_put when removing an entry from > stack ring. > > Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko (but see the two other comments) > --- a/mm/kasan/report_tags.c > +++ b/mm/kasan/report_tags.c > @@ -7,6 +7,7 @@ > #include > > #include "kasan.h" > +#include "../slab.h" Why?