All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>, igt-dev@lists.freedesktop.org
Cc: gustavo.sousa@intel.com, 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 15:34:15 +0300	[thread overview]
Message-ID: <f5d457a42fb7d837541253d101dba763bb815e32@intel.com> (raw)
In-Reply-To: <20260527034342.1952153-1-ashutosh.dixit@intel.com>

On Tue, 26 May 2026, Ashutosh Dixit <ashutosh.dixit@intel.com> wrote:
> 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.

Who can read debugfs is a distro policy and configuration decision, and
it's not just a binary root/non-root anyway.


BR,
Jani.

>
> 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);

-- 
Jani Nikula, Intel

      parent reply	other threads:[~2026-05-27 12:34 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
2026-05-27 12:34 ` Jani Nikula [this message]

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=f5d457a42fb7d837541253d101dba763bb815e32@intel.com \
    --to=jani.nikula@intel.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.