[PATCH 14/19] present: Add window flip mode
Michel Dänzer
michel at daenzer.net
Mon Feb 5 12:00:30 UTC 2018
On 2018-02-02 11:11 PM, Keith Packard wrote:
> Michel Dänzer <michel at daenzer.net> writes:
>
>> But this seems irrelevant for per-window flips. In this case, the window
>> pixmap isn't used for anything else after flipping, so having direct
>> access to the pixmap doesn't allow the client to do anything it couldn't
>> do anyway using the X11 protocol. (There might be exceptions to this if
>> the window wasn't created by the presenting client, and the Security
>> extension comes into play. But that would be a rather exotic scenario,
>> so I don't think we need to consider it here.)
>
> Agreed. Discarding the window pixmap during per-window flips seems like
> it should be fine. Of course, you need to replace the window pixmap for
> all windows sharing the original redirection, and that might include the
> parent. That's mildly concerning as now the client has control over the
> contents of another application's window outside of the X protocol.
Ignoring the Security extension, the client has the same control over
the contents of another application's window *using* the X protocol,
doesn't it?
If this is a concern, Present could try allocating a new window pixmap
to unflip to, and just leave the last flip pixmap as the window pixmap
if that fails (which it "never" will, in basically any scenario where
the X server can otherwise continue working normally).
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the xorg-devel
mailing list