From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: <igt-dev@lists.freedesktop.org>, <ngai-mint.kwan@intel.com>
Subject: Re: [PATCH i-g-t] lib/intel_wa: Return false for non-root users
Date: Wed, 27 May 2026 10:10:08 -0700 [thread overview]
Message-ID: <87cxygvkwf.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <87fr3d6pgh.fsf@intel.com>
On Wed, 27 May 2026 04:50:54 -0700, Gustavo Sousa wrote:
>
> Ashutosh Dixit <ashutosh.dixit@intel.com> writes:
>
> > 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;
>
> This doesn't sound right to me. The function will be lying by returning
> false here and will probably make it harder to debug issues on code that
> rely on having the correct result for a workaround check.
>
> My personal take is that we probably should start avoiding having
> asserts in lib/ code and defer any assertion to real test code.
OK, I've reverted the original patch:
https://patchwork.freedesktop.org/series/167401/
next prev parent reply other threads:[~2026-05-27 17:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-05-27 12:34 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87cxygvkwf.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ngai-mint.kwan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox