Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/intel_wa: Return false for non-root users
@ 2026-05-27  3:43 Ashutosh Dixit
  2026-05-27  4:41 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Ashutosh Dixit @ 2026-05-27  3:43 UTC (permalink / raw)
  To: igt-dev; +Cc: gustavo.sousa, ngai-mint.kwan

Under some circurmstancs debugfs reads are initiated by non-root users. In
these cases, just return false rather than asserting that debugfs could not
be read.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/intel_wa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/intel_wa.c b/lib/intel_wa.c
index a16ea62a4c..2d0d664f3c 100644
--- a/lib/intel_wa.c
+++ b/lib/intel_wa.c
@@ -47,6 +47,10 @@ bool igt_has_intel_wa(int drm_fd, const char *check_wa)
 	unsigned int xe;
 	char name[256];
 
+	/* If we are not root, we can't read debugfs, just return false */
+	if (getuid() != 0)
+		return false;
+
 	debugfs_fd = igt_debugfs_dir(drm_fd);
 	igt_assert(debugfs_fd >= 0);
 
-- 
2.54.0


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

end of thread, other threads:[~2026-05-27 17:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27  3:43 [PATCH i-g-t] lib/intel_wa: Return false for non-root users Ashutosh Dixit
2026-05-27  4:41 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-05-27  4:49 ` ✓ i915.CI.BAT: " Patchwork
2026-05-27  6:35 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-27 10:01 ` ✓ i915.CI.Full: success " Patchwork
2026-05-27 11:50 ` [PATCH i-g-t] " Gustavo Sousa
2026-05-27 17:10   ` Dixit, Ashutosh
2026-05-27 12:34 ` Jani Nikula

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