Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/guc: Fix CFI violation in debugfs access.
@ 2026-01-26 23:10 Daniele Ceraolo Spurio
  2026-01-26 23:21 ` Michal Wajdeczko
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Daniele Ceraolo Spurio @ 2026-01-26 23:10 UTC (permalink / raw)
  To: intel-xe; +Cc: Daniele Ceraolo Spurio, Michal Wajdeczko, George D Sworo

xe_guc_print_info is void-returning, but the function pointer it is
assigned to expects an int-returning function, leading to the following
CFI error:

[  206.873690] CFI failure at guc_debugfs_show+0xa1/0xf0 [xe]
(target: xe_guc_print_info+0x0/0x370 [xe]; expected type: 0xbe3bc66a)

Fix this by using a local int-returning function, like we do for the
other debugfs entries in the same file.

Fixes: e15826bb3c2c ("drm/xe/guc: Refactor GuC debugfs initialization")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: George D Sworo <george.d.sworo@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_debugfs.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_debugfs.c b/drivers/gpu/drm/xe/xe_guc_debugfs.c
index 2f23119686d4..1a4c940ebecb 100644
--- a/drivers/gpu/drm/xe/xe_guc_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_guc_debugfs.c
@@ -74,6 +74,12 @@ static int guc_debugfs_show(struct seq_file *m, void *data)
 	return print(&gt->uc.guc, &p);
 }
 
+static int guc_info(struct xe_guc *guc, struct drm_printer *p)
+{
+	xe_guc_print_info(guc, p);
+	return 0;
+}
+
 static int guc_log(struct xe_guc *guc, struct drm_printer *p)
 {
 	xe_guc_log_print(&guc->log, p);
@@ -110,7 +116,7 @@ static int guc_pc(struct xe_guc *guc, struct drm_printer *p)
  * - without access to the PF specific GuC objects
  */
 static const struct drm_info_list vf_safe_debugfs_list[] = {
-	{ "guc_info", .show = guc_debugfs_show, .data = xe_guc_print_info },
+	{ "guc_info", .show = guc_debugfs_show, .data = guc_info },
 	{ "guc_ctb", .show = guc_debugfs_show, .data = guc_ctb },
 };
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-01-28 15:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-26 23:10 [PATCH] drm/xe/guc: Fix CFI violation in debugfs access Daniele Ceraolo Spurio
2026-01-26 23:21 ` Michal Wajdeczko
2026-01-26 23:24   ` Daniele Ceraolo Spurio
2026-01-26 23:27 ` ✓ CI.KUnit: success for " Patchwork
2026-01-27  2:25 ` ✗ Xe.CI.Full: failure " Patchwork
2026-01-28  8:18 ` Patchwork
2026-01-28 14:03 ` ✓ CI.KUnit: success for drm/xe/guc: Fix CFI violation in debugfs access. (rev2) Patchwork
2026-01-28 15:00 ` ✓ Xe.CI.BAT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox