forked from rpms/glibc
Import glibc-2.34-18.fc35 from f35
* Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-18 - Backport optimized ELF dependency sorting algorithm (#2032647) * Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-17 - Sync with upstream branch release/2.34/master, commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5 - i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771) - Update syscall lists for Linux 5.15 - powerpc: Fix unrecognized instruction errors with recent GCC - timezone: test-case for BZ #28707 - timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707) - Fix subscript error with odd TZif file [BZ #28338] - AArch64: Check for SVE in ifuncs [BZ #28744] - intl/plural.y: Avoid conflicting declarations of yyerror and yylex - Linux: Fix 32-bit vDSO for clock_gettime on powerpc32 - linux: Add sparck brk implementation - Update sparc libm-test-ulps - Update hppa libm-test-ulps - riscv: align stack before calling _dl_init [BZ #28703] - riscv: align stack in clone [BZ #28702] - powerpc64[le]: Allocate extra stack frame on syscall.S - elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704] - nss: Use "files dns" as the default for the hosts database (bug 28700) - arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro - mips: increase stack alignment in clone to match the ABI - mips: align stack in clone [BZ #28223] Resolves: #2032647 Resolves: #2033649
This commit is contained in:
parent
8e6a1ec6a4
commit
c2879fd933
2024
glibc-rh2032647-1.patch
Normal file
2024
glibc-rh2032647-1.patch
Normal file
File diff suppressed because one or more lines are too long
585
glibc-rh2032647-2.patch
Normal file
585
glibc-rh2032647-2.patch
Normal file
@ -0,0 +1,585 @@
|
|||||||
|
commit 15a0c5730d1d5aeb95f50c9ec7470640084feae8
|
||||||
|
Author: Chung-Lin Tang <cltang@codesourcery.com>
|
||||||
|
Date: Thu Oct 21 21:41:22 2021 +0800
|
||||||
|
|
||||||
|
elf: Fix slow DSO sorting behavior in dynamic loader (BZ #17645)
|
||||||
|
|
||||||
|
This second patch contains the actual implementation of a new sorting algorithm
|
||||||
|
for shared objects in the dynamic loader, which solves the slow behavior that
|
||||||
|
the current "old" algorithm falls into when the DSO set contains circular
|
||||||
|
dependencies.
|
||||||
|
|
||||||
|
The new algorithm implemented here is simply depth-first search (DFS) to obtain
|
||||||
|
the Reverse-Post Order (RPO) sequence, a topological sort. A new l_visited:1
|
||||||
|
bitfield is added to struct link_map to more elegantly facilitate such a search.
|
||||||
|
|
||||||
|
The DFS algorithm is applied to the input maps[nmap-1] backwards towards
|
||||||
|
maps[0]. This has the effect of a more "shallow" recursion depth in general
|
||||||
|
since the input is in BFS. Also, when combined with the natural order of
|
||||||
|
processing l_initfini[] at each node, this creates a resulting output sorting
|
||||||
|
closer to the intuitive "left-to-right" order in most cases.
|
||||||
|
|
||||||
|
Another notable implementation adjustment related to this _dl_sort_maps change
|
||||||
|
is the removing of two char arrays 'used' and 'done' in _dl_close_worker to
|
||||||
|
represent two per-map attributes. This has been changed to simply use two new
|
||||||
|
bit-fields l_map_used:1, l_map_done:1 added to struct link_map. This also allows
|
||||||
|
discarding the clunky 'used' array sorting that _dl_sort_maps had to sometimes
|
||||||
|
do along the way.
|
||||||
|
|
||||||
|
Tunable support for switching between different sorting algorithms at runtime is
|
||||||
|
also added. A new tunable 'glibc.rtld.dynamic_sort' with current valid values 1
|
||||||
|
(old algorithm) and 2 (new DFS algorithm) has been added. At time of commit
|
||||||
|
of this patch, the default setting is 1 (old algorithm).
|
||||||
|
|
||||||
|
Signed-off-by: Chung-Lin Tang <cltang@codesourcery.com>
|
||||||
|
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
diff --git a/elf/dl-close.c b/elf/dl-close.c
|
||||||
|
index cd7b9c9fe83a1a44..f6fbf9de7d78555b 100644
|
||||||
|
--- a/elf/dl-close.c
|
||||||
|
+++ b/elf/dl-close.c
|
||||||
|
@@ -167,8 +167,6 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
|
||||||
|
bool any_tls = false;
|
||||||
|
const unsigned int nloaded = ns->_ns_nloaded;
|
||||||
|
- char used[nloaded];
|
||||||
|
- char done[nloaded];
|
||||||
|
struct link_map *maps[nloaded];
|
||||||
|
|
||||||
|
/* Run over the list and assign indexes to the link maps and enter
|
||||||
|
@@ -176,24 +174,21 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
int idx = 0;
|
||||||
|
for (struct link_map *l = ns->_ns_loaded; l != NULL; l = l->l_next)
|
||||||
|
{
|
||||||
|
+ l->l_map_used = 0;
|
||||||
|
+ l->l_map_done = 0;
|
||||||
|
l->l_idx = idx;
|
||||||
|
maps[idx] = l;
|
||||||
|
++idx;
|
||||||
|
-
|
||||||
|
}
|
||||||
|
assert (idx == nloaded);
|
||||||
|
|
||||||
|
- /* Prepare the bitmaps. */
|
||||||
|
- memset (used, '\0', sizeof (used));
|
||||||
|
- memset (done, '\0', sizeof (done));
|
||||||
|
-
|
||||||
|
/* Keep track of the lowest index link map we have covered already. */
|
||||||
|
int done_index = -1;
|
||||||
|
while (++done_index < nloaded)
|
||||||
|
{
|
||||||
|
struct link_map *l = maps[done_index];
|
||||||
|
|
||||||
|
- if (done[done_index])
|
||||||
|
+ if (l->l_map_done)
|
||||||
|
/* Already handled. */
|
||||||
|
continue;
|
||||||
|
|
||||||
|
@@ -204,12 +199,12 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
/* See CONCURRENCY NOTES in cxa_thread_atexit_impl.c to know why
|
||||||
|
acquire is sufficient and correct. */
|
||||||
|
&& atomic_load_acquire (&l->l_tls_dtor_count) == 0
|
||||||
|
- && !used[done_index])
|
||||||
|
+ && !l->l_map_used)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* We need this object and we handle it now. */
|
||||||
|
- done[done_index] = 1;
|
||||||
|
- used[done_index] = 1;
|
||||||
|
+ l->l_map_used = 1;
|
||||||
|
+ l->l_map_done = 1;
|
||||||
|
/* Signal the object is still needed. */
|
||||||
|
l->l_idx = IDX_STILL_USED;
|
||||||
|
|
||||||
|
@@ -225,9 +220,9 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
{
|
||||||
|
assert ((*lp)->l_idx >= 0 && (*lp)->l_idx < nloaded);
|
||||||
|
|
||||||
|
- if (!used[(*lp)->l_idx])
|
||||||
|
+ if (!(*lp)->l_map_used)
|
||||||
|
{
|
||||||
|
- used[(*lp)->l_idx] = 1;
|
||||||
|
+ (*lp)->l_map_used = 1;
|
||||||
|
/* If we marked a new object as used, and we've
|
||||||
|
already processed it, then we need to go back
|
||||||
|
and process again from that point forward to
|
||||||
|
@@ -250,9 +245,9 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
{
|
||||||
|
assert (jmap->l_idx >= 0 && jmap->l_idx < nloaded);
|
||||||
|
|
||||||
|
- if (!used[jmap->l_idx])
|
||||||
|
+ if (!jmap->l_map_used)
|
||||||
|
{
|
||||||
|
- used[jmap->l_idx] = 1;
|
||||||
|
+ jmap->l_map_used = 1;
|
||||||
|
if (jmap->l_idx - 1 < done_index)
|
||||||
|
done_index = jmap->l_idx - 1;
|
||||||
|
}
|
||||||
|
@@ -262,8 +257,7 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
|
||||||
|
/* Sort the entries. We can skip looking for the binary itself which is
|
||||||
|
at the front of the search list for the main namespace. */
|
||||||
|
- _dl_sort_maps (maps + (nsid == LM_ID_BASE), nloaded - (nsid == LM_ID_BASE),
|
||||||
|
- used + (nsid == LM_ID_BASE), true);
|
||||||
|
+ _dl_sort_maps (maps, nloaded, (nsid == LM_ID_BASE), true);
|
||||||
|
|
||||||
|
/* Call all termination functions at once. */
|
||||||
|
#ifdef SHARED
|
||||||
|
@@ -280,7 +274,7 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
/* All elements must be in the same namespace. */
|
||||||
|
assert (imap->l_ns == nsid);
|
||||||
|
|
||||||
|
- if (!used[i])
|
||||||
|
+ if (!imap->l_map_used)
|
||||||
|
{
|
||||||
|
assert (imap->l_type == lt_loaded && !imap->l_nodelete_active);
|
||||||
|
|
||||||
|
@@ -333,7 +327,7 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
if (i < first_loaded)
|
||||||
|
first_loaded = i;
|
||||||
|
}
|
||||||
|
- /* Else used[i]. */
|
||||||
|
+ /* Else imap->l_map_used. */
|
||||||
|
else if (imap->l_type == lt_loaded)
|
||||||
|
{
|
||||||
|
struct r_scope_elem *new_list = NULL;
|
||||||
|
@@ -560,7 +554,7 @@ _dl_close_worker (struct link_map *map, bool force)
|
||||||
|
for (unsigned int i = first_loaded; i < nloaded; ++i)
|
||||||
|
{
|
||||||
|
struct link_map *imap = maps[i];
|
||||||
|
- if (!used[i])
|
||||||
|
+ if (!imap->l_map_used)
|
||||||
|
{
|
||||||
|
assert (imap->l_type == lt_loaded);
|
||||||
|
|
||||||
|
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
|
||||||
|
index 087a49b212a96920..237d9636c5be780c 100644
|
||||||
|
--- a/elf/dl-deps.c
|
||||||
|
+++ b/elf/dl-deps.c
|
||||||
|
@@ -613,10 +613,9 @@ Filters not supported with LD_TRACE_PRELINKING"));
|
||||||
|
|
||||||
|
/* If libc.so.6 is the main map, it participates in the sort, so
|
||||||
|
that the relocation order is correct regarding libc.so.6. */
|
||||||
|
- if (l_initfini[0] == GL (dl_ns)[l_initfini[0]->l_ns].libc_map)
|
||||||
|
- _dl_sort_maps (l_initfini, nlist, NULL, false);
|
||||||
|
- else
|
||||||
|
- _dl_sort_maps (&l_initfini[1], nlist - 1, NULL, false);
|
||||||
|
+ _dl_sort_maps (l_initfini, nlist,
|
||||||
|
+ (l_initfini[0] != GL (dl_ns)[l_initfini[0]->l_ns].libc_map),
|
||||||
|
+ false);
|
||||||
|
|
||||||
|
/* Terminate the list of dependencies. */
|
||||||
|
l_initfini[nlist] = NULL;
|
||||||
|
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
|
||||||
|
index 6dbdfe4b3ebbeb89..c683884c355dfd52 100644
|
||||||
|
--- a/elf/dl-fini.c
|
||||||
|
+++ b/elf/dl-fini.c
|
||||||
|
@@ -92,8 +92,7 @@ _dl_fini (void)
|
||||||
|
/* Now we have to do the sorting. We can skip looking for the
|
||||||
|
binary itself which is at the front of the search list for
|
||||||
|
the main namespace. */
|
||||||
|
- _dl_sort_maps (maps + (ns == LM_ID_BASE), nmaps - (ns == LM_ID_BASE),
|
||||||
|
- NULL, true);
|
||||||
|
+ _dl_sort_maps (maps, nmaps, (ns == LM_ID_BASE), true);
|
||||||
|
|
||||||
|
/* We do not rely on the linked list of loaded object anymore
|
||||||
|
from this point on. We have our own list here (maps). The
|
||||||
|
diff --git a/elf/dl-sort-maps.c b/elf/dl-sort-maps.c
|
||||||
|
index d21770267a37e128..a274ed66cc987735 100644
|
||||||
|
--- a/elf/dl-sort-maps.c
|
||||||
|
+++ b/elf/dl-sort-maps.c
|
||||||
|
@@ -16,16 +16,24 @@
|
||||||
|
License along with the GNU C Library; if not, see
|
||||||
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
+#include <assert.h>
|
||||||
|
#include <ldsodefs.h>
|
||||||
|
+#include <elf/dl-tunables.h>
|
||||||
|
|
||||||
|
+/* Note: this is the older, "original" sorting algorithm, being used as
|
||||||
|
+ default up to 2.35.
|
||||||
|
|
||||||
|
-/* Sort array MAPS according to dependencies of the contained objects.
|
||||||
|
- Array USED, if non-NULL, is permutated along MAPS. If FOR_FINI this is
|
||||||
|
- called for finishing an object. */
|
||||||
|
-void
|
||||||
|
-_dl_sort_maps (struct link_map **maps, unsigned int nmaps, char *used,
|
||||||
|
- bool for_fini)
|
||||||
|
+ Sort array MAPS according to dependencies of the contained objects.
|
||||||
|
+ If FOR_FINI is true, this is called for finishing an object. */
|
||||||
|
+static void
|
||||||
|
+_dl_sort_maps_original (struct link_map **maps, unsigned int nmaps,
|
||||||
|
+ unsigned int skip, bool for_fini)
|
||||||
|
{
|
||||||
|
+ /* Allows caller to do the common optimization of skipping the first map,
|
||||||
|
+ usually the main binary. */
|
||||||
|
+ maps += skip;
|
||||||
|
+ nmaps -= skip;
|
||||||
|
+
|
||||||
|
/* A list of one element need not be sorted. */
|
||||||
|
if (nmaps <= 1)
|
||||||
|
return;
|
||||||
|
@@ -66,14 +74,6 @@ _dl_sort_maps (struct link_map **maps, unsigned int nmaps, char *used,
|
||||||
|
(k - i) * sizeof (maps[0]));
|
||||||
|
maps[k] = thisp;
|
||||||
|
|
||||||
|
- if (used != NULL)
|
||||||
|
- {
|
||||||
|
- char here_used = used[i];
|
||||||
|
- memmove (&used[i], &used[i + 1],
|
||||||
|
- (k - i) * sizeof (used[0]));
|
||||||
|
- used[k] = here_used;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (seen[i + 1] > nmaps - i)
|
||||||
|
{
|
||||||
|
++i;
|
||||||
|
@@ -120,3 +120,183 @@ _dl_sort_maps (struct link_map **maps, unsigned int nmaps, char *used,
|
||||||
|
next:;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#if !HAVE_TUNABLES
|
||||||
|
+/* In this case, just default to the original algorithm. */
|
||||||
|
+strong_alias (_dl_sort_maps_original, _dl_sort_maps);
|
||||||
|
+#else
|
||||||
|
+
|
||||||
|
+/* We use a recursive function due to its better clarity and ease of
|
||||||
|
+ implementation, as well as faster execution speed. We already use
|
||||||
|
+ alloca() for list allocation during the breadth-first search of
|
||||||
|
+ dependencies in _dl_map_object_deps(), and this should be on the
|
||||||
|
+ same order of worst-case stack usage.
|
||||||
|
+
|
||||||
|
+ Note: the '*rpo' parameter is supposed to point to one past the
|
||||||
|
+ last element of the array where we save the sort results, and is
|
||||||
|
+ decremented before storing the current map at each level. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+dfs_traversal (struct link_map ***rpo, struct link_map *map,
|
||||||
|
+ bool *do_reldeps)
|
||||||
|
+{
|
||||||
|
+ if (map->l_visited)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ map->l_visited = 1;
|
||||||
|
+
|
||||||
|
+ if (map->l_initfini)
|
||||||
|
+ {
|
||||||
|
+ for (int i = 0; map->l_initfini[i] != NULL; i++)
|
||||||
|
+ {
|
||||||
|
+ struct link_map *dep = map->l_initfini[i];
|
||||||
|
+ if (dep->l_visited == 0
|
||||||
|
+ && dep->l_main_map == 0)
|
||||||
|
+ dfs_traversal (rpo, dep, do_reldeps);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (__glibc_unlikely (do_reldeps != NULL && map->l_reldeps != NULL))
|
||||||
|
+ {
|
||||||
|
+ /* Indicate that we encountered relocation dependencies during
|
||||||
|
+ traversal. */
|
||||||
|
+ *do_reldeps = true;
|
||||||
|
+
|
||||||
|
+ for (int m = map->l_reldeps->act - 1; m >= 0; m--)
|
||||||
|
+ {
|
||||||
|
+ struct link_map *dep = map->l_reldeps->list[m];
|
||||||
|
+ if (dep->l_visited == 0
|
||||||
|
+ && dep->l_main_map == 0)
|
||||||
|
+ dfs_traversal (rpo, dep, do_reldeps);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ *rpo -= 1;
|
||||||
|
+ **rpo = map;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* Topologically sort array MAPS according to dependencies of the contained
|
||||||
|
+ objects. */
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+_dl_sort_maps_dfs (struct link_map **maps, unsigned int nmaps,
|
||||||
|
+ unsigned int skip __attribute__ ((unused)), bool for_fini)
|
||||||
|
+{
|
||||||
|
+ for (int i = nmaps - 1; i >= 0; i--)
|
||||||
|
+ maps[i]->l_visited = 0;
|
||||||
|
+
|
||||||
|
+ /* We apply DFS traversal for each of maps[i] until the whole total order
|
||||||
|
+ is found and we're at the start of the Reverse-Postorder (RPO) sequence,
|
||||||
|
+ which is a topological sort.
|
||||||
|
+
|
||||||
|
+ We go from maps[nmaps - 1] backwards towards maps[0] at this level.
|
||||||
|
+ Due to the breadth-first search (BFS) ordering we receive, going
|
||||||
|
+ backwards usually gives a more shallow depth-first recursion depth,
|
||||||
|
+ adding more stack usage safety. Also, combined with the natural
|
||||||
|
+ processing order of l_initfini[] at each node during DFS, this maintains
|
||||||
|
+ an ordering closer to the original link ordering in the sorting results
|
||||||
|
+ under most simpler cases.
|
||||||
|
+
|
||||||
|
+ Another reason we order the top level backwards, it that maps[0] is
|
||||||
|
+ usually exactly the main object of which we're in the midst of
|
||||||
|
+ _dl_map_object_deps() processing, and maps[0]->l_initfini[] is still
|
||||||
|
+ blank. If we start the traversal from maps[0], since having no
|
||||||
|
+ dependencies yet filled in, maps[0] will always be immediately
|
||||||
|
+ incorrectly placed at the last place in the order (first in reverse).
|
||||||
|
+ Adjusting the order so that maps[0] is last traversed naturally avoids
|
||||||
|
+ this problem.
|
||||||
|
+
|
||||||
|
+ Further, the old "optimization" of skipping the main object at maps[0]
|
||||||
|
+ from the call-site (i.e. _dl_sort_maps(maps+1,nmaps-1)) is in general
|
||||||
|
+ no longer valid, since traversing along object dependency-links
|
||||||
|
+ may "find" the main object even when it is not included in the initial
|
||||||
|
+ order (e.g. a dlopen()'ed shared object can have circular dependencies
|
||||||
|
+ linked back to itself). In such a case, traversing N-1 objects will
|
||||||
|
+ create a N-object result, and raise problems.
|
||||||
|
+
|
||||||
|
+ To summarize, just passing in the full list, and iterating from back
|
||||||
|
+ to front makes things much more straightforward. */
|
||||||
|
+
|
||||||
|
+ /* Array to hold RPO sorting results, before we copy back to maps[]. */
|
||||||
|
+ struct link_map *rpo[nmaps];
|
||||||
|
+
|
||||||
|
+ /* The 'head' position during each DFS iteration. Note that we start at
|
||||||
|
+ one past the last element due to first-decrement-then-store (see the
|
||||||
|
+ bottom of above dfs_traversal() routine). */
|
||||||
|
+ struct link_map **rpo_head = &rpo[nmaps];
|
||||||
|
+
|
||||||
|
+ bool do_reldeps = false;
|
||||||
|
+ bool *do_reldeps_ref = (for_fini ? &do_reldeps : NULL);
|
||||||
|
+
|
||||||
|
+ for (int i = nmaps - 1; i >= 0; i--)
|
||||||
|
+ {
|
||||||
|
+ dfs_traversal (&rpo_head, maps[i], do_reldeps_ref);
|
||||||
|
+
|
||||||
|
+ /* We can break early if all objects are already placed. */
|
||||||
|
+ if (rpo_head == rpo)
|
||||||
|
+ goto end;
|
||||||
|
+ }
|
||||||
|
+ assert (rpo_head == rpo);
|
||||||
|
+
|
||||||
|
+ end:
|
||||||
|
+ /* Here we may do a second pass of sorting, using only l_initfini[]
|
||||||
|
+ static dependency links. This is avoided if !FOR_FINI or if we didn't
|
||||||
|
+ find any reldeps in the first DFS traversal.
|
||||||
|
+
|
||||||
|
+ The reason we do this is: while it is unspecified how circular
|
||||||
|
+ dependencies should be handled, the presumed reasonable behavior is to
|
||||||
|
+ have destructors to respect static dependency links as much as possible,
|
||||||
|
+ overriding reldeps if needed. And the first sorting pass, which takes
|
||||||
|
+ l_initfini/l_reldeps links equally, may not preserve this priority.
|
||||||
|
+
|
||||||
|
+ Hence we do a 2nd sorting pass, taking only DT_NEEDED links into account
|
||||||
|
+ (see how the do_reldeps argument to dfs_traversal() is NULL below). */
|
||||||
|
+ if (do_reldeps)
|
||||||
|
+ {
|
||||||
|
+ for (int i = nmaps - 1; i >= 0; i--)
|
||||||
|
+ rpo[i]->l_visited = 0;
|
||||||
|
+
|
||||||
|
+ struct link_map **maps_head = &maps[nmaps];
|
||||||
|
+ for (int i = nmaps - 1; i >= 0; i--)
|
||||||
|
+ {
|
||||||
|
+ dfs_traversal (&maps_head, rpo[i], NULL);
|
||||||
|
+
|
||||||
|
+ /* We can break early if all objects are already placed.
|
||||||
|
+ The below memcpy is not needed in the do_reldeps case here,
|
||||||
|
+ since we wrote back to maps[] during DFS traversal. */
|
||||||
|
+ if (maps_head == maps)
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ assert (maps_head == maps);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ memcpy (maps, rpo, sizeof (struct link_map *) * nmaps);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+_dl_sort_maps_init (void)
|
||||||
|
+{
|
||||||
|
+ int32_t algorithm = TUNABLE_GET (glibc, rtld, dynamic_sort, int32_t, NULL);
|
||||||
|
+ GLRO(dl_dso_sort_algo) = algorithm == 1 ? dso_sort_algorithm_original
|
||||||
|
+ : dso_sort_algorithm_dfs;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+_dl_sort_maps (struct link_map **maps, unsigned int nmaps,
|
||||||
|
+ unsigned int skip, bool for_fini)
|
||||||
|
+{
|
||||||
|
+ /* It can be tempting to use a static function pointer to store and call
|
||||||
|
+ the current selected sorting algorithm routine, but experimentation
|
||||||
|
+ shows that current processors still do not handle indirect branches
|
||||||
|
+ that efficiently, plus a static function pointer will involve
|
||||||
|
+ PTR_MANGLE/DEMANGLE, further impairing performance of small, common
|
||||||
|
+ input cases. A simple if-case with direct function calls appears to
|
||||||
|
+ be the fastest. */
|
||||||
|
+ if (__glibc_likely (GLRO(dl_dso_sort_algo) == dso_sort_algorithm_original))
|
||||||
|
+ _dl_sort_maps_original (maps, nmaps, skip, for_fini);
|
||||||
|
+ else
|
||||||
|
+ _dl_sort_maps_dfs (maps, nmaps, skip, for_fini);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif /* HAVE_TUNABLES. */
|
||||||
|
diff --git a/elf/dl-support.c b/elf/dl-support.c
|
||||||
|
index d8c06ba7eb4c76ea..c5ee5d33aa7e1d65 100644
|
||||||
|
--- a/elf/dl-support.c
|
||||||
|
+++ b/elf/dl-support.c
|
||||||
|
@@ -166,6 +166,8 @@ size_t _dl_phnum;
|
||||||
|
uint64_t _dl_hwcap;
|
||||||
|
uint64_t _dl_hwcap2;
|
||||||
|
|
||||||
|
+enum dso_sort_algorithm _dl_dso_sort_algo;
|
||||||
|
+
|
||||||
|
/* The value of the FPU control word the kernel will preset in hardware. */
|
||||||
|
fpu_control_t _dl_fpu_control = _FPU_DEFAULT;
|
||||||
|
|
||||||
|
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
|
||||||
|
index 2c684c2db2a1f59b..4dc366eea445e974 100644
|
||||||
|
--- a/elf/dl-sysdep.c
|
||||||
|
+++ b/elf/dl-sysdep.c
|
||||||
|
@@ -231,6 +231,9 @@ _dl_sysdep_start (void **start_argptr,
|
||||||
|
|
||||||
|
__tunables_init (_environ);
|
||||||
|
|
||||||
|
+ /* Initialize DSO sorting algorithm after tunables. */
|
||||||
|
+ _dl_sort_maps_init ();
|
||||||
|
+
|
||||||
|
#ifdef DL_SYSDEP_INIT
|
||||||
|
DL_SYSDEP_INIT;
|
||||||
|
#endif
|
||||||
|
diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
|
||||||
|
index 8ddd4a23142a941b..46ffb2378416f90f 100644
|
||||||
|
--- a/elf/dl-tunables.list
|
||||||
|
+++ b/elf/dl-tunables.list
|
||||||
|
@@ -156,4 +156,13 @@ glibc {
|
||||||
|
security_level: SXID_IGNORE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ rtld {
|
||||||
|
+ dynamic_sort {
|
||||||
|
+ type: INT_32
|
||||||
|
+ minval: 1
|
||||||
|
+ maxval: 2
|
||||||
|
+ default: 1
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
diff --git a/elf/dso-sort-tests-1.def b/elf/dso-sort-tests-1.def
|
||||||
|
index 873ddf55d91155c6..5f7f18ef270bc12d 100644
|
||||||
|
--- a/elf/dso-sort-tests-1.def
|
||||||
|
+++ b/elf/dso-sort-tests-1.def
|
||||||
|
@@ -62,5 +62,5 @@ output: b>a>{}<a<b
|
||||||
|
# The below expected outputs are what the two algorithms currently produce
|
||||||
|
# respectively, for regression testing purposes.
|
||||||
|
tst-bz15311: {+a;+e;+f;+g;+d;%d;-d;-g;-f;-e;-a};a->b->c->d;d=>[ba];c=>a;b=>e=>a;c=>f=>b;d=>g=>c
|
||||||
|
-xfail_output(glibc.rtld.dynamic_sort=1): {+a[d>c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[<a<c<d<g<f<b<e];}
|
||||||
|
+output(glibc.rtld.dynamic_sort=1): {+a[d>c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[<a<c<d<g<f<b<e];}
|
||||||
|
output(glibc.rtld.dynamic_sort=2): {+a[d>c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[<g<f<a<b<c<d<e];}
|
||||||
|
diff --git a/elf/rtld.c b/elf/rtld.c
|
||||||
|
index 6bbb373c5743cb99..84eac9a8df7125a6 100644
|
||||||
|
--- a/elf/rtld.c
|
||||||
|
+++ b/elf/rtld.c
|
||||||
|
@@ -1426,6 +1426,9 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||||
|
main_map->l_name = (char *) "";
|
||||||
|
*user_entry = main_map->l_entry;
|
||||||
|
|
||||||
|
+ /* Set bit indicating this is the main program map. */
|
||||||
|
+ main_map->l_main_map = 1;
|
||||||
|
+
|
||||||
|
#ifdef HAVE_AUX_VECTOR
|
||||||
|
/* Adjust the on-stack auxiliary vector so that it looks like the
|
||||||
|
binary was executed directly. */
|
||||||
|
diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp
|
||||||
|
index 9f66c528855fb21d..9bf572715f996ca6 100644
|
||||||
|
--- a/elf/tst-rtld-list-tunables.exp
|
||||||
|
+++ b/elf/tst-rtld-list-tunables.exp
|
||||||
|
@@ -10,5 +10,6 @@ glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
+glibc.rtld.dynamic_sort: 1 (min: 1, max: 2)
|
||||||
|
glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10)
|
||||||
|
glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+)
|
||||||
|
diff --git a/include/link.h b/include/link.h
|
||||||
|
index c46aced9f7b43ba0..4dcf01d8aea90bc2 100644
|
||||||
|
--- a/include/link.h
|
||||||
|
+++ b/include/link.h
|
||||||
|
@@ -181,6 +181,11 @@ struct link_map
|
||||||
|
unsigned int l_init_called:1; /* Nonzero if DT_INIT function called. */
|
||||||
|
unsigned int l_global:1; /* Nonzero if object in _dl_global_scope. */
|
||||||
|
unsigned int l_reserved:2; /* Reserved for internal use. */
|
||||||
|
+ unsigned int l_main_map:1; /* Nonzero for the map of the main program. */
|
||||||
|
+ unsigned int l_visited:1; /* Used internally for map dependency
|
||||||
|
+ graph traversal. */
|
||||||
|
+ unsigned int l_map_used:1; /* These two bits are used during traversal */
|
||||||
|
+ unsigned int l_map_done:1; /* of maps in _dl_close_worker. */
|
||||||
|
unsigned int l_phdr_allocated:1; /* Nonzero if the data structure pointed
|
||||||
|
to by `l_phdr' is allocated. */
|
||||||
|
unsigned int l_soname_added:1; /* Nonzero if the SONAME is for sure in
|
||||||
|
diff --git a/manual/tunables.texi b/manual/tunables.texi
|
||||||
|
index 658547c6137bf177..10f4d75993f9940f 100644
|
||||||
|
--- a/manual/tunables.texi
|
||||||
|
+++ b/manual/tunables.texi
|
||||||
|
@@ -309,6 +309,17 @@ changed once allocated at process startup. The default allocation of
|
||||||
|
optional static TLS is 512 bytes and is allocated in every thread.
|
||||||
|
@end deftp
|
||||||
|
|
||||||
|
+@deftp Tunable glibc.rtld.dynamic_sort
|
||||||
|
+Sets the algorithm to use for DSO sorting, valid values are @samp{1} and
|
||||||
|
+@samp{2}. For value of @samp{1}, an older O(n^3) algorithm is used, which is
|
||||||
|
+long time tested, but may have performance issues when dependencies between
|
||||||
|
+shared objects contain cycles due to circular dependencies. When set to the
|
||||||
|
+value of @samp{2}, a different algorithm is used, which implements a
|
||||||
|
+topological sort through depth-first search, and does not exhibit the
|
||||||
|
+performance issues of @samp{1}.
|
||||||
|
+
|
||||||
|
+The default value of this tunable is @samp{1}.
|
||||||
|
+@end deftp
|
||||||
|
|
||||||
|
@node Elision Tunables
|
||||||
|
@section Elision Tunables
|
||||||
|
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
|
||||||
|
index fcbbf6974827cdf1..bcf1f199c5985c65 100644
|
||||||
|
--- a/sysdeps/generic/ldsodefs.h
|
||||||
|
+++ b/sysdeps/generic/ldsodefs.h
|
||||||
|
@@ -245,6 +245,13 @@ enum allowmask
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
+/* DSO sort algorithm to use (check dl-sort-maps.c). */
|
||||||
|
+enum dso_sort_algorithm
|
||||||
|
+ {
|
||||||
|
+ dso_sort_algorithm_original,
|
||||||
|
+ dso_sort_algorithm_dfs
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
struct audit_ifaces
|
||||||
|
{
|
||||||
|
void (*activity) (uintptr_t *, unsigned int);
|
||||||
|
@@ -672,6 +679,8 @@ struct rtld_global_ro
|
||||||
|
platforms. */
|
||||||
|
EXTERN uint64_t _dl_hwcap2;
|
||||||
|
|
||||||
|
+ EXTERN enum dso_sort_algorithm _dl_dso_sort_algo;
|
||||||
|
+
|
||||||
|
#ifdef SHARED
|
||||||
|
/* We add a function table to _rtld_global which is then used to
|
||||||
|
call the function instead of going through the PLT. The result
|
||||||
|
@@ -1098,7 +1107,7 @@ extern void _dl_fini (void) attribute_hidden;
|
||||||
|
|
||||||
|
/* Sort array MAPS according to dependencies of the contained objects. */
|
||||||
|
extern void _dl_sort_maps (struct link_map **maps, unsigned int nmaps,
|
||||||
|
- char *used, bool for_fini) attribute_hidden;
|
||||||
|
+ unsigned int skip, bool for_fini) attribute_hidden;
|
||||||
|
|
||||||
|
/* The dynamic linker calls this function before and having changing
|
||||||
|
any shared object mappings. The `r_state' member of `struct r_debug'
|
||||||
|
@@ -1225,6 +1234,9 @@ extern struct link_map * _dl_get_dl_main_map (void)
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/* Initialize the DSO sort algorithm to use. */
|
||||||
|
+extern void _dl_sort_maps_init (void) attribute_hidden;
|
||||||
|
+
|
||||||
|
/* Initialization of libpthread for statically linked applications.
|
||||||
|
If libpthread is not linked in, this is an empty function. */
|
||||||
|
void __pthread_initialize_minimal (void) weak_function;
|
25
glibc-rh2032647-3.patch
Normal file
25
glibc-rh2032647-3.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
commit d3bf2f5927d51258a51ac7fde04f4805f8ee294a
|
||||||
|
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
Date: Wed Nov 3 09:19:30 2021 -0300
|
||||||
|
|
||||||
|
elf: Do not run DSO sorting if tunables is not enabled
|
||||||
|
|
||||||
|
Since the argorithm selection requires tunables.
|
||||||
|
|
||||||
|
Checked on x86_64-linux-gnu with --enable-tunables=no.
|
||||||
|
|
||||||
|
diff --git a/elf/Makefile b/elf/Makefile
|
||||||
|
index 8dd2b24328113536..02ee834fdaf00a26 100644
|
||||||
|
--- a/elf/Makefile
|
||||||
|
+++ b/elf/Makefile
|
||||||
|
@@ -483,8 +483,10 @@ include $(objpfx)$(1).generated-makefile
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Generate from each testcase description file
|
||||||
|
+ifeq (yes,$(have-tunables))
|
||||||
|
$(eval $(call include_dsosort_tests,dso-sort-tests-1.def))
|
||||||
|
$(eval $(call include_dsosort_tests,dso-sort-tests-2.def))
|
||||||
|
+endif
|
||||||
|
|
||||||
|
check-abi: $(objpfx)check-abi-ld.out
|
||||||
|
tests-special += $(objpfx)check-abi-ld.out
|
189
glibc-rh2032647-4.patch
Normal file
189
glibc-rh2032647-4.patch
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
commit b4bbedb1e75737a80bcc3d53d6eef1fbe0b5f4d5
|
||||||
|
Author: H.J. Lu <hjl.tools@gmail.com>
|
||||||
|
Date: Sat Nov 6 14:13:27 2021 -0700
|
||||||
|
|
||||||
|
dso-ordering-test.py: Put all sources in one directory [BZ #28550]
|
||||||
|
|
||||||
|
Put all sources for DSO sorting tests in the dso-sort-tests-src directory
|
||||||
|
and compile test relocatable objects with
|
||||||
|
|
||||||
|
$(objpfx)tst-dso-ordering1-dir/tst-dso-ordering1-a.os: $(objpfx)dso-sort-tests-src/tst-dso-ordering1-a.c
|
||||||
|
$(compile.c) $(OUTPUT_OPTION)
|
||||||
|
|
||||||
|
to avoid random $< values from $(before-compile) when compiling test
|
||||||
|
relocatable objects with
|
||||||
|
|
||||||
|
$(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c)
|
||||||
|
compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags)
|
||||||
|
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
|
||||||
|
|
||||||
|
for 3 "make -j 28" parallel builds on a machine with 112 cores at the
|
||||||
|
same time.
|
||||||
|
|
||||||
|
This partially fixes BZ #28550.
|
||||||
|
|
||||||
|
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py
|
||||||
|
index 944ee740527d60fd..bde0406be9da14fc 100644
|
||||||
|
--- a/scripts/dso-ordering-test.py
|
||||||
|
+++ b/scripts/dso-ordering-test.py
|
||||||
|
@@ -526,9 +526,13 @@ def process_testcase(t):
|
||||||
|
base_test_name = t.test_name
|
||||||
|
test_subdir = base_test_name + "-dir"
|
||||||
|
testpfx = objpfx + test_subdir + "/"
|
||||||
|
+ test_srcdir = "dso-sort-tests-src/"
|
||||||
|
+ testpfx_src = objpfx + test_srcdir
|
||||||
|
|
||||||
|
if not os.path.exists(testpfx):
|
||||||
|
os.mkdir(testpfx)
|
||||||
|
+ if not os.path.exists(testpfx_src):
|
||||||
|
+ os.mkdir(testpfx_src)
|
||||||
|
|
||||||
|
def find_objs_not_depended_on(t):
|
||||||
|
objs_not_depended_on = []
|
||||||
|
@@ -595,6 +599,11 @@ def process_testcase(t):
|
||||||
|
# Print out needed Makefile fragments for use in glibc/elf/Makefile.
|
||||||
|
module_names = ""
|
||||||
|
for o in test_descr.objs:
|
||||||
|
+ rule = ("$(objpfx)" + test_subdir + "/" + test_name
|
||||||
|
+ + "-" + o + ".os: $(objpfx)" + test_srcdir
|
||||||
|
+ + test_name + "-" + o + ".c\n"
|
||||||
|
+ "\t$(compile.c) $(OUTPUT_OPTION)\n")
|
||||||
|
+ makefile.write (rule)
|
||||||
|
module_names += " " + test_subdir + "/" + test_name + "-" + o
|
||||||
|
makefile.write("modules-names +=%s\n" % (module_names))
|
||||||
|
|
||||||
|
@@ -637,7 +646,7 @@ def process_testcase(t):
|
||||||
|
# object. This only needs to be done at most once for
|
||||||
|
# an object name.
|
||||||
|
if not dep in fake_created:
|
||||||
|
- f = open(testpfx + test_name + "-" + dep
|
||||||
|
+ f = open(testpfx_src + test_name + "-" + dep
|
||||||
|
+ ".FAKE.c", "w")
|
||||||
|
f.write(" \n")
|
||||||
|
f.close()
|
||||||
|
@@ -648,6 +657,12 @@ def process_testcase(t):
|
||||||
|
% (test_name + "-" + dep + ".FAKE.so",
|
||||||
|
("$(objpfx)" + test_subdir + "/"
|
||||||
|
+ test_name + "-" + dep + ".so")))
|
||||||
|
+ rule = ("$(objpfx)" + test_subdir + "/"
|
||||||
|
+ + test_name + "-" + dep + ".FAKE.os: "
|
||||||
|
+ "$(objpfx)" + test_srcdir
|
||||||
|
+ + test_name + "-" + dep + ".FAKE.c\n"
|
||||||
|
+ "\t$(compile.c) $(OUTPUT_OPTION)\n")
|
||||||
|
+ makefile.write (rule)
|
||||||
|
makefile.write \
|
||||||
|
("modules-names += %s\n"
|
||||||
|
% (test_subdir + "/"
|
||||||
|
@@ -687,6 +702,10 @@ def process_testcase(t):
|
||||||
|
+ test_descr.soname_map['#'] + ".so")
|
||||||
|
ldflags += (" -Wl,-soname=" + soname)
|
||||||
|
makefile.write("LDFLAGS-%s = %s\n" % (test_name, ldflags))
|
||||||
|
+ rule = ("$(objpfx)" + test_subdir + "/" + test_name + ".o: "
|
||||||
|
+ "$(objpfx)" + test_srcdir + test_name + ".c\n"
|
||||||
|
+ "\t$(compile.c) $(OUTPUT_OPTION)\n")
|
||||||
|
+ makefile.write (rule)
|
||||||
|
|
||||||
|
not_depended_objs = find_objs_not_depended_on(test_descr)
|
||||||
|
if not_depended_objs:
|
||||||
|
@@ -745,7 +764,7 @@ def process_testcase(t):
|
||||||
|
" something_failed=true\n"
|
||||||
|
"else\n"
|
||||||
|
" diff -wu ${common_objpfx}elf/%s/%s%s.output \\\n"
|
||||||
|
- " ${common_objpfx}elf/%s/%s%s.exp\n"
|
||||||
|
+ " ${common_objpfx}elf/%s%s%s.exp\n"
|
||||||
|
" if [ $? -ne 0 ]; then\n"
|
||||||
|
" echo '%sFAIL: %s%s expected output comparison'\n"
|
||||||
|
" something_failed=true\n"
|
||||||
|
@@ -753,14 +772,14 @@ def process_testcase(t):
|
||||||
|
"fi\n"
|
||||||
|
% (("X" if xfail else ""), test_name, tunable_descr,
|
||||||
|
test_subdir, test_name, tunable_sfx,
|
||||||
|
- test_subdir, base_test_name, exp_tunable_sfx,
|
||||||
|
+ test_srcdir, base_test_name, exp_tunable_sfx,
|
||||||
|
("X" if xfail else ""), test_name, tunable_descr))
|
||||||
|
|
||||||
|
# Generate C files according to dependency and calling relations from
|
||||||
|
# description string.
|
||||||
|
for obj in test_descr.objs:
|
||||||
|
src_name = test_name + "-" + obj + ".c"
|
||||||
|
- f = open(testpfx + src_name, "w")
|
||||||
|
+ f = open(testpfx_src + src_name, "w")
|
||||||
|
if obj in test_descr.callrefs:
|
||||||
|
called_objs = test_descr.callrefs[obj]
|
||||||
|
for callee in called_objs:
|
||||||
|
@@ -804,7 +823,7 @@ def process_testcase(t):
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# Open C file for writing main program
|
||||||
|
- f = open(testpfx + test_name + ".c", "w")
|
||||||
|
+ f = open(testpfx_src + test_name + ".c", "w")
|
||||||
|
|
||||||
|
# if there are some operations in main(), it means we need -ldl
|
||||||
|
f.write("#include <stdio.h>\n")
|
||||||
|
@@ -885,7 +904,7 @@ def process_testcase(t):
|
||||||
|
for obj in test_descr.objs:
|
||||||
|
src_name = test_name + "-" + obj + ".c"
|
||||||
|
obj_name = test_name + "-" + obj + ".os"
|
||||||
|
- run_cmd([build_gcc, "-c", "-fPIC", testpfx + src_name,
|
||||||
|
+ run_cmd([build_gcc, "-c", "-fPIC", testpfx_src + src_name,
|
||||||
|
"-o", testpfx + obj_name])
|
||||||
|
|
||||||
|
obj_processed = {}
|
||||||
|
@@ -903,10 +922,12 @@ def process_testcase(t):
|
||||||
|
deps.append(dep + ".FAKE")
|
||||||
|
if not dep in fake_created:
|
||||||
|
base_name = testpfx + test_name + "-" + dep
|
||||||
|
+ src_base_name = (testpfx_src + test_name
|
||||||
|
+ + "-" + dep)
|
||||||
|
cmd = [build_gcc, "-Wl,--no-as-needed",
|
||||||
|
("-Wl,-soname=" + base_name + ".so"),
|
||||||
|
"-shared", base_name + ".FAKE.c",
|
||||||
|
- "-o", base_name + ".FAKE.so"]
|
||||||
|
+ "-o", src_base_name + ".FAKE.so"]
|
||||||
|
run_cmd(cmd)
|
||||||
|
fake_created[dep] = True
|
||||||
|
dso_deps = map(lambda d: testpfx + test_name + "-" + d + ".so",
|
||||||
|
@@ -932,7 +953,7 @@ def process_testcase(t):
|
||||||
|
main_deps = map(lambda d: testpfx + test_name + "-" + d + ".so",
|
||||||
|
deps)
|
||||||
|
cmd = [build_gcc, "-Wl,--no-as-needed", "-o", testpfx + test_name,
|
||||||
|
- testpfx + test_name + ".c", "-L%s" % (os.getcwd()),
|
||||||
|
+ testpfx_src + test_name + ".c", "-L%s" % (os.getcwd()),
|
||||||
|
"-Wl,-rpath-link=%s" % (os.getcwd())]
|
||||||
|
if '#' in test_descr.soname_map:
|
||||||
|
soname = ("-Wl,-soname=" + testpfx + test_name + "-"
|
||||||
|
@@ -987,14 +1008,14 @@ def process_testcase(t):
|
||||||
|
sfx = ""
|
||||||
|
if r[0] != "":
|
||||||
|
sfx = "-" + r[0].replace("=","_")
|
||||||
|
- f = open(testpfx + t.test_name + sfx + ".exp", "w")
|
||||||
|
+ f = open(testpfx_src + t.test_name + sfx + ".exp", "w")
|
||||||
|
(output, xfail) = r[1]
|
||||||
|
f.write('%s' % output)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# Create header part of top-level testcase shell script, to wrap execution
|
||||||
|
# and output comparison together.
|
||||||
|
- t.sh = open(testpfx + t.test_name + ".sh", "w")
|
||||||
|
+ t.sh = open(testpfx_src + t.test_name + ".sh", "w")
|
||||||
|
t.sh.write("#!/bin/sh\n")
|
||||||
|
t.sh.write("# Test driver for %s, generated by "
|
||||||
|
"dso-ordering-test.py\n" % (t.test_name))
|
||||||
|
@@ -1022,12 +1043,12 @@ def process_testcase(t):
|
||||||
|
sfx = ""
|
||||||
|
if r[0] != "":
|
||||||
|
sfx = "-" + r[0].replace("=","_")
|
||||||
|
- expected_output_files += " $(objpfx)%s/%s%s.exp" % (test_subdir,
|
||||||
|
+ expected_output_files += " $(objpfx)%s%s%s.exp" % (test_srcdir,
|
||||||
|
t.test_name, sfx)
|
||||||
|
makefile.write \
|
||||||
|
- ("$(objpfx)%s.out: $(objpfx)%s/%s.sh%s "
|
||||||
|
+ ("$(objpfx)%s.out: $(objpfx)%s%s.sh%s "
|
||||||
|
"$(common-objpfx)support/test-run-command\n"
|
||||||
|
- % (t.test_name, test_subdir, t.test_name,
|
||||||
|
+ % (t.test_name, test_srcdir, t.test_name,
|
||||||
|
expected_output_files))
|
||||||
|
makefile.write("\t$(SHELL) $< $(common-objpfx) '$(test-wrapper-env)' "
|
||||||
|
"'$(run-program-env)' > $@; $(evaluate-test)\n")
|
45
glibc-rh2032647-5.patch
Normal file
45
glibc-rh2032647-5.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
commit 1f67d8286b5da9266a138198ef1f15c27cbb0010
|
||||||
|
Author: H.J. Lu <hjl.tools@gmail.com>
|
||||||
|
Date: Mon Nov 15 16:28:39 2021 -0800
|
||||||
|
|
||||||
|
elf: Use a temporary file to generate Makefile fragments [BZ #28550]
|
||||||
|
|
||||||
|
1. Use a temporary file to generate Makefile fragments for DSO sorting
|
||||||
|
tests and use -include on them.
|
||||||
|
2. Add Makefile fragments to postclean-generated so that a "make clean"
|
||||||
|
removes the autogenerated fragments and a subsequent "make" regenerates
|
||||||
|
them.
|
||||||
|
|
||||||
|
This partially fixes BZ #28550.
|
||||||
|
|
||||||
|
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
diff --git a/elf/Makefile b/elf/Makefile
|
||||||
|
index 02ee834fdaf00a26..535ba4260fb98e64 100644
|
||||||
|
--- a/elf/Makefile
|
||||||
|
+++ b/elf/Makefile
|
||||||
|
@@ -471,6 +471,7 @@ tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \
|
||||||
|
$(objpfx)tst-unused-dep-cmp.out
|
||||||
|
endif
|
||||||
|
|
||||||
|
+ifndef avoid-generated
|
||||||
|
# DSO sorting tests:
|
||||||
|
# The dso-ordering-test.py script generates testcase source files in $(objpfx),
|
||||||
|
# creating a $(objpfx)<testcase-name>-dir for each testcase, and creates a
|
||||||
|
@@ -478,9 +479,14 @@ endif
|
||||||
|
define include_dsosort_tests
|
||||||
|
$(objpfx)$(1).generated-makefile: $(1)
|
||||||
|
$(PYTHON) $(..)scripts/dso-ordering-test.py \
|
||||||
|
- --description-file $$< --objpfx $(objpfx) --output-makefile $$@
|
||||||
|
-include $(objpfx)$(1).generated-makefile
|
||||||
|
+ --description-file $$< --objpfx $(objpfx) --output-makefile $$@T
|
||||||
|
+ mv $$@T $$@
|
||||||
|
+-include $(objpfx)$(1).generated-makefile
|
||||||
|
endef
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \
|
||||||
|
+ $(objpfx)/dso-sort-tests-2.generated-makefile
|
||||||
|
|
||||||
|
# Generate from each testcase description file
|
||||||
|
ifeq (yes,$(have-tunables))
|
49
glibc-rh2032647-6.patch
Normal file
49
glibc-rh2032647-6.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
commit 0884724a95b60452ad483dbe086d237d02ba624d
|
||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Tue Dec 14 12:37:44 2021 +0100
|
||||||
|
|
||||||
|
elf: Use new dependency sorting algorithm by default
|
||||||
|
|
||||||
|
The default has to change eventually, and there are no known failures
|
||||||
|
that require a delay.
|
||||||
|
|
||||||
|
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
|
||||||
|
index 46ffb2378416f90f..ffcd7f18d4fafb91 100644
|
||||||
|
--- a/elf/dl-tunables.list
|
||||||
|
+++ b/elf/dl-tunables.list
|
||||||
|
@@ -162,7 +162,7 @@ glibc {
|
||||||
|
type: INT_32
|
||||||
|
minval: 1
|
||||||
|
maxval: 2
|
||||||
|
- default: 1
|
||||||
|
+ default: 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp
|
||||||
|
index 9bf572715f996ca6..44e4834cfb431633 100644
|
||||||
|
--- a/elf/tst-rtld-list-tunables.exp
|
||||||
|
+++ b/elf/tst-rtld-list-tunables.exp
|
||||||
|
@@ -10,6 +10,6 @@ glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+)
|
||||||
|
-glibc.rtld.dynamic_sort: 1 (min: 1, max: 2)
|
||||||
|
+glibc.rtld.dynamic_sort: 2 (min: 1, max: 2)
|
||||||
|
glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10)
|
||||||
|
glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+)
|
||||||
|
diff --git a/manual/tunables.texi b/manual/tunables.texi
|
||||||
|
index 10f4d75993f9940f..7c3b28d029410a6f 100644
|
||||||
|
--- a/manual/tunables.texi
|
||||||
|
+++ b/manual/tunables.texi
|
||||||
|
@@ -318,7 +318,7 @@ value of @samp{2}, a different algorithm is used, which implements a
|
||||||
|
topological sort through depth-first search, and does not exhibit the
|
||||||
|
performance issues of @samp{1}.
|
||||||
|
|
||||||
|
-The default value of this tunable is @samp{1}.
|
||||||
|
+The default value of this tunable is @samp{2}.
|
||||||
|
@end deftp
|
||||||
|
|
||||||
|
@node Elision Tunables
|
32
glibc-upstream-2.34-54.patch
Normal file
32
glibc-upstream-2.34-54.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
commit 7af07fe795f43e53d31be1c6f9adba7e05f87b0b
|
||||||
|
Author: Xi Ruoyao <xry111@mengyan1223.wang>
|
||||||
|
Date: Thu Aug 12 20:31:59 2021 +0000
|
||||||
|
|
||||||
|
mips: align stack in clone [BZ #28223]
|
||||||
|
|
||||||
|
The MIPS O32 ABI requires 4 byte aligned stack, and the MIPS N64 and N32
|
||||||
|
ABI require 8 byte aligned stack. Previously if the caller passed an
|
||||||
|
unaligned stack to clone the the child misbehaved.
|
||||||
|
|
||||||
|
Fixes bug 28223.
|
||||||
|
|
||||||
|
(cherry picked from commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
|
||||||
|
index 71d9dba8bd9e8f9e..43a5ad3a400d9504 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/mips/clone.S
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
|
||||||
|
@@ -55,6 +55,13 @@ NESTED(__clone,4*SZREG,sp)
|
||||||
|
.set at
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ /* Align stack to 4/8 bytes per the ABI. */
|
||||||
|
+#if _MIPS_SIM == _ABIO32
|
||||||
|
+ li t0,-4
|
||||||
|
+#else
|
||||||
|
+ li t0,-8
|
||||||
|
+#endif
|
||||||
|
+ and a1,a1,t0
|
||||||
|
|
||||||
|
/* Sanity check arguments. */
|
||||||
|
li v0,EINVAL
|
37
glibc-upstream-2.34-55.patch
Normal file
37
glibc-upstream-2.34-55.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
commit 4db172a54d43f9b7fd17e66fc44a34efb3cab1e1
|
||||||
|
Author: Xi Ruoyao <xry111@mengyan1223.wang>
|
||||||
|
Date: Fri Aug 13 16:01:14 2021 +0000
|
||||||
|
|
||||||
|
mips: increase stack alignment in clone to match the ABI
|
||||||
|
|
||||||
|
In "mips: align stack in clone [BZ #28223]"
|
||||||
|
(commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe) I made a mistake: I
|
||||||
|
misbelieved one "word" was 2-byte and "doubleword" should be 4-byte.
|
||||||
|
But in MIPS ABI one "word" is defined 32-bit (4-byte), so "doubleword" is
|
||||||
|
8-byte [1], and "quadword" is 16-byte [2].
|
||||||
|
|
||||||
|
[1]: "System V Application Binary Interface: MIPS(R) RISC Processor
|
||||||
|
Supplement, 3rd edition", page 3-31
|
||||||
|
[2]: "MIPSpro(TM) 64-Bit Porting and Transition Guide", page 23
|
||||||
|
|
||||||
|
(cherry picked from commit 0f62fe053273ff6c62ac95c59b7687c964737b00)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S
|
||||||
|
index 43a5ad3a400d9504..fd71b5ca2eb86089 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/mips/clone.S
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/mips/clone.S
|
||||||
|
@@ -55,11 +55,11 @@ NESTED(__clone,4*SZREG,sp)
|
||||||
|
.set at
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- /* Align stack to 4/8 bytes per the ABI. */
|
||||||
|
+ /* Align stack to 8/16 bytes per the ABI. */
|
||||||
|
#if _MIPS_SIM == _ABIO32
|
||||||
|
- li t0,-4
|
||||||
|
-#else
|
||||||
|
li t0,-8
|
||||||
|
+#else
|
||||||
|
+ li t0,-16
|
||||||
|
#endif
|
||||||
|
and a1,a1,t0
|
||||||
|
|
65
glibc-upstream-2.34-56.patch
Normal file
65
glibc-upstream-2.34-56.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
commit 93aabf891e96e93f100081ee07989c23d7107d17
|
||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Fri Dec 17 11:48:41 2021 +0100
|
||||||
|
|
||||||
|
arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro
|
||||||
|
|
||||||
|
Due to PIE-by-default, PIC is now defined in more cases. libc.a
|
||||||
|
does not have _rtld_global_ro, and statically linking setcontext
|
||||||
|
fails. SHARED is the right condition to use, so that libc.a
|
||||||
|
references _dl_hwcap instead of _rtld_global_ro.
|
||||||
|
|
||||||
|
For static PIE support, the !SHARED case would still have to be made
|
||||||
|
PIC. This patch does not achieve that.
|
||||||
|
|
||||||
|
Fixes commit 23645707f12f2dd9d80b51effb2d9618a7b65565
|
||||||
|
("Replace --enable-static-pie with --disable-default-pie").
|
||||||
|
|
||||||
|
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
||||||
|
Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||||
|
(cherry picked from commit ce1e5b11229f19820b86f8b19d651f16009552b0)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/arm/getcontext.S b/sysdeps/unix/sysv/linux/arm/getcontext.S
|
||||||
|
index 3aa581c4da6d1166..11bfcbe5f53afc6e 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/arm/getcontext.S
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/arm/getcontext.S
|
||||||
|
@@ -50,7 +50,7 @@ ENTRY(__getcontext)
|
||||||
|
|
||||||
|
/* Store FP regs. Much of the FP code is copied from arm/setjmp.S. */
|
||||||
|
|
||||||
|
-#ifdef PIC
|
||||||
|
+#ifdef SHARED
|
||||||
|
ldr r2, 1f
|
||||||
|
ldr r1, .Lrtld_global_ro
|
||||||
|
0: add r2, pc, r2
|
||||||
|
@@ -102,7 +102,7 @@ ENTRY(__getcontext)
|
||||||
|
|
||||||
|
END(__getcontext)
|
||||||
|
|
||||||
|
-#ifdef PIC
|
||||||
|
+#ifdef SHARED
|
||||||
|
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
|
||||||
|
.Lrtld_global_ro:
|
||||||
|
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S
|
||||||
|
index 8be8beefea13883e..4c7c6e550944138c 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/arm/setcontext.S
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/arm/setcontext.S
|
||||||
|
@@ -32,7 +32,7 @@ ENTRY(__setcontext)
|
||||||
|
add r0, r0, #UCONTEXT_REGSPACE
|
||||||
|
|
||||||
|
/* Restore the VFP registers. Copied from arm/__longjmp.S. */
|
||||||
|
-#ifdef PIC
|
||||||
|
+#ifdef SHARED
|
||||||
|
ldr r2, 1f
|
||||||
|
ldr r1, .Lrtld_global_ro
|
||||||
|
0: add r2, pc, r2
|
||||||
|
@@ -101,7 +101,7 @@ ENTRY(__startcontext)
|
||||||
|
.fnend
|
||||||
|
END(__startcontext)
|
||||||
|
|
||||||
|
-#ifdef PIC
|
||||||
|
+#ifdef SHARED
|
||||||
|
1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS
|
||||||
|
.Lrtld_global_ro:
|
||||||
|
.long C_SYMBOL_NAME(_rtld_global_ro)(GOT)
|
74
glibc-upstream-2.34-57.patch
Normal file
74
glibc-upstream-2.34-57.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
commit dc9b69d5331dcdca4547c0490cb9fefbd89e40f6
|
||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Fri Dec 17 12:01:20 2021 +0100
|
||||||
|
|
||||||
|
nss: Use "files dns" as the default for the hosts database (bug 28700)
|
||||||
|
|
||||||
|
This matches what is currently in nss/nsswitch.conf. The new ordering
|
||||||
|
matches what most distributions use in their installed configuration
|
||||||
|
files.
|
||||||
|
|
||||||
|
It is common to add localhost to /etc/hosts because the name does not
|
||||||
|
exist in the DNS, but is commonly used as a host name.
|
||||||
|
|
||||||
|
With the built-in "dns [!UNAVAIL=return] files" default, dns is
|
||||||
|
searched first and provides an answer for "localhost" (NXDOMAIN).
|
||||||
|
We never look at the files database as a result, so the contents of
|
||||||
|
/etc/hosts is ignored. This means that "getent hosts localhost"
|
||||||
|
fail without a /etc/nsswitch.conf file, even though the host name
|
||||||
|
is listed in /etc/hosts.
|
||||||
|
|
||||||
|
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
||||||
|
(cherry picked from commit b99b0f93ee8762fe53ff65802deb6f00700b9924)
|
||||||
|
|
||||||
|
diff --git a/manual/nss.texi b/manual/nss.texi
|
||||||
|
index 3aaa7786f8cf3168..524d22ad1e7f8ca0 100644
|
||||||
|
--- a/manual/nss.texi
|
||||||
|
+++ b/manual/nss.texi
|
||||||
|
@@ -324,9 +324,8 @@ missing.
|
||||||
|
|
||||||
|
@cindex default value, and NSS
|
||||||
|
For the @code{hosts} and @code{networks} databases the default value is
|
||||||
|
-@code{dns [!UNAVAIL=return] files}. I.e., the system is prepared for
|
||||||
|
-the DNS service not to be available but if it is available the answer it
|
||||||
|
-returns is definitive.
|
||||||
|
+@code{files dns}. I.e., local configuration will override the contents
|
||||||
|
+of the domain name system (DNS).
|
||||||
|
|
||||||
|
The @code{passwd}, @code{group}, and @code{shadow} databases was
|
||||||
|
traditionally handled in a special way. The appropriate files in the
|
||||||
|
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
|
||||||
|
index f1c97f7c8e9d7378..dbc87868dd408d9f 100644
|
||||||
|
--- a/nss/XXX-lookup.c
|
||||||
|
+++ b/nss/XXX-lookup.c
|
||||||
|
@@ -29,7 +29,7 @@
|
||||||
|
|* ALTERNATE_NAME - name of another service which is examined in *|
|
||||||
|
|* case DATABASE_NAME is not found *|
|
||||||
|
|* *|
|
||||||
|
-|* DEFAULT_CONFIG - string for default conf (e.g. "dns files") *|
|
||||||
|
+|* DEFAULT_CONFIG - string for default conf (e.g. "files dns") *|
|
||||||
|
|* *|
|
||||||
|
\*******************************************************************/
|
||||||
|
|
||||||
|
diff --git a/nss/nss_database.c b/nss/nss_database.c
|
||||||
|
index ab121cb371c087e9..54561f03287db2e4 100644
|
||||||
|
--- a/nss/nss_database.c
|
||||||
|
+++ b/nss/nss_database.c
|
||||||
|
@@ -80,7 +80,7 @@ enum nss_database_default
|
||||||
|
{
|
||||||
|
nss_database_default_defconfig = 0, /* "nis [NOTFOUND=return] files". */
|
||||||
|
nss_database_default_compat, /* "compat [NOTFOUND=return] files". */
|
||||||
|
- nss_database_default_dns, /* "dns [!UNAVAIL=return] files". */
|
||||||
|
+ nss_database_default_dns, /* "files dns". */
|
||||||
|
nss_database_default_files, /* "files". */
|
||||||
|
nss_database_default_nis, /* "nis". */
|
||||||
|
nss_database_default_nis_nisplus, /* "nis nisplus". */
|
||||||
|
@@ -133,7 +133,7 @@ nss_database_select_default (struct nss_database_default_cache *cache,
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case nss_database_default_dns:
|
||||||
|
- line = "dns [!UNAVAIL=return] files";
|
||||||
|
+ line = "files dns";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case nss_database_default_files:
|
35
glibc-upstream-2.34-58.patch
Normal file
35
glibc-upstream-2.34-58.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
commit 03de6917bd11c0591867607ce74ef658f76eabb9
|
||||||
|
Author: Aurelien Jarno <aurelien@aurel32.net>
|
||||||
|
Date: Wed Dec 15 23:46:19 2021 +0100
|
||||||
|
|
||||||
|
elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704]
|
||||||
|
|
||||||
|
On KVM guests running on some AMD systems, the IBRS feature is reported
|
||||||
|
as a synthetic feature using the Intel feature, while the cpuinfo entry
|
||||||
|
keeps the same. Handle that by first checking the presence of the Intel
|
||||||
|
feature on AMD systems.
|
||||||
|
|
||||||
|
Fixes bug 28704.
|
||||||
|
|
||||||
|
(cherry picked from commit 94058f6cde8b887178885954740ac6c866d25eab)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
|
||||||
|
index 2d4927f5e52dc260..830aaca2ecae971b 100644
|
||||||
|
--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
|
||||||
|
+++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
|
||||||
|
@@ -169,7 +169,14 @@ do_test (int argc, char **argv)
|
||||||
|
else if (cpu_features->basic.kind == arch_kind_amd)
|
||||||
|
{
|
||||||
|
fails += CHECK_PROC (ibpb, AMD_IBPB);
|
||||||
|
- fails += CHECK_PROC (ibrs, AMD_IBRS);
|
||||||
|
+
|
||||||
|
+ /* The IBRS feature on AMD processors is reported using the Intel feature
|
||||||
|
+ * on KVM guests (synthetic bit). In both cases the cpuinfo entry is the
|
||||||
|
+ * same. */
|
||||||
|
+ if (HAS_CPU_FEATURE (IBRS_IBPB))
|
||||||
|
+ fails += CHECK_PROC (ibrs, IBRS_IBPB);
|
||||||
|
+ else
|
||||||
|
+ fails += CHECK_PROC (ibrs, AMD_IBRS);
|
||||||
|
fails += CHECK_PROC (stibp, AMD_STIBP);
|
||||||
|
}
|
||||||
|
fails += CHECK_PROC (ibt, IBT);
|
35
glibc-upstream-2.34-59.patch
Normal file
35
glibc-upstream-2.34-59.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
commit 5daf13b1e637eec0f7a2de05b177cb0d76479aa2
|
||||||
|
Author: Matheus Castanho <msc@linux.ibm.com>
|
||||||
|
Date: Wed Dec 1 11:14:40 2021 -0300
|
||||||
|
|
||||||
|
powerpc64[le]: Allocate extra stack frame on syscall.S
|
||||||
|
|
||||||
|
The syscall function does not allocate the extra stack frame for scv like other
|
||||||
|
assembly syscalls using DO_CALL_SCV. So after commit d120fb9941 changed the
|
||||||
|
offset that is used to save LR, syscall ended up using an invalid offset,
|
||||||
|
causing regressions on powerpc64. So make sure the extra stack frame is
|
||||||
|
allocated in syscall.S as well to make it consistent with other uses of
|
||||||
|
DO_CALL_SCV and avoid similar issues in the future.
|
||||||
|
|
||||||
|
Tested on powerpc, powerpc64, and powerpc64le (with and without scv)
|
||||||
|
|
||||||
|
Reviewed-by: Raphael M Zinsly <rzinsly@linux.ibm.com>
|
||||||
|
|
||||||
|
(cherry picked from commit ae91d3df24a4a1b1f264d101a71a298bff310d14)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S
|
||||||
|
index a29652feaf6764cf..a5497c8370982fe3 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/powerpc/syscall.S
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S
|
||||||
|
@@ -27,7 +27,11 @@ ENTRY (syscall)
|
||||||
|
mr r8,r9
|
||||||
|
#if defined(USE_PPC_SCV) && !IS_IN(rtld) && (defined(__PPC64__) || defined(__powerpc64__))
|
||||||
|
CHECK_SCV_SUPPORT r9 0f
|
||||||
|
+ stdu r1,-SCV_FRAME_SIZE(r1)
|
||||||
|
+ cfi_adjust_cfa_offset(SCV_FRAME_SIZE)
|
||||||
|
DO_CALL_SCV
|
||||||
|
+ addi r1,r1,SCV_FRAME_SIZE
|
||||||
|
+ cfi_adjust_cfa_offset(-SCV_FRAME_SIZE)
|
||||||
|
RET_SCV
|
||||||
|
b 1f
|
||||||
|
#endif
|
32
glibc-upstream-2.34-60.patch
Normal file
32
glibc-upstream-2.34-60.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
commit 9de8011c328021f10588a8acb418daf5121d5f3d
|
||||||
|
Author: Aurelien Jarno <aurelien@aurel32.net>
|
||||||
|
Date: Tue Dec 14 22:44:35 2021 +0100
|
||||||
|
|
||||||
|
riscv: align stack in clone [BZ #28702]
|
||||||
|
|
||||||
|
The RISC-V ABI [1] mandates that "the stack pointer shall be aligned to
|
||||||
|
a 128-bit boundary upon procedure entry". This as not the case in clone.
|
||||||
|
|
||||||
|
This fixes the misc/tst-misalign-clone-internal and
|
||||||
|
misc/tst-misalign-clone tests.
|
||||||
|
|
||||||
|
Fixes bug 28702.
|
||||||
|
|
||||||
|
[1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc
|
||||||
|
|
||||||
|
(cherry picked from commit d2e594d71509faf36cf851a69370db34a4f5fa65)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S
|
||||||
|
index 12f91a20d3bb34f5..161e83c7e3786b8d 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/riscv/clone.S
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/riscv/clone.S
|
||||||
|
@@ -32,6 +32,9 @@
|
||||||
|
.text
|
||||||
|
LEAF (__clone)
|
||||||
|
|
||||||
|
+ /* Align stack to a 128-bit boundary as per RISC-V ABI. */
|
||||||
|
+ andi a1,a1,ALMASK
|
||||||
|
+
|
||||||
|
/* Sanity check arguments. */
|
||||||
|
beqz a0,L (invalid) /* No NULL function pointers. */
|
||||||
|
beqz a1,L (invalid) /* No NULL stack pointers. */
|
34
glibc-upstream-2.34-61.patch
Normal file
34
glibc-upstream-2.34-61.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
commit aa3a97496c82a8443039248ebee650322c9480f4
|
||||||
|
Author: Aurelien Jarno <aurelien@aurel32.net>
|
||||||
|
Date: Thu Dec 16 00:06:28 2021 +0100
|
||||||
|
|
||||||
|
riscv: align stack before calling _dl_init [BZ #28703]
|
||||||
|
|
||||||
|
Align the stack pointer to 128 bits during the call to _dl_init() as
|
||||||
|
specified by the RISC-V ABI [1]. This fixes the elf/tst-align2 test.
|
||||||
|
|
||||||
|
Fixes bug 28703.
|
||||||
|
|
||||||
|
[1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc
|
||||||
|
|
||||||
|
(cherry picked from commit 225da459cebef1037dcd78b56471edc0721e1c41)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/riscv/dl-machine.h b/sysdeps/riscv/dl-machine.h
|
||||||
|
index aedf69fcdd8aff50..951268923da26a37 100644
|
||||||
|
--- a/sysdeps/riscv/dl-machine.h
|
||||||
|
+++ b/sysdeps/riscv/dl-machine.h
|
||||||
|
@@ -127,8 +127,14 @@ elf_machine_load_address (void)
|
||||||
|
sll a3, a1, " STRINGXP (PTRLOG) "\n\
|
||||||
|
add a3, a3, a2\n\
|
||||||
|
add a3, a3, " STRINGXP (SZREG) "\n\
|
||||||
|
+ # Stash the stack pointer in s1.\n\
|
||||||
|
+ mv s1, sp\n\
|
||||||
|
+ # Align stack to 128 bits for the _dl_init call.\n\
|
||||||
|
+ andi sp, sp,-16\n\
|
||||||
|
# Call the function to run the initializers.\n\
|
||||||
|
jal _dl_init\n\
|
||||||
|
+ # Restore the stack pointer for _start.\n\
|
||||||
|
+ mv sp, s1\n\
|
||||||
|
# Pass our finalizer function to _start.\n\
|
||||||
|
lla a0, _dl_fini\n\
|
||||||
|
# Jump to the user entry point.\n\
|
21
glibc-upstream-2.34-62.patch
Normal file
21
glibc-upstream-2.34-62.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
commit 4029747c592cb2d59805b3a4e7a8963fcdcdbeb1
|
||||||
|
Author: John David Anglin <danglin@gcc.gnu.org>
|
||||||
|
Date: Mon Sep 6 17:37:29 2021 +0000
|
||||||
|
|
||||||
|
Update hppa libm-test-ulps
|
||||||
|
|
||||||
|
(cherry picked from commit d8cf84ac7e504663dfeb2bb45d8d48ae81effe05)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps
|
||||||
|
index 90e16a72692e9199..3d60fc25a14d053f 100644
|
||||||
|
--- a/sysdeps/hppa/fpu/libm-test-ulps
|
||||||
|
+++ b/sysdeps/hppa/fpu/libm-test-ulps
|
||||||
|
@@ -1104,7 +1104,7 @@ float: 8
|
||||||
|
ldouble: 1
|
||||||
|
|
||||||
|
Function: "tgamma_downward":
|
||||||
|
-double: 8
|
||||||
|
+double: 9
|
||||||
|
float: 7
|
||||||
|
|
||||||
|
Function: "tgamma_towardzero":
|
21
glibc-upstream-2.34-63.patch
Normal file
21
glibc-upstream-2.34-63.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
commit e94544c82f4ac37017589d8d83156d72388fc4af
|
||||||
|
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
Date: Wed Aug 4 21:40:32 2021 +0300
|
||||||
|
|
||||||
|
Update sparc libm-test-ulps
|
||||||
|
|
||||||
|
(cherry picked from commit c52eb066bc634a79e4194457362384abe5b43b3a)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps
|
||||||
|
index c2e4649524aa3a44..f34bbe6c592814d0 100644
|
||||||
|
--- a/sysdeps/sparc/fpu/libm-test-ulps
|
||||||
|
+++ b/sysdeps/sparc/fpu/libm-test-ulps
|
||||||
|
@@ -1346,7 +1346,7 @@ float: 8
|
||||||
|
ldouble: 4
|
||||||
|
|
||||||
|
Function: "tgamma_downward":
|
||||||
|
-double: 8
|
||||||
|
+double: 9
|
||||||
|
float: 7
|
||||||
|
ldouble: 5
|
||||||
|
|
81
glibc-upstream-2.34-64.patch
Normal file
81
glibc-upstream-2.34-64.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
commit 1d9764aba8c00754fbf8299e48afbe222245ee3e
|
||||||
|
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
Date: Wed Aug 4 21:34:12 2021 +0300
|
||||||
|
|
||||||
|
linux: Add sparck brk implementation
|
||||||
|
|
||||||
|
It turned that the generic implementation of brk() does not work
|
||||||
|
for sparc, since on failure kernel will just return the previous
|
||||||
|
input value without setting the conditional register.
|
||||||
|
|
||||||
|
This patches adds back a sparc32 and sparc64 implementation removed
|
||||||
|
by 720480934ab9107.
|
||||||
|
|
||||||
|
Checked on sparc64-linux-gnu and sparcv9-linux-gnu.
|
||||||
|
|
||||||
|
(cherry picked from commit 5b86241a032c50462988bdd1439e078384690d34)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/sparc/brk.c b/sysdeps/unix/sysv/linux/sparc/brk.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..aafe9673e3062cf8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/sparc/brk.c
|
||||||
|
@@ -0,0 +1,58 @@
|
||||||
|
+/* Change data segment. Linux SPARC version.
|
||||||
|
+ Copyright (C) 2021 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library. If not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <errno.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <sysdep.h>
|
||||||
|
+
|
||||||
|
+/* This must be initialized data because commons can't have aliases. */
|
||||||
|
+void *__curbrk = 0;
|
||||||
|
+
|
||||||
|
+#if HAVE_INTERNAL_BRK_ADDR_SYMBOL
|
||||||
|
+/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt
|
||||||
|
+ to work around different old braindamage in the old Linux ELF dynamic
|
||||||
|
+ linker. */
|
||||||
|
+weak_alias (__curbrk, ___brk_addr)
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#ifdef __arch64__
|
||||||
|
+# define SYSCALL_NUM "0x6d"
|
||||||
|
+#else
|
||||||
|
+# define SYSCALL_NUM "0x10"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
+__brk (void *addr)
|
||||||
|
+{
|
||||||
|
+ register long int g1 asm ("g1") = __NR_brk;
|
||||||
|
+ register long int o0 asm ("o0") = (long int) addr;
|
||||||
|
+ asm volatile ("ta " SYSCALL_NUM
|
||||||
|
+ : "=r"(o0)
|
||||||
|
+ : "r"(g1), "0"(o0)
|
||||||
|
+ : "cc");
|
||||||
|
+ __curbrk = (void *) o0;
|
||||||
|
+
|
||||||
|
+ if (__curbrk < addr)
|
||||||
|
+ {
|
||||||
|
+ __set_errno (ENOMEM);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+weak_alias (__brk, brk)
|
33
glibc-upstream-2.34-65.patch
Normal file
33
glibc-upstream-2.34-65.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
commit 8ad6d6d8ed33631bd2ca5d1112e6da2f92731432
|
||||||
|
Author: maminjie <maminjie2@huawei.com>
|
||||||
|
Date: Mon Dec 20 19:36:32 2021 +0800
|
||||||
|
|
||||||
|
Linux: Fix 32-bit vDSO for clock_gettime on powerpc32
|
||||||
|
|
||||||
|
When the clock_id is CLOCK_PROCESS_CPUTIME_ID or CLOCK_THREAD_CPUTIME_ID,
|
||||||
|
on the 5.10 kernel powerpc 32-bit, the 32-bit vDSO is executed successfully (
|
||||||
|
because the __kernel_clock_gettime in arch/powerpc/kernel/vdso32/gettimeofday.S
|
||||||
|
does not support these two IDs, the 32-bit time_t syscall will be used),
|
||||||
|
but tp32.tv_sec is equal to 0, causing the 64-bit time_t syscall to continue to be used,
|
||||||
|
resulting in two system calls.
|
||||||
|
|
||||||
|
Fix commit 72e84d1db22203e01a43268de71ea8669eca2863.
|
||||||
|
|
||||||
|
Signed-off-by: maminjie <maminjie2@huawei.com>
|
||||||
|
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
|
(cherry picked from commit e0fc721ce600038dd390e77cfe52440707ef574d)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
|
||||||
|
index 91df6b3d967bf945..9c7d9073254843c7 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
|
||||||
|
@@ -53,7 +53,7 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
|
||||||
|
{
|
||||||
|
struct timespec tp32;
|
||||||
|
r = INTERNAL_VSYSCALL_CALL (vdso_time, 2, clock_id, &tp32);
|
||||||
|
- if (r == 0 && tp32.tv_sec > 0)
|
||||||
|
+ if (r == 0 && tp32.tv_sec >= 0)
|
||||||
|
{
|
||||||
|
*tp = valid_timespec_to_timespec64 (tp32);
|
||||||
|
return 0;
|
37
glibc-upstream-2.34-66.patch
Normal file
37
glibc-upstream-2.34-66.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
commit 41fddc064ded5c9a36d8ffaad59a85407a22a535
|
||||||
|
Author: Andrea Monaco <andrea.monaco@autistici.org>
|
||||||
|
Date: Sun Dec 12 10:24:28 2021 +0100
|
||||||
|
|
||||||
|
intl/plural.y: Avoid conflicting declarations of yyerror and yylex
|
||||||
|
|
||||||
|
bison-3.8 includes these lines in the generated intl/plural.c:
|
||||||
|
|
||||||
|
#if !defined __gettexterror && !defined YYERROR_IS_DECLARED
|
||||||
|
void __gettexterror (struct parse_args *arg, const char *msg);
|
||||||
|
#endif
|
||||||
|
#if !defined __gettextlex && !defined YYLEX_IS_DECLARED
|
||||||
|
int __gettextlex (YYSTYPE *yylvalp, struct parse_args *arg);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Those default prototypes provided by bison conflict with the
|
||||||
|
declarations later on in plural.y. This patch solves the issue.
|
||||||
|
|
||||||
|
Reviewed-by: Arjun Shankar <arjun@redhat.com>
|
||||||
|
(cherry picked from commit c6d7d6312c21bbcfb236d48bb7c11cedb234389f)
|
||||||
|
|
||||||
|
diff --git a/intl/plural.y b/intl/plural.y
|
||||||
|
index e02e74541c4574eb..2ee128ba01b5820d 100644
|
||||||
|
--- a/intl/plural.y
|
||||||
|
+++ b/intl/plural.y
|
||||||
|
@@ -40,6 +40,11 @@
|
||||||
|
# define __gettextparse PLURAL_PARSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/* Later we provide those prototypes. Without these macros, bison may
|
||||||
|
+ generate its own prototypes with possible conflicts. */
|
||||||
|
+#define YYLEX_IS_DECLARED
|
||||||
|
+#define YYERROR_IS_DECLARED
|
||||||
|
+
|
||||||
|
%}
|
||||||
|
%parse-param {struct parse_args *arg}
|
||||||
|
%lex-param {struct parse_args *arg}
|
50
glibc-upstream-2.34-67.patch
Normal file
50
glibc-upstream-2.34-67.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
commit 217b84127b3a6590afcc7e198e6c3f665935e8f4
|
||||||
|
Author: Wilco Dijkstra <wdijkstr@arm.com>
|
||||||
|
Date: Thu Jan 6 14:36:28 2022 +0000
|
||||||
|
|
||||||
|
AArch64: Check for SVE in ifuncs [BZ #28744]
|
||||||
|
|
||||||
|
Add a check for SVE in the A64FX ifuncs for memcpy, memset and memmove.
|
||||||
|
This fixes BZ #28744.
|
||||||
|
|
||||||
|
(cherry picked from commit e5fa62b8db546f8792ec9e5c61e6419f4f8e3f4d)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/aarch64/multiarch/memcpy.c b/sysdeps/aarch64/multiarch/memcpy.c
|
||||||
|
index 25e0081eeb51727c..b6703af44b3f1a3d 100644
|
||||||
|
--- a/sysdeps/aarch64/multiarch/memcpy.c
|
||||||
|
+++ b/sysdeps/aarch64/multiarch/memcpy.c
|
||||||
|
@@ -48,7 +48,7 @@ libc_ifunc (__libc_memcpy,
|
||||||
|
|| IS_NEOVERSE_V1 (midr)
|
||||||
|
? __memcpy_simd
|
||||||
|
# if HAVE_AARCH64_SVE_ASM
|
||||||
|
- : (IS_A64FX (midr)
|
||||||
|
+ : (IS_A64FX (midr) && sve
|
||||||
|
? __memcpy_a64fx
|
||||||
|
: __memcpy_generic))))));
|
||||||
|
# else
|
||||||
|
diff --git a/sysdeps/aarch64/multiarch/memmove.c b/sysdeps/aarch64/multiarch/memmove.c
|
||||||
|
index d0adefc547f60030..d2339ff34ff7b3e5 100644
|
||||||
|
--- a/sysdeps/aarch64/multiarch/memmove.c
|
||||||
|
+++ b/sysdeps/aarch64/multiarch/memmove.c
|
||||||
|
@@ -48,7 +48,7 @@ libc_ifunc (__libc_memmove,
|
||||||
|
|| IS_NEOVERSE_V1 (midr)
|
||||||
|
? __memmove_simd
|
||||||
|
# if HAVE_AARCH64_SVE_ASM
|
||||||
|
- : (IS_A64FX (midr)
|
||||||
|
+ : (IS_A64FX (midr) && sve
|
||||||
|
? __memmove_a64fx
|
||||||
|
: __memmove_generic))))));
|
||||||
|
# else
|
||||||
|
diff --git a/sysdeps/aarch64/multiarch/memset.c b/sysdeps/aarch64/multiarch/memset.c
|
||||||
|
index d7d9bbbda095e051..3d839bc02e96380d 100644
|
||||||
|
--- a/sysdeps/aarch64/multiarch/memset.c
|
||||||
|
+++ b/sysdeps/aarch64/multiarch/memset.c
|
||||||
|
@@ -44,7 +44,7 @@ libc_ifunc (__libc_memset,
|
||||||
|
: (IS_EMAG (midr) && zva_size == 64
|
||||||
|
? __memset_emag
|
||||||
|
# if HAVE_AARCH64_SVE_ASM
|
||||||
|
- : (IS_A64FX (midr)
|
||||||
|
+ : (IS_A64FX (midr) && sve
|
||||||
|
? __memset_a64fx
|
||||||
|
: __memset_generic))));
|
||||||
|
# else
|
27
glibc-upstream-2.34-68.patch
Normal file
27
glibc-upstream-2.34-68.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
commit 515a6f53cd984d5e6e374fbee52772f967fc3c73
|
||||||
|
Author: Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
Date: Mon Sep 13 22:49:45 2021 -0700
|
||||||
|
|
||||||
|
Fix subscript error with odd TZif file [BZ #28338]
|
||||||
|
|
||||||
|
* time/tzfile.c (__tzfile_compute): Fix unlikely off-by-one bug
|
||||||
|
that accessed before start of an array when an oddball-but-valid
|
||||||
|
TZif file was queried with an unusual time_t value.
|
||||||
|
|
||||||
|
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
(cherry picked from commit 645277434a42efc547d2cac8bfede4da10b4049f)
|
||||||
|
|
||||||
|
diff --git a/time/tzfile.c b/time/tzfile.c
|
||||||
|
index 4377018a55936389..190a777152b31cee 100644
|
||||||
|
--- a/time/tzfile.c
|
||||||
|
+++ b/time/tzfile.c
|
||||||
|
@@ -765,8 +765,7 @@ __tzfile_compute (__time64_t timer, int use_localtime,
|
||||||
|
*leap_correct = leaps[i].change;
|
||||||
|
|
||||||
|
if (timer == leaps[i].transition /* Exactly at the transition time. */
|
||||||
|
- && ((i == 0 && leaps[i].change > 0)
|
||||||
|
- || leaps[i].change > leaps[i - 1].change))
|
||||||
|
+ && (leaps[i].change > (i == 0 ? 0 : leaps[i - 1].change)))
|
||||||
|
{
|
||||||
|
*leap_hit = 1;
|
||||||
|
while (i > 0
|
52
glibc-upstream-2.34-69.patch
Normal file
52
glibc-upstream-2.34-69.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
commit 85b24f9694e21f1d2f2d8b80d3bf690687723347
|
||||||
|
Author: Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
Date: Fri Dec 17 21:38:00 2021 +0100
|
||||||
|
|
||||||
|
timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707)
|
||||||
|
|
||||||
|
When using a timezone file with a truncated starting time,
|
||||||
|
generated by the zic in IANA tzcode-2021d a.k.a. tzlib-2021d
|
||||||
|
(also in tzlib-2021e; current as of this writing), glibc
|
||||||
|
asserts in __tzfile_read (on e.g. tzset() for this file) and
|
||||||
|
you may find lines matching "tzfile.c:435: __tzfile_read:
|
||||||
|
Assertion `num_types == 1' failed" in your syslog.
|
||||||
|
|
||||||
|
One example of such a file is the tzfile for Asuncion
|
||||||
|
generated by tzlib-2021e as follows, using the tzlib-2021e zic:
|
||||||
|
"zic -d DEST -r @1546300800 -L /dev/null -b slim
|
||||||
|
SOURCE/southamerica". Note that in its type 2 header, it has
|
||||||
|
two entries in its "time-types" array (types), but only one
|
||||||
|
entry in its "transition types" array (type_idxs).
|
||||||
|
|
||||||
|
This is valid and expected already in the published RFC8536, and
|
||||||
|
not even frowned upon: "Local time for timestamps before the
|
||||||
|
first transition is specified by the first time type (time type
|
||||||
|
0)" ... "every nonzero local time type index SHOULD appear at
|
||||||
|
least once in the transition type array". Note the "nonzero ...
|
||||||
|
index". Until the 2021d zic, index 0 has been shared by the
|
||||||
|
first valid transition but with 2021d it's separate, set apart
|
||||||
|
as a placeholder and only "implicitly" indexed. (A draft update
|
||||||
|
of the RFC mandates that the entry at index 0 is a placeholder
|
||||||
|
in this case, hence can no longer be shared.)
|
||||||
|
|
||||||
|
* time/tzfile.c (__tzfile_read): Don't assert when no transitions
|
||||||
|
are found.
|
||||||
|
|
||||||
|
Co-authored-by: Christopher Wong <Christopher.Wong@axis.com>
|
||||||
|
(cherry picked from commit c36f64aa6dff13b12a1e03a185e75a50fa9f6a4c)
|
||||||
|
|
||||||
|
diff --git a/time/tzfile.c b/time/tzfile.c
|
||||||
|
index 190a777152b31cee..8668392ad387af05 100644
|
||||||
|
--- a/time/tzfile.c
|
||||||
|
+++ b/time/tzfile.c
|
||||||
|
@@ -431,8 +431,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
|
||||||
|
if (__tzname[0] == NULL)
|
||||||
|
{
|
||||||
|
/* This should only happen if there are no transition rules.
|
||||||
|
- In this case there should be only one single type. */
|
||||||
|
- assert (num_types == 1);
|
||||||
|
+ In this case there's usually only one single type, unless
|
||||||
|
+ e.g. the data file has a truncated time-range. */
|
||||||
|
__tzname[0] = __tzstring (zone_names);
|
||||||
|
}
|
||||||
|
if (__tzname[1] == NULL)
|
130
glibc-upstream-2.34-70.patch
Normal file
130
glibc-upstream-2.34-70.patch
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
commit d5ba02f67dd62a63e29c29eebd6c543722aa6b5b
|
||||||
|
Author: Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
Date: Fri Dec 17 21:45:54 2021 +0100
|
||||||
|
|
||||||
|
timezone: test-case for BZ #28707
|
||||||
|
|
||||||
|
This test-case is the tzfile for Asuncion generated by
|
||||||
|
tzlib-2021e as follows, using the tzlib-2021e zic: "zic -d
|
||||||
|
DEST -r @1546300800 -L /dev/null -b slim
|
||||||
|
SOURCE/southamerica". Note that in its type 2 header, it
|
||||||
|
has two entries in its "time-types" array (types), but only
|
||||||
|
one entry in its "transition types" array (type_idxs).
|
||||||
|
|
||||||
|
* timezone/Makefile, timezone/tst-pr28707.c,
|
||||||
|
timezone/testdata/gen-XT5.sh: New test.
|
||||||
|
|
||||||
|
Co-authored-by: Christopher Wong <Christopher.Wong@axis.com>
|
||||||
|
(cherry picked from commit ebe899af0dc3215159a9c896ac6f35b72a18cb6e)
|
||||||
|
|
||||||
|
diff --git a/timezone/Makefile b/timezone/Makefile
|
||||||
|
index c624a189b322cb5f..f091663b8bbbceda 100644
|
||||||
|
--- a/timezone/Makefile
|
||||||
|
+++ b/timezone/Makefile
|
||||||
|
@@ -23,7 +23,7 @@ subdir := timezone
|
||||||
|
include ../Makeconfig
|
||||||
|
|
||||||
|
others := zdump zic
|
||||||
|
-tests := test-tz tst-timezone tst-tzset
|
||||||
|
+tests := test-tz tst-timezone tst-tzset tst-bz28707
|
||||||
|
|
||||||
|
generated-dirs += testdata
|
||||||
|
|
||||||
|
@@ -85,10 +85,12 @@ $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
|
||||||
|
America/Sao_Paulo Asia/Tokyo \
|
||||||
|
Europe/London)
|
||||||
|
$(objpfx)tst-tzset.out: $(addprefix $(testdata)/XT, 1 2 3 4)
|
||||||
|
+$(objpfx)tst-bz28707.out: $(testdata)/XT5
|
||||||
|
|
||||||
|
test-tz-ENV = TZDIR=$(testdata)
|
||||||
|
tst-timezone-ENV = TZDIR=$(testdata)
|
||||||
|
tst-tzset-ENV = TZDIR=$(testdata)
|
||||||
|
+tst-bz28707-ENV = TZDIR=$(testdata)
|
||||||
|
|
||||||
|
# Note this must come second in the deps list for $(built-program-cmd) to work.
|
||||||
|
zic-deps = $(objpfx)zic $(leapseconds) yearistype
|
||||||
|
@@ -122,6 +124,10 @@ $(testdata)/XT%: testdata/XT%
|
||||||
|
$(make-target-directory)
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
|
+$(testdata)/XT%: testdata/gen-XT%.sh
|
||||||
|
+ $(SHELL) $< > $@.tmp
|
||||||
|
+ mv $@.tmp $@
|
||||||
|
+
|
||||||
|
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
|
||||||
|
sed -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
|
||||||
|
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
|
||||||
|
diff --git a/timezone/testdata/gen-XT5.sh b/timezone/testdata/gen-XT5.sh
|
||||||
|
new file mode 100755
|
||||||
|
index 0000000000000000..3cea0569eb5a6a57
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/timezone/testdata/gen-XT5.sh
|
||||||
|
@@ -0,0 +1,16 @@
|
||||||
|
+#! /bin/sh
|
||||||
|
+
|
||||||
|
+# This test-case is the tzfile for America/Asuncion
|
||||||
|
+# generated by tzlib-2021e as follows, using the tzlib-2021e
|
||||||
|
+# zic: "zic -d DEST -r @1546300800 -L /dev/null -b slim
|
||||||
|
+# SOURCE/southamerica". Note that in its type 2 header, it
|
||||||
|
+# has two entries in its "time-types" array (types), but
|
||||||
|
+# only one entry in its "transition types" array
|
||||||
|
+# (type_idxs).
|
||||||
|
+
|
||||||
|
+printf \
|
||||||
|
+'TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'\
|
||||||
|
+'\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0TZif2\0\0\0\0\0\0\0\0'\
|
||||||
|
+'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\b\0'\
|
||||||
|
+'\0\0\0\*\255\200\1\0\0\0\0\0\0\377\377\325\320\1\4-00\0-03\0\n'\
|
||||||
|
+'<-04>4<-03>,M10.1.0/0,M3.4.0/0\n'
|
||||||
|
diff --git a/timezone/tst-bz28707.c b/timezone/tst-bz28707.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..0a9df1e9a094f1e9
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/timezone/tst-bz28707.c
|
||||||
|
@@ -0,0 +1,46 @@
|
||||||
|
+/* Copyright (C) 2021 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <time.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+
|
||||||
|
+/* Test that we can use a truncated timezone-file, where the time-type
|
||||||
|
+ at index 0 is not indexed by the transition-types array (and the
|
||||||
|
+ transition-types array does not contain at least both one DST and one
|
||||||
|
+ normal time members). */
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+do_test (void)
|
||||||
|
+{
|
||||||
|
+ if (setenv ("TZ", "XT5", 1))
|
||||||
|
+ {
|
||||||
|
+ puts ("setenv failed.");
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ tzset ();
|
||||||
|
+
|
||||||
|
+ return
|
||||||
|
+ /* Sanity-check that we got the right timezone-name for DST. For
|
||||||
|
+ normal time, we're likely to get "-00" (the "unspecified" marker),
|
||||||
|
+ even though the POSIX timezone string says "-04". Let's not test
|
||||||
|
+ that. */
|
||||||
|
+ !(strcmp (tzname[1], "-03") == 0);
|
||||||
|
+}
|
||||||
|
+#include <support/test-driver.c>
|
39
glibc-upstream-2.34-71.patch
Normal file
39
glibc-upstream-2.34-71.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
commit e64235ff4266e87b20505101877fe57350ab69ab
|
||||||
|
Author: Paul A. Clarke <pc@us.ibm.com>
|
||||||
|
Date: Tue Sep 14 13:13:33 2021 -0500
|
||||||
|
|
||||||
|
powerpc: Fix unrecognized instruction errors with recent GCC
|
||||||
|
|
||||||
|
Recent binutils commit b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a
|
||||||
|
changes the behavior of `.machine` directives to override, rather
|
||||||
|
than augment, the base CPU. This can result in _reduced_ functionality
|
||||||
|
when, for example, compiling for default machine "power8", but explicitly
|
||||||
|
asking for ".machine power5", which loses Altivec instructions.
|
||||||
|
|
||||||
|
In tst-ucontext-ppc64-vscr.c, while the instructions provoking the new
|
||||||
|
error messages are bracketed by ".machine power5", which is ostensibly
|
||||||
|
Power ISA 2.03 (POWER5), the POWER5 processor did not support the
|
||||||
|
VSX subset, so these instructions are not recognized as "power5".
|
||||||
|
|
||||||
|
Error: unrecognized opcode: `vspltisb'
|
||||||
|
Error: unrecognized opcode: `vpkuwus'
|
||||||
|
Error: unrecognized opcode: `mfvscr'
|
||||||
|
Error: unrecognized opcode: `stvx'
|
||||||
|
|
||||||
|
Manually adding the VSX subset via ".machine altivec" is sufficient.
|
||||||
|
|
||||||
|
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
|
||||||
|
(cherry picked from commit 064b475a2e5662b6b3973fabf505eade86e61510)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c b/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c
|
||||||
|
index 28c87fcef72bded6..d3fc4ab589f4752a 100644
|
||||||
|
--- a/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c
|
||||||
|
+++ b/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c
|
||||||
|
@@ -50,6 +50,7 @@ do_test (void)
|
||||||
|
/* Set SAT bit in VSCR register. */
|
||||||
|
asm volatile (".machine push;\n"
|
||||||
|
".machine \"power5\";\n"
|
||||||
|
+ ".machine altivec;\n"
|
||||||
|
"vspltisb %0,0;\n"
|
||||||
|
"vspltisb %1,-1;\n"
|
||||||
|
"vpkuwus %0,%0,%1;\n"
|
377
glibc-upstream-2.34-72.patch
Normal file
377
glibc-upstream-2.34-72.patch
Normal file
@ -0,0 +1,377 @@
|
|||||||
|
commit 73558ffe841cf4c60ccb4c71cf6dcebf84f2b736
|
||||||
|
Author: Joseph Myers <joseph@codesourcery.com>
|
||||||
|
Date: Wed Nov 10 15:21:19 2021 +0000
|
||||||
|
|
||||||
|
Update syscall lists for Linux 5.15
|
||||||
|
|
||||||
|
Linux 5.15 has one new syscall, process_mrelease (and also enables the
|
||||||
|
clone3 syscall for RV32). It also has a macro __NR_SYSCALL_MASK for
|
||||||
|
Arm, which is not a syscall but matches the pattern used for syscall
|
||||||
|
macro names.
|
||||||
|
|
||||||
|
Add __NR_SYSCALL_MASK to the names filtered out in the code dealing
|
||||||
|
with syscall lists, update syscall-names.list for the new syscall and
|
||||||
|
regenerate the arch-syscall.h headers with build-many-glibcs.py
|
||||||
|
update-syscalls.
|
||||||
|
|
||||||
|
Tested with build-many-glibcs.py.
|
||||||
|
|
||||||
|
(cherry picked from commit 3387c40a8bbad5faf85b1feb56429cb20feaa640)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h
|
||||||
|
index bedab1abbac7f6c1..74a809561a45edc4 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h
|
||||||
|
@@ -180,6 +180,7 @@
|
||||||
|
#define __NR_preadv2 286
|
||||||
|
#define __NR_prlimit64 261
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 270
|
||||||
|
#define __NR_process_vm_writev 271
|
||||||
|
#define __NR_pselect6 72
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h
|
||||||
|
index 91354ed9e29b8d15..6fc0a23504c3b53d 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h
|
||||||
|
@@ -328,6 +328,7 @@
|
||||||
|
#define __NR_preadv2 520
|
||||||
|
#define __NR_prlimit64 496
|
||||||
|
#define __NR_process_madvise 550
|
||||||
|
+#define __NR_process_mrelease 558
|
||||||
|
#define __NR_process_vm_readv 504
|
||||||
|
#define __NR_process_vm_writev 505
|
||||||
|
#define __NR_pselect6 463
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/arc/arch-syscall.h b/sysdeps/unix/sysv/linux/arc/arch-syscall.h
|
||||||
|
index ff5c7eb36db89494..0c66762bf868a992 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/arc/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/arc/arch-syscall.h
|
||||||
|
@@ -182,6 +182,7 @@
|
||||||
|
#define __NR_preadv2 286
|
||||||
|
#define __NR_prlimit64 261
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 270
|
||||||
|
#define __NR_process_vm_writev 271
|
||||||
|
#define __NR_pselect6_time64 413
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/arm/arch-syscall.h b/sysdeps/unix/sysv/linux/arm/arch-syscall.h
|
||||||
|
index 5772333ceef6ce59..c41a864c6d530eb0 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/arm/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/arm/arch-syscall.h
|
||||||
|
@@ -235,6 +235,7 @@
|
||||||
|
#define __NR_preadv2 392
|
||||||
|
#define __NR_prlimit64 369
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 376
|
||||||
|
#define __NR_process_vm_writev 377
|
||||||
|
#define __NR_pselect6 335
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/csky/arch-syscall.h b/sysdeps/unix/sysv/linux/csky/arch-syscall.h
|
||||||
|
index 4af6d6202f6df7ae..863ffa3e0cd34d3e 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/csky/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/csky/arch-syscall.h
|
||||||
|
@@ -190,6 +190,7 @@
|
||||||
|
#define __NR_preadv2 286
|
||||||
|
#define __NR_prlimit64 261
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 270
|
||||||
|
#define __NR_process_vm_writev 271
|
||||||
|
#define __NR_pselect6 72
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk b/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk
|
||||||
|
index dddfd517471e5cc9..85b017918ef20736 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk
|
||||||
|
@@ -22,7 +22,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
# Skip pseudo-system calls which describe ranges.
|
||||||
|
-/^#define __NR_(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE) / {
|
||||||
|
+/^#define __NR_(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE|SYSCALL_MASK) / {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
/^#define __NR_(|64_|[NO]32_)Linux(_syscalls)? / {
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/glibcsyscalls.py b/sysdeps/unix/sysv/linux/glibcsyscalls.py
|
||||||
|
index 621a202ed75cd725..fe7896eebe74cdf4 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/glibcsyscalls.py
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/glibcsyscalls.py
|
||||||
|
@@ -41,7 +41,7 @@ RE_PSEUDO_SYSCALL = re.compile(r"""__NR_(
|
||||||
|
(unused|reserved)[0-9]+
|
||||||
|
|
||||||
|
# Pseudo-system call which describes a range.
|
||||||
|
- |(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE)
|
||||||
|
+ |(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE|SYSCALL_MASK)
|
||||||
|
|(|64_|[NO]32_)Linux(_syscalls)?
|
||||||
|
)""", re.X)
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h
|
||||||
|
index b07fc8549de34157..6cf27cd17c1ad0c0 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h
|
||||||
|
@@ -222,6 +222,7 @@
|
||||||
|
#define __NR_preadv2 347
|
||||||
|
#define __NR_prlimit64 321
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 330
|
||||||
|
#define __NR_process_vm_writev 331
|
||||||
|
#define __NR_pselect6 273
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/i386/arch-syscall.h b/sysdeps/unix/sysv/linux/i386/arch-syscall.h
|
||||||
|
index 6e4264698b5ce480..2512508b7daa8ed2 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/i386/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/i386/arch-syscall.h
|
||||||
|
@@ -254,6 +254,7 @@
|
||||||
|
#define __NR_preadv2 378
|
||||||
|
#define __NR_prlimit64 340
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 347
|
||||||
|
#define __NR_process_vm_writev 348
|
||||||
|
#define __NR_prof 44
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h
|
||||||
|
index 1ca706d7216a3902..4a0c737369217367 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h
|
||||||
|
@@ -209,6 +209,7 @@
|
||||||
|
#define __NR_preadv2 1348
|
||||||
|
#define __NR_prlimit64 1325
|
||||||
|
#define __NR_process_madvise 1464
|
||||||
|
+#define __NR_process_mrelease 1472
|
||||||
|
#define __NR_process_vm_readv 1332
|
||||||
|
#define __NR_process_vm_writev 1333
|
||||||
|
#define __NR_pselect6 1294
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h
|
||||||
|
index 2f10f71f90d225ff..e310eb5075fb22d8 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h
|
||||||
|
@@ -243,6 +243,7 @@
|
||||||
|
#define __NR_preadv2 377
|
||||||
|
#define __NR_prlimit64 339
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 345
|
||||||
|
#define __NR_process_vm_writev 346
|
||||||
|
#define __NR_pselect6 301
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h
|
||||||
|
index 0607a4dfa6adaa23..b4ecad010c2a6abf 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h
|
||||||
|
@@ -253,6 +253,7 @@
|
||||||
|
#define __NR_preadv2 393
|
||||||
|
#define __NR_prlimit64 370
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 377
|
||||||
|
#define __NR_process_vm_writev 378
|
||||||
|
#define __NR_prof 44
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h
|
||||||
|
index 0055eec0b169ba96..7e3d138ba969c57b 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h
|
||||||
|
@@ -238,6 +238,7 @@
|
||||||
|
#define __NR_preadv2 4361
|
||||||
|
#define __NR_prlimit64 4338
|
||||||
|
#define __NR_process_madvise 4440
|
||||||
|
+#define __NR_process_mrelease 4448
|
||||||
|
#define __NR_process_vm_readv 4345
|
||||||
|
#define __NR_process_vm_writev 4346
|
||||||
|
#define __NR_prof 4044
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h
|
||||||
|
index 8e8e9f91ccfebfab..7e9e232e5256bc89 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h
|
||||||
|
@@ -221,6 +221,7 @@
|
||||||
|
#define __NR_preadv2 6325
|
||||||
|
#define __NR_prlimit64 6302
|
||||||
|
#define __NR_process_madvise 6440
|
||||||
|
+#define __NR_process_mrelease 6448
|
||||||
|
#define __NR_process_vm_readv 6309
|
||||||
|
#define __NR_process_vm_writev 6310
|
||||||
|
#define __NR_pselect6 6264
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h
|
||||||
|
index ebd1545f806564bb..f9e7ef72b0aa1749 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h
|
||||||
|
@@ -209,6 +209,7 @@
|
||||||
|
#define __NR_preadv2 5321
|
||||||
|
#define __NR_prlimit64 5297
|
||||||
|
#define __NR_process_madvise 5440
|
||||||
|
+#define __NR_process_mrelease 5448
|
||||||
|
#define __NR_process_vm_readv 5304
|
||||||
|
#define __NR_process_vm_writev 5305
|
||||||
|
#define __NR_pselect6 5260
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h
|
||||||
|
index 2b530b1f88e4c52a..afd73fc1daca1fb4 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h
|
||||||
|
@@ -189,6 +189,7 @@
|
||||||
|
#define __NR_preadv2 286
|
||||||
|
#define __NR_prlimit64 261
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 270
|
||||||
|
#define __NR_process_vm_writev 271
|
||||||
|
#define __NR_pselect6 72
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h
|
||||||
|
index a32984a9c17315ee..0ac2992028eda27e 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h
|
||||||
|
@@ -247,6 +247,7 @@
|
||||||
|
#define __NR_preadv2 380
|
||||||
|
#define __NR_prlimit64 325
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 351
|
||||||
|
#define __NR_process_vm_writev 352
|
||||||
|
#define __NR_prof 44
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h
|
||||||
|
index b01e464fb906d632..c890bc644e14fe06 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h
|
||||||
|
@@ -231,6 +231,7 @@
|
||||||
|
#define __NR_preadv2 380
|
||||||
|
#define __NR_prlimit64 325
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 351
|
||||||
|
#define __NR_process_vm_writev 352
|
||||||
|
#define __NR_prof 44
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
|
||||||
|
index 24d0a2c455caa630..cd336d755a42598a 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
#define __NR_clock_nanosleep_time64 407
|
||||||
|
#define __NR_clock_settime64 404
|
||||||
|
#define __NR_clone 220
|
||||||
|
+#define __NR_clone3 435
|
||||||
|
#define __NR_close 57
|
||||||
|
#define __NR_close_range 436
|
||||||
|
#define __NR_connect 203
|
||||||
|
@@ -171,6 +172,7 @@
|
||||||
|
#define __NR_preadv2 286
|
||||||
|
#define __NR_prlimit64 261
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 270
|
||||||
|
#define __NR_process_vm_writev 271
|
||||||
|
#define __NR_pselect6_time64 413
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
|
||||||
|
index e526c89ae7b285cc..8edd21620bb4ef64 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
|
||||||
|
@@ -179,6 +179,7 @@
|
||||||
|
#define __NR_preadv2 286
|
||||||
|
#define __NR_prlimit64 261
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 270
|
||||||
|
#define __NR_process_vm_writev 271
|
||||||
|
#define __NR_pselect6 72
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h
|
||||||
|
index d4c7b101b64c010f..1a4873f505765617 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h
|
||||||
|
@@ -240,6 +240,7 @@
|
||||||
|
#define __NR_preadv2 376
|
||||||
|
#define __NR_prlimit64 334
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 340
|
||||||
|
#define __NR_process_vm_writev 341
|
||||||
|
#define __NR_pselect6 301
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h
|
||||||
|
index bd8c78d7059a0f31..2af4607c1d36d173 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h
|
||||||
|
@@ -211,6 +211,7 @@
|
||||||
|
#define __NR_preadv2 376
|
||||||
|
#define __NR_prlimit64 334
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 340
|
||||||
|
#define __NR_process_vm_writev 341
|
||||||
|
#define __NR_pselect6 301
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/sh/arch-syscall.h b/sysdeps/unix/sysv/linux/sh/arch-syscall.h
|
||||||
|
index 3b6ac3d084d74638..7b422ce268ba14d0 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/sh/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/sh/arch-syscall.h
|
||||||
|
@@ -237,6 +237,7 @@
|
||||||
|
#define __NR_preadv2 381
|
||||||
|
#define __NR_prlimit64 339
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 365
|
||||||
|
#define __NR_process_vm_writev 366
|
||||||
|
#define __NR_pselect6 308
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h
|
||||||
|
index 35221a707e4d4a7c..77c3cc64f95ea7f3 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h
|
||||||
|
@@ -242,6 +242,7 @@
|
||||||
|
#define __NR_preadv2 358
|
||||||
|
#define __NR_prlimit64 331
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 338
|
||||||
|
#define __NR_process_vm_writev 339
|
||||||
|
#define __NR_pselect6 297
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h
|
||||||
|
index 5ba2b2050924df1c..7ad50bc4ad6cef04 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h
|
||||||
|
@@ -222,6 +222,7 @@
|
||||||
|
#define __NR_preadv2 358
|
||||||
|
#define __NR_prlimit64 331
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 338
|
||||||
|
#define __NR_process_vm_writev 339
|
||||||
|
#define __NR_pselect6 297
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
|
||||||
|
index fd98893b0e44a606..1a74d090b72f4d61 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/syscall-names.list
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/syscall-names.list
|
||||||
|
@@ -21,8 +21,8 @@
|
||||||
|
# This file can list all potential system calls. The names are only
|
||||||
|
# used if the installed kernel headers also provide them.
|
||||||
|
|
||||||
|
-# The list of system calls is current as of Linux 5.14.
|
||||||
|
-kernel 5.14
|
||||||
|
+# The list of system calls is current as of Linux 5.15.
|
||||||
|
+kernel 5.15
|
||||||
|
|
||||||
|
FAST_atomic_update
|
||||||
|
FAST_cmpxchg
|
||||||
|
@@ -440,6 +440,7 @@ preadv
|
||||||
|
preadv2
|
||||||
|
prlimit64
|
||||||
|
process_madvise
|
||||||
|
+process_mrelease
|
||||||
|
process_vm_readv
|
||||||
|
process_vm_writev
|
||||||
|
prof
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h
|
||||||
|
index 26d6ac68a651ec98..3ce2a1fcfc1c15f2 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h
|
||||||
|
@@ -215,6 +215,7 @@
|
||||||
|
#define __NR_preadv2 327
|
||||||
|
#define __NR_prlimit64 302
|
||||||
|
#define __NR_process_madvise 440
|
||||||
|
+#define __NR_process_mrelease 448
|
||||||
|
#define __NR_process_vm_readv 310
|
||||||
|
#define __NR_process_vm_writev 311
|
||||||
|
#define __NR_pselect6 270
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h
|
||||||
|
index 36847783f6b91d5e..9e87e89baccc397c 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h
|
||||||
|
@@ -208,6 +208,7 @@
|
||||||
|
#define __NR_preadv2 1073742370
|
||||||
|
#define __NR_prlimit64 1073742126
|
||||||
|
#define __NR_process_madvise 1073742264
|
||||||
|
+#define __NR_process_mrelease 1073742272
|
||||||
|
#define __NR_process_vm_readv 1073742363
|
||||||
|
#define __NR_process_vm_writev 1073742364
|
||||||
|
#define __NR_pselect6 1073742094
|
442
glibc-upstream-2.34-73.patch
Normal file
442
glibc-upstream-2.34-73.patch
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5
|
||||||
|
Author: Florian Weimer <fweimer@redhat.com>
|
||||||
|
Date: Thu Jan 13 14:59:29 2022 +0100
|
||||||
|
|
||||||
|
i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771)
|
||||||
|
|
||||||
|
The configure check for CAN_USE_REGISTER_ASM_EBP tried to compile a
|
||||||
|
simple function that uses %ebp as an inline assembly operand. If
|
||||||
|
compilation failed, CAN_USE_REGISTER_ASM_EBP was set 0, which
|
||||||
|
eventually had these consequences:
|
||||||
|
|
||||||
|
(1) %ebx was avoided as an inline assembly operand, with an
|
||||||
|
assembler macro hack to avoid unnecessary register moves.
|
||||||
|
(2) %ebp was avoided as an inline assembly operand, using an
|
||||||
|
out-of-line syscall function for 6-argument system calls.
|
||||||
|
|
||||||
|
(1) is no longer needed for any GCC version that is supported for
|
||||||
|
building glibc. %ebx can be used directly as a register operand.
|
||||||
|
Therefore, this commit removes the %ebx avoidance completely. This
|
||||||
|
avoids the assembler macro hack, which turns out to be incompatible
|
||||||
|
with the current Systemtap probe macros (which switch to .altmacro
|
||||||
|
unconditionally).
|
||||||
|
|
||||||
|
(2) is still needed in many build configurations. The existing
|
||||||
|
configure check cannot really capture that because the simple function
|
||||||
|
succeeds to compile, while the full glibc build still fails.
|
||||||
|
Therefore, this commit removes the check, the CAN_USE_REGISTER_ASM_EBP
|
||||||
|
macro, and uses the out-of-line syscall function for 6-argument system
|
||||||
|
calls unconditionally.
|
||||||
|
|
||||||
|
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
|
||||||
|
(cherry picked from commit a78e6a10d0b50d0ca80309775980fc99944b1727)
|
||||||
|
|
||||||
|
diff --git a/config.h.in b/config.h.in
|
||||||
|
index 458342887e4e9380..790038fec60eb049 100644
|
||||||
|
--- a/config.h.in
|
||||||
|
+++ b/config.h.in
|
||||||
|
@@ -286,10 +286,6 @@
|
||||||
|
/* Define if static PIE is enabled. */
|
||||||
|
#define ENABLE_STATIC_PIE 0
|
||||||
|
|
||||||
|
-/* Some compiler options may now allow to use ebp in __asm__ (used mainly
|
||||||
|
- in i386 6 argument syscall issue). */
|
||||||
|
-#define CAN_USE_REGISTER_ASM_EBP 0
|
||||||
|
-
|
||||||
|
/* The default value of x86 CET control. */
|
||||||
|
#define DEFAULT_DL_X86_CET_CONTROL cet_elf_property
|
||||||
|
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/i386/configure b/sysdeps/unix/sysv/linux/i386/configure
|
||||||
|
index 0327590486c80777..f119e62fc31903b3 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/i386/configure
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/i386/configure
|
||||||
|
@@ -1,44 +1,5 @@
|
||||||
|
# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
|
||||||
|
# Local configure fragment for sysdeps/unix/sysv/linux/i386.
|
||||||
|
|
||||||
|
-# Check if CFLAGS allows compiler to use ebp register in inline assembly.
|
||||||
|
-
|
||||||
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flags allows ebp in inline assembly" >&5
|
||||||
|
-$as_echo_n "checking if compiler flags allows ebp in inline assembly... " >&6; }
|
||||||
|
-if ${libc_cv_can_use_register_asm_ebp+:} false; then :
|
||||||
|
- $as_echo_n "(cached) " >&6
|
||||||
|
-else
|
||||||
|
-
|
||||||
|
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
-/* end confdefs.h. */
|
||||||
|
-
|
||||||
|
- void foo (int i)
|
||||||
|
- {
|
||||||
|
- register int reg asm ("ebp") = i;
|
||||||
|
- asm ("# %0" : : "r" (reg));
|
||||||
|
- }
|
||||||
|
-int
|
||||||
|
-main ()
|
||||||
|
-{
|
||||||
|
-
|
||||||
|
- ;
|
||||||
|
- return 0;
|
||||||
|
-}
|
||||||
|
-_ACEOF
|
||||||
|
-if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
- libc_cv_can_use_register_asm_ebp=yes
|
||||||
|
-else
|
||||||
|
- libc_cv_can_use_register_asm_ebp=no
|
||||||
|
-fi
|
||||||
|
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
-
|
||||||
|
-fi
|
||||||
|
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_can_use_register_asm_ebp" >&5
|
||||||
|
-$as_echo "$libc_cv_can_use_register_asm_ebp" >&6; }
|
||||||
|
-if test $libc_cv_can_use_register_asm_ebp = yes; then
|
||||||
|
- $as_echo "#define CAN_USE_REGISTER_ASM_EBP 1" >>confdefs.h
|
||||||
|
-
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
libc_cv_gcc_unwind_find_fde=yes
|
||||||
|
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/i386/configure.ac b/sysdeps/unix/sysv/linux/i386/configure.ac
|
||||||
|
index 9e980784bb826463..64ab2cc2c8f9deec 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/i386/configure.ac
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/i386/configure.ac
|
||||||
|
@@ -1,22 +1,5 @@
|
||||||
|
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
||||||
|
# Local configure fragment for sysdeps/unix/sysv/linux/i386.
|
||||||
|
|
||||||
|
-# Check if CFLAGS allows compiler to use ebp register in inline assembly.
|
||||||
|
-AC_CACHE_CHECK([if compiler flags allows ebp in inline assembly],
|
||||||
|
- libc_cv_can_use_register_asm_ebp, [
|
||||||
|
-AC_COMPILE_IFELSE(
|
||||||
|
- [AC_LANG_PROGRAM([
|
||||||
|
- void foo (int i)
|
||||||
|
- {
|
||||||
|
- register int reg asm ("ebp") = i;
|
||||||
|
- asm ("# %0" : : "r" (reg));
|
||||||
|
- }])],
|
||||||
|
- [libc_cv_can_use_register_asm_ebp=yes],
|
||||||
|
- [libc_cv_can_use_register_asm_ebp=no])
|
||||||
|
-])
|
||||||
|
-if test $libc_cv_can_use_register_asm_ebp = yes; then
|
||||||
|
- AC_DEFINE(CAN_USE_REGISTER_ASM_EBP)
|
||||||
|
-fi
|
||||||
|
-
|
||||||
|
libc_cv_gcc_unwind_find_fde=yes
|
||||||
|
ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed
|
||||||
|
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
|
||||||
|
index 8a9911b7acd9e692..39d6a3c13427abb5 100644
|
||||||
|
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
|
||||||
|
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
|
||||||
|
@@ -43,15 +43,6 @@
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-/* Since GCC 5 and above can properly spill %ebx with PIC when needed,
|
||||||
|
- we can inline syscalls with 6 arguments if GCC 5 or above is used
|
||||||
|
- to compile glibc. Disable GCC 5 optimization when compiling for
|
||||||
|
- profiling or when -fno-omit-frame-pointer is used since asm ("ebp")
|
||||||
|
- can't be used to put the 6th argument in %ebp for syscall. */
|
||||||
|
-#if !defined PROF && CAN_USE_REGISTER_ASM_EBP
|
||||||
|
-# define OPTIMIZE_FOR_GCC_5
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#ifdef __ASSEMBLER__
|
||||||
|
|
||||||
|
/* Linux uses a negative return value to indicate syscall errors,
|
||||||
|
@@ -239,36 +230,6 @@
|
||||||
|
extern int __syscall_error (int)
|
||||||
|
attribute_hidden __attribute__ ((__regparm__ (1)));
|
||||||
|
|
||||||
|
-#ifndef OPTIMIZE_FOR_GCC_5
|
||||||
|
-/* We need some help from the assembler to generate optimal code. We
|
||||||
|
- define some macros here which later will be used. */
|
||||||
|
-asm (".L__X'%ebx = 1\n\t"
|
||||||
|
- ".L__X'%ecx = 2\n\t"
|
||||||
|
- ".L__X'%edx = 2\n\t"
|
||||||
|
- ".L__X'%eax = 3\n\t"
|
||||||
|
- ".L__X'%esi = 3\n\t"
|
||||||
|
- ".L__X'%edi = 3\n\t"
|
||||||
|
- ".L__X'%ebp = 3\n\t"
|
||||||
|
- ".L__X'%esp = 3\n\t"
|
||||||
|
- ".macro bpushl name reg\n\t"
|
||||||
|
- ".if 1 - \\name\n\t"
|
||||||
|
- ".if 2 - \\name\n\t"
|
||||||
|
- "error\n\t"
|
||||||
|
- ".else\n\t"
|
||||||
|
- "xchgl \\reg, %ebx\n\t"
|
||||||
|
- ".endif\n\t"
|
||||||
|
- ".endif\n\t"
|
||||||
|
- ".endm\n\t"
|
||||||
|
- ".macro bpopl name reg\n\t"
|
||||||
|
- ".if 1 - \\name\n\t"
|
||||||
|
- ".if 2 - \\name\n\t"
|
||||||
|
- "error\n\t"
|
||||||
|
- ".else\n\t"
|
||||||
|
- "xchgl \\reg, %ebx\n\t"
|
||||||
|
- ".endif\n\t"
|
||||||
|
- ".endif\n\t"
|
||||||
|
- ".endm\n\t");
|
||||||
|
-
|
||||||
|
/* Six-argument syscalls use an out-of-line helper, because an inline
|
||||||
|
asm using all registers apart from %esp cannot work reliably and
|
||||||
|
the assembler does not support describing an asm that saves and
|
||||||
|
@@ -279,7 +240,6 @@ struct libc_do_syscall_args
|
||||||
|
{
|
||||||
|
int ebx, edi, ebp;
|
||||||
|
};
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
# define VDSO_NAME "LINUX_2.6"
|
||||||
|
# define VDSO_HASH 61765110
|
||||||
|
@@ -332,14 +292,8 @@ struct libc_do_syscall_args
|
||||||
|
|
||||||
|
/* Each object using 6-argument inline syscalls must include a
|
||||||
|
definition of __libc_do_syscall. */
|
||||||
|
-#ifdef OPTIMIZE_FOR_GCC_5
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_6(name, args...) \
|
||||||
|
- INTERNAL_SYSCALL_MAIN_INLINE(name, 6, args)
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS_6(name, args...) \
|
||||||
|
- INTERNAL_SYSCALL_MAIN_NCS(name, 6, args)
|
||||||
|
-#else /* GCC 5 */
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3, \
|
||||||
|
- arg4, arg5, arg6) \
|
||||||
|
+#define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3, \
|
||||||
|
+ arg4, arg5, arg6) \
|
||||||
|
struct libc_do_syscall_args _xv = \
|
||||||
|
{ \
|
||||||
|
(int) (arg1), \
|
||||||
|
@@ -352,8 +306,8 @@ struct libc_do_syscall_args
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \
|
||||||
|
: "memory", "cc")
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS_6(name, arg1, arg2, arg3, \
|
||||||
|
- arg4, arg5, arg6) \
|
||||||
|
+#define INTERNAL_SYSCALL_MAIN_NCS_6(name, arg1, arg2, arg3, \
|
||||||
|
+ arg4, arg5, arg6) \
|
||||||
|
struct libc_do_syscall_args _xv = \
|
||||||
|
{ \
|
||||||
|
(int) (arg1), \
|
||||||
|
@@ -366,7 +320,6 @@ struct libc_do_syscall_args
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "a" (name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \
|
||||||
|
: "memory", "cc")
|
||||||
|
-#endif /* GCC 5 */
|
||||||
|
|
||||||
|
#define INTERNAL_SYSCALL(name, nr, args...) \
|
||||||
|
({ \
|
||||||
|
@@ -380,193 +333,72 @@ struct libc_do_syscall_args
|
||||||
|
(int) resultvar; })
|
||||||
|
|
||||||
|
#if I386_USE_SYSENTER
|
||||||
|
-# ifdef OPTIMIZE_FOR_GCC_5
|
||||||
|
-# ifdef PIC
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
+# ifdef PIC
|
||||||
|
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
LOADREGS_##nr(args) \
|
||||||
|
asm volatile ( \
|
||||||
|
"call *%%gs:%P2" \
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "a" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \
|
||||||
|
ASMARGS_##nr(args) : "memory", "cc")
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
+# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
LOADREGS_##nr(args) \
|
||||||
|
asm volatile ( \
|
||||||
|
"call *%%gs:%P2" \
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "a" (name), "i" (offsetof (tcbhead_t, sysinfo)) \
|
||||||
|
ASMARGS_##nr(args) : "memory", "cc")
|
||||||
|
-# else
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
+# else /* I386_USE_SYSENTER && !PIC */
|
||||||
|
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
LOADREGS_##nr(args) \
|
||||||
|
asm volatile ( \
|
||||||
|
"call *_dl_sysinfo" \
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc")
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
+# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
LOADREGS_##nr(args) \
|
||||||
|
asm volatile ( \
|
||||||
|
"call *_dl_sysinfo" \
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "a" (name) ASMARGS_##nr(args) : "memory", "cc")
|
||||||
|
-# endif
|
||||||
|
-# else /* GCC 5 */
|
||||||
|
-# ifdef PIC
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
- EXTRAVAR_##nr \
|
||||||
|
- asm volatile ( \
|
||||||
|
- LOADARGS_##nr \
|
||||||
|
- "movl %1, %%eax\n\t" \
|
||||||
|
- "call *%%gs:%P2\n\t" \
|
||||||
|
- RESTOREARGS_##nr \
|
||||||
|
- : "=a" (resultvar) \
|
||||||
|
- : "i" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \
|
||||||
|
- ASMFMT_##nr(args) : "memory", "cc")
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
- EXTRAVAR_##nr \
|
||||||
|
- asm volatile ( \
|
||||||
|
- LOADARGS_##nr \
|
||||||
|
- "call *%%gs:%P2\n\t" \
|
||||||
|
- RESTOREARGS_##nr \
|
||||||
|
- : "=a" (resultvar) \
|
||||||
|
- : "0" (name), "i" (offsetof (tcbhead_t, sysinfo)) \
|
||||||
|
- ASMFMT_##nr(args) : "memory", "cc")
|
||||||
|
-# else
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
- EXTRAVAR_##nr \
|
||||||
|
- asm volatile ( \
|
||||||
|
- LOADARGS_##nr \
|
||||||
|
- "movl %1, %%eax\n\t" \
|
||||||
|
- "call *_dl_sysinfo\n\t" \
|
||||||
|
- RESTOREARGS_##nr \
|
||||||
|
- : "=a" (resultvar) \
|
||||||
|
- : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc")
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
- EXTRAVAR_##nr \
|
||||||
|
- asm volatile ( \
|
||||||
|
- LOADARGS_##nr \
|
||||||
|
- "call *_dl_sysinfo\n\t" \
|
||||||
|
- RESTOREARGS_##nr \
|
||||||
|
- : "=a" (resultvar) \
|
||||||
|
- : "0" (name) ASMFMT_##nr(args) : "memory", "cc")
|
||||||
|
-# endif
|
||||||
|
-# endif /* GCC 5 */
|
||||||
|
-#else
|
||||||
|
-# ifdef OPTIMIZE_FOR_GCC_5
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
+# endif /* I386_USE_SYSENTER && !PIC */
|
||||||
|
+#else /* !I386_USE_SYSENTER */
|
||||||
|
+# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
LOADREGS_##nr(args) \
|
||||||
|
asm volatile ( \
|
||||||
|
"int $0x80" \
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc")
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
+# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
LOADREGS_##nr(args) \
|
||||||
|
asm volatile ( \
|
||||||
|
"int $0x80" \
|
||||||
|
: "=a" (resultvar) \
|
||||||
|
: "a" (name) ASMARGS_##nr(args) : "memory", "cc")
|
||||||
|
-# else /* GCC 5 */
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \
|
||||||
|
- EXTRAVAR_##nr \
|
||||||
|
- asm volatile ( \
|
||||||
|
- LOADARGS_##nr \
|
||||||
|
- "movl %1, %%eax\n\t" \
|
||||||
|
- "int $0x80\n\t" \
|
||||||
|
- RESTOREARGS_##nr \
|
||||||
|
- : "=a" (resultvar) \
|
||||||
|
- : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc")
|
||||||
|
-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \
|
||||||
|
- EXTRAVAR_##nr \
|
||||||
|
- asm volatile ( \
|
||||||
|
- LOADARGS_##nr \
|
||||||
|
- "int $0x80\n\t" \
|
||||||
|
- RESTOREARGS_##nr \
|
||||||
|
- : "=a" (resultvar) \
|
||||||
|
- : "0" (name) ASMFMT_##nr(args) : "memory", "cc")
|
||||||
|
-# endif /* GCC 5 */
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-#define LOADARGS_0
|
||||||
|
-#ifdef __PIC__
|
||||||
|
-# if I386_USE_SYSENTER && defined PIC
|
||||||
|
-# define LOADARGS_1 \
|
||||||
|
- "bpushl .L__X'%k3, %k3\n\t"
|
||||||
|
-# define LOADARGS_5 \
|
||||||
|
- "movl %%ebx, %4\n\t" \
|
||||||
|
- "movl %3, %%ebx\n\t"
|
||||||
|
-# else
|
||||||
|
-# define LOADARGS_1 \
|
||||||
|
- "bpushl .L__X'%k2, %k2\n\t"
|
||||||
|
-# define LOADARGS_5 \
|
||||||
|
- "movl %%ebx, %3\n\t" \
|
||||||
|
- "movl %2, %%ebx\n\t"
|
||||||
|
-# endif
|
||||||
|
-# define LOADARGS_2 LOADARGS_1
|
||||||
|
-# define LOADARGS_3 \
|
||||||
|
- "xchgl %%ebx, %%edi\n\t"
|
||||||
|
-# define LOADARGS_4 LOADARGS_3
|
||||||
|
-#else
|
||||||
|
-# define LOADARGS_1
|
||||||
|
-# define LOADARGS_2
|
||||||
|
-# define LOADARGS_3
|
||||||
|
-# define LOADARGS_4
|
||||||
|
-# define LOADARGS_5
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-#define RESTOREARGS_0
|
||||||
|
-#ifdef __PIC__
|
||||||
|
-# if I386_USE_SYSENTER && defined PIC
|
||||||
|
-# define RESTOREARGS_1 \
|
||||||
|
- "bpopl .L__X'%k3, %k3\n\t"
|
||||||
|
-# define RESTOREARGS_5 \
|
||||||
|
- "movl %4, %%ebx"
|
||||||
|
-# else
|
||||||
|
-# define RESTOREARGS_1 \
|
||||||
|
- "bpopl .L__X'%k2, %k2\n\t"
|
||||||
|
-# define RESTOREARGS_5 \
|
||||||
|
- "movl %3, %%ebx"
|
||||||
|
-# endif
|
||||||
|
-# define RESTOREARGS_2 RESTOREARGS_1
|
||||||
|
-# define RESTOREARGS_3 \
|
||||||
|
- "xchgl %%edi, %%ebx\n\t"
|
||||||
|
-# define RESTOREARGS_4 RESTOREARGS_3
|
||||||
|
-#else
|
||||||
|
-# define RESTOREARGS_1
|
||||||
|
-# define RESTOREARGS_2
|
||||||
|
-# define RESTOREARGS_3
|
||||||
|
-# define RESTOREARGS_4
|
||||||
|
-# define RESTOREARGS_5
|
||||||
|
-#endif
|
||||||
|
+#endif /* !I386_USE_SYSENTER */
|
||||||
|
|
||||||
|
-#ifdef OPTIMIZE_FOR_GCC_5
|
||||||
|
-# define LOADREGS_0()
|
||||||
|
-# define ASMARGS_0()
|
||||||
|
-# define LOADREGS_1(arg1) \
|
||||||
|
+#define LOADREGS_0()
|
||||||
|
+#define ASMARGS_0()
|
||||||
|
+#define LOADREGS_1(arg1) \
|
||||||
|
LOADREGS_0 ()
|
||||||
|
-# define ASMARGS_1(arg1) \
|
||||||
|
+#define ASMARGS_1(arg1) \
|
||||||
|
ASMARGS_0 (), "b" ((unsigned int) (arg1))
|
||||||
|
-# define LOADREGS_2(arg1, arg2) \
|
||||||
|
+#define LOADREGS_2(arg1, arg2) \
|
||||||
|
LOADREGS_1 (arg1)
|
||||||
|
-# define ASMARGS_2(arg1, arg2) \
|
||||||
|
+#define ASMARGS_2(arg1, arg2) \
|
||||||
|
ASMARGS_1 (arg1), "c" ((unsigned int) (arg2))
|
||||||
|
-# define LOADREGS_3(arg1, arg2, arg3) \
|
||||||
|
+#define LOADREGS_3(arg1, arg2, arg3) \
|
||||||
|
LOADREGS_2 (arg1, arg2)
|
||||||
|
-# define ASMARGS_3(arg1, arg2, arg3) \
|
||||||
|
+#define ASMARGS_3(arg1, arg2, arg3) \
|
||||||
|
ASMARGS_2 (arg1, arg2), "d" ((unsigned int) (arg3))
|
||||||
|
-# define LOADREGS_4(arg1, arg2, arg3, arg4) \
|
||||||
|
+#define LOADREGS_4(arg1, arg2, arg3, arg4) \
|
||||||
|
LOADREGS_3 (arg1, arg2, arg3)
|
||||||
|
-# define ASMARGS_4(arg1, arg2, arg3, arg4) \
|
||||||
|
+#define ASMARGS_4(arg1, arg2, arg3, arg4) \
|
||||||
|
ASMARGS_3 (arg1, arg2, arg3), "S" ((unsigned int) (arg4))
|
||||||
|
-# define LOADREGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||||
|
+#define LOADREGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||||
|
LOADREGS_4 (arg1, arg2, arg3, arg4)
|
||||||
|
-# define ASMARGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||||
|
+#define ASMARGS_5(arg1, arg2, arg3, arg4, arg5) \
|
||||||
|
ASMARGS_4 (arg1, arg2, arg3, arg4), "D" ((unsigned int) (arg5))
|
||||||
|
-# define LOADREGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||||
|
- register unsigned int _a6 asm ("ebp") = (unsigned int) (arg6); \
|
||||||
|
- LOADREGS_5 (arg1, arg2, arg3, arg4, arg5)
|
||||||
|
-# define ASMARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||||
|
- ASMARGS_5 (arg1, arg2, arg3, arg4, arg5), "r" (_a6)
|
||||||
|
-#endif /* GCC 5 */
|
||||||
|
|
||||||
|
#define ASMFMT_0()
|
||||||
|
#ifdef __PIC__
|
55
glibc.spec
55
glibc.spec
@ -148,7 +148,7 @@ end \
|
|||||||
Summary: The GNU libc libraries
|
Summary: The GNU libc libraries
|
||||||
Name: glibc
|
Name: glibc
|
||||||
Version: %{glibcversion}
|
Version: %{glibcversion}
|
||||||
Release: 16%{?dist}
|
Release: 18%{?dist}
|
||||||
|
|
||||||
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
|
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
|
||||||
# libraries.
|
# libraries.
|
||||||
@ -287,6 +287,32 @@ Patch87: glibc-upstream-2.34-51.patch
|
|||||||
Patch88: glibc-upstream-2.34-52.patch
|
Patch88: glibc-upstream-2.34-52.patch
|
||||||
Patch89: glibc-upstream-2.34-53.patch
|
Patch89: glibc-upstream-2.34-53.patch
|
||||||
Patch90: glibc-rh1988382.patch
|
Patch90: glibc-rh1988382.patch
|
||||||
|
Patch91: glibc-upstream-2.34-54.patch
|
||||||
|
Patch92: glibc-upstream-2.34-55.patch
|
||||||
|
Patch93: glibc-upstream-2.34-56.patch
|
||||||
|
Patch94: glibc-upstream-2.34-57.patch
|
||||||
|
Patch95: glibc-upstream-2.34-58.patch
|
||||||
|
Patch96: glibc-upstream-2.34-59.patch
|
||||||
|
Patch97: glibc-upstream-2.34-60.patch
|
||||||
|
Patch98: glibc-upstream-2.34-61.patch
|
||||||
|
Patch99: glibc-upstream-2.34-62.patch
|
||||||
|
Patch100: glibc-upstream-2.34-63.patch
|
||||||
|
Patch101: glibc-upstream-2.34-64.patch
|
||||||
|
Patch102: glibc-upstream-2.34-65.patch
|
||||||
|
Patch103: glibc-upstream-2.34-66.patch
|
||||||
|
Patch104: glibc-upstream-2.34-67.patch
|
||||||
|
Patch105: glibc-upstream-2.34-68.patch
|
||||||
|
Patch106: glibc-upstream-2.34-69.patch
|
||||||
|
Patch107: glibc-upstream-2.34-70.patch
|
||||||
|
Patch108: glibc-upstream-2.34-71.patch
|
||||||
|
Patch109: glibc-upstream-2.34-72.patch
|
||||||
|
Patch110: glibc-upstream-2.34-73.patch
|
||||||
|
Patch111: glibc-rh2032647-1.patch
|
||||||
|
Patch112: glibc-rh2032647-2.patch
|
||||||
|
Patch113: glibc-rh2032647-3.patch
|
||||||
|
Patch114: glibc-rh2032647-4.patch
|
||||||
|
Patch115: glibc-rh2032647-5.patch
|
||||||
|
Patch116: glibc-rh2032647-6.patch
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Continued list of core "glibc" package information:
|
# Continued list of core "glibc" package information:
|
||||||
@ -2315,6 +2341,33 @@ fi
|
|||||||
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
|
%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-18
|
||||||
|
- Backport optimized ELF dependency sorting algorithm (#2032647)
|
||||||
|
|
||||||
|
* Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-17
|
||||||
|
- Sync with upstream branch release/2.34/master,
|
||||||
|
commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5
|
||||||
|
- i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771)
|
||||||
|
- Update syscall lists for Linux 5.15
|
||||||
|
- powerpc: Fix unrecognized instruction errors with recent GCC
|
||||||
|
- timezone: test-case for BZ #28707
|
||||||
|
- timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707)
|
||||||
|
- Fix subscript error with odd TZif file [BZ #28338]
|
||||||
|
- AArch64: Check for SVE in ifuncs [BZ #28744]
|
||||||
|
- intl/plural.y: Avoid conflicting declarations of yyerror and yylex
|
||||||
|
- Linux: Fix 32-bit vDSO for clock_gettime on powerpc32
|
||||||
|
- linux: Add sparck brk implementation
|
||||||
|
- Update sparc libm-test-ulps
|
||||||
|
- Update hppa libm-test-ulps
|
||||||
|
- riscv: align stack before calling _dl_init [BZ #28703]
|
||||||
|
- riscv: align stack in clone [BZ #28702]
|
||||||
|
- powerpc64[le]: Allocate extra stack frame on syscall.S
|
||||||
|
- elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704]
|
||||||
|
- nss: Use "files dns" as the default for the hosts database (bug 28700)
|
||||||
|
- arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro
|
||||||
|
- mips: increase stack alignment in clone to match the ABI
|
||||||
|
- mips: align stack in clone [BZ #28223]
|
||||||
|
|
||||||
* Tue Dec 14 2021 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.34-16
|
* Tue Dec 14 2021 Siddhesh Poyarekar <siddhesh@redhat.com> - 2.34-16
|
||||||
- Enable PIE by default on all architectures (#1988382)
|
- Enable PIE by default on all architectures (#1988382)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user