On 29/08/17 07:56 PM, Emil Velikov wrote: > On 28 August 2017 at 10:23, Michel Dänzer <michel at daenzer.net> wrote: >> From: Michel Dänzer <michel.daenzer at amd.com> >> >> And destroy all other FBs. This is so that other DRM masters can only >> get access to this all-black FB, not to any other FB we created, while >> we're switched away and not DRM master. >> > Isn't the issue applicable overall - be that in X, wayland compositors, other? Potentially. > 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. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer