From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
David Gow <davidgow@google.com>,
Alison Schofield <alison.schofield@intel.com>
Subject: [for-linus][PATCH 4/7] tracepoint: Allow trace events in modules with TAINT_TEST
Date: Wed, 07 Sep 2022 12:15:15 -0400 [thread overview]
Message-ID: <20220907161609.915329087@goodmis.org> (raw)
In-Reply-To: 20220907161511.694486342@goodmis.org
From: Alison Schofield <alison.schofield@intel.com>
Commit 2852ca7fba9f ("panic: Taint kernel if tests are run")
introduced a new taint type, TAINT_TEST, to signal that an
in-kernel test module has been loaded.
TAINT_TEST taint type defaults into a 'bad_taint' list for
kernel tracing and blocks the creation of trace events. This
causes a problem for CXL testing where loading the cxl_test
module makes all CXL modules out-of-tree, blocking any trace
events.
Trace events are in development for CXL at the moment and this
issue was found in test with v6.0-rc1.
Link: https://lkml.kernel.org/r/20220829171048.263065-1-alison.schofield@intel.com
Fixes: 2852ca7fba9f7 ("panic: Taint kernel if tests are run")
Reported-by: Ira Weiny <ira.weiny@intel.com>
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
kernel/tracepoint.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index 64ea283f2f86..ef42c1a11920 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -571,7 +571,8 @@ static void for_each_tracepoint_range(
bool trace_module_has_bad_taint(struct module *mod)
{
return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) |
- (1 << TAINT_UNSIGNED_MODULE));
+ (1 << TAINT_UNSIGNED_MODULE) |
+ (1 << TAINT_TEST));
}
static BLOCKING_NOTIFIER_HEAD(tracepoint_notify_list);
@@ -647,7 +648,7 @@ static int tracepoint_module_coming(struct module *mod)
/*
* We skip modules that taint the kernel, especially those with different
* module headers (for forced load), to make sure we don't cause a crash.
- * Staging, out-of-tree, and unsigned GPL modules are fine.
+ * Staging, out-of-tree, unsigned GPL, and test modules are fine.
*/
if (trace_module_has_bad_taint(mod))
return 0;
--
2.35.1
next prev parent reply other threads:[~2022-09-07 16:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 16:15 [for-linus][PATCH 0/7] tracing: Fixes and updates for 6.0 Steven Rostedt
2022-09-07 16:15 ` [for-linus][PATCH 1/7] rv/monitors: Make monitors automata definition static Steven Rostedt
2022-09-07 16:15 ` [for-linus][PATCH 2/7] MAINTAINERS: Add Runtime Verification (RV) entry Steven Rostedt
2022-09-07 16:15 ` [for-linus][PATCH 3/7] MAINTAINERS: add scripts/tracing/ to TRACING Steven Rostedt
2022-09-07 16:15 ` Steven Rostedt [this message]
2022-09-07 16:15 ` [for-linus][PATCH 5/7] tracing: hold caller_addr to hardirq_{enable,disable}_ip Steven Rostedt
2022-09-07 16:15 ` [for-linus][PATCH 6/7] tracing: Fix to check event_mutex is held while accessing trigger list Steven Rostedt
2022-09-07 16:15 ` [for-linus][PATCH 7/7] rv/reactor: add __init/__exit annotations to module init/exit funcs Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220907161609.915329087@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=davidgow@google.com \
--cc=ira.weiny@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.