From patchwork Fri Aug 26 22:35:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alison Schofield X-Patchwork-Id: 12956674 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5444EECAAD4 for ; Fri, 26 Aug 2022 22:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231808AbiHZWfn (ORCPT ); Fri, 26 Aug 2022 18:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbiHZWfl (ORCPT ); Fri, 26 Aug 2022 18:35:41 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D79A2DA8F; Fri, 26 Aug 2022 15:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661553341; x=1693089341; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=O4cj6su9MdCY7mmHhaPZl5o9miyzRhe/xLoVYob78Vo=; b=CurICu0lS+HRjy4eVrk351G6G/PYsD8C5k3MTYWS9Fn8AgAq5R9cPAlP /acQvpxiYDfiUX9Za3WSbQrAOpBiVVBgfScgXvU/MO9f+FH5Cihz9n/yI nstlHr/q/o/aLUfQ3Y9UQ7qL2iCertBrt+kGEemVJ03RqX7wI5JZSlsnA oVC4nSnlQV0tzuAKp7J/7SzR38h7cplo9pCP3ZBwn2xtYwj9djcfZdEl2 R3h5eCLLKS9AaTNxB9W0blfljuHeZ1JuL615/qAYKcxPY3Z5ZZK/GfZSM BhYy9XzTw+TkgH6rvFwK0EOidRZfIJYyouvxa5hb2Ay0h+5nR44FzEAXs A==; X-IronPort-AV: E=McAfee;i="6500,9779,10451"; a="320714912" X-IronPort-AV: E=Sophos;i="5.93,266,1654585200"; d="scan'208";a="320714912" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 15:35:21 -0700 X-IronPort-AV: E=Sophos;i="5.93,266,1654585200"; d="scan'208";a="753019198" Received: from aschofie-mobl2.amr.corp.intel.com (HELO localhost) ([10.209.82.226]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 15:35:20 -0700 From: alison.schofield@intel.com To: Steven Rostedt Cc: Alison Schofield , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, Ira Weiny , Dan Williams Subject: [PATCH] tracepoint: Allow trace events in modules with TAINT_TEST Date: Fri, 26 Aug 2022 15:35:11 -0700 Message-Id: <20220826223511.170256-1-alison.schofield@intel.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org From: Alison Schofield Commit 2852ca7fba9f ("panic: Taint kernel if tests are run") introduced a new taint type, TAINT_TEST, to signal that an in-kernel test has been run. 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. Reported-by: Ira Weiny Suggested-by: Dan Williams Signed-off-by: Alison Schofield Reviewed-by: David Gow --- kernel/tracepoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) base-commit: 4c612826bec1441214816827979b62f84a097e91 diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index 64ea283f2f86..5f17378c9dc2 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);