[PATCH] Apitrace replay: Fix "apitrace replay" regression when used with fips
Carl Worth
cworth at cworth.org
Fri Nov 29 14:56:55 PST 2013
Alexander Monakov <amonakov at ispras.ru> writes:
> Sigh, I warned Carl that playing games with dl* interposition is not going to
> work well,
Yes. And your warning hasn't fallen on deaf ears!
> and it's disappointing to see that fips does that by default (and
> interposes dlsym, which it doesn't need to -- interposing dlopen is
> enough;
Two points on this front:
1. I wrote that code before you and I talked all about this
2. I tried to only add code to fips as I encountered actual bugs. So I
believe that the dlysm interposition I wrote was a fix for an
actual bug (though, I can't claim it was the only possible, nor the
best fix).
In the meantime, directly in response to your suggestions, I also wrote
glaze which works via LD_LIBRARY_PATH instead of LD_PRELOAD. And we have
been using fips via glaze specifically to workaround the bad
interactions of fips with glretrace. That works like this:
glaze --wrapper=/path/to/libfips-64.so glretrace -b <trace-file>
If you're interested, you can checkout glaze via:
git://git.cworth.org/git/glaze
Finally, I am interested in folding in the approach from glaze into fips
directly. A couple of things have kept me back so far, (which might just
be my own bugs as opposed to any fault in the actual approach). One is
that the LD_LIBRARY_PATH-based approach fails when an application has
rpath, (which, hopefully won't be a problem for much packaged or
shipping software, but does often happen with software compiled on a
developer's system).
The other problem is that I haven't yet got glaze passing all of the
test cases I wrote for fips. Specifically, I have had some difficulty at
getting glaze to work with EGL or GLES programs. I don't know the
specifics of that problem yet, but I would be interested if you happen
to have any insight.
> And now Carl's colleague at Intel had to spend time figuring out and
> fixing a problem...
Well, what we're doing here is reducing the amount of dlopen/dlsym
interposition going on, (specifically from glretrace in this case). That
sounds like a net win in exactly the direction you are arguing for.
-Carl
--
carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20131129/d7535de8/attachment.pgp>
More information about the apitrace
mailing list