All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
To: Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx mailing list
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH xf86-video-ati 5/6] Make all active CRTCs scan out an all-black framebuffer in LeaveVT
Date: Thu, 31 Aug 2017 11:35:13 +0900	[thread overview]
Message-ID: <d16c71d3-ba2d-2e72-19c2-8e04daae8b50@daenzer.net> (raw)
In-Reply-To: <CACvgo51bzkmjadyRqH+7quMt6VOW=tp24h3Gv3iDNdEhKDN1nQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 30/08/17 07:27 PM, Emil Velikov wrote:
> On 30 August 2017 at 09:04, Michel Dänzer <michel@daenzer.net> wrote:
>> On 29/08/17 07:56 PM, Emil Velikov wrote:
>>
>>> IIRC the vmwgfx's kernel driver, which has extra locking [1] in order
>>> to address that.
>>> Would a similar approach like that be applicable for radeon/amdgpu?
>>
>> I don't see how that's related.
>>
>> The issue is that if the caller of DRM_IOCTL_MODE_GETFB is DRM master
>> (or root, or using a DRM control device node), the ioctl returns a valid
>> GEM handle for the framebuffer, so the caller can use the underlying
>> buffer arbitrarily. This is handled by core DRM code, there's nothing
>> kernel drivers can do about it.
>>
> Disclaimer: I'm might be a mile off.
> 
> vmgfx's vmw_master_check() which does the usual DRM master/control or
> root checking.
> There is a "Check if we were previously master, but now dropped" which
> seems, perhaps too vaguely, related to what's happening here.
> 
> Admittedly I've not looked too closely at the locked_master and
> associated ttm code (ttm_read_lock, etc).
> But was under the impression that it is used to restrict access to the
> [contents behind the] GEM handle, when DRM master is dropped.

I'm not familiar with that code either, so I may be wrong, but AFAICT
it's kind of the opposite, allowing userspace which was previously DRM
master to do some things it otherwise wouldn't be allowed to do.

Whereas this change is about something userspace can do while it's DRM
master, and which cannot be disallowed per se without breaking userspace
(e.g. smooth bootsplash -> login screen -> user session transitions).


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-08-31  2:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28  9:23 [PATCH xf86-video-ati 0/6] Harden against other DRM masters Michel Dänzer
     [not found] ` <20170828092343.27742-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-08-28  9:23   ` [PATCH xf86-video-ati 1/6] Create radeon_pixmap_clear helper Michel Dänzer
2017-08-28  9:23   ` [PATCH xf86-video-ati 2/6] Create drmmode_set_mode helper Michel Dänzer
2017-08-28  9:23   ` [PATCH xf86-video-ati 3/6] Create radeon_pixmap_get_fb_ptr helper Michel Dänzer
2017-08-28  9:23   ` [PATCH xf86-video-ati 4/6] Create radeon_master_screen helper Michel Dänzer
2017-08-28  9:23   ` [PATCH xf86-video-ati 5/6] Make all active CRTCs scan out an all-black framebuffer in LeaveVT Michel Dänzer
     [not found]     ` <20170828092343.27742-6-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-08-29 10:56       ` Emil Velikov
     [not found]         ` <CACvgo52+5yVkKdwDMSdGnbM2C-Z-wUt3NdewP8oystW6=LVn2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-30  8:04           ` Michel Dänzer
     [not found]             ` <8d6d0c04-7994-3b7a-6db6-cac8d8be3a4c-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-08-30 10:27               ` Emil Velikov
     [not found]                 ` <CACvgo51bzkmjadyRqH+7quMt6VOW=tp24h3Gv3iDNdEhKDN1nQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-31  2:35                   ` Michel Dänzer [this message]
2017-08-28  9:23   ` [PATCH xf86-video-ati 6/6] Remove drmmode_scanout_free Michel Dänzer
2017-08-28 17:09   ` [PATCH xf86-video-ati 0/6] Harden against other DRM masters Deucher, Alexander

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=d16c71d3-ba2d-2e72-19c2-8e04daae8b50@daenzer.net \
    --to=michel-otuistvhuppr7s880joybq@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --subject='Re: [PATCH xf86-video-ati 5/6] Make all active CRTCs scan out an all-black framebuffer in LeaveVT' \
    /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

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.