public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: xf86-video-intel hits an assert when using dri and xorg is not suid root
Date: Fri, 13 Jun 2014 14:44:44 +0200	[thread overview]
Message-ID: <539AF23C.6080106@redhat.com> (raw)
In-Reply-To: <20140613123616.GG6451@nuc-i3427.alporthouse.com>

Hi,

On 06/13/2014 02:36 PM, Chris Wilson wrote:
> On Fri, Jun 13, 2014 at 02:08:06PM +0200, Hans de Goede wrote:
>> Hi,
>>
>> When trying to run the latest xorg + intel drv, with dri3, with Xorg not
>> running as root, the followin assert in src/intel_device.c: authorise() :
>>
>> assert(is_i915_gem(fd));
>>
>> Triggers, this is caused by the DRM_IOCTL_I915_GETPARAM ioctl in
>> is_i915_gem() failing with -EACCESS in this case.
>>
>> I thought that the use of rendernodes should work as normal user ?
> 
> Hmm, I have
> 
> DRM_IOCTL_DEF_DRV(I915_GETPARAM, i915_getparam, DRM_AUTH|DRM_RENDER_ALLOW),
> 
> What path did find_render_node() choose? Was it right?

I don't have USE_RENDERNODE defined in config.h, so find_render_node()
is returning NULL, which makes dev->render_node point to dev->master_node,
and thus makes intel_get_client_fd open the /dev/dri/card0 node a second
time (when using non suid-root xorg the first time it was opened by
systemd-logind and the fd was passed from systemd-logind to xf86-video-intel
by the server).

Do we really want a second open in this case, maybe intel_get_client_fd
should detect that render_node == master_node and re-use the master fd
in that case ?

Regards,

Hans

  reply	other threads:[~2014-06-13 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 12:08 xf86-video-intel hits an assert when using dri and xorg is not suid root Hans de Goede
2014-06-13 12:36 ` Chris Wilson
2014-06-13 12:44   ` Hans de Goede [this message]
2014-06-13 12:53     ` Chris Wilson
2014-06-13 13:31       ` Hans de Goede

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=539AF23C.6080106@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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