forked from pool/glibc
Accepting request 1145071 from home:Andreas_Schwab:Factory
- Add libnsl1 to baselibs.conf (bsc#1219640) - arm-dl-start-user.patch: arm: Remove wrong ldr from _dl_start_user (BZ #31339) OBS-URL: https://build.opensuse.org/request/show/1145071 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=694
This commit is contained in:
parent
a39c2d7af8
commit
91530fb57a
40
arm-dl-start-user.patch
Normal file
40
arm-dl-start-user.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 63295e4fda1f6dab4bf7442706fe303bf283036c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
Date: Mon, 5 Feb 2024 16:10:24 +0000
|
||||||
|
Subject: [PATCH] arm: Remove wrong ldr from _dl_start_user (BZ 31339)
|
||||||
|
|
||||||
|
The commit 49d877a80b29d3002887b084eec6676d9f5fec18 (arm: Remove
|
||||||
|
_dl_skip_args usage) removed the _SKIP_ARGS literal, which was
|
||||||
|
previously loader to r4 on loader _start. However, the cleanup did not
|
||||||
|
remove the following 'ldr r4, [sl, r4]' on _dl_start_user, used to check
|
||||||
|
to skip the arguments after ld self-relocations.
|
||||||
|
|
||||||
|
In my testing, the kernel initially set r4 to 0, which makes the
|
||||||
|
ldr instruction just read the _GLOBAL_OFFSET_TABLE_. However, since r4
|
||||||
|
is a callee-saved register; a different runtime might not zero
|
||||||
|
initialize it and thus trigger an invalid memory access.
|
||||||
|
|
||||||
|
Checked on arm-linux-gnu.
|
||||||
|
|
||||||
|
Reported-by: Adrian Ratiu <adrian.ratiu@collabora.com>
|
||||||
|
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||||
|
(cherry picked from commit 1e25112dc0cb2515d27d8d178b1ecce778a9d37a)
|
||||||
|
---
|
||||||
|
sysdeps/arm/dl-machine.h | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
|
||||||
|
index b857bbc868..dd1a0f6b6e 100644
|
||||||
|
--- a/sysdeps/arm/dl-machine.h
|
||||||
|
+++ b/sysdeps/arm/dl-machine.h
|
||||||
|
@@ -139,7 +139,6 @@ _start:\n\
|
||||||
|
_dl_start_user:\n\
|
||||||
|
adr r6, .L_GET_GOT\n\
|
||||||
|
add sl, sl, r6\n\
|
||||||
|
- ldr r4, [sl, r4]\n\
|
||||||
|
@ save the entry point in another register\n\
|
||||||
|
mov r6, r0\n\
|
||||||
|
@ get the original arg count\n\
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
@ -24,3 +24,5 @@ glibc-devel-static
|
|||||||
glibc-profile
|
glibc-profile
|
||||||
arch i586 block!
|
arch i586 block!
|
||||||
glibc-utils
|
glibc-utils
|
||||||
|
libnsl1
|
||||||
|
arch i586 block!
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 7 09:08:50 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
- Add libnsl1 to baselibs.conf (bsc#1219640)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 6 08:40:15 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
- arm-dl-start-user.patch: arm: Remove wrong ldr from _dl_start_user (BZ
|
||||||
|
#31339)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 1 09:25:37 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
Thu Feb 1 09:25:37 UTC 2024 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
34
glibc.spec
34
glibc.spec
@ -298,9 +298,13 @@ Patch304: glibc-resolv-mdnshint.diff
|
|||||||
# PATCH-FIX-OPENSUSE disable rewriting ::1 to 127.0.0.1 for /etc/hosts bnc#684534, bnc#706719
|
# PATCH-FIX-OPENSUSE disable rewriting ::1 to 127.0.0.1 for /etc/hosts bnc#684534, bnc#706719
|
||||||
Patch306: glibc-fix-double-loopback.diff
|
Patch306: glibc-fix-double-loopback.diff
|
||||||
|
|
||||||
|
%if %{without snapshot}
|
||||||
###
|
###
|
||||||
# Patches from upstream
|
# Patches from upstream
|
||||||
###
|
###
|
||||||
|
# PATCH-FIX-UPSTREAM arm: Remove wrong ldr from _dl_start_user (BZ #31339)
|
||||||
|
Patch1000: arm-dl-start-user.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
###
|
###
|
||||||
# Patches awaiting upstream approval
|
# Patches awaiting upstream approval
|
||||||
@ -512,31 +516,8 @@ have support for IPv6.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n glibc-%{version} -q -a 4
|
%autosetup -n glibc-%{version} -a 4 -p1
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch19 -p1
|
|
||||||
%patch20 -p1
|
|
||||||
%patch21 -p1
|
|
||||||
|
|
||||||
%patch100 -p1
|
|
||||||
%patch102 -p1
|
|
||||||
%patch103 -p1
|
|
||||||
|
|
||||||
%patch304 -p1
|
|
||||||
%patch306 -p1
|
|
||||||
|
|
||||||
%if %{without snapshot}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%patch2000 -p1
|
|
||||||
|
|
||||||
%patch3000
|
|
||||||
rm -f manpages/catchsegv.1
|
rm -f manpages/catchsegv.1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -1008,11 +989,10 @@ rm -f %{buildroot}%{_bindir}/pldd
|
|||||||
rm -rf %{buildroot}%{_libdir}/audit
|
rm -rf %{buildroot}%{_libdir}/audit
|
||||||
|
|
||||||
%ifarch i686
|
%ifarch i686
|
||||||
# Remove files from glibc-{extra,info,i18ndata}, nscd, libnsl1
|
# Remove files from glibc-{extra,info,i18ndata}, nscd
|
||||||
rm -rf %{buildroot}%{_infodir} %{buildroot}%{_prefix}/share/i18n
|
rm -rf %{buildroot}%{_infodir} %{buildroot}%{_prefix}/share/i18n
|
||||||
rm -f %{buildroot}%{_bindir}/makedb %{buildroot}/var/lib/misc/Makefile
|
rm -f %{buildroot}%{_bindir}/makedb %{buildroot}/var/lib/misc/Makefile
|
||||||
rm -f %{buildroot}%{_sbindir}/nscd
|
rm -f %{buildroot}%{_sbindir}/nscd
|
||||||
rm -f %{buildroot}%{slibdir}/libnsl.so.1
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifnarch i686
|
%ifnarch i686
|
||||||
@ -1393,12 +1373,12 @@ exit 0
|
|||||||
/var/lib/misc/Makefile
|
/var/lib/misc/Makefile
|
||||||
|
|
||||||
%files lang -f libc.lang
|
%files lang -f libc.lang
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch %ix86 %alpha hppa m68k %mips32 %mips64 %sparc ppc ppc64 ppc64le x86_64 s390 s390x %arm aarch64 riscv64
|
%ifarch %ix86 %alpha hppa m68k %mips32 %mips64 %sparc ppc ppc64 ppc64le x86_64 s390 s390x %arm aarch64 riscv64
|
||||||
%files -n libnsl1
|
%files -n libnsl1
|
||||||
%{slibdir}/libnsl.so.1
|
%{slibdir}/libnsl.so.1
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: manpages/locale.alias.5
|
Index: ./manpages/locale.alias.5
|
||||||
===================================================================
|
===================================================================
|
||||||
--- manpages/locale.alias.5.orig
|
--- ./manpages/locale.alias.5.orig
|
||||||
+++ manpages/locale.alias.5
|
+++ ./manpages/locale.alias.5
|
||||||
@@ -18,7 +18,7 @@
|
@@ -18,7 +18,7 @@
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
locale.alias \- Locale name alias data base
|
locale.alias \- Locale name alias data base
|
||||||
|
Loading…
Reference in New Issue
Block a user