[VDPAU] [PATCH] Detect libflashplayer through /proc/self/maps
jer at gentoo.org
Fri Nov 15 06:21:09 PST 2013
On Thu, 14 Nov 2013 10:51:44 -0800
Robert Morell <rmorell at nvidia.com> wrote:
> This behavior looks like it may cause false positives if the
> libflashplayer library is loaded into the process, but some other
> module is actually using VDPAU (for example, native HTML5 video
> rendering done by the browser).
The original code is already testing for processes which
1) load libvdpau (or the code in question would never be executed) and
2a) explicitly call their OOP plugins handler with the string
"libflashplayer" in argv or otherwise manipulate the sub-process.
Some browsers do not write the plugin's name to the sub-process's
cmdline, so the check fails there.
> I don't have any good suggestions for how to easily detect if Flash
> is actually using the VDPAU API, though.
libvdpau is loaded by the process, and the libvdpau code checks whether
libflashplayer is loaded. That is how the current libvdpau code works,
assuming 2a). I propose doing this instead:
2b) Check whether libflashplayer is loaded by the process that loaded
Rémi and you are probably correctly questioning whether the original
code works at all, but it does in fact work fine (for any browser that
writes a specific string to the argv of its OOP plugin sub-processes).
The change I propose works for any browser that does OOP plugins.
I am not aware of any browser that loads more than a single plugin into
an OOP process. That would be plain silly, right?
More information about the VDPAU