From mboxrd@z Thu Jan 1 00:00:00 1970 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F3CCC4453C for ; Wed, 22 Jul 2026 21:47:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A1EA10E4F7; Wed, 22 Jul 2026 21:47:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Icpdbj1Z"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 014CD10E4E7 for ; Wed, 22 Jul 2026 21:47:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784756822; x=1816292822; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=J/fe52cHhL5dBtX0+KAJA0tMQSNc5OjpHDqgVzMZUpU=; b=Icpdbj1ZNB/0zVHpy3zlXR2BwaDkIAKIlO9b/eal3c4AFWkjkrPd6wVX g1LUBgv6GZKxSSvDSnUh1DEJWtN68n79CnMwSjLxxhNHn8oqBa71ywwv2 XAYHuzOKLFRKuZp8v7YCBGnnWoyvdUFXxBz+MICOmBUp6n9BtPKpOjj5I 2G5QaLzCJQ/BX961uXviaHUAcxWgHBYfk61HSEJ/SYnkRNZ0MVNA6LBjr Xa626Ow5rvjkQG/4FBht8Uupeg7oNAXY0wmDficrorLRpxyLvQCQVe/0I zkG+jCdnWnAE4PdGBf2AbqEGDjr/ZHMzbf5PrwDnOE95psjl1/lc6E+rG A==; X-CSE-ConnectionGUID: +z3KpbQ0Qn6vvgTr1NTIrQ== X-CSE-MsgGUID: 53N02fYvQY2GaAV2FjEztA== X-IronPort-AV: E=McAfee;i="6800,10657,11854"; a="87944946" X-IronPort-AV: E=Sophos;i="6.25,179,1779174000"; d="scan'208";a="87944946" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2026 14:47:01 -0700 X-CSE-ConnectionGUID: 4awQDgfyQ5Gkv+jdiHSWVg== X-CSE-MsgGUID: J1M+jRq1QOeeqz9JUP9TOQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,179,1779174000"; d="scan'208";a="262540696" Received: from dut4402arlh.fm.intel.com ([10.105.10.136]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2026 14:47:01 -0700 From: Stuart Summers To: Cc: intel-xe@lists.freedesktop.org, rodrigo.vivi@intel.com, matthew.brost@intel.com, umesh.nerlige.ramappa@intel.com, Michal.Wajdeczko@intel.com, matthew.d.roper@intel.com, daniele.ceraolospurio@intel.com, shuicheng.lin@intel.com, Stuart Summers Subject: [PATCH 9/9] drm/xe: Taint kernel when debug configfs parameters are set Date: Wed, 22 Jul 2026 21:47:05 +0000 Message-ID: <20260722214656.107936-20-stuart.summers@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260722214656.107936-11-stuart.summers@intel.com> References: <20260722214656.107936-11-stuart.summers@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" Writing any debug configfs attribute indicates the system is running in a non-standard configuration that may mask bugs or produce misleading behaviour. Taint the kernel with TAINT_TEST on each successful write so bug reports clearly reflect when debug settings were active. Signed-off-by: Stuart Summers Assisted-by: Copilot:claude-sonnet-4.6,claude-sonnet-5 --- drivers/gpu/drm/xe/xe_configfs_debug.c | 12 ++++++++++++ drivers/gpu/drm/xe/xe_configfs_debug_params.c | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_configfs_debug.c b/drivers/gpu/drm/xe/xe_configfs_debug.c index b068c64e42bf..4542f3311f4b 100644 --- a/drivers/gpu/drm/xe/xe_configfs_debug.c +++ b/drivers/gpu/drm/xe/xe_configfs_debug.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -33,6 +34,10 @@ * and driver debugging and are not stable ABI. Using them is "at your own * risk". * + * Writing any debug attribute taints the kernel with ``TAINT_TEST``. This + * makes it visible in bug reports when a non-standard or unsafe configuration + * was active. + * * See the top-level ``Xe Configfs`` documentation in ``xe_configfs.c`` * for how to create, probe and remove configfs devices. Once a device * directory exists, the driver populates it with a ``debug/`` subdirectory @@ -524,6 +529,7 @@ static ssize_t wa_bb_store(struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX], if (!count) { memset(wa_bb, 0, sizeof(tmp_wa_bb)); + add_taint(TAINT_TEST, LOCKDEP_STILL_OK); return len; } @@ -543,6 +549,8 @@ static ssize_t wa_bb_store(struct wa_bb wa_bb[static XE_ENGINE_CLASS_MAX], memcpy(wa_bb, tmp_wa_bb, sizeof(tmp_wa_bb)); + add_taint(TAINT_TEST, LOCKDEP_STILL_OK); + return len; } @@ -694,6 +702,8 @@ static ssize_t engines_allowed_store(struct config_item *item, const char *page, dev->config.debug.engines_allowed = val; + add_taint(TAINT_TEST, LOCKDEP_STILL_OK); + return len; } @@ -783,6 +793,8 @@ static ssize_t gt_types_allowed_store(struct config_item *item, const char *page dev->config.debug.gt_types_allowed = typemask; + add_taint(TAINT_TEST, LOCKDEP_STILL_OK); + return len; } diff --git a/drivers/gpu/drm/xe/xe_configfs_debug_params.c b/drivers/gpu/drm/xe/xe_configfs_debug_params.c index 38af06ca7504..ac9e77838006 100644 --- a/drivers/gpu/drm/xe/xe_configfs_debug_params.c +++ b/drivers/gpu/drm/xe/xe_configfs_debug_params.c @@ -29,11 +29,15 @@ * This file also generates the xe_configfs_get_() accessors used * by the rest of the driver to read a parameter's effective value; see * the DOC section below. + * + * Setting these parameters taints the kernel since these are intended + * for debug and testing purposes only. */ #include #include #include +#include #include #include #include @@ -62,6 +66,7 @@ static ssize_t _name##_store(struct config_item *item, const char *page, size_t if (xe_configfs_is_bound(dev)) \ return -EBUSY; \ dev->config.debug.params._name = val; \ + add_taint(TAINT_TEST, LOCKDEP_STILL_OK); \ return len; \ } @@ -95,6 +100,7 @@ static ssize_t _name##_store(struct config_item *item, const char *page, size_t if (xe_configfs_is_bound(dev)) \ return -EBUSY; \ dev->config.debug.params._name = val; \ + add_taint(TAINT_TEST, LOCKDEP_STILL_OK); \ return len; \ } -- 2.43.0