From patchwork Mon May 1 16:54:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13227668 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22DA1C77B7C for ; Mon, 1 May 2023 16:56:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A849990000F; Mon, 1 May 2023 12:56:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A3565900002; Mon, 1 May 2023 12:56:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FDF890000F; Mon, 1 May 2023 12:56:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 80600900002 for ; Mon, 1 May 2023 12:56:28 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4EF0A1407C0 for ; Mon, 1 May 2023 16:56:28 +0000 (UTC) X-FDA: 80742289656.29.A89B687 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by imf10.hostedemail.com (Postfix) with ESMTP id 6B6A6C001C for ; Mon, 1 May 2023 16:56:26 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b="2XuV/LXF"; spf=pass (imf10.hostedemail.com: domain of 3Oe9PZAYKCIAwyvirfksskpi.gsqpmry1-qqozego.svk@flex--surenb.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3Oe9PZAYKCIAwyvirfksskpi.gsqpmry1-qqozego.svk@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1682960186; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=tlYphv1i8nYyRhT88mmnNNep9iAUv9BwOK+gAme7uDQ=; b=w37F0pTtwIJ113IzRzs5w53AP/5NMInOuSNDyJYQ/efK1/lZx49QOmvn1optRpAEB9CmU6 vyMz4CT23HbbPuq7G21W450nR1iGn4V8XNHAWN1KiGIZlhAGpuMWjMAl3kign1GgBp0rIE 2h+7PzjV3I1+rtgGX9M1miDi1YyBn+s= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1682960186; a=rsa-sha256; cv=none; b=ySbW/KCp0e06oST1T/wD+02C3s/OHGh16nOm3nXy5MBq2Q7iV6tPc7VWnn2b51ADPEOb+r tLowx7/7u3gBfqraL7JGX0UEq+Y6CZV7j3Y0A3WeyhVNuVTnx6dhbcgcGXj5wONDZ51T1m pCYDtwMmR+PhkENj4PsPE9XHmwHIqhI= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b="2XuV/LXF"; spf=pass (imf10.hostedemail.com: domain of 3Oe9PZAYKCIAwyvirfksskpi.gsqpmry1-qqozego.svk@flex--surenb.bounces.google.com designates 209.85.219.201 as permitted sender) smtp.mailfrom=3Oe9PZAYKCIAwyvirfksskpi.gsqpmry1-qqozego.svk@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-b9a79db4e7fso3326317276.0 for ; Mon, 01 May 2023 09:56:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682960185; x=1685552185; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=tlYphv1i8nYyRhT88mmnNNep9iAUv9BwOK+gAme7uDQ=; b=2XuV/LXFPS9qv6kO1OAu52yKSEfT1BC8Uyc51PtqvyTLOw6UNebCYkZhZP2v9FO8oS hEHZdD7KUMfSEQtQdWUpzCKOMJYHSpoe3376M6dYUuLCm/nLCzqTViK3tDrzmpk69PsF C9DS0KqR2dDtDGP7hZX5XLhu1WFJacbmtNn9E47IgAq8uRv0BvffVAbtCHATYs2yY0Ed RwD1ZD9bXshFGg1hMmTye+Eo2Jv3yEhTf/4wFmEVqV85hSy0daDAaaNAG8CJUm6nMdJU XzZ/3I4BMbhLiO6ONlK15VVriVh+DhXOoojulz1/HRxZdei9as7clRNqchBWLsgCOWe8 k8ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682960185; x=1685552185; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tlYphv1i8nYyRhT88mmnNNep9iAUv9BwOK+gAme7uDQ=; b=fWuWU0de0vMXAfgTTDt/ghpQwzrzqS6jhJNsFtwKBIUct4QFkPZoUayMW9TsMumFJC liRU82jKOoPMbzRYVVQA4k81J3juwPn7Z9TSg+9gscNnacyAz6kh3dUUHwaOfzxujYBO G07yRSCwsMCMuOAyo/ZNTQJOHQH9bjXwZKXZRiidtXW+5gsr4NN2BvLz5QWcIMAeEOyL A2YUR9MbPkx1oyfmNYZwQTGaIlF4mS+/aSKlwJFuBkOetQCg7+Tfp2AZW+BAhxayAdlM tzR+ZgLxkzTUB9UywH0OvAwMpRpJ1fGpHvSXvmy56RKCvTDdZtWhiwXi7y/ql1hxGrYf lz1g== X-Gm-Message-State: AC+VfDxA9cG5ZHF0uyXrri0GMkHiPFwlSVTxIq0kkwcWUROZB8/uwFg+ PymRK/4Cr57RLJ1g9r+vNzgVf22K+/0= X-Google-Smtp-Source: ACHHUZ6xCTIdyFwNXOIyet6JY8PR9mR9OkX4G2UItacuFEKdh2Mzs7ZirEmIfEVsSkOy5x89pd9AYPIc+TM= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:6d24:3efd:facc:7ac4]) (user=surenb job=sendgmr) by 2002:a05:6902:1003:b0:b8f:54f5:89ff with SMTP id w3-20020a056902100300b00b8f54f589ffmr9086045ybt.11.1682960185390; Mon, 01 May 2023 09:56:25 -0700 (PDT) Date: Mon, 1 May 2023 09:54:44 -0700 In-Reply-To: <20230501165450.15352-1-surenb@google.com> Mime-Version: 1.0 References: <20230501165450.15352-1-surenb@google.com> X-Mailer: git-send-email 2.40.1.495.gc816e09b53d-goog Message-ID: <20230501165450.15352-35-surenb@google.com> Subject: [PATCH 34/40] lib: code tagging context capture support From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, 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, surenb@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 X-Rspam-User: X-Rspamd-Queue-Id: 6B6A6C001C X-Rspamd-Server: rspam09 X-Stat-Signature: 9zmjyokfefpa4thzuisfn3dwsuep18r8 X-HE-Tag: 1682960186-133118 X-HE-Meta: U2FsdGVkX18APEJ5mF4pG50Fup+6S8bTebYEmPvnn1C/935qUWzntgfXIHIvbwgv1mIpI0BoWYO0QILg8CO6bnIEEJlOVNIb+ekBoZXLZeLn7xuR8LGY1jfV/BJ5eP18XcHJD9Mwz1HTTNZKhqms3xBw0AsvRc8e27RNFu960/D+kePMiSGXQJPxuroOyZP60qXCEBpLyozFPUVbrrZN/lJLKbgRHA2jp/129XBA1tVT8bvZU2a1CeFLn5ZviLIKwbxZ+4dEibDD6K4ymL/c/P+elwweQTr7v0gRM6AABAkSXZPKAnlqeYElTl4iWhT4hr8J337z24EnUOjfMsN2xLZiDpECecoIUm7UjP3nPu/qDFexG4yl5JxQFgbLW6PUI3CPXdAuy2ctQWavHVK1qsFrCH6z/TJOyUMzpZkKugYAX2RCLx2dRolztS93UoMiKB0+PElg8qi1R3vmLFEu/01zZ1njZaIW+wQ2zpFtvltN1z0nP9P1PWNeTTG2GyhcPjw0bYZiTxHqwiNWUcFTtsZcBnos8eMzLwLFNtAp7oJ90b6UlAo5Yh/XNN6HHt+v5v49apDWcGzmjWoBvcNvO2ui7ZVYPLJY5i9RPZ2tDOVkoKJKgOY6bjzgnoIUhwVdksFmtF6ONs76l3Y8vSiw7iS1lRtHgjnn6uq+rNzLtYKbyfDuLI4F6jE0CErd4uDj+KukkKabkwFFgM26nNQuaiTiduqR4uCJ56IE0PGDcrRqclB9H41dBVDx7bFezB4z3yXre8ztBcJbeSitIn9+HvmKEh0UOBhghuItXVJuYtLG2mmvrN+CjjYpWsxOLYeCrwRnJCNO5v7KFDyx7TgL0ALxdEOxviWA4W2IpSxbIXSA/d99hLmEPMEtady0Fq7rTM2AxSy9wq2OkLs78NEEehf2MIHyK013663dozyw4gk9C1U5XZdI5yV9jpD1i2UudmP/8Jj9gEgV7sBFnML fH6g5Bq9 vvoC4fMKKuG+Or4VWCARXyNiQjaMcU5l9S4B5aquGwiJfDZfShEm97Yi6TiP7CnVVZiYcdzQpbbDFomNlTjHkmAaM0OA681ZRlOKFwLNr1J0oMWUP9JkG+6x6uPFg3DYEFocpj3kgIcXMnz1dKUMIGL+xx4sAJQb8WIxmLp9xskg8gjjbu4zsedzIEHD5KFr3c/a4jfeexKfhhr21FH1g4K263C00owpC1KcWd1T/5zRckdFHgATB3FfdGi6OIN0AVwJiS3sv/5aNEhcmM6Zxp2ykJJWbsCtX5rKWoXHIimN9HdyF6FahXrFjScHaGR6el+ysKkV9J3VYeuzVcHWkt8m0EDf++godOJYJk3xDgB+F3OUJ79k3HC5ImldIy/0VFwRvIY276UXrXQqtgQqytMjMqQXNO4/Il42emmepwngucXlPXBofe4zUyd3AwuND1u3ML5rCma0SCF9a2ZIurwbakfekI4UNiv1SOZgao3/UUKuhh4QPKsw6wjXG5Fg8gECUyTyk3nliozlKBrbq5d3+tR4zmFKLeq/QkuWGs63DNPlMipvz8o0/Ur9mh+e7nbrSa+eSc2FlfJxtNJthaoXLavnP5/Haw3d5rPaIVEt/0HpTxeR3wVBMLAt2LX6U6tq8yOynr/uKsV3VD4GKe+JzywpNzQPvjgAbISWK6fTJQJM7rt7BwaV7Og== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add support for code tag context capture when registering a new code tag type. When context capture for a specific code tag is enabled, codetag_ref will point to a codetag_ctx object which can be attached to an application-specific object storing code invocation context. codetag_ctx has a pointer to its codetag_with_ctx object with embedded codetag object in it. All context objects of the same code tag are placed into codetag_with_ctx.ctx_head linked list. codetag.flag is used to indicate when a context capture for the associated code tag is initialized and enabled. Signed-off-by: Suren Baghdasaryan --- include/linux/codetag.h | 50 +++++++++++++- include/linux/codetag_ctx.h | 48 +++++++++++++ lib/codetag.c | 134 ++++++++++++++++++++++++++++++++++++ 3 files changed, 231 insertions(+), 1 deletion(-) create mode 100644 include/linux/codetag_ctx.h diff --git a/include/linux/codetag.h b/include/linux/codetag.h index 87207f199ac9..9ab2f017e845 100644 --- a/include/linux/codetag.h +++ b/include/linux/codetag.h @@ -5,8 +5,12 @@ #ifndef _LINUX_CODETAG_H #define _LINUX_CODETAG_H +#include +#include #include +struct kref; +struct codetag_ctx; struct codetag_iterator; struct codetag_type; struct seq_buf; @@ -18,15 +22,38 @@ struct module; * an array of these. */ struct codetag { - unsigned int flags; /* used in later patches */ + unsigned int flags; /* has to be the first member shared with codetag_ctx */ unsigned int lineno; const char *modname; const char *function; const char *filename; } __aligned(8); +/* codetag_with_ctx flags */ +#define CTC_FLAG_CTX_PTR (1 << 0) +#define CTC_FLAG_CTX_READY (1 << 1) +#define CTC_FLAG_CTX_ENABLED (1 << 2) + +/* + * Code tag with context capture support. Contains a list to store context for + * each tag hit, a lock protecting the list and a flag to indicate whether + * context capture is enabled for the tag. + */ +struct codetag_with_ctx { + struct codetag ct; + struct list_head ctx_head; + spinlock_t ctx_lock; +} __aligned(8); + +/* + * Tag reference can point to codetag directly or indirectly via codetag_ctx. + * Direct codetag pointer is used when context capture is disabled or not + * supported. When context capture for the tag is used, the reference points + * to the codetag_ctx through which the codetag can be reached. + */ union codetag_ref { struct codetag *ct; + struct codetag_ctx *ctx; }; struct codetag_range { @@ -46,6 +73,7 @@ struct codetag_type_desc { struct codetag_module *cmod); bool (*module_unload)(struct codetag_type *cttype, struct codetag_module *cmod); + void (*free_ctx)(struct kref *ref); }; struct codetag_iterator { @@ -53,6 +81,7 @@ struct codetag_iterator { struct codetag_module *cmod; unsigned long mod_id; struct codetag *ct; + struct codetag_ctx *ctx; }; #define CODE_TAG_INIT { \ @@ -63,9 +92,28 @@ struct codetag_iterator { .flags = 0, \ } +static inline bool is_codetag_ctx_ref(union codetag_ref *ref) +{ + return !!(ref->ct->flags & CTC_FLAG_CTX_PTR); +} + +static inline +struct codetag_with_ctx *ct_to_ctc(struct codetag *ct) +{ + return container_of(ct, struct codetag_with_ctx, ct); +} + void codetag_lock_module_list(struct codetag_type *cttype, bool lock); struct codetag_iterator codetag_get_ct_iter(struct codetag_type *cttype); struct codetag *codetag_next_ct(struct codetag_iterator *iter); +struct codetag_ctx *codetag_next_ctx(struct codetag_iterator *iter); + +bool codetag_enable_ctx(struct codetag_with_ctx *ctc, bool enable); +static inline bool codetag_ctx_enabled(struct codetag_with_ctx *ctc) +{ + return !!(ctc->ct.flags & CTC_FLAG_CTX_ENABLED); +} +bool codetag_has_ctx(struct codetag_with_ctx *ctc); void codetag_to_text(struct seq_buf *out, struct codetag *ct); diff --git a/include/linux/codetag_ctx.h b/include/linux/codetag_ctx.h new file mode 100644 index 000000000000..e741484f0e08 --- /dev/null +++ b/include/linux/codetag_ctx.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * code tag context + */ +#ifndef _LINUX_CODETAG_CTX_H +#define _LINUX_CODETAG_CTX_H + +#include +#include + +/* Code tag hit context. */ +struct codetag_ctx { + unsigned int flags; /* has to be the first member shared with codetag */ + struct codetag_with_ctx *ctc; + struct list_head node; + struct kref refcount; +} __aligned(8); + +static inline struct codetag_ctx *kref_to_ctx(struct kref *refcount) +{ + return container_of(refcount, struct codetag_ctx, refcount); +} + +static inline void add_ctx(struct codetag_ctx *ctx, + struct codetag_with_ctx *ctc) +{ + kref_init(&ctx->refcount); + spin_lock(&ctc->ctx_lock); + ctx->flags = CTC_FLAG_CTX_PTR; + ctx->ctc = ctc; + list_add_tail(&ctx->node, &ctc->ctx_head); + spin_unlock(&ctc->ctx_lock); +} + +static inline void rem_ctx(struct codetag_ctx *ctx, + void (*free_ctx)(struct kref *refcount)) +{ + struct codetag_with_ctx *ctc = ctx->ctc; + + spin_lock(&ctc->ctx_lock); + /* ctx might have been removed while we were using it */ + if (!list_empty(&ctx->node)) + list_del_init(&ctx->node); + spin_unlock(&ctc->ctx_lock); + kref_put(&ctx->refcount, free_ctx); +} + +#endif /* _LINUX_CODETAG_CTX_H */ diff --git a/lib/codetag.c b/lib/codetag.c index 84f90f3b922c..d891bbe4481d 100644 --- a/lib/codetag.c +++ b/lib/codetag.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only #include +#include #include #include #include @@ -92,6 +93,139 @@ struct codetag *codetag_next_ct(struct codetag_iterator *iter) return ct; } +static struct codetag_ctx *next_ctx_from_ct(struct codetag_iterator *iter) +{ + struct codetag_with_ctx *ctc; + struct codetag_ctx *ctx = NULL; + struct codetag *ct = iter->ct; + + while (ct) { + if (!(ct->flags & CTC_FLAG_CTX_READY)) + goto next; + + ctc = ct_to_ctc(ct); + spin_lock(&ctc->ctx_lock); + if (!list_empty(&ctc->ctx_head)) { + ctx = list_first_entry(&ctc->ctx_head, + struct codetag_ctx, node); + kref_get(&ctx->refcount); + } + spin_unlock(&ctc->ctx_lock); + if (ctx) + break; +next: + ct = codetag_next_ct(iter); + } + + iter->ctx = ctx; + return ctx; +} + +struct codetag_ctx *codetag_next_ctx(struct codetag_iterator *iter) +{ + struct codetag_ctx *ctx = iter->ctx; + struct codetag_ctx *found = NULL; + + lockdep_assert_held(&iter->cttype->mod_lock); + + if (!ctx) + return next_ctx_from_ct(iter); + + spin_lock(&ctx->ctc->ctx_lock); + /* + * Do not advance if the object was isolated, restart at the same tag. + */ + if (!list_empty(&ctx->node)) { + if (list_is_last(&ctx->node, &ctx->ctc->ctx_head)) { + /* Finished with this tag, advance to the next */ + codetag_next_ct(iter); + } else { + found = list_next_entry(ctx, node); + kref_get(&found->refcount); + } + } + spin_unlock(&ctx->ctc->ctx_lock); + kref_put(&ctx->refcount, iter->cttype->desc.free_ctx); + + if (!found) + return next_ctx_from_ct(iter); + + iter->ctx = found; + return found; +} + +static struct codetag_type *find_cttype(struct codetag *ct) +{ + struct codetag_module *cmod; + struct codetag_type *cttype; + unsigned long mod_id; + unsigned long tmp; + + mutex_lock(&codetag_lock); + list_for_each_entry(cttype, &codetag_types, link) { + down_read(&cttype->mod_lock); + idr_for_each_entry_ul(&cttype->mod_idr, cmod, tmp, mod_id) { + if (ct >= cmod->range.start && ct < cmod->range.stop) { + up_read(&cttype->mod_lock); + goto found; + } + } + up_read(&cttype->mod_lock); + } + cttype = NULL; +found: + mutex_unlock(&codetag_lock); + + return cttype; +} + +bool codetag_enable_ctx(struct codetag_with_ctx *ctc, bool enable) +{ + struct codetag_type *cttype = find_cttype(&ctc->ct); + + if (!cttype || !cttype->desc.free_ctx) + return false; + + lockdep_assert_held(&cttype->mod_lock); + BUG_ON(!rwsem_is_locked(&cttype->mod_lock)); + + if (codetag_ctx_enabled(ctc) == enable) + return false; + + if (enable) { + /* Initialize context capture fields only once */ + if (!(ctc->ct.flags & CTC_FLAG_CTX_READY)) { + spin_lock_init(&ctc->ctx_lock); + INIT_LIST_HEAD(&ctc->ctx_head); + ctc->ct.flags |= CTC_FLAG_CTX_READY; + } + ctc->ct.flags |= CTC_FLAG_CTX_ENABLED; + } else { + /* + * The list of context objects is intentionally left untouched. + * It can be read back and if context capture is re-enablied it + * will append new objects. + */ + ctc->ct.flags &= ~CTC_FLAG_CTX_ENABLED; + } + + return true; +} + +bool codetag_has_ctx(struct codetag_with_ctx *ctc) +{ + bool no_ctx; + + if (!(ctc->ct.flags & CTC_FLAG_CTX_READY)) + return false; + + spin_lock(&ctc->ctx_lock); + no_ctx = list_empty(&ctc->ctx_head); + spin_unlock(&ctc->ctx_lock); + + return !no_ctx; +} + void codetag_to_text(struct seq_buf *out, struct codetag *ct) { seq_buf_printf(out, "%s:%u module:%s func:%s",