Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 559380 - applications using OpenGL require dev_rw_dri access
Summary: applications using OpenGL require dev_rw_dri access
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-02 06:18 UTC by Jason Zaman
Modified: 2015-09-02 06:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Zaman gentoo-dev 2015-09-02 06:18:13 UTC
On my intel gfx card, running glxgears gives:

$ glxgears 
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
LLVM ERROR: Allocation failed when allocating new memory in the JIT
Can't allocate RWX Memory: Permission denied

type=AVC msg=audit(1441174330.223:105916): avc:  denied  { execmem } for  pid=20612 comm="glxgears" scontext=staff_u:staff_r:staff_t:s0-s0:c0.c511 tcontext=staff_u:staff_r:staff_t:s0-s0:c0.c511 tclass=process permissive=0


adding dev_rw_dri(staff_t) and running glxgears works perfectly fine. On the other hand if I do not have dri access, glxgears appears to fall back to something in MESA which does JIT and requires execmem perms and PaX marking. out of the two options dri access seems preferred.
Using mpv with -vo=opengl leads to exactly the same issue of execmem if no dri access.

Now the questions is should this just be granted on all X domains through one of the xserver interfaces? or do we give it to individual domains? or give it everywhere but use a boolean?

It would also be good to confirm if this applies to other graphics drivers or if they need different rules.
Comment 1 Niklas Haas 2015-09-02 06:35:23 UTC
> It would also be good to confirm if this applies to other graphics drivers or if they need different rules.

With the proprietary nvidia drivers I do not need this rule, but I needed to set allow_mplayer_execstack to true to get -vo opengl working.

glxgears worked out of the box for me.