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 1F3DCC5ACD4 for ; Fri, 7 Aug 2026 19:45:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BF9A10F5A8; Fri, 7 Aug 2026 19:45:28 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="SM2BwXzM"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 31C0010E35E for ; Fri, 7 Aug 2026 19:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1786131922; x=1817667922; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HPuPvNk2rRAiqzofcWQhsxVjtoUGcl08/pKfySmqOo4=; b=SM2BwXzMLh5gjYt+Nd5/i52ruQzS/F3LdFKckB1uy2o2UvCJ2HiTcKXx TBxmNhhDT8eG4BA3VkreNBsGpMRliUVxrw7S7qZXkMYJe3WAkh5cltIgd Tz6Wvi7jsydVK3KlZ4R7OM9nZuHK9vKKtJ9Q5+foXL9q4ideYYicloBfo HUop862Smh27EcmnzrjelKDuq0kNDeJrbqRn6RbclBSg1LdzaQBzwITpX cNjuuYcvrRdBDbQ+ZzqbTWH/rDZzbHFUDiJN6m+4pHeqcAehY2Q5xY+JG bSgSNdqyNvwgDyY0c9l7F6I3Aiw3IpJmMF28cESD9nE7/ppEAyknbrvi5 Q==; X-CSE-ConnectionGUID: 0FLeSX3ARty+aH+CnTxElQ== X-CSE-MsgGUID: Ae2Yq2TZTq2HS7iUeCz6Yg== X-IronPort-AV: E=McAfee;i="6800,10657,11868"; a="86758829" X-IronPort-AV: E=Sophos;i="6.25,210,1779174000"; d="scan'208";a="86758829" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2026 12:45:22 -0700 X-CSE-ConnectionGUID: Ecp8EaWlTk+eWSxnyEt8TA== X-CSE-MsgGUID: Q/gIgZmBTJ6F7I6sxlEs1w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,210,1779174000"; d="scan'208";a="258174111" Received: from dut4475arls.fm.intel.com ([10.105.10.116]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2026 12:45:20 -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 10/10] drm/xe: Taint kernel when debug configfs parameters are set Date: Fri, 7 Aug 2026 19:45:27 +0000 Message-ID: <20260807194518.9474-22-stuart.summers@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260807194518.9474-12-stuart.summers@intel.com> References: <20260807194518.9474-12-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 6060abe66e73..13ab9422b9c1 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 @@ -528,6 +533,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; } @@ -547,6 +553,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; } @@ -699,6 +707,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; } @@ -789,6 +799,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 c868e3f49ea4..482363833e13 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 @@ -65,6 +69,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; \ } @@ -101,6 +106,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