(master) hw/xfree86/glamor_egl: do not link statically glx library - #3213
Conversation
In a987fc7 commit glx library is statically linked which makes all glx library variables dublicated in glx.so and glamoregl.so files and leads 'split-brain' problem where same symbols exist in different depending on context (this evident when it called using functions with static attribute). This patch exports neccesary glx symbols for glamor library. Signed-off-by: Tautvis <gtautvis@gmail.com>
Commit a987fc7 linked glx library statically, which leaded dublicated glx extension symbols in glx.so and glamoregl.so libraries. This commit do not link glx directly. Signed-off-by: Tautvis <gtautvis@gmail.com>
|
is the glx library now becoming a xf86 module or just a shared library ? |
There is already the glx static library, which all X servers except xf86 an xnest (which doesn't support glx) link statically too. xf86 uses it's glx extension library (hw/xfree86/dixmods/glxmodule.c) to implement the glx extension, instead of the server linking to it statically. |
Currently for xfree86 it is module: xserver/hw/xfree86/dixmods/glxmodule.c Line 45 in b9d651f From glamor perspective (and in my view) it should be viewed as shared library - these _X_EXPORT'ed symbols are directly called for correct functionality. On other xservers (kdrive and etc) - it directly linked as static library. @stefan11111 can comment on this situation much better. Without these exports we would need to somehow make note: then there is bind-now thingy in cases when glamor loaded before glx (we can end up with manual dereferencing X11Libre/xf86-video-amdgpu#62 for glx functions ) |
|
@cepelinas9000 I'm guessing we crossed when posting the messages, see mine above. Linking the glx extension is the "clean" way to solve this, but it would probably break the 390 nvidia xf86 driver. @metux @X11Libre/dev |
Review: hw/xfree86/glamor_egl: do not link statically glx library —
|
|
@ONykyf Could you test this patch against the proprietary 390 driver? |
I can do it tomorrow. |
stefan11111
left a comment
There was a problem hiding this comment.
LGTM. Seems to work fine with nvidia 390 too. See: #3174 (comment)
|
I wonder if this breaks when not using lazy-loading. Hopefully not. |
Shouldn't break, i tested on latest Gentoo with bind-now set. |
|
@stefan11111 @cepelinas9000 do we need to backport this one ? |
Yes, to https://github.com/X11Libre/xserver/commits/release/25.0/ and https://github.com/X11Libre/xserver/commits/release/25.1/ |
In a987fc7 commit glx library is
statically linked which makes all glx library variables dublicated in
glx.so and glamoregl.so files
for context: #3174 (comment)
Backport dashboard
release/25.2release/25.1release/25.0🤖 Backport assessment on behalf of @metux. All three release branches are
vulnerable (identical
link_with: [glamor, libxserver_glx]inhw/xfree86/glamor_egl/meson.build). Note: PR #3213 carries two commits(merge
6c75731752); each backport includes both the meson fix and itsprerequisite
_X_EXPORTheader-export commit (9b74a3a7f9a2). On 25.1/25.0the headers were remapped to the
glx/layout andglx/glxutil.hgained anexplicit
#include <X11/Xfuncproto.h>since it no longer includesglxserver.hthere.