Accepting request 947893 from X11:XOrg
- Re-enable asm on aarch64 - Add patch to fix run with BTI enabled on aarch64: * libglvnd-add-bti.patch - boo#1188928 OBS-URL: https://build.opensuse.org/request/show/947893 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libglvnd?expand=0&rev=23
This commit is contained in:
commit
985594086c
38
libglvnd-add-bti.patch
Normal file
38
libglvnd-add-bti.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 5dc67a6310e32e0d36527c4eaa1b92c39beb8c8c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Guillaume Gardet <guillaume.gardet@arm.com>
|
||||||
|
Date: Fri, 21 Jan 2022 09:26:07 +0100
|
||||||
|
Subject: [PATCH] Add BTI landing pads for aarch64
|
||||||
|
|
||||||
|
When Branch Target Identifier (BTI) is enabled on aarch64,
|
||||||
|
any software which run libglbnd will fail with SIGILL, Illegal instruction.
|
||||||
|
This is because some assembler code misses the BTI landing pads.
|
||||||
|
See: https://developer.arm.com/documentation/102433/0100/Jump-oriented-programming
|
||||||
|
|
||||||
|
"hint #34" is the same thing as "BTI C" landing pad, but keep
|
||||||
|
compatibility with systems without BTI enabled.
|
||||||
|
---
|
||||||
|
src/GLdispatch/vnd-glapi/entry_aarch64_tsd.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/GLdispatch/vnd-glapi/entry_aarch64_tsd.c b/src/GLdispatch/vnd-glapi/entry_aarch64_tsd.c
|
||||||
|
index ae80131..00c4132 100644
|
||||||
|
--- a/src/GLdispatch/vnd-glapi/entry_aarch64_tsd.c
|
||||||
|
+++ b/src/GLdispatch/vnd-glapi/entry_aarch64_tsd.c
|
||||||
|
@@ -55,7 +55,8 @@
|
||||||
|
".balign " U_STRINGIFY(ENTRY_STUB_ALIGN) "\n\t" \
|
||||||
|
".global " func "\n\t" \
|
||||||
|
".type " func ", %function\n\t" \
|
||||||
|
- func ":\n\t"
|
||||||
|
+ func ":\n\t" \
|
||||||
|
+ "hint #34\n\t"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Looks up the current dispatch table, finds the stub address at the given slot
|
||||||
|
@@ -69,6 +70,7 @@
|
||||||
|
* table then does a branch without link to the function address.
|
||||||
|
*/
|
||||||
|
#define STUB_ASM_CODE(slot) \
|
||||||
|
+ "hint #34\n\t" \
|
||||||
|
"stp x1, x0, [sp, #-16]!\n\t" \
|
||||||
|
"adrp x0, :got:_glapi_Current\n\t" \
|
||||||
|
"ldr x0, [x0, #:got_lo12:_glapi_Current]\n\t" \
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 21 09:05:39 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||||
|
|
||||||
|
- Re-enable asm on aarch64
|
||||||
|
- Add patch to fix run with BTI enabled on aarch64:
|
||||||
|
* libglvnd-add-bti.patch - boo#1188928
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 4 22:41:36 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
Tue Jan 4 22:41:36 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ Source: https://github.com/NVIDIA/libglvnd/archive/v%{version}.tar.gz#/%
|
|||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
Source2: libglvnd.rpmlintrc
|
Source2: libglvnd.rpmlintrc
|
||||||
Patch1: disable-glx-tests.patch
|
Patch1: disable-glx-tests.patch
|
||||||
|
# PATCH-FIX-UPSTREAM - https://github.com/NVIDIA/libglvnd/pull/214
|
||||||
|
Patch2: libglvnd-add-bti.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
@ -60,6 +62,7 @@ development.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
# fix env shebang to call py3 directly
|
# fix env shebang to call py3 directly
|
||||||
sed -i -e "1s|#!.*|#!%{_bindir}/python3|" src/generate/*.py
|
sed -i -e "1s|#!.*|#!%{_bindir}/python3|" src/generate/*.py
|
||||||
|
|
||||||
@ -68,11 +71,6 @@ sed -i -e "1s|#!.*|#!%{_bindir}/python3|" src/generate/*.py
|
|||||||
%configure \
|
%configure \
|
||||||
%if 0%{?suse_version} < 1330
|
%if 0%{?suse_version} < 1330
|
||||||
--libdir=%{_prefix}/X11R6/%{_lib} \
|
--libdir=%{_prefix}/X11R6/%{_lib} \
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1500
|
|
||||||
%ifarch aarch64
|
|
||||||
--disable-asm \
|
|
||||||
%endif
|
|
||||||
%endif
|
%endif
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--disable-headers \
|
--disable-headers \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user