summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-08 10:04:18 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-15 09:44:33 +0100
commitfb535ac046697db5923575bb23ee419fe7cfbab2 (patch)
tree8f842469be51c8e27647d28f4f2e8d955354dd83 /meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
parent19ee0f26cbaaacebacf552878ce98149957d0ac3 (diff)
downloadpoky-fb535ac046697db5923575bb23ee419fe7cfbab2.tar.gz
glibc: Upgrade to 2.28
License-Update: libidn is dropped from glibc and a testcase that was a particular contributor copyrighted see https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=LICENSES;h=0e3a9fe39b26e97038d92f904508a4c3aa1bb43b;hp=b29efe01084af28cc40953d7317f22927c0ee3b7;hb=5a357506659f9a00fcf5bc9c5d8fc676175c89a7;hpb=7279af007c420a9d5f88a6909d11e7cb712c16a4 https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=LICENSES;h=b29efe01084af28cc40953d7317f22927c0ee3b7;hp=80f7f1487947f57815b9fe076fadc8c7f94eeb8e;hb=7f9f1ecb710eac4d65bb02785ddf288cac098323;hpb=5f7b841d3aebdccc2baed27cb4b22ddb08cd7c0c Drop upstreamed and backported patches (From OE-Core rev: da8bf414922ce7af865fadc4a86fd96ab6262506) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch')
-rw-r--r--meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
new file mode 100644
index 0000000000..6b2bf65cac
--- /dev/null
+++ b/meta/recipes-core/glibc/glibc/0010-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -0,0 +1,62 @@
1From f6581da98bef982c888061fa06092c03f3c6c708 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Mar 2015 00:20:09 +0000
4Subject: [PATCH 10/30] Quote from bug 1443 which explains what the patch does
5 :
6
7 We build some random program and link it with -lust. When we run it,
8 it dies with a SIGSEGV before reaching main().
9
10 Libust.so depends on liburcu-bp.so from the usermode-rcu package.
11 Although libust.so is not prelinked, liburcu-bp.so IS prelinked; this
12 is critical.
13
14 Libust.so uses a TLS / __thread variable that is defined in liburcu-
15 bp.so. There are special ARM-specific relocation types that allow two
16 shared libraries to share thread-specific data. This is critical too.
17
18 One more critical issue: although liburcu-bp.so is prelinked, we can't
19 load it at its prelinked address, because we also link against
20 librt.so, and librt.so uses that address.
21
22 The dynamic linker is forced to relink liburcu-bp.so at a different
23 address. In the course of relinking, it processes the special ARM
24 relocation record mentioned above. The prelinker has already filled
25 in the information, which is a short offset into a table of thread-
26 specific data that is allocated per-thread for each library that uses
27 TLS. Because the normal behavior of a relocation is to add the symbol
28 value to an addend stored at the address being relocated, we end up
29 adding the short offset to itself, doubling it.
30
31 Now we have an awkward situation. The libust.so library doesn't know
32 about the addend, so its TLS data for this element is correct. The
33 liburcu-bp.so library has a different offset for the element. When we
34 go to initialize the element for the first time in liburcu-bp.so, we
35 write the address of the result at the doubled (broken) offset.
36 Later, when we refer to the address from libust.so, we check the value
37 at the correct offset, but it's NULL, so we eat hot SIGSEGV.
38
39Upstream-Status: Pending
40
41Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
42Signed-off-by: Khem Raj <raj.khem@gmail.com>
43---
44 sysdeps/arm/dl-machine.h | 2 +-
45 1 file changed, 1 insertion(+), 1 deletion(-)
46
47diff --git a/sysdeps/arm/dl-machine.h b/sysdeps/arm/dl-machine.h
48index 1a4fd3f17b..a02c47571a 100644
49--- a/sysdeps/arm/dl-machine.h
50+++ b/sysdeps/arm/dl-machine.h
51@@ -510,7 +510,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
52
53 case R_ARM_TLS_DTPOFF32:
54 if (sym != NULL)
55- *reloc_addr += sym->st_value;
56+ *reloc_addr = sym->st_value;
57 break;
58
59 case R_ARM_TLS_TPOFF32:
60--
612.18.0
62