Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1297961rwr; Wed, 3 May 2023 13:03:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ48TK47q1Mn6SylIwbDeB9bephdV1FBJB0gCDe9hPioDDwR3qisAQYW+5n5ONSnVWKc9IHT X-Received: by 2002:a17:902:e841:b0:1a9:bac2:21a2 with SMTP id t1-20020a170902e84100b001a9bac221a2mr1435276plg.21.1683144188436; Wed, 03 May 2023 13:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683144188; cv=none; d=google.com; s=arc-20160816; b=y2jl+QFEh/hSBfoxQY4chiZSOWmDg85Jk7hgYup8JpZfv+caYkaaIQVCEGKDYpMHet +/NRVITY/ymIAIDmOUXi1H5D44DnWqyLV6iBYkkRkQ/E7tpRZKuCHKLTrecCRBQjY0Fa hJ0wjeceVZWaC6IRMlEiTPNxQFf33+yeqafy2Xyw51Jxs9alKPhWoNfhxCX7vePPSYBX kSQornKtvjPPfkSEKZofsMFT7QsIBH3LIWGtyUyHVlGIXX69rzEVrvWWkvxir22An39V XHDHPPW0fQs0JRxdYM8Mj6tLdsyHBMIp5mgZNJO5EOIDH3B5m0j2D2y7vXiWIOQBjuZg RnbQ== 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=bq44fWKfzB7azpC5445h4zSgjB+E0XG23Sx5k3P/Wrs=; b=z1eiE7WcaHuh1uQ1mzNIvUBNfmDbVGd1q2znUbAp/0LRU99QU62JLACdqSML0h6KWG 26kICs8GUueYUNvfoLjASbVEdq/0/ohsfdzzTYNAruTe/cNJKBuQRWkd6N79UCtCssbL no2rEdWa7OJUAM6dU95Yi5+wPKUoUcO4xAyn7pAQ/Jj0XFPyIW27FHMENzeShgClcbUW DCPkpQnK4wbCG35JztaXdlbdedVbTywR/ldZesC9nm2Mc43foVsaiIrjbjutxAHpJRmf eNeVgJBlo67WdRj1db53LW6BQcMObl/TwjcdzX3YKZpc5qXRf1EN17Lg7WDdRgxMmJS7 k4qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=mNn8mOJ9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a17090301d000b001ab19717e7esi3124675plh.353.2023.05.03.13.02.32; Wed, 03 May 2023 13:03:08 -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=@google.com header.s=20221208 header.b=mNn8mOJ9; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229754AbjECTpo (ORCPT + 99 others); Wed, 3 May 2023 15:45:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjECTpm (ORCPT ); Wed, 3 May 2023 15:45:42 -0400 Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52FE37695 for ; Wed, 3 May 2023 12:45:41 -0700 (PDT) Received: by mail-yb1-xb32.google.com with SMTP id 3f1490d57ef6-b9a6869dd3cso8120507276.2 for ; Wed, 03 May 2023 12:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683143140; x=1685735140; 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=bq44fWKfzB7azpC5445h4zSgjB+E0XG23Sx5k3P/Wrs=; b=mNn8mOJ969yUibKfAWrXgatuIFi6FVIM4EsSSH9KQ1Go4d1sYzKZHUi8VHjbX6pfWa OlJ16nZGAbvURg1kkDTdEvJDfJPD2YhA8jF3Bo81PkL1ob0v9cS2gkR4gCqMlpmjnr/s tWs9Fu3MohlaypLe2rIvRSkpy7E5gp65K6pp8163QEUwdmBPDYTBTVK0GaffIx+/jWG1 GkJ4oD48JkxrW+rrbEhXrrnBxumK3LN05X4J4kXdI0k+pYkkAnfDQi3ANZniOpY63cWz Q+VUnUlPsKkbZjKcze+vAukdxm3Nrif9W+zvOKGcMfCU5FAKE+MOBW4LpPVOFpo/QEqA mUdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683143140; x=1685735140; 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=bq44fWKfzB7azpC5445h4zSgjB+E0XG23Sx5k3P/Wrs=; b=R7ipBoeOfacUYRucSP0TiqZ7NhylaMDK/Eb/WZmUdOKzcB7z+ZmJaHGzxihSecQz0t v6MUFJh9qPlhec1zPHwdKgmyGQZZRgASXZnAyMuxQ9Snzea6ccdWLrOQn+sT7PWzPWK3 mTAoNQYomCyE4gAyNBchwGdOdYtFXh9agqTsRfHNWw4y/Abq5d718S9ZaLw8UnwmCP42 xOeG5Yqa6ZXR53WneSQVBHDeYn6HM0ZPpzm31fLcEKLk6TjG18dhT6epnSJ3Pm6rD0Pu /wTkM2ML9ypGDeJoklG9i4GRpW1hhb0vKE0+UH6X8Xr16pkB3KWjw9gDOx+Z+KawoJWP qtWA== X-Gm-Message-State: AC+VfDxtSr/MYg4upP9sWetvsmE4+yG/E+DI2Y1QHUSDUumMaI+d65Xn TO5x5HPmr6AWwWAstknGgYTbnEHszYKVtdInzLMX5w== X-Received: by 2002:a25:4f86:0:b0:b9a:9ad4:1d3 with SMTP id d128-20020a254f86000000b00b9a9ad401d3mr18494816ybb.5.1683143140255; Wed, 03 May 2023 12:45:40 -0700 (PDT) MIME-Version: 1.0 References: <20230501165450.15352-1-surenb@google.com> <20230501165450.15352-35-surenb@google.com> In-Reply-To: From: Suren Baghdasaryan Date: Wed, 3 May 2023 12:45:29 -0700 Message-ID: Subject: Re: [PATCH 34/40] lib: code tagging context capture support To: Dave Hansen Cc: Michal Hocko , akpm@linux-foundation.org, kent.overstreet@linux.dev, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Wed, May 3, 2023 at 8:26=E2=80=AFAM Dave Hansen = wrote: > > On 5/3/23 08:18, Suren Baghdasaryan wrote: > >>> +static inline void rem_ctx(struct codetag_ctx *ctx, > >>> + void (*free_ctx)(struct kref *refcount)) > >>> +{ > >>> + struct codetag_with_ctx *ctc =3D ctx->ctc; > >>> + > >>> + spin_lock(&ctc->ctx_lock); > >> This could deadlock when allocator is called from the IRQ context. > > I see. spin_lock_irqsave() then? > > Yes. But, even better, please turn on lockdep when you are testing. It > will find these for you. If you're on x86, we have a set of handy-dandy > debug options that you can add to an existing config with: > > make x86_debug.config Nice! I thought I tested with lockdep enabled but I might be wrong. The beauty of working on multiple patchsets in parallel is that I can't remember what I did for each one :) > > That said, I'm as concerned as everyone else that this is all "new" code > and doesn't lean on existing tracing or things like PAGE_OWNER enough. Yeah, that's being actively discussed. >