[Mesa-dev] [Bug 110328] meson-built drivers are installed with non-empty rpath

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 4 19:08:10 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110328

            Bug ID: 110328
           Summary: meson-built drivers are installed with non-empty rpath
           Product: Mesa
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Other
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: ajax at nwnk.net
        QA Contact: mesa-dev at lists.freedesktop.org
            Blocks: 109323

This is terrible:

datura:~% readelf -d /usr/lib64/dri/radeonsi_dri.so | grep RPATH
 0x000000000000000f (RPATH)              Library rpath:
[$ORIGIN/../../../mesa:$ORIGIN/../../../compiler/glsl:$ORIGIN/../../../compiler/glsl/glcpp:$ORIGIN/../../../util:$ORIGIN/../../../compiler/nir:$ORIGIN/../../../compiler:$ORIGIN/../../../mesa/drivers/dri/common:$ORIGIN/../../state_trackers/dri:$ORIGIN/../../auxiliary:$ORIGIN/../../../mapi/shared-glapi:$ORIGIN/../../auxiliary/pipe-loader:$ORIGIN/../../../loader:$ORIGIN/../../winsys/sw/null:$ORIGIN/../../winsys/sw/wrapper:$ORIGIN/../../winsys/sw/dri:$ORIGIN/../../winsys/sw/kms-dri:$ORIGIN/../../drivers/llvmpipe:$ORIGIN/../../drivers/softpipe:$ORIGIN/../../drivers/r300:$ORIGIN/../../winsys/radeon/drm:$ORIGIN/../../drivers/r600:$ORIGIN/../../drivers/radeonsi:$ORIGIN/../../winsys/amdgpu/drm:$ORIGIN/../../../amd/addrlib:$ORIGIN/../../../amd/common:$ORIGIN/../../winsys/nouveau/drm:$ORIGIN/../../drivers/nouveau:$ORIGIN/../../drivers/svga:$ORIGIN/../../winsys/svga/drm:$ORIGIN/../../drivers/virgl:$ORIGIN/../../winsys/virgl/drm:$ORIGIN/../../winsys/virgl/vtest]

This is _probably_ not a security problem, since in most cases $ORIGIN is going
to be /usr/lib/dri, and /usr and / aren't generally world-writable. But it is a
performance problem, because when the 3D driver loads any libraries it depends
on that aren't already loaded (llvm, probably) will be uselessly searched for
in a bunch of nonexistent directories. Not theoretical either, see:

https://gitlab.freedesktop.org/wayland/weston/issues/213

In Fedora I'm going to work around this for now by doing 'chrpath -d' on the
drivers after they're installed, but this should be addressed upstream too.


Referenced Bugs:

https://bugs.freedesktop.org/show_bug.cgi?id=109323
[Bug 109323] [TRACKER] mesa: Remove autotools
-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190404/099ed88f/attachment.html>


More information about the mesa-dev mailing list