public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Dennis Schridde <devurandom@gmx.net>
To: gentoo-dev@lists.gentoo.org
Cc: "Michał Górny" <mgorny@gentoo.org>
Subject: Re: [gentoo-dev] Access to DRM render nodes from portage sandbox?
Date: Wed, 09 May 2018 09:56:53 +0200	[thread overview]
Message-ID: <1633461.yP7ybrhVju@monk> (raw)
In-Reply-To: <1525851283.1846.1.camel@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]

On Wednesday, 9 May 2018 09:34:43 CEST Michał Górny wrote:
> W dniu śro, 09.05.2018 o godzinie 08∶51 +0200, użytkownik Dennis
> 
> Schridde napisał:
> > I see sandbox violations similar to "ACCESS DENIED: open_wr: /dev/dri/
> > renderD128" pop up for more and more packages, probably since OpenCL
> > becomes used more widely.  Hence I would like to ask: Could we in Gentoo
> > treat GPUs just like CPUs and allow any process to access render nodes
> > (i.e. the GPUs compute capabilities via the specific interface the Linux
> > kernel's DRM offers for that purpose) without sandbox restrictions?
> > 
> > See-Also: https://bugs.gentoo.org/654216
> 
> Doesn't accessing those nodes involve a risk of programs being able to
> crash your system (or xorg)?  Or cause on-screen artifacts?

Well, in the presence of Linux kernel bugs, programs could crash the whole 
system.  But I believe this is also true for all other drivers and compute 
devices, including CPUs.

I assume an application using render nodes could crash X by e.g. consuming all 
memory.  But then this is also true for all applications using the CPU and its 
attached memory for computations.

On-screen artifacts as in resolution switching and other KMS operations is 
explicitly prohibited.  Insecure access (using GEM FLINK) to the memory of 
other applications (which could cause broken textures / windows with broken 
content) is also explicitly prohibited.  So my understanding is that the 
answer is: No, using render nodes cannot cause on-screen artifacts (modulo the 
presence of Linux kernel bugs, s.a.).

DRM render nodes were specifically introduced to allow GPGPU applications to 
run without impacting the security of the system (and without X).

The Linux kernel documentation contains some information on the concept:
* https://www.kernel.org/doc/html/v4.16/gpu/drm-uapi.html#render-nodes

As well as an older blog post by David Herrmann:
* https://dvdhrm.wordpress.com/2013/09/01/splitting-drm-and-kms-device-nodes/

And the Wikipedia article on DRM:
* https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Render_nodes

--Dennis

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2018-05-09  7:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09  6:51 [gentoo-dev] Access to DRM render nodes from portage sandbox? Dennis Schridde
2018-05-09  7:34 ` Michał Górny
2018-05-09  7:56   ` Dennis Schridde [this message]
2018-05-09  8:16     ` Michał Górny
2018-05-09 16:34 ` Matt Turner
2018-05-09 17:10   ` Mike Gilbert
2018-05-09 17:12     ` M. J. Everitt
2018-05-09 18:50       ` Kent Fredric
2018-05-09 18:54         ` M. J. Everitt
2018-05-09 19:13           ` Kent Fredric
2018-05-09 19:31           ` William Hubbs
2018-05-09 19:36             ` M. J. Everitt
2018-05-10  7:17     ` Dennis Schridde
2018-05-09 17:19   ` Alec Warner
2018-05-09 18:43     ` Matt Turner
2018-05-09 18:46       ` Matt Turner
2018-05-09 18:41 ` Matt Turner

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=1633461.yP7ybrhVju@monk \
    --to=devurandom@gmx.net \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=mgorny@gentoo.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