Skip to contentSkip to conversation

Advice on fixing unwanted master inheritance:

DISCUSSION Thomas Hellstrom 2 participants 2 messages Nov 29, 2015

lore
Share & tools
lore
#0 lore raw

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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw
Quoted 21 lines · Thomas Hellstrom

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.

Quoted 4 lines

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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel