RenderThread unauthenticated DRM ioctl

72 views
Skip to first unread message

Francois Gervais

unread,
Jun 19, 2017, 11:51:44 AM6/19/17
to Android-x86
Hi,

We are trying to enable the i915 acceleration on Android-x86.

It works fine except that RenderThread is doing unauthentication ioctl calls so it gets refused by the kernel.

Here are some of the calls that gets refused with a bit of custom debug output to see why it got so:

[   18.680047] [drm:drm_ioctl] pid=2504, name=RenderThread, dev=0xe200, auth=0, I915_GEM_EXECBUFFER2
[   18.680052] drm_ioctl_permit(476): flags = 0x21
[   18.680056] drm_ioctl_permit(477): drm_is_render_client(file_priv) = 0
[   18.680061] drm_ioctl_permit(478): file_priv->authenticated = 0

[   18.680811] [drm:drm_ioctl] pid=2504, name=RenderThread, dev=0xe200, auth=0, I915_GEM_BUSY
[   18.680814] drm_ioctl_permit(476): flags = 0x21
[   18.680818] drm_ioctl_permit(477): drm_is_render_client(file_priv) = 0
[   18.680821] drm_ioctl_permit(478): file_priv->authenticated = 0

[   18.692584] [drm:drm_ioctl] pid=2504, name=RenderThread, dev=0xe200, auth=0, DRM_IOCTL_GEM_OPEN
[   18.692588] drm_ioctl_permit(476): flags = 0x11
[   18.692590] drm_ioctl_permit(477): drm_is_render_client(file_priv) = 0
[   18.692593] drm_ioctl_permit(478): file_priv->authenticated = 0


This is the kernel condition that refuses it:

/* AUTH is only for authenticated or render client */
if (unlikely((flags & DRM_AUTH) && !drm_is_render_client(file_priv) &&
    !file_priv->authenticated))
return -EACCES;

If we forcefully accept, the 3d acceleration works.

Any idea?

Povilas Staniulis

unread,
Jun 19, 2017, 6:07:31 PM6/19/17
to andro...@googlegroups.com
This is normal.
Android x86 kernel is patched to disable drm_ioctl_permit checks.

What kernel are you running this on ?
> --
> You received this message because you are subscribed to the Google
> Groups "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to android-x86...@googlegroups.com
> <mailto:android-x86...@googlegroups.com>.
> To post to this group, send email to andro...@googlegroups.com
> <mailto:andro...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/android-x86.
> For more options, visit https://groups.google.com/d/optout.


youling 257

unread,
Jun 19, 2017, 10:00:11 PM6/19/17
to Android-x86

Francois Gervais

unread,
Jun 20, 2017, 9:21:05 AM6/20/17
to Android-x86
Ah that explains it, we run a vanilla 4.8.11 kernel.

Thanks a lot for pointing that out.
Reply all
Reply to author
Forward
0 new messages