All of lore.kernel.org
 help / color / mirror / Atom feed
* Advice on fixing unwanted master inheritance:
@ 2015-11-29 17:44 Thomas Hellstrom
  2015-11-29 19:48 ` Dave Airlie
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Hellstrom @ 2015-11-29 17:44 UTC (permalink / raw)
  To: dri-devel

Hi, all!

There's an odd master inheritance going on in drm. Consider the
following scenario.

1) Xorg opens DRM. Becomes master.
2) Plymouthd opens a file descriptor to drm.
3) Xorg exits.
4) Plymouthd calls drmSetMaster(). At this point it actually inherits
Xorg's master structure and all authenticated clients.
5) vmwgfx dislikes this and throws a BUG().

I can of course fix vmwgfx up to not throw a bug in this case, but I
figure this behavior is not really what we want, so I'd like to fix the
root cause as well, As I see it, we have two options.

A) If the client is authenticated with the master we allow the above
behaviour as a way to change master role in a master realm. If the
client is not authenticated, like Plymouthd in this case, we create a
new master structure for Plymouthd.

B) This behaviour is not allowed at all. We always create a new master
structure when this happens.

Opinions?

Thanks,
Thomas
 

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Advice on fixing unwanted master inheritance:
  2015-11-29 17:44 Advice on fixing unwanted master inheritance: Thomas Hellstrom
@ 2015-11-29 19:48 ` Dave Airlie
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Airlie @ 2015-11-29 19:48 UTC (permalink / raw)
  To: Thomas Hellstrom; +Cc: dri-devel

On 30 November 2015 at 03:44, Thomas Hellstrom <thellstrom@vmware.com> wrote:
> Hi, all!
>
> There's an odd master inheritance going on in drm. Consider the
> following scenario.
>
> 1) Xorg opens DRM. Becomes master.
> 2) Plymouthd opens a file descriptor to drm.
> 3) Xorg exits.
> 4) Plymouthd calls drmSetMaster(). At this point it actually inherits
> Xorg's master structure and all authenticated clients.
> 5) vmwgfx dislikes this and throws a BUG().
>
> I can of course fix vmwgfx up to not throw a bug in this case, but I
> figure this behavior is not really what we want, so I'd like to fix the
> root cause as well, As I see it, we have two options.
>
> A) If the client is authenticated with the master we allow the above
> behaviour as a way to change master role in a master realm. If the
> client is not authenticated, like Plymouthd in this case, we create a
> new master structure for Plymouthd.
>
> B) This behaviour is not allowed at all. We always create a new master
> structure when this happens.
>
> Opinions?

Do we have a use case where we hand over master between server/client
I can't think of one, I'd try B first and see if anything breaks.

Dave.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-29 19:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-29 17:44 Advice on fixing unwanted master inheritance: Thomas Hellstrom
2015-11-29 19:48 ` Dave Airlie

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.