From 26f82ad953d596b72322b0516ef426c1e597537548b73eb5b4a3b46a001f06fc Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 27 Mar 2014 08:44:54 +0000 Subject: [PATCH 01/14] Accepting request 227699 from home:Andreas_Schwab:Factory - check-pf-alloca.patch: remove use of alloca while collecting interface addresses OBS-URL: https://build.opensuse.org/request/show/227699 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=345 --- check-pf-alloca.patch | 206 ++++++++++++++++++++++++++-------------- glibc-testsuite.changes | 6 ++ glibc-utils.changes | 6 ++ glibc.changes | 6 ++ 4 files changed, 151 insertions(+), 73 deletions(-) diff --git a/check-pf-alloca.patch b/check-pf-alloca.patch index 8e4e82b..83709a6 100644 --- a/check-pf-alloca.patch +++ b/check-pf-alloca.patch @@ -9,95 +9,155 @@ Index: glibc-2.19/sysdeps/unix/sysv/linux/check_pf.c =================================================================== --- glibc-2.19.orig/sysdeps/unix/sysv/linux/check_pf.c +++ glibc-2.19/sysdeps/unix/sysv/linux/check_pf.c -@@ -139,9 +139,10 @@ make_request (int fd, pid_t pid) - #endif - bool use_malloc = false; - char *buf; -+ size_t alloca_used = 0; - - if (__libc_use_alloca (buf_size)) -- buf = alloca (buf_size); -+ buf = alloca_account (buf_size, alloca_used); - else - { - buf = malloc (buf_size); -@@ -163,6 +164,7 @@ make_request (int fd, pid_t pid) +@@ -106,6 +106,11 @@ cache_valid_p (void) + static struct cached_data * + make_request (int fd, pid_t pid) + { ++ struct cached_data *result = NULL; ++ ++ size_t result_len = 0; ++ size_t result_cap = 32; ++ + struct req { - struct in6addrinfo info; - struct in6ailist *next; -+ bool use_malloc; - } *in6ailist = NULL; - size_t in6ailistlen = 0; + struct nlmsghdr nlh; +@@ -137,19 +142,9 @@ make_request (int fd, pid_t pid) + #else + const size_t buf_size = __getpagesize (); + #endif +- bool use_malloc = false; + char *buf; + +- if (__libc_use_alloca (buf_size)) +- buf = alloca (buf_size); +- else +- { +- buf = malloc (buf_size); +- if (buf != NULL) +- use_malloc = true; +- else +- goto out_fail; +- } ++ buf = alloca (buf_size); + + struct iovec iov = { buf, buf_size }; + +@@ -159,12 +154,7 @@ make_request (int fd, pid_t pid) + goto out_fail; + + bool done = false; +- struct in6ailist +- { +- struct in6addrinfo info; +- struct in6ailist *next; +- } *in6ailist = NULL; +- size_t in6ailistlen = 0; ++ bool seen_ipv4 = false; -@@ -180,10 +182,10 @@ make_request (int fd, pid_t pid) + bool seen_ipv6 = false; - ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0)); - if (read_len < 0) -- goto out_fail; -+ goto out_fail2; - - if (msg.msg_flags & MSG_TRUNC) -- goto out_fail; -+ goto out_fail2; - - struct nlmsghdr *nlmh; - for (nlmh = (struct nlmsghdr *) buf; -@@ -239,7 +241,19 @@ make_request (int fd, pid_t pid) +@@ -239,28 +229,36 @@ make_request (int fd, pid_t pid) } } - struct in6ailist *newp = alloca (sizeof (*newp)); -+ struct in6ailist *newp; -+ if (__libc_use_alloca (alloca_used + sizeof (*newp))) +- newp->info.flags = (((ifam->ifa_flags +- & (IFA_F_DEPRECATED +- | IFA_F_OPTIMISTIC)) +- ? in6ai_deprecated : 0) +- | ((ifam->ifa_flags +- & IFA_F_HOMEADDRESS) +- ? in6ai_homeaddress : 0)); +- newp->info.prefixlen = ifam->ifa_prefixlen; +- newp->info.index = ifam->ifa_index; ++ if (result_len == 0 || result_len == result_cap) + { -+ newp = alloca_account (sizeof (*newp), alloca_used); -+ newp->use_malloc = false; ++ result_cap = 2 * result_cap; ++ result = realloc (result, sizeof (*result) ++ + result_cap * sizeof (struct in6addrinfo)); + } -+ else -+ { -+ newp = malloc (sizeof (*newp)); -+ if (newp == NULL) -+ goto out_fail2; -+ newp->use_malloc = true; -+ } - newp->info.flags = (((ifam->ifa_flags - & (IFA_F_DEPRECATED - | IFA_F_OPTIMISTIC)) -@@ -275,7 +289,7 @@ make_request (int fd, pid_t pid) - result = malloc (sizeof (*result) - + in6ailistlen * sizeof (struct in6addrinfo)); - if (result == NULL) -- goto out_fail; -+ goto out_fail2; ++ ++ if (!result) ++ goto out_fail; ++ ++ struct in6addrinfo *info = &result->in6ai[result_len++]; ++ ++ info->flags = (((ifam->ifa_flags ++ & (IFA_F_DEPRECATED ++ | IFA_F_OPTIMISTIC)) ++ ? in6ai_deprecated : 0) ++ | ((ifam->ifa_flags ++ & IFA_F_HOMEADDRESS) ++ ? in6ai_homeaddress : 0)); ++ info->prefixlen = ifam->ifa_prefixlen; ++ info->index = ifam->ifa_index; + if (ifam->ifa_family == AF_INET) + { +- newp->info.addr[0] = 0; +- newp->info.addr[1] = 0; +- newp->info.addr[2] = htonl (0xffff); +- newp->info.addr[3] = *(const in_addr_t *) address; ++ info->addr[0] = 0; ++ info->addr[1] = 0; ++ info->addr[2] = htonl (0xffff); ++ info->addr[3] = *(const in_addr_t *) address; + } + else +- memcpy (newp->info.addr, address, sizeof (newp->info.addr)); +- newp->next = in6ailist; +- in6ailist = newp; +- ++in6ailistlen; ++ memcpy (info->addr, address, sizeof (info->addr)); + } + else if (nlmh->nlmsg_type == NLMSG_DONE) + /* We found the end, leave the loop. */ +@@ -269,42 +267,29 @@ make_request (int fd, pid_t pid) + } + while (! done); +- struct cached_data *result; +- if (seen_ipv6 && in6ailist != NULL) ++ if (seen_ipv6 && result != NULL) + { +- result = malloc (sizeof (*result) +- + in6ailistlen * sizeof (struct in6addrinfo)); +- if (result == NULL) +- goto out_fail; +- result->timestamp = get_nl_timestamp (); result->usecnt = 2; -@@ -286,7 +300,10 @@ make_request (int fd, pid_t pid) - do - { - result->in6ai[--in6ailistlen] = in6ailist->info; + result->seen_ipv4 = seen_ipv4; + result->seen_ipv6 = true; +- result->in6ailen = in6ailistlen; +- +- do +- { +- result->in6ai[--in6ailistlen] = in6ailist->info; - in6ailist = in6ailist->next; -+ struct in6ailist *next = in6ailist->next; -+ if (in6ailist->use_malloc) -+ free (in6ailist); -+ in6ailist = next; - } - while (in6ailist != NULL); +- } +- while (in6ailist != NULL); ++ result->in6ailen = result_len; } -@@ -302,7 +319,15 @@ make_request (int fd, pid_t pid) - free (buf); + else + { ++ free (result); ++ + atomic_add (&noai6ai_cached.usecnt, 2); + noai6ai_cached.seen_ipv4 = seen_ipv4; + noai6ai_cached.seen_ipv6 = seen_ipv6; + result = &noai6ai_cached; + } + +- if (use_malloc) +- free (buf); return result; -out_fail: -+ out_fail2: -+ while (in6ailist != NULL) -+ { -+ struct in6ailist *next = in6ailist->next; -+ if (in6ailist->use_malloc) -+ free (in6ailist); -+ in6ailist = next; -+ } +- if (use_malloc) +- free (buf); + out_fail: - if (use_malloc) - free (buf); ++ ++ free (result); return NULL; + } + diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 8fa09da..a395a37 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 27 08:40:20 UTC 2014 - schwab@suse.de + +- check-pf-alloca.patch: remove use of alloca while collecting interface + addresses + ------------------------------------------------------------------- Tue Mar 25 09:26:44 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.changes b/glibc-utils.changes index 8fa09da..a395a37 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 27 08:40:20 UTC 2014 - schwab@suse.de + +- check-pf-alloca.patch: remove use of alloca while collecting interface + addresses + ------------------------------------------------------------------- Tue Mar 25 09:26:44 UTC 2014 - schwab@suse.de diff --git a/glibc.changes b/glibc.changes index 8fa09da..a395a37 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 27 08:40:20 UTC 2014 - schwab@suse.de + +- check-pf-alloca.patch: remove use of alloca while collecting interface + addresses + ------------------------------------------------------------------- Tue Mar 25 09:26:44 UTC 2014 - schwab@suse.de From 8f0c4de31f46af5fde222379cd6e375a4821356a5de5f41ee60ed8f74802e8b4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 29 Mar 2014 22:02:34 +0000 Subject: [PATCH 02/14] Accepting request 228198 from home:Andreas_Schwab:Factory - powerpc-opt-power8.patch: remove broken POWER8 implementation of isnan, isinf, finite; fix missing static symbols - glibc-2.14-crypt.diff: update for file renaming OBS-URL: https://build.opensuse.org/request/show/228198 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=346 --- glibc-2.14-crypt.diff | 142 ++++++------ glibc-testsuite.changes | 7 + glibc-utils.changes | 7 + glibc.changes | 7 + powerpc-opt-power8.patch | 467 +++++++++------------------------------ 5 files changed, 193 insertions(+), 437 deletions(-) diff --git a/glibc-2.14-crypt.diff b/glibc-2.14-crypt.diff index 64cb5a3..ee1d657 100644 --- a/glibc-2.14-crypt.diff +++ b/glibc-2.14-crypt.diff @@ -1,7 +1,7 @@ -Index: glibc-2.18.90/Versions.def +Index: glibc-2.19/Versions.def =================================================================== ---- glibc-2.18.90.orig/Versions.def -+++ glibc-2.18.90/Versions.def +--- glibc-2.19.orig/Versions.def ++++ glibc-2.19/Versions.def @@ -45,6 +45,9 @@ libc { libcrypt { GLIBC_2.0 @@ -12,10 +12,10 @@ Index: glibc-2.18.90/Versions.def libdl { GLIBC_2.0 GLIBC_2.1 -Index: glibc-2.18.90/crypt/Makefile +Index: glibc-2.19/crypt/Makefile =================================================================== ---- glibc-2.18.90.orig/crypt/Makefile -+++ glibc-2.18.90/crypt/Makefile +--- glibc-2.19.orig/crypt/Makefile ++++ glibc-2.19/crypt/Makefile @@ -21,14 +21,18 @@ subdir := crypt @@ -37,10 +37,10 @@ Index: glibc-2.18.90/crypt/Makefile include ../Makeconfig -Index: glibc-2.18.90/crypt/Versions +Index: glibc-2.19/crypt/Versions =================================================================== ---- glibc-2.18.90.orig/crypt/Versions -+++ glibc-2.18.90/crypt/Versions +--- glibc-2.19.orig/crypt/Versions ++++ glibc-2.19/crypt/Versions @@ -3,3 +3,8 @@ libcrypt { crypt; crypt_r; encrypt; encrypt_r; fcrypt; setkey; setkey_r; } @@ -50,10 +50,10 @@ Index: glibc-2.18.90/crypt/Versions + crypt_gensalt; crypt_gensalt_rn; crypt_gensalt_ra; + } +} -Index: glibc-2.18.90/crypt/crypt-entry.c +Index: glibc-2.19/crypt/crypt-entry.c =================================================================== ---- glibc-2.18.90.orig/crypt/crypt-entry.c -+++ glibc-2.18.90/crypt/crypt-entry.c +--- glibc-2.19.orig/crypt/crypt-entry.c ++++ glibc-2.19/crypt/crypt-entry.c @@ -81,7 +81,7 @@ extern struct crypt_data _ufc_foobar; */ @@ -76,140 +76,130 @@ Index: glibc-2.18.90/crypt/crypt-entry.c } #endif +#endif -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/aarch64/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/alpha/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/alpha/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/alpha/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/alpha/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/arm/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/arm/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/arm/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/arm/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/ia64/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/ia64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/ia64/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/ia64/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/m68k/m680x0/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/mips/mips32/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libowcrypt.abilist +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/nptl/libowcrypt.abilist ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libowcrypt.abilist +Index: glibc-2.19/shlib-versions =================================================================== ---- /dev/null -+++ glibc-2.18.90/ports/sysdeps/unix/sysv/linux/tile/tilepro/nptl/libowcrypt.abilist -@@ -0,0 +1,5 @@ -+OW_CRYPT_1.0 -+ OW_CRYPT_1.0 A -+ crypt_gensalt F -+ crypt_gensalt_ra F -+ crypt_gensalt_rn F -Index: glibc-2.18.90/shlib-versions -=================================================================== ---- glibc-2.18.90.orig/shlib-versions -+++ glibc-2.18.90/shlib-versions +--- glibc-2.19.orig/shlib-versions ++++ glibc-2.19/shlib-versions @@ -93,6 +93,7 @@ sh.*-.*-linux.* ld=ld-linux.so.2 GLIBC_ # This defines the shared library version numbers we will install. @@ -218,110 +208,120 @@ Index: glibc-2.18.90/shlib-versions # The gross patch for programs assuming broken locale implementations. sh.*-.*-.* libBrokenLocale=1 GLIBC_2.2 -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/i386/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/i386/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/i386/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/i386/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt-le.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt-le.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt-le.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt-le.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/sh/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/sh/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/s390/s390-64/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/sh/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/sh/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/sparc/sparc32/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/x86_64/64/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/x86_64/64/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/sparc/sparc64/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A + crypt_gensalt F + crypt_gensalt_ra F + crypt_gensalt_rn F -Index: glibc-2.18.90/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libowcrypt.abilist +Index: glibc-2.19/sysdeps/unix/sysv/linux/x86_64/64/nptl/libowcrypt.abilist =================================================================== --- /dev/null -+++ glibc-2.18.90/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libowcrypt.abilist ++++ glibc-2.19/sysdeps/unix/sysv/linux/x86_64/64/nptl/libowcrypt.abilist +@@ -0,0 +1,5 @@ ++OW_CRYPT_1.0 ++ OW_CRYPT_1.0 A ++ crypt_gensalt F ++ crypt_gensalt_ra F ++ crypt_gensalt_rn F +Index: glibc-2.19/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libowcrypt.abilist +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/unix/sysv/linux/x86_64/x32/nptl/libowcrypt.abilist @@ -0,0 +1,5 @@ +OW_CRYPT_1.0 + OW_CRYPT_1.0 A diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index a395a37..c2059fe 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: remove broken POWER8 implementation of isnan, + isinf, finite; fix missing static symbols +- glibc-2.14-crypt.diff: update for file renaming + ------------------------------------------------------------------- Thu Mar 27 08:40:20 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.changes b/glibc-utils.changes index a395a37..c2059fe 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: remove broken POWER8 implementation of isnan, + isinf, finite; fix missing static symbols +- glibc-2.14-crypt.diff: update for file renaming + ------------------------------------------------------------------- Thu Mar 27 08:40:20 UTC 2014 - schwab@suse.de diff --git a/glibc.changes b/glibc.changes index a395a37..c2059fe 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: remove broken POWER8 implementation of isnan, + isinf, finite; fix missing static symbols +- glibc-2.14-crypt.diff: update for file renaming + ------------------------------------------------------------------- Thu Mar 27 08:40:20 UTC 2014 - schwab@suse.de diff --git a/powerpc-opt-power8.patch b/powerpc-opt-power8.patch index 24aa7f5..449f72f 100644 --- a/powerpc-opt-power8.patch +++ b/powerpc-opt-power8.patch @@ -31,6 +31,25 @@ * sysdeps/powerpc/powerpc64/power7/strcspn.S: New file: optimited strcspn for POWER7. +2014-03-12 Adhemerval Zanella + + [BZ #16689] + * sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S + (__bzero_ppc): Call memset@local instead of __memset_ppc@local for + static build. + * sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c: Build IFUNC + selector for static builds. + + * sysdeps/powerpc/powerpc64/multiarch/strspn.c (strspn): Build IFUNC + selector for static builds. + +2014-03-11 Adhemerval Zanella + + [BZ #16683] + * sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S (__bzero_ppc): + Define it for static builds as well. + (NO_BZERO_IMPL): Likewise. + 2014-03-11 Vidya Ranganathan * sysdeps/powerpc/powerpc64/power7/strspn.S: New file: Optimization. @@ -238,6 +257,42 @@ Index: glibc-2.19/string/strspn.c { const char *p; const char *a; +Index: glibc-2.19/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S +=================================================================== +--- glibc-2.19.orig/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S ++++ glibc-2.19/sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S +@@ -19,8 +19,17 @@ + + #include + ++/* memset ifunc selector is not built for static and memset@local ++ for shared builds makes the linker point the call to the ifunc ++ selector. */ ++#ifdef SHARED ++# define MEMSET __memset_ppc ++#else ++# define MEMSET memset ++#endif ++ + ENTRY (__bzero_ppc) + mr r5,r4 + li r4,0 +- b __memset_ppc@local ++ b MEMSET@local + END (__bzero_ppc) +Index: glibc-2.19/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c +=================================================================== +--- glibc-2.19.orig/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c ++++ glibc-2.19/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c +@@ -17,7 +17,7 @@ + . */ + + /* Define multiple versions only for definition in libc. */ +-#if defined SHARED && !defined NOT_IN_libc ++#ifndef NOT_IN_libc + # include + # include + # include "init-arch.h" Index: glibc-2.19/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h @@ -254,80 +309,26 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile -@@ -4,7 +4,8 @@ sysdep_routines += s_isnan-power7 s_isna - s_copysign-ppc64 s_finite-power7 s_finite-ppc64 \ - s_finitef-ppc64 s_isinff-ppc64 s_isinf-power7 \ - s_isinf-ppc64 s_modf-power5+ s_modf-ppc64 \ -- s_modff-power5+ s_modff-ppc64 -+ s_modff-power5+ s_modff-ppc64 s_isnan-power8 \ -+ s_isinf-power8 s_finite-power8 - - libm-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \ - s_isnan-power5 s_isnan-ppc64 s_llround-power6x \ -@@ -21,7 +22,9 @@ libm-sysdep_routines += s_isnan-power7 s +@@ -21,7 +21,8 @@ libm-sysdep_routines += s_isnan-power7 s s_logbl-power7 s_logb-ppc64 s_logbf-ppc64 \ s_logbl-ppc64 s_modf-power5+ s_modf-ppc64 \ s_modff-power5+ s_modff-ppc64 e_hypot-ppc64 \ - e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 + e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 \ -+ s_isnan-power8 s_isinf-power8 s_finite-power8 \ + s_llrint-power8 s_llround-power8 CFLAGS-s_logbf-power7.c = -mcpu=power7 CFLAGS-s_logbl-power7.c = -mcpu=power7 -Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S -@@ -0,0 +1,33 @@ -+/* isnan(). PowerPC64/POWER7 version. -+ Copyright (C) 2014 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 -+ . */ -+ -+#include -+#include -+ -+#undef hidden_def -+#define hidden_def(name) -+#undef weak_alias -+#define weak_alias(name, alias) -+#undef strong_alias -+#define strong_alias(name, alias) -+#undef compat_symbol -+#define compat_symbol(lib, name, symbol, ver) -+ -+#define __finite __finite_power8 -+ -+#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c -@@ -23,10 +23,13 @@ - - extern __typeof (__finite) __finite_ppc64 attribute_hidden; +@@ -25,8 +25,8 @@ extern __typeof (__finite) __finite_ppc6 extern __typeof (__finite) __finite_power7 attribute_hidden; -+extern __typeof (__finite) __finite_power8 attribute_hidden; libc_ifunc (__finite, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 -+ (hwcap2 & PPC_FEATURE2_ARCH_2_07) -+ ? __finite_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 : __finite_ppc64); @@ -337,75 +338,27 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c -@@ -23,10 +23,13 @@ - extern __typeof (__finitef) __finitef_ppc64 attribute_hidden; - /* The double-precision version also works for single-precision. */ +@@ -25,8 +25,8 @@ extern __typeof (__finitef) __finitef_pp extern __typeof (__finitef) __finite_power7 attribute_hidden; -+extern __typeof (__finitef) __finite_power8 attribute_hidden; libc_ifunc (__finitef, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 -+ (hwcap2 & PPC_FEATURE2_ARCH_2_07) -+ ? __finite_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 : __finitef_ppc64); weak_alias (__finitef, finitef) -Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S -@@ -0,0 +1,33 @@ -+/* isinf(). PowerPC64/POWER8 version. -+ Copyright (C) 2014 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 -+ . */ -+ -+#include -+#include -+ -+#undef hidden_def -+#define hidden_def(name) -+#undef weak_alias -+#define weak_alias(name, alias) -+#undef strong_alias -+#define strong_alias(name, alias) -+#undef compat_symbol -+#define compat_symbol(lib, name, alias, ver) -+ -+#define __isinf __isinf_power8 -+ -+#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c -@@ -23,10 +23,13 @@ - - extern __typeof (__isinf) __isinf_ppc64 attribute_hidden; +@@ -25,8 +25,8 @@ extern __typeof (__isinf) __isinf_ppc64 extern __typeof (__isinf) __isinf_power7 attribute_hidden; -+extern __typeof (__isinf) __isinf_power8 attribute_hidden; libc_ifunc (__isinf, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 -+ (hwcap2 & PPC_FEATURE2_ARCH_2_07) -+ ? __isinf_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 : __isinf_ppc64); @@ -415,76 +368,28 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c -@@ -24,10 +24,13 @@ - extern __typeof (__isinff) __isinff_ppc64 attribute_hidden; - /* The double-precision version also works for single-precision. */ +@@ -26,8 +26,8 @@ extern __typeof (__isinff) __isinff_ppc6 extern __typeof (__isinff) __isinf_power7 attribute_hidden; -+extern __typeof (__isinff) __isinf_power8 attribute_hidden; libc_ifunc (__isinff, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 -+ (hwcap2 & PPC_FEATURE2_ARCH_2_07) -+ ? __isinf_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 : __isinff_ppc64); weak_alias (__isinff, isinff) -Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S -@@ -0,0 +1,33 @@ -+/* isnan(). PowerPC64/POWER7 version. -+ Copyright (C) 2014 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 -+ . */ -+ -+#include -+#include -+ -+#undef hidden_def -+#define hidden_def(name) -+#undef weak_alias -+#define weak_alias(name, alias) -+#undef strong_alias -+#define strong_alias(name, alias) -+#undef compat_symbol -+#define compat_symbol(lib, name, symbol, ver) -+ -+#define __isnan __isnan_power8 -+ -+#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c -@@ -26,16 +26,19 @@ extern __typeof (__isnan) __isnan_power5 - extern __typeof (__isnan) __isnan_power6 attribute_hidden; - extern __typeof (__isnan) __isnan_power6x attribute_hidden; +@@ -28,14 +28,14 @@ extern __typeof (__isnan) __isnan_power6 extern __typeof (__isnan) __isnan_power7 attribute_hidden; -+extern __typeof (__isnan) __isnan_power8 attribute_hidden; libc_ifunc (__isnan, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isnan_power7 : - (hwcap & PPC_FEATURE_POWER6_EXT) -+ (hwcap2 & PPC_FEATURE2_ARCH_2_07) -+ ? __isnan_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 : + (hwcap & PPC_FEATURE_POWER6_EXT) @@ -504,11 +409,8 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c -@@ -25,16 +25,19 @@ extern __typeof (__isnanf) __isnan_power - extern __typeof (__isnanf) __isnan_power6 attribute_hidden; - extern __typeof (__isnanf) __isnan_power6x attribute_hidden; +@@ -27,14 +27,14 @@ extern __typeof (__isnanf) __isnan_power extern __typeof (__isnanf) __isnan_power7 attribute_hidden; -+extern __typeof (__isnanf) __isnan_power8 attribute_hidden; libc_ifunc (__isnanf, - (hwcap & PPC_FEATURE_ARCH_2_06) @@ -519,8 +421,6 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c - ? __isnan_power6 : - (hwcap & PPC_FEATURE_POWER5) - ? __isnan_power5 -+ (hwcap2 & PPC_FEATURE2_ARCH_2_07) -+ ? __isnan_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 : + (hwcap & PPC_FEATURE_POWER6_EXT) @@ -714,6 +614,44 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c + return i; } +Index: glibc-2.19/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S +=================================================================== +--- glibc-2.19.orig/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S ++++ glibc-2.19/sysdeps/powerpc/powerpc64/multiarch/memset-ppc64.S +@@ -18,10 +18,9 @@ + + #include + +-#if defined SHARED && !defined NOT_IN_libc +- + /* Copied from bzero.S to prevent the linker from inserting a stub +- between bzero and memset. */ ++ between bzero and memset. NOTE: this code should be positioned ++ before ENTRY/END_GEN_TB redefinition. */ + ENTRY (__bzero_ppc) + CALL_MCOUNT 3 + mr r5,r4 +@@ -29,6 +28,8 @@ ENTRY (__bzero_ppc) + b L(_memset) + END_GEN_TB (__bzero_ppc,TB_TOCLESS) + ++ ++#if defined SHARED && !defined NOT_IN_libc + # undef EALIGN + # define EALIGN(name, alignt, words) \ + .section ".text"; \ +@@ -48,9 +49,9 @@ END_GEN_TB (__bzero_ppc,TB_TOCLESS) + # undef libc_hidden_builtin_def + # define libc_hidden_builtin_def(name) \ + .globl __GI_memset; __GI_memset = __memset_ppc ++#endif + + /* Do not implement __bzero at powerpc64/memset.S. */ +-# define NO_BZERO_IMPL +-#endif ++#define NO_BZERO_IMPL + + #include Index: glibc-2.19/sysdeps/powerpc/powerpc64/multiarch/strcspn-power7.S =================================================================== --- /dev/null @@ -1291,7 +1229,7 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/multiarch/strspn.c + License along with the GNU C Library; if not, see + . */ + -+#if defined SHARED && !defined NOT_IN_libc ++#ifndef NOT_IN_libc +# include +# include +# include "init-arch.h" @@ -2258,209 +2196,6 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power7/strspn.S + blr /* done */ +END(strspn) +libc_hidden_builtin_def (strspn) -Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S -@@ -0,0 +1,56 @@ -+/* isfinite(). PowerPC64/POWER8 version. -+ Copyright (C) 2014 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 -+ . */ -+ -+#include -+#include -+ -+#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ -+ -+/* int [r3] __finite ([fp1] x) */ -+ -+EALIGN (__finite, 4, 0) -+ CALL_MCOUNT 0 -+ MFVSRD_R3_V1 -+ lis r9,0x8010 -+ clrldi r3,r3,1 /* r3 = r3 & 0x8000000000000000 */ -+ rldicr r9,r9,32,31 /* r9 = (r9 << 32) & 0xffffffff */ -+ add r3,r3,r9 -+ rldicl r3,r3,1,63 -+ blr -+END (__finite) -+ -+hidden_def (__finite) -+weak_alias (__finite, finite) -+ -+/* It turns out that the 'double' version will also always work for -+ single-precision. */ -+strong_alias (__finite, __finitef) -+hidden_def (__finitef) -+weak_alias (__finitef, finitef) -+ -+#ifdef IS_IN_libm -+# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0) -+compat_symbol (libm, __finite, __finitel, GLIBC_2_0) -+compat_symbol (libm, finite, finitel, GLIBC_2_0) -+# endif -+#else -+# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) -+compat_symbol (libc, __finite, __finitel, GLIBC_2_0); -+compat_symbol (libc, finite, finitel, GLIBC_2_0); -+# endif -+#endif -Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finitef.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finitef.S -@@ -0,0 +1 @@ -+/* This function uses the same code as s_finite.S. */ -Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S -@@ -0,0 +1,61 @@ -+/* isinf(). PowerPC64/POWER8 version. -+ Copyright (C) 2014 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 -+ . */ -+ -+#include -+#include -+ -+#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ -+ -+/* int [r3] __isinf([fp1] x) */ -+ -+EALIGN (__isinf, 4, 0) -+ CALL_MCOUNT 0 -+ MFVSRD_R3_V1 -+ lis r9,0x7ff0 /* r9 = 0x7ff0 */ -+ rldicl r10,r3,0,1 /* r10 = r3 & (0x8000000000000000) */ -+ sldi r9,r9,32 /* r9 = r9 << 52 */ -+ cmpd cr7,r10,r9 /* fp1 & 0x7ff0000000000000 ? */ -+ beq cr7,L(inf) -+ li r3,0 /* Not inf */ -+ blr -+L(inf): -+ sradi r3,r3,63 /* r3 = r3 >> 63 */ -+ ori r3,r3,1 /* r3 = r3 | 0x1 */ -+ blr -+END (__isinf) -+ -+hidden_def (__isinf) -+weak_alias (__isinf, isinf) -+ -+/* It turns out that the 'double' version will also always work for -+ single-precision. */ -+strong_alias (__isinf, __isinff) -+hidden_def (__isinff) -+weak_alias (__isinff, isinff) -+ -+#ifdef NO_LONG_DOUBLE -+strong_alias (__isinf, __isinfl) -+weak_alias (__isinf, isinfl) -+#endif -+ -+#ifndef IS_IN_libm -+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) -+compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0); -+compat_symbol (libc, isinf, isinfl, GLIBC_2_0); -+# endif -+#endif -Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S -@@ -0,0 +1 @@ -+/* This function uses the same code as s_isinf.S. */ -Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S -@@ -0,0 +1,53 @@ -+/* isnan(). PowerPC64/POWER8 version. -+ Copyright (C) 2014 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 -+ . */ -+ -+#include -+#include -+ -+#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ -+ -+/* int [r3] __isnan([f1] x) */ -+ -+EALIGN (__isnan, 4, 0) -+ CALL_MCOUNT 0 -+ MFVSRD_R3_V1 -+ lis r9,0x7ff0 -+ clrldi r3,r3,1 /* r3 = r3 & 0x8000000000000000 */ -+ rldicr r9,r9,32,31 /* r9 = (r9 << 32) & 0xffffffff */ -+ subf r3,r3,r9 -+ rldicl r3,r3,1,63 -+ blr -+END (__isnan) -+ -+/* It turns out that the 'double' version will also always work for -+ single-precision. */ -+strong_alias (__isnan, __isnanf) -+hidden_def (__isnanf) -+weak_alias (__isnanf, isnanf) -+ -+#ifdef NO_LONG_DOUBLE -+strong_alias (__isnan, __isnanl) -+weak_alias (__isnan, isnanl) -+#endif -+ -+#ifndef IS_IN_libm -+# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) -+compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0); -+compat_symbol (libc, isnan, isnanl, GLIBC_2_0); -+# endif -+#endif -Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnanf.S -=================================================================== ---- /dev/null -+++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnanf.S -@@ -0,0 +1 @@ -+/* This function uses the same code as s_isnan.S. */ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S =================================================================== --- /dev/null From 352e35f7011bff29da2544c30667bafe5db51dd6c446f16ee4fa41906becf193 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 31 Mar 2014 15:44:49 +0000 Subject: [PATCH 03/14] Accepting request 228349 from home:Andreas_Schwab:Factory - powerpc-opt-power8.patch: readd POWER8 implementation of isnan, isinf, finite with fix for little endian - pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when doing elision (bnc#865968) OBS-URL: https://build.opensuse.org/request/show/228349 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=347 --- glibc-testsuite.changes | 8 + glibc-testsuite.spec | 3 + glibc-utils.changes | 8 + glibc-utils.spec | 3 + glibc.changes | 8 + glibc.spec | 3 + powerpc-opt-power8.patch | 414 +++++++++++++++++++++++++++++++++++- pthread-mutex-destroy.patch | 61 ++++++ 8 files changed, 499 insertions(+), 9 deletions(-) create mode 100644 pthread-mutex-destroy.patch diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index c2059fe..8ce95dc 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: readd POWER8 implementation of isnan, + isinf, finite with fix for little endian +- pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when + doing elision (bnc#865968) + ------------------------------------------------------------------- Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de diff --git a/glibc-testsuite.spec b/glibc-testsuite.spec index b2ffa52..e4bdad0 100644 --- a/glibc-testsuite.spec +++ b/glibc-testsuite.spec @@ -256,6 +256,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch +# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision +Patch2004: pthread-mutex-destroy.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -468,6 +470,7 @@ rm nscd/s-stamp %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 +%patch2004 -p1 %patch3000 diff --git a/glibc-utils.changes b/glibc-utils.changes index c2059fe..8ce95dc 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: readd POWER8 implementation of isnan, + isinf, finite with fix for little endian +- pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when + doing elision (bnc#865968) + ------------------------------------------------------------------- Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.spec b/glibc-utils.spec index 9b364d1..ef4f6d7 100644 --- a/glibc-utils.spec +++ b/glibc-utils.spec @@ -255,6 +255,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch +# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision +Patch2004: pthread-mutex-destroy.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -468,6 +470,7 @@ rm nscd/s-stamp %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 +%patch2004 -p1 %patch3000 diff --git a/glibc.changes b/glibc.changes index c2059fe..8ce95dc 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de + +- powerpc-opt-power8.patch: readd POWER8 implementation of isnan, + isinf, finite with fix for little endian +- pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when + doing elision (bnc#865968) + ------------------------------------------------------------------- Sat Mar 29 16:41:25 UTC 2014 - schwab@suse.de diff --git a/glibc.spec b/glibc.spec index ae76ee6..2359870 100644 --- a/glibc.spec +++ b/glibc.spec @@ -256,6 +256,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch +# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision +Patch2004: pthread-mutex-destroy.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -468,6 +470,7 @@ rm nscd/s-stamp %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 +%patch2004 -p1 %patch3000 diff --git a/powerpc-opt-power8.patch b/powerpc-opt-power8.patch index 449f72f..e429a18 100644 --- a/powerpc-opt-power8.patch +++ b/powerpc-opt-power8.patch @@ -1,3 +1,16 @@ +2014-03-31 Adhemerval Zanella + + * sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S (MFVSRD_R3_V1): + Encode instruction correctly in little endian. + * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S (MFVSRD_R3_V1): + Likewise. + * sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S (MFVSRD_R3_V1): + Likewise. + * sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S (MFVSRD_R3_V1): + Likewise. + * sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S (MFVSRD_R3_V1): + Likewise. + 2014-03-20 Adhemerval Zanella Vidya Ranganathan @@ -309,26 +322,80 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile -@@ -21,7 +21,8 @@ libm-sysdep_routines += s_isnan-power7 s +@@ -4,7 +4,8 @@ sysdep_routines += s_isnan-power7 s_isna + s_copysign-ppc64 s_finite-power7 s_finite-ppc64 \ + s_finitef-ppc64 s_isinff-ppc64 s_isinf-power7 \ + s_isinf-ppc64 s_modf-power5+ s_modf-ppc64 \ +- s_modff-power5+ s_modff-ppc64 ++ s_modff-power5+ s_modff-ppc64 s_isnan-power8 \ ++ s_isinf-power8 s_finite-power8 + + libm-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \ + s_isnan-power5 s_isnan-ppc64 s_llround-power6x \ +@@ -21,7 +22,9 @@ libm-sysdep_routines += s_isnan-power7 s s_logbl-power7 s_logb-ppc64 s_logbf-ppc64 \ s_logbl-ppc64 s_modf-power5+ s_modf-ppc64 \ s_modff-power5+ s_modff-ppc64 e_hypot-ppc64 \ - e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 + e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 \ ++ s_isnan-power8 s_isinf-power8 s_finite-power8 \ + s_llrint-power8 s_llround-power8 CFLAGS-s_logbf-power7.c = -mcpu=power7 CFLAGS-s_logbl-power7.c = -mcpu=power7 +Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S +@@ -0,0 +1,33 @@ ++/* isnan(). PowerPC64/POWER7 version. ++ Copyright (C) 2014 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 ++ . */ ++ ++#include ++#include ++ ++#undef hidden_def ++#define hidden_def(name) ++#undef weak_alias ++#define weak_alias(name, alias) ++#undef strong_alias ++#define strong_alias(name, alias) ++#undef compat_symbol ++#define compat_symbol(lib, name, symbol, ver) ++ ++#define __finite __finite_power8 ++ ++#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c -@@ -25,8 +25,8 @@ extern __typeof (__finite) __finite_ppc6 +@@ -23,10 +23,13 @@ + + extern __typeof (__finite) __finite_ppc64 attribute_hidden; extern __typeof (__finite) __finite_power7 attribute_hidden; ++extern __typeof (__finite) __finite_power8 attribute_hidden; libc_ifunc (__finite, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __finite_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 : __finite_ppc64); @@ -338,27 +405,75 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c -@@ -25,8 +25,8 @@ extern __typeof (__finitef) __finitef_pp +@@ -23,10 +23,13 @@ + extern __typeof (__finitef) __finitef_ppc64 attribute_hidden; + /* The double-precision version also works for single-precision. */ extern __typeof (__finitef) __finite_power7 attribute_hidden; ++extern __typeof (__finitef) __finite_power8 attribute_hidden; libc_ifunc (__finitef, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __finite_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __finite_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __finite_power7 : __finitef_ppc64); weak_alias (__finitef, finitef) +Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S +@@ -0,0 +1,33 @@ ++/* isinf(). PowerPC64/POWER8 version. ++ Copyright (C) 2014 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 ++ . */ ++ ++#include ++#include ++ ++#undef hidden_def ++#define hidden_def(name) ++#undef weak_alias ++#define weak_alias(name, alias) ++#undef strong_alias ++#define strong_alias(name, alias) ++#undef compat_symbol ++#define compat_symbol(lib, name, alias, ver) ++ ++#define __isinf __isinf_power8 ++ ++#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c -@@ -25,8 +25,8 @@ extern __typeof (__isinf) __isinf_ppc64 +@@ -23,10 +23,13 @@ + + extern __typeof (__isinf) __isinf_ppc64 attribute_hidden; extern __typeof (__isinf) __isinf_power7 attribute_hidden; ++extern __typeof (__isinf) __isinf_power8 attribute_hidden; libc_ifunc (__isinf, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isinf_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 : __isinf_ppc64); @@ -368,28 +483,76 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c -@@ -26,8 +26,8 @@ extern __typeof (__isinff) __isinff_ppc6 +@@ -24,10 +24,13 @@ + extern __typeof (__isinff) __isinff_ppc64 attribute_hidden; + /* The double-precision version also works for single-precision. */ extern __typeof (__isinff) __isinf_power7 attribute_hidden; ++extern __typeof (__isinff) __isinf_power8 attribute_hidden; libc_ifunc (__isinff, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isinf_power7 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isinf_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isinf_power7 : __isinff_ppc64); weak_alias (__isinff, isinff) +Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S +@@ -0,0 +1,33 @@ ++/* isnan(). PowerPC64/POWER7 version. ++ Copyright (C) 2014 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 ++ . */ ++ ++#include ++#include ++ ++#undef hidden_def ++#define hidden_def(name) ++#undef weak_alias ++#define weak_alias(name, alias) ++#undef strong_alias ++#define strong_alias(name, alias) ++#undef compat_symbol ++#define compat_symbol(lib, name, symbol, ver) ++ ++#define __isnan __isnan_power8 ++ ++#include Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c -@@ -28,14 +28,14 @@ extern __typeof (__isnan) __isnan_power6 +@@ -26,16 +26,19 @@ extern __typeof (__isnan) __isnan_power5 + extern __typeof (__isnan) __isnan_power6 attribute_hidden; + extern __typeof (__isnan) __isnan_power6x attribute_hidden; extern __typeof (__isnan) __isnan_power7 attribute_hidden; ++extern __typeof (__isnan) __isnan_power8 attribute_hidden; libc_ifunc (__isnan, - (hwcap & PPC_FEATURE_ARCH_2_06) - ? __isnan_power7 : - (hwcap & PPC_FEATURE_POWER6_EXT) ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isnan_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 : + (hwcap & PPC_FEATURE_POWER6_EXT) @@ -409,8 +572,11 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c =================================================================== --- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c +++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c -@@ -27,14 +27,14 @@ extern __typeof (__isnanf) __isnan_power +@@ -25,16 +25,19 @@ extern __typeof (__isnanf) __isnan_power + extern __typeof (__isnanf) __isnan_power6 attribute_hidden; + extern __typeof (__isnanf) __isnan_power6x attribute_hidden; extern __typeof (__isnanf) __isnan_power7 attribute_hidden; ++extern __typeof (__isnanf) __isnan_power8 attribute_hidden; libc_ifunc (__isnanf, - (hwcap & PPC_FEATURE_ARCH_2_06) @@ -421,6 +587,8 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c - ? __isnan_power6 : - (hwcap & PPC_FEATURE_POWER5) - ? __isnan_power5 ++ (hwcap2 & PPC_FEATURE2_ARCH_2_07) ++ ? __isnan_power8 : + (hwcap & PPC_FEATURE_ARCH_2_06) + ? __isnan_power7 : + (hwcap & PPC_FEATURE_POWER6_EXT) @@ -2196,11 +2364,229 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power7/strspn.S + blr /* done */ +END(strspn) +libc_hidden_builtin_def (strspn) +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S +@@ -0,0 +1,61 @@ ++/* isfinite(). PowerPC64/POWER8 version. ++ Copyright (C) 2014 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 ++ . */ ++ ++#include ++#include ++#include ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else ++#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif ++ ++/* int [r3] __finite ([fp1] x) */ ++ ++EALIGN (__finite, 4, 0) ++ CALL_MCOUNT 0 ++ MFVSRD_R3_V1 ++ lis r9,0x8010 ++ clrldi r3,r3,1 /* r3 = r3 & 0x8000000000000000 */ ++ rldicr r9,r9,32,31 /* r9 = (r9 << 32) & 0xffffffff */ ++ add r3,r3,r9 ++ rldicl r3,r3,1,63 ++ blr ++END (__finite) ++ ++hidden_def (__finite) ++weak_alias (__finite, finite) ++ ++/* It turns out that the 'double' version will also always work for ++ single-precision. */ ++strong_alias (__finite, __finitef) ++hidden_def (__finitef) ++weak_alias (__finitef, finitef) ++ ++#ifdef IS_IN_libm ++# if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0) ++compat_symbol (libm, __finite, __finitel, GLIBC_2_0) ++compat_symbol (libm, finite, finitel, GLIBC_2_0) ++# endif ++#else ++# if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0) ++compat_symbol (libc, __finite, __finitel, GLIBC_2_0); ++compat_symbol (libc, finite, finitel, GLIBC_2_0); ++# endif ++#endif +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finitef.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_finitef.S +@@ -0,0 +1 @@ ++/* This function uses the same code as s_finite.S. */ +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S +@@ -0,0 +1,66 @@ ++/* isinf(). PowerPC64/POWER8 version. ++ Copyright (C) 2014 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 ++ . */ ++ ++#include ++#include ++#include ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else ++#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif ++ ++/* int [r3] __isinf([fp1] x) */ ++ ++EALIGN (__isinf, 4, 0) ++ CALL_MCOUNT 0 ++ MFVSRD_R3_V1 ++ lis r9,0x7ff0 /* r9 = 0x7ff0 */ ++ rldicl r10,r3,0,1 /* r10 = r3 & (0x8000000000000000) */ ++ sldi r9,r9,32 /* r9 = r9 << 52 */ ++ cmpd cr7,r10,r9 /* fp1 & 0x7ff0000000000000 ? */ ++ beq cr7,L(inf) ++ li r3,0 /* Not inf */ ++ blr ++L(inf): ++ sradi r3,r3,63 /* r3 = r3 >> 63 */ ++ ori r3,r3,1 /* r3 = r3 | 0x1 */ ++ blr ++END (__isinf) ++ ++hidden_def (__isinf) ++weak_alias (__isinf, isinf) ++ ++/* It turns out that the 'double' version will also always work for ++ single-precision. */ ++strong_alias (__isinf, __isinff) ++hidden_def (__isinff) ++weak_alias (__isinff, isinff) ++ ++#ifdef NO_LONG_DOUBLE ++strong_alias (__isinf, __isinfl) ++weak_alias (__isinf, isinfl) ++#endif ++ ++#ifndef IS_IN_libm ++# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) ++compat_symbol (libc, __isinf, __isinfl, GLIBC_2_0); ++compat_symbol (libc, isinf, isinfl, GLIBC_2_0); ++# endif ++#endif +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isinff.S +@@ -0,0 +1 @@ ++/* This function uses the same code as s_isinf.S. */ +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S +@@ -0,0 +1,58 @@ ++/* isnan(). PowerPC64/POWER8 version. ++ Copyright (C) 2014 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 ++ . */ ++ ++#include ++#include ++#include ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else ++#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif ++ ++/* int [r3] __isnan([f1] x) */ ++ ++EALIGN (__isnan, 4, 0) ++ CALL_MCOUNT 0 ++ MFVSRD_R3_V1 ++ lis r9,0x7ff0 ++ clrldi r3,r3,1 /* r3 = r3 & 0x8000000000000000 */ ++ rldicr r9,r9,32,31 /* r9 = (r9 << 32) & 0xffffffff */ ++ subf r3,r3,r9 ++ rldicl r3,r3,1,63 ++ blr ++END (__isnan) ++ ++/* It turns out that the 'double' version will also always work for ++ single-precision. */ ++strong_alias (__isnan, __isnanf) ++hidden_def (__isnanf) ++weak_alias (__isnanf, isnanf) ++ ++#ifdef NO_LONG_DOUBLE ++strong_alias (__isnan, __isnanl) ++weak_alias (__isnan, isnanl) ++#endif ++ ++#ifndef IS_IN_libm ++# if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) ++compat_symbol (libc, __isnan, __isnanl, GLIBC_2_0); ++compat_symbol (libc, isnan, isnanl, GLIBC_2_0); ++# endif ++#endif +Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnanf.S +=================================================================== +--- /dev/null ++++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_isnanf.S +@@ -0,0 +1 @@ ++/* This function uses the same code as s_isnan.S. */ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S =================================================================== --- /dev/null +++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S -@@ -0,0 +1,45 @@ +@@ -0,0 +1,50 @@ +/* Round double to long int. POWER8 PowerPC64 version. + Copyright (C) 2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -2220,9 +2606,14 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S + . */ + +#include ++#include +#include + ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else +#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif + +/* long long int[r3] __llrint (double x[fp1]) */ +ENTRY (__llrint) @@ -2250,7 +2641,7 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S =================================================================== --- /dev/null +++ glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S -@@ -0,0 +1,47 @@ +@@ -0,0 +1,52 @@ +/* llround function. POWER8 PowerPC64 version. + Copyright (C) 2014 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -2270,9 +2661,14 @@ Index: glibc-2.19/sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S + . */ + +#include ++#include +#include + ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define MFVSRD_R3_V1 .byte 0x66,0x00,0x23,0x7c /* mfvsrd r3,vs1 */ ++#else +#define MFVSRD_R3_V1 .byte 0x7c,0x23,0x00,0x66 /* mfvsrd r3,vs1 */ ++#endif + +/* long long [r3] llround (float x [fp1]) */ + diff --git a/pthread-mutex-destroy.patch b/pthread-mutex-destroy.patch new file mode 100644 index 0000000..4ecd866 --- /dev/null +++ b/pthread-mutex-destroy.patch @@ -0,0 +1,61 @@ +[PATCH] Skip checks in pthread_mutex_destroy when doing elision + +When doing elisison the __nusers field is not updated, thus can have an +arbitrary value. + + [BZ #16657] + * nptl/pthread_mutex_destroy.c (__pthread_mutex_destroy): Skip + checks when doing elision. + * nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c: New file. + +Index: glibc-2.18/nptl/pthread_mutex_destroy.c +=================================================================== +--- glibc-2.18.orig/nptl/pthread_mutex_destroy.c ++++ glibc-2.18/nptl/pthread_mutex_destroy.c +@@ -21,6 +21,9 @@ + + #include + ++#ifndef DO_ELISION ++# define DO_ELISION(m) 0 ++#endif + + int + __pthread_mutex_destroy (mutex) +@@ -28,7 +31,8 @@ __pthread_mutex_destroy (mutex) + { + LIBC_PROBE (mutex_destroy, 1, mutex); + +- if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 ++ if (!DO_ELISION (mutex) ++ && (mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 + && mutex->__data.__nusers != 0) + return EBUSY; + +Index: glibc-2.18/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c +=================================================================== +--- /dev/null ++++ glibc-2.18/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c +@@ -0,0 +1,22 @@ ++/* Elided version of pthread_mutex_destroy. ++ Copyright (C) 2014 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 ++ . */ ++ ++#include ++#include "force-elision.h" ++ ++#include "nptl/pthread_mutex_destroy.c" From a37f437be6524832ce08fb03cea32d91c7c289d9641ffa46379af70a23f87dd7 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 1 Apr 2014 08:34:23 +0000 Subject: [PATCH 04/14] . OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=348 --- glibc.changes | 6 ++++++ nscd.service | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glibc.changes b/glibc.changes index 8ce95dc..06808a3 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 1 08:31:22 UTC 2014 - werner@suse.de + +- make nscd.service smart that is use/provide the synchronization + points nss-lookup.target and nss-user-lookup.target + ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/nscd.service b/nscd.service index bacc6e3..7bc75d7 100644 --- a/nscd.service +++ b/nscd.service @@ -1,9 +1,13 @@ [Unit] Description=Name Service Cache Daemon +Wants=nss-lookup.target nss-user-lookup.target +Before=nss-lookup.target nss-user-lookup.target +ConditionPathExists=/etc/nscd.conf [Service] -Type=forking -ExecStart=/usr/sbin/nscd +Type=simple +PIDFile=/run/nscd/nscd.pid +ExecStart=/usr/sbin/nscd --foreground ExecStop=/usr/sbin/nscd --shutdown ExecReload=/usr/sbin/nscd -i passwd ExecReload=/usr/sbin/nscd -i group @@ -11,7 +15,6 @@ ExecReload=/usr/sbin/nscd -i hosts ExecReload=/usr/sbin/nscd -i services ExecReload=/usr/sbin/nscd -i netgroup Restart=always -PIDFile=/run/nscd/nscd.pid [Install] WantedBy=multi-user.target From aaf02819e7550f9427afb53d010bc3008d59846bfb758aa8d3df67420075cd98 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 1 Apr 2014 09:15:35 +0000 Subject: [PATCH 05/14] . OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=349 --- glibc-testsuite.changes | 6 ++++++ glibc-utils.changes | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 8ce95dc..06808a3 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 1 08:31:22 UTC 2014 - werner@suse.de + +- make nscd.service smart that is use/provide the synchronization + points nss-lookup.target and nss-user-lookup.target + ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.changes b/glibc-utils.changes index 8ce95dc..06808a3 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 1 08:31:22 UTC 2014 - werner@suse.de + +- make nscd.service smart that is use/provide the synchronization + points nss-lookup.target and nss-user-lookup.target + ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de From 44f2b7bf8673baf7f459aab60bbb2c79ea199cb0d39947a169a5a6cb469309e3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 1 Apr 2014 09:29:43 +0000 Subject: [PATCH 06/14] Revert last change OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=350 --- glibc-testsuite.changes | 6 ------ glibc-utils.changes | 6 ------ glibc.changes | 6 ------ nscd.service | 9 +++------ 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 06808a3..8ce95dc 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Apr 1 08:31:22 UTC 2014 - werner@suse.de - -- make nscd.service smart that is use/provide the synchronization - points nss-lookup.target and nss-user-lookup.target - ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.changes b/glibc-utils.changes index 06808a3..8ce95dc 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Apr 1 08:31:22 UTC 2014 - werner@suse.de - -- make nscd.service smart that is use/provide the synchronization - points nss-lookup.target and nss-user-lookup.target - ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/glibc.changes b/glibc.changes index 06808a3..8ce95dc 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Apr 1 08:31:22 UTC 2014 - werner@suse.de - -- make nscd.service smart that is use/provide the synchronization - points nss-lookup.target and nss-user-lookup.target - ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/nscd.service b/nscd.service index 7bc75d7..bacc6e3 100644 --- a/nscd.service +++ b/nscd.service @@ -1,13 +1,9 @@ [Unit] Description=Name Service Cache Daemon -Wants=nss-lookup.target nss-user-lookup.target -Before=nss-lookup.target nss-user-lookup.target -ConditionPathExists=/etc/nscd.conf [Service] -Type=simple -PIDFile=/run/nscd/nscd.pid -ExecStart=/usr/sbin/nscd --foreground +Type=forking +ExecStart=/usr/sbin/nscd ExecStop=/usr/sbin/nscd --shutdown ExecReload=/usr/sbin/nscd -i passwd ExecReload=/usr/sbin/nscd -i group @@ -15,6 +11,7 @@ ExecReload=/usr/sbin/nscd -i hosts ExecReload=/usr/sbin/nscd -i services ExecReload=/usr/sbin/nscd -i netgroup Restart=always +PIDFile=/run/nscd/nscd.pid [Install] WantedBy=multi-user.target From 5767ee0b6c6552df8803a880a826a4866b00ed6aa134de1de5560039a5679833 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 1 Apr 2014 10:03:02 +0000 Subject: [PATCH 07/14] Accepting request 228414 from home:Andreas_Schwab:Factory - ppc64-copysign.patch: Fix ppc64le copysign overwriting parent stack frame (BZ #16786) - aarch64-setcontext.patch: Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629) OBS-URL: https://build.opensuse.org/request/show/228414 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=351 --- aarch64-setcontext.patch | 225 +++++++++++++++++++++++++++++++++++++++ glibc-testsuite.changes | 8 ++ glibc-testsuite.spec | 6 ++ glibc-utils.changes | 8 ++ glibc-utils.spec | 6 ++ glibc.changes | 8 ++ glibc.spec | 6 ++ ppc64-copysign.patch | 23 ++++ 8 files changed, 290 insertions(+) create mode 100644 aarch64-setcontext.patch create mode 100644 ppc64-copysign.patch diff --git a/aarch64-setcontext.patch b/aarch64-setcontext.patch new file mode 100644 index 0000000..9997ff5 --- /dev/null +++ b/aarch64-setcontext.patch @@ -0,0 +1,225 @@ +From 4dc40de1ed58a1de5d960e59f20a04191f6820c9 Mon Sep 17 00:00:00 2001 +From: Will Newton +Date: Wed, 12 Mar 2014 16:14:51 +0000 +Subject: [PATCH 1/3] aarch64: Re-implement setcontext without rt_sigreturn + syscall + +The current implementation of setcontext uses rt_sigreturn to restore +the contents of registers. This contrasts with the way most other +architectures implement setcontext: + + powerpc64, mips, tile: + + Call rt_sigreturn if context was created by a call to a signal handler, + otherwise restore in user code. + + powerpc32: + + Call swapcontext system call and don't call sigreturn or rt_sigreturn. + + x86_64, sparc, hppa, sh, ia64, m68k, s390, arm: + + Only support restoring "synchronous" contexts, that is contexts + created by getcontext, and restoring in user code and don't call + sigreturn or rt_sigreturn. + + alpha: + + Call sigreturn (but not rt_sigreturn) in all cases to do the restore. + +The text of the setcontext manpage suggests that the requirement to be +able to restore a signal handler created context has been dropped from +SUSv2: + + If the context was obtained by a call to a signal handler, then old + standard text says that "program execution continues with the program + instruction following the instruction interrupted by the signal". + However, this sentence was removed in SUSv2, and the present verdict + is "the result is unspecified". + +Implementing setcontext by calling rt_sigreturn unconditionally causes +problems when used with sigaltstack as in BZ #16629. On this basis it +seems that aarch64 is broken and that new ports should only support +restoring contexts created with getcontext and do not need to call +rt_sigreturn at all. + +This patch re-implements the aarch64 setcontext function to restore +the context in user code in a similar manner to x86_64 and other ports. + +ChangeLog: + +2014-03-13 Will Newton + + [BZ #16629] + * sysdeps/unix/sysv/linux/aarch64/setcontext.S (__setcontext): + Re-implement to restore registers in user code and avoid + rt_sigreturn system call. +--- + sysdeps/unix/sysv/linux/aarch64/setcontext.S | 147 +++++++++++++++++---------- + 1 file changed, 92 insertions(+), 55 deletions(-) + +Index: glibc-2.19/ports/sysdeps/unix/sysv/linux/aarch64/setcontext.S +=================================================================== +--- glibc-2.19.orig/ports/sysdeps/unix/sysv/linux/aarch64/setcontext.S ++++ glibc-2.19/ports/sysdeps/unix/sysv/linux/aarch64/setcontext.S +@@ -22,68 +22,105 @@ + #include "ucontext_i.h" + #include "ucontext-internal.h" + +-/* int setcontext (const ucontext_t *ucp) */ ++/* int __setcontext (const ucontext_t *ucp) + +- .text +- +-ENTRY(__setcontext) ++ Restores the machine context in UCP and thereby resumes execution ++ in that context. + +- /* Create a signal frame on the stack: ++ This implementation is intended to be used for *synchronous* context ++ switches only. Therefore, it does not have to restore anything ++ other than the PRESERVED state. */ + +- fp +- lr +- ... +- sp-> rt_sigframe +- */ +- +- stp x29, x30, [sp, -16]! +- cfi_adjust_cfa_offset (16) +- cfi_rel_offset (x29, 0) +- cfi_rel_offset (x30, 8) +- +- mov x29, sp +- cfi_def_cfa_register (x29) +- +- /* Allocate space for the sigcontext. */ +- mov w3, #((RT_SIGFRAME_SIZE + SP_ALIGN_SIZE) & SP_ALIGN_MASK) +- sub sp, sp, x3 +- +- /* Compute the base address of the ucontext structure. */ +- add x1, sp, #RT_SIGFRAME_UCONTEXT +- +- /* Only ucontext is required in the frame, *copy* it in. */ +- +-#if UCONTEXT_SIZE % 16 +-#error The implementation of setcontext.S assumes sizeof(ucontext_t) % 16 == 0 +-#endif +- +- mov x2, #UCONTEXT_SIZE / 16 +-0: +- ldp x3, x4, [x0], #16 +- stp x3, x4, [x1], #16 +- sub x2, x2, 1 +- cbnz x2, 0b ++ .text + +- /* rt_sigreturn () -- no arguments, sp points to struct rt_sigframe. */ +- mov x8, SYS_ify (rt_sigreturn) ++ENTRY (__setcontext) ++ /* Save a copy of UCP. */ ++ mov x9, x0 ++ ++ /* Set the signal mask with ++ rt_sigprocmask (SIG_SETMASK, mask, NULL, _NSIG/8). */ ++ mov x0, #SIG_SETMASK ++ add x1, x9, #UCONTEXT_SIGMASK ++ mov x2, #0 ++ mov x3, #_NSIG8 ++ mov x8, SYS_ify (rt_sigprocmask) + svc 0 +- +- /* Ooops we failed. Recover the stack */ +- +- mov sp, x29 +- cfi_def_cfa_register (sp) +- +- ldp x29, x30, [sp], 16 +- cfi_adjust_cfa_offset (16) +- cfi_restore (x29) +- cfi_restore (x30) +- b C_SYMBOL_NAME(__syscall_error) +- ++ cbz x0, 1f ++ b C_SYMBOL_NAME (__syscall_error) ++1: ++ /* Restore the general purpose registers. */ ++ mov x0, x9 ++ cfi_def_cfa (x0, 0) ++ cfi_offset (x18, oX0 + 18 * SZREG) ++ cfi_offset (x19, oX0 + 19 * SZREG) ++ cfi_offset (x20, oX0 + 20 * SZREG) ++ cfi_offset (x21, oX0 + 21 * SZREG) ++ cfi_offset (x22, oX0 + 22 * SZREG) ++ cfi_offset (x23, oX0 + 23 * SZREG) ++ cfi_offset (x24, oX0 + 24 * SZREG) ++ cfi_offset (x25, oX0 + 25 * SZREG) ++ cfi_offset (x26, oX0 + 26 * SZREG) ++ cfi_offset (x27, oX0 + 27 * SZREG) ++ cfi_offset (x28, oX0 + 28 * SZREG) ++ cfi_offset (x29, oX0 + 29 * SZREG) ++ cfi_offset (x30, oX0 + 30 * SZREG) ++ ++ cfi_offset ( d8, oV0 + 8 * SZVREG) ++ cfi_offset ( d9, oV0 + 9 * SZVREG) ++ cfi_offset (d10, oV0 + 10 * SZVREG) ++ cfi_offset (d11, oV0 + 11 * SZVREG) ++ cfi_offset (d12, oV0 + 12 * SZVREG) ++ cfi_offset (d13, oV0 + 13 * SZVREG) ++ cfi_offset (d14, oV0 + 14 * SZVREG) ++ cfi_offset (d15, oV0 + 15 * SZVREG) ++ ldp x18, x19, [x0, oX0 + 18 * SZREG] ++ ldp x20, x21, [x0, oX0 + 20 * SZREG] ++ ldp x22, x23, [x0, oX0 + 22 * SZREG] ++ ldp x24, x25, [x0, oX0 + 24 * SZREG] ++ ldp x26, x27, [x0, oX0 + 26 * SZREG] ++ ldp x28, x29, [x0, oX0 + 28 * SZREG] ++ ldr x30, [x0, oX0 + 30 * SZREG] ++ ldr x2, [x0, oSP] ++ mov sp, x2 ++ ++ /* Check for FP SIMD context. */ ++ add x2, x0, #oEXTENSION ++ ++ mov w3, #(FPSIMD_MAGIC & 0xffff) ++ movk w3, #(FPSIMD_MAGIC >> 16), lsl #16 ++ ldr w1, [x2, #oHEAD + oMAGIC] ++ cmp w1, w3 ++ b.ne 2f ++ ++ /* Restore the FP SIMD context. */ ++ add x3, x2, #oV0 + 8 * SZVREG ++ ldp d8, d9, [x3], #2 * SZVREG ++ ldp d10, d11, [x3], #2 * SZVREG ++ ldp d12, d13, [x3], #2 * SZVREG ++ ldp d14, d15, [x3], #2 * SZVREG ++ ++ add x3, x2, oFPSR ++ ++ ldr w4, [x3] ++ msr fpsr, x4 ++ ++ ldr w4, [x3, oFPCR - oFPSR] ++ msr fpcr, x4 ++ ++2: ++ ldr x16, [x0, oPC] ++ /* Restore arg registers. */ ++ ldp x2, x3, [x0, oX0 + 2 * SZREG] ++ ldp x4, x5, [x0, oX0 + 4 * SZREG] ++ ldp x6, x7, [x0, oX0 + 6 * SZREG] ++ ldp x0, x1, [x0, oX0 + 0 * SZREG] ++ /* Jump to the new pc value. */ ++ br x16 + PSEUDO_END (__setcontext) + weak_alias (__setcontext, setcontext) + +-ENTRY(__startcontext) ++ENTRY (__startcontext) + mov x0, x19 + cbnz x0, __setcontext +-1: b HIDDEN_JUMPTARGET(_exit) +-END(__startcontext) ++1: b HIDDEN_JUMPTARGET (_exit) ++END (__startcontext) diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 8ce95dc..621a553 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de + +- ppc64-copysign.patch: Fix ppc64le copysign overwriting parent stack + frame (BZ #16786) +- aarch64-setcontext.patch: Fix aarch64 setcontext clobbering alternate + signal stack (BZ #16629) + ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/glibc-testsuite.spec b/glibc-testsuite.spec index e4bdad0..8c00dbb 100644 --- a/glibc-testsuite.spec +++ b/glibc-testsuite.spec @@ -244,6 +244,8 @@ Patch1004: powerpc-opt-power8.patch Patch1005: check-pf-alloca.patch # PATCH-FIX-UPSTREAM Fix use of half-initialized result in getaddrinfo when using nscd Patch1006: getaddrinfo-uninit-result.patch +# PATCH-FIX-UPSTREAM Fix ppc64le copysign overwriting parent stack frame (BZ #16786) +Patch1007: ppc64-copysign.patch ### # Patches awaiting upstream approval @@ -258,6 +260,8 @@ Patch2002: ldd-system-interp.patch Patch2003: abort-no-flush.patch # PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision Patch2004: pthread-mutex-destroy.patch +# PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629) +Patch2005: aarch64-setcontext.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -465,12 +469,14 @@ rm nscd/s-stamp %patch1004 -p1 %patch1005 -p1 %patch1006 -p1 +%patch1007 -p1 %patch2000 -p1 %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 %patch2004 -p1 +%patch2005 -p1 %patch3000 diff --git a/glibc-utils.changes b/glibc-utils.changes index 8ce95dc..621a553 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de + +- ppc64-copysign.patch: Fix ppc64le copysign overwriting parent stack + frame (BZ #16786) +- aarch64-setcontext.patch: Fix aarch64 setcontext clobbering alternate + signal stack (BZ #16629) + ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.spec b/glibc-utils.spec index ef4f6d7..012da23 100644 --- a/glibc-utils.spec +++ b/glibc-utils.spec @@ -243,6 +243,8 @@ Patch1004: powerpc-opt-power8.patch Patch1005: check-pf-alloca.patch # PATCH-FIX-UPSTREAM Fix use of half-initialized result in getaddrinfo when using nscd Patch1006: getaddrinfo-uninit-result.patch +# PATCH-FIX-UPSTREAM Fix ppc64le copysign overwriting parent stack frame (BZ #16786) +Patch1007: ppc64-copysign.patch ### # Patches awaiting upstream approval @@ -257,6 +259,8 @@ Patch2002: ldd-system-interp.patch Patch2003: abort-no-flush.patch # PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision Patch2004: pthread-mutex-destroy.patch +# PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629) +Patch2005: aarch64-setcontext.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -465,12 +469,14 @@ rm nscd/s-stamp %patch1004 -p1 %patch1005 -p1 %patch1006 -p1 +%patch1007 -p1 %patch2000 -p1 %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 %patch2004 -p1 +%patch2005 -p1 %patch3000 diff --git a/glibc.changes b/glibc.changes index 8ce95dc..621a553 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de + +- ppc64-copysign.patch: Fix ppc64le copysign overwriting parent stack + frame (BZ #16786) +- aarch64-setcontext.patch: Fix aarch64 setcontext clobbering alternate + signal stack (BZ #16629) + ------------------------------------------------------------------- Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de diff --git a/glibc.spec b/glibc.spec index 2359870..d74e8d3 100644 --- a/glibc.spec +++ b/glibc.spec @@ -244,6 +244,8 @@ Patch1004: powerpc-opt-power8.patch Patch1005: check-pf-alloca.patch # PATCH-FIX-UPSTREAM Fix use of half-initialized result in getaddrinfo when using nscd Patch1006: getaddrinfo-uninit-result.patch +# PATCH-FIX-UPSTREAM Fix ppc64le copysign overwriting parent stack frame (BZ #16786) +Patch1007: ppc64-copysign.patch ### # Patches awaiting upstream approval @@ -258,6 +260,8 @@ Patch2002: ldd-system-interp.patch Patch2003: abort-no-flush.patch # PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision Patch2004: pthread-mutex-destroy.patch +# PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629) +Patch2005: aarch64-setcontext.patch # Non-glibc patches # PATCH-FIX-OPENSUSE Remove debianisms from manpages @@ -465,12 +469,14 @@ rm nscd/s-stamp %patch1004 -p1 %patch1005 -p1 %patch1006 -p1 +%patch1007 -p1 %patch2000 -p1 %patch2001 -p1 %patch2002 -p1 %patch2003 -p1 %patch2004 -p1 +%patch2005 -p1 %patch3000 diff --git a/ppc64-copysign.patch b/ppc64-copysign.patch new file mode 100644 index 0000000..5cdcb94 --- /dev/null +++ b/ppc64-copysign.patch @@ -0,0 +1,23 @@ +2014-04-01 Alan Modra + + [BZ #16786] + * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Don't trash stack. + +Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/s_copysign.S +=================================================================== +--- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/s_copysign.S ++++ glibc-2.19/sysdeps/powerpc/powerpc64/fpu/s_copysign.S +@@ -27,11 +27,11 @@ ENTRY(__copysign) + /* double [f1] copysign (double [f1] x, double [f2] y); + copysign(x,y) returns a value with the magnitude of x and + with the sign bit of y. */ +- stfd fp2,56(r1) ++ stfd fp2,-8(r1) + nop + nop + nop +- ld r3,56(r1) ++ ld r3,-8(r1) + cmpdi r3,0 + blt L(0) + fabs fp1,fp1 From 50e3e8d7ca53a32d7a4c2efe4feebe10039ac67783bada29d5e8e6cc2be8b674 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 1 Apr 2014 10:47:35 +0000 Subject: [PATCH 08/14] . OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=352 --- glibc.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glibc.changes b/glibc.changes index 621a553..21fab48 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 1 10:47:15 UTC 2014 - werner@suse.de + +- make nscd.service smart that is use/provide the synchronization + points nss-lookup.target and nss-user-lookup.target + ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de From 0135385403d8113494f65524e34f2ed3696f2cbb0648339eb5385bba96277fc6 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 1 Apr 2014 10:48:19 +0000 Subject: [PATCH 09/14] . OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=353 --- glibc-testsuite.changes | 6 ++++++ glibc-utils.changes | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 621a553..21fab48 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 1 10:47:15 UTC 2014 - werner@suse.de + +- make nscd.service smart that is use/provide the synchronization + points nss-lookup.target and nss-user-lookup.target + ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.changes b/glibc-utils.changes index 621a553..21fab48 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Apr 1 10:47:15 UTC 2014 - werner@suse.de + +- make nscd.service smart that is use/provide the synchronization + points nss-lookup.target and nss-user-lookup.target + ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de From 8d61ec172a108fe28a168c8162681d131f46723ebbbb093201d215cb98d73649 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 1 Apr 2014 10:50:39 +0000 Subject: [PATCH 10/14] . OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=354 --- glibc.changes | 6 ------ 1 file changed, 6 deletions(-) diff --git a/glibc.changes b/glibc.changes index 21fab48..621a553 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Apr 1 10:47:15 UTC 2014 - werner@suse.de - -- make nscd.service smart that is use/provide the synchronization - points nss-lookup.target and nss-user-lookup.target - ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de From 1f8f6c662b98b1e022f23bf90e37895502f7be83ab74303e3fe74d76993db04f Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 1 Apr 2014 10:55:16 +0000 Subject: [PATCH 11/14] . OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=355 --- glibc-testsuite.changes | 6 ------ glibc-utils.changes | 6 ------ 2 files changed, 12 deletions(-) diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 21fab48..621a553 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Apr 1 10:47:15 UTC 2014 - werner@suse.de - -- make nscd.service smart that is use/provide the synchronization - points nss-lookup.target and nss-user-lookup.target - ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.changes b/glibc-utils.changes index 21fab48..621a553 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Tue Apr 1 10:47:15 UTC 2014 - werner@suse.de - -- make nscd.service smart that is use/provide the synchronization - points nss-lookup.target and nss-user-lookup.target - ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de From 9ed98d396d474c4c690c93b64f0dbf5fb1936f0a542c967ec6201d35d4a5762d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 2 Apr 2014 10:03:02 +0000 Subject: [PATCH 12/14] Accepting request 228714 from home:Andreas_Schwab:Factory - Readd dependency on sysvinit.target to nscd.service (bnc#868422) - Make the nscd service part of the nss-lookup and nss-user-lookup targets (bnc#871386) - Move _constraints back to main package and update it OBS-URL: https://build.opensuse.org/request/show/228714 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=356 --- _constraints | 14 ++++++++++++++ glibc-testsuite.changes | 10 +++++++++- glibc-utils.changes | 10 +++++++++- glibc.changes | 10 +++++++++- nscd.service | 3 +++ 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 _constraints diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..03d38d4 --- /dev/null +++ b/_constraints @@ -0,0 +1,14 @@ + + + + + glibc-testsuite + + + + 1500 + + + xen + + diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 621a553..56a90b3 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 1 13:33:24 UTC 2014 - schwab@suse.de + +- Readd dependency on sysvinit.target to nscd.service (bnc#868422) +- Make the nscd service part of the nss-lookup and nss-user-lookup targets + (bnc#871386) +- Move _constraints back to main package and update it + ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de @@ -10,7 +18,7 @@ Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de - powerpc-opt-power8.patch: readd POWER8 implementation of isnan, - isinf, finite with fix for little endian + isinf, finite with fix for little endian (bnc#871353) - pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when doing elision (bnc#865968) diff --git a/glibc-utils.changes b/glibc-utils.changes index 621a553..56a90b3 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 1 13:33:24 UTC 2014 - schwab@suse.de + +- Readd dependency on sysvinit.target to nscd.service (bnc#868422) +- Make the nscd service part of the nss-lookup and nss-user-lookup targets + (bnc#871386) +- Move _constraints back to main package and update it + ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de @@ -10,7 +18,7 @@ Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de - powerpc-opt-power8.patch: readd POWER8 implementation of isnan, - isinf, finite with fix for little endian + isinf, finite with fix for little endian (bnc#871353) - pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when doing elision (bnc#865968) diff --git a/glibc.changes b/glibc.changes index 621a553..56a90b3 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 1 13:33:24 UTC 2014 - schwab@suse.de + +- Readd dependency on sysvinit.target to nscd.service (bnc#868422) +- Make the nscd service part of the nss-lookup and nss-user-lookup targets + (bnc#871386) +- Move _constraints back to main package and update it + ------------------------------------------------------------------- Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de @@ -10,7 +18,7 @@ Tue Apr 1 07:55:19 UTC 2014 - schwab@suse.de Mon Mar 31 13:22:56 UTC 2014 - schwab@suse.de - powerpc-opt-power8.patch: readd POWER8 implementation of isnan, - isinf, finite with fix for little endian + isinf, finite with fix for little endian (bnc#871353) - pthread-mutex-destroy.patch: Skip checks in pthread_mutex_destroy when doing elision (bnc#865968) diff --git a/nscd.service b/nscd.service index bacc6e3..2170cbc 100644 --- a/nscd.service +++ b/nscd.service @@ -1,5 +1,8 @@ [Unit] Description=Name Service Cache Daemon +After=sysinit.target +Wants=nss-lookup.target nss-user-lookup.target +Before=nss-lookup.target nss-user-lookup.target [Service] Type=forking From 006d01ca2c255c98ca2d67760d94c3f8bcebab7c2196d470754e9271dde182f5 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 3 Apr 2014 09:25:20 +0000 Subject: [PATCH 13/14] Accepting request 228849 from home:Andreas_Schwab:Factory - nextafterl-ibm-ldouble.patch: Correct IBM long double nextafterl (bnc#871637, BZ #16739) OBS-URL: https://build.opensuse.org/request/show/228849 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=357 --- glibc-testsuite.changes | 6 ++ glibc-testsuite.spec | 3 + glibc-utils.changes | 6 ++ glibc-utils.spec | 3 + glibc.changes | 6 ++ glibc.spec | 3 + nextafterl-ibm-ldouble.patch | 116 +++++++++++++++++++++++++++++++++++ 7 files changed, 143 insertions(+) create mode 100644 nextafterl-ibm-ldouble.patch diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index 56a90b3..f346b76 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 3 07:32:24 UTC 2014 - schwab@suse.de + +- nextafterl-ibm-ldouble.patch: Correct IBM long double nextafterl + (bnc#871637, BZ #16739) + ------------------------------------------------------------------- Tue Apr 1 13:33:24 UTC 2014 - schwab@suse.de diff --git a/glibc-testsuite.spec b/glibc-testsuite.spec index 8c00dbb..ca9740b 100644 --- a/glibc-testsuite.spec +++ b/glibc-testsuite.spec @@ -246,6 +246,8 @@ Patch1005: check-pf-alloca.patch Patch1006: getaddrinfo-uninit-result.patch # PATCH-FIX-UPSTREAM Fix ppc64le copysign overwriting parent stack frame (BZ #16786) Patch1007: ppc64-copysign.patch +# PATCH-FIX-UPSTREAM Correct IBM long double nextafterl (BZ #16739) +Patch1008: nextafterl-ibm-ldouble.patch ### # Patches awaiting upstream approval @@ -470,6 +472,7 @@ rm nscd/s-stamp %patch1005 -p1 %patch1006 -p1 %patch1007 -p1 +%patch1008 -p1 %patch2000 -p1 %patch2001 -p1 diff --git a/glibc-utils.changes b/glibc-utils.changes index 56a90b3..f346b76 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 3 07:32:24 UTC 2014 - schwab@suse.de + +- nextafterl-ibm-ldouble.patch: Correct IBM long double nextafterl + (bnc#871637, BZ #16739) + ------------------------------------------------------------------- Tue Apr 1 13:33:24 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.spec b/glibc-utils.spec index 012da23..92ce4d9 100644 --- a/glibc-utils.spec +++ b/glibc-utils.spec @@ -245,6 +245,8 @@ Patch1005: check-pf-alloca.patch Patch1006: getaddrinfo-uninit-result.patch # PATCH-FIX-UPSTREAM Fix ppc64le copysign overwriting parent stack frame (BZ #16786) Patch1007: ppc64-copysign.patch +# PATCH-FIX-UPSTREAM Correct IBM long double nextafterl (BZ #16739) +Patch1008: nextafterl-ibm-ldouble.patch ### # Patches awaiting upstream approval @@ -470,6 +472,7 @@ rm nscd/s-stamp %patch1005 -p1 %patch1006 -p1 %patch1007 -p1 +%patch1008 -p1 %patch2000 -p1 %patch2001 -p1 diff --git a/glibc.changes b/glibc.changes index 56a90b3..f346b76 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 3 07:32:24 UTC 2014 - schwab@suse.de + +- nextafterl-ibm-ldouble.patch: Correct IBM long double nextafterl + (bnc#871637, BZ #16739) + ------------------------------------------------------------------- Tue Apr 1 13:33:24 UTC 2014 - schwab@suse.de diff --git a/glibc.spec b/glibc.spec index d74e8d3..720f07a 100644 --- a/glibc.spec +++ b/glibc.spec @@ -246,6 +246,8 @@ Patch1005: check-pf-alloca.patch Patch1006: getaddrinfo-uninit-result.patch # PATCH-FIX-UPSTREAM Fix ppc64le copysign overwriting parent stack frame (BZ #16786) Patch1007: ppc64-copysign.patch +# PATCH-FIX-UPSTREAM Correct IBM long double nextafterl (BZ #16739) +Patch1008: nextafterl-ibm-ldouble.patch ### # Patches awaiting upstream approval @@ -470,6 +472,7 @@ rm nscd/s-stamp %patch1005 -p1 %patch1006 -p1 %patch1007 -p1 +%patch1008 -p1 %patch2000 -p1 %patch2001 -p1 diff --git a/nextafterl-ibm-ldouble.patch b/nextafterl-ibm-ldouble.patch new file mode 100644 index 0000000..c5d107f --- /dev/null +++ b/nextafterl-ibm-ldouble.patch @@ -0,0 +1,116 @@ +2014-04-02 Alan Modra + + [BZ #16739] + * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Correct + output when value is near a power of two. Use int64_t for lx and + remove casts. Use decimal rather than hex exponent constants. + Don't use long double multiplication when double will suffice. + * math/libm-test.inc (nextafter_test_data): Add tests. + +Index: glibc-2.19/math/libm-test.inc +=================================================================== +--- glibc-2.19.orig/math/libm-test.inc ++++ glibc-2.19/math/libm-test.inc +@@ -10528,6 +10528,14 @@ static const struct test_ff_f_data nexta + // XXX Enable once gcc is fixed. + //TEST_ff_f (nextafter, 0x0.00000040000000000000p-16385L, -0.1L, 0x0.0000003ffffffff00000p-16385L), + #endif ++#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 106 ++ TEST_ff_f (nextafter, 1.0L, -10.0L, 1.0L-0x1p-106L, NO_EXCEPTION), ++ TEST_ff_f (nextafter, 1.0L, 10.0L, 1.0L+0x1p-105L, NO_EXCEPTION), ++ TEST_ff_f (nextafter, 1.0L-0x1p-106L, 10.0L, 1.0L, NO_EXCEPTION), ++ TEST_ff_f (nextafter, -1.0L, -10.0L, -1.0L-0x1p-105L, NO_EXCEPTION), ++ TEST_ff_f (nextafter, -1.0L, 10.0L, -1.0L+0x1p-106L, NO_EXCEPTION), ++ TEST_ff_f (nextafter, -1.0L+0x1p-106L, -10.0L, -1.0L, NO_EXCEPTION), ++#endif + + /* XXX We need the hexadecimal FP number representation here for further + tests. */ +Index: glibc-2.19/sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c +=================================================================== +--- glibc-2.19.orig/sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c ++++ glibc-2.19/sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c +@@ -30,8 +30,7 @@ static char rcsid[] = "$NetBSD: $"; + + long double __nextafterl(long double x, long double y) + { +- int64_t hx,hy,ihx,ihy; +- uint64_t lx; ++ int64_t hx, hy, ihx, ihy, lx; + double xhi, xlo, yhi; + + ldbl_unpack (x, &xhi, &xlo); +@@ -76,19 +75,28 @@ long double __nextafterl(long double x, + u = math_opt_barrier (x); + x -= __LDBL_DENORM_MIN__; + if (ihx < 0x0360000000000000LL +- || (hx > 0 && (int64_t) lx <= 0) +- || (hx < 0 && (int64_t) lx > 1)) { ++ || (hx > 0 && lx <= 0) ++ || (hx < 0 && lx > 1)) { + u = u * u; + math_force_eval (u); /* raise underflow flag */ + } + return x; + } +- if (ihx < 0x06a0000000000000LL) { /* ulp will denormal */ +- INSERT_WORDS64 (yhi, hx & (0x7ffLL<<52)); +- u = yhi; +- u *= 0x1.0000000000000p-105L; ++ /* If the high double is an exact power of two and the low ++ double is the opposite sign, then 1ulp is one less than ++ what we might determine from the high double. Similarly ++ if X is an exact power of two, and positive, because ++ making it a little smaller will result in the exponent ++ decreasing by one and normalisation of the mantissa. */ ++ if ((hx & 0x000fffffffffffffLL) == 0 ++ && ((lx != 0 && (hx ^ lx) < 0) ++ || (lx == 0 && hx >= 0))) ++ ihx -= 1LL << 52; ++ if (ihx < (106LL << 52)) { /* ulp will denormal */ ++ INSERT_WORDS64 (yhi, ihx & (0x7ffLL<<52)); ++ u = yhi * 0x1p-105; + } else { +- INSERT_WORDS64 (yhi, (hx & (0x7ffLL<<52))-(0x069LL<<52)); ++ INSERT_WORDS64 (yhi, (ihx & (0x7ffLL<<52))-(105LL<<52)); + u = yhi; + } + return x - u; +@@ -103,8 +111,8 @@ long double __nextafterl(long double x, + u = math_opt_barrier (x); + x += __LDBL_DENORM_MIN__; + if (ihx < 0x0360000000000000LL +- || (hx > 0 && (int64_t) lx < 0 && lx != 0x8000000000000001LL) +- || (hx < 0 && (int64_t) lx >= 0)) { ++ || (hx > 0 && lx < 0 && lx != 0x8000000000000001LL) ++ || (hx < 0 && lx >= 0)) { + u = u * u; + math_force_eval (u); /* raise underflow flag */ + } +@@ -112,12 +120,21 @@ long double __nextafterl(long double x, + x = -0.0L; + return x; + } +- if (ihx < 0x06a0000000000000LL) { /* ulp will denormal */ +- INSERT_WORDS64 (yhi, hx & (0x7ffLL<<52)); +- u = yhi; +- u *= 0x1.0000000000000p-105L; ++ /* If the high double is an exact power of two and the low ++ double is the opposite sign, then 1ulp is one less than ++ what we might determine from the high double. Similarly ++ if X is an exact power of two, and negative, because ++ making it a little larger will result in the exponent ++ decreasing by one and normalisation of the mantissa. */ ++ if ((hx & 0x000fffffffffffffLL) == 0 ++ && ((lx != 0 && (hx ^ lx) < 0) ++ || (lx == 0 && hx < 0))) ++ ihx -= 1LL << 52; ++ if (ihx < (106LL << 52)) { /* ulp will denormal */ ++ INSERT_WORDS64 (yhi, ihx & (0x7ffLL<<52)); ++ u = yhi * 0x1p-105; + } else { +- INSERT_WORDS64 (yhi, (hx & (0x7ffLL<<52))-(0x069LL<<52)); ++ INSERT_WORDS64 (yhi, (ihx & (0x7ffLL<<52))-(105LL<<52)); + u = yhi; + } + return x + u; From 6addb61a1659cd2f2fefb4e3ab238f49b8f99d1a2855360039eb0f12b77a500a Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 7 Apr 2014 13:52:06 +0000 Subject: [PATCH 14/14] Accepting request 229286 from home:Andreas_Schwab:Factory - pthread-mutex-destroy.patch: Remove - pthread-mutex-trylock-elision.patch: Properly handle forced elision in pthread_mutex_trylock (bnc#865968, BZ #16657) OBS-URL: https://build.opensuse.org/request/show/229286 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=358 --- glibc-testsuite.changes | 7 ++++ glibc-testsuite.spec | 4 +- glibc-utils.changes | 7 ++++ glibc-utils.spec | 4 +- glibc.changes | 7 ++++ glibc.spec | 4 +- pthread-mutex-destroy.patch | 61 ----------------------------- pthread-mutex-trylock-elision.patch | 53 +++++++++++++++++++++++++ 8 files changed, 80 insertions(+), 67 deletions(-) delete mode 100644 pthread-mutex-destroy.patch create mode 100644 pthread-mutex-trylock-elision.patch diff --git a/glibc-testsuite.changes b/glibc-testsuite.changes index f346b76..a98fc17 100644 --- a/glibc-testsuite.changes +++ b/glibc-testsuite.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 7 09:06:32 UTC 2014 - schwab@suse.de + +- pthread-mutex-destroy.patch: Remove +- pthread-mutex-trylock-elision.patch: Properly handle forced elision in + pthread_mutex_trylock (bnc#865968, BZ #16657) + ------------------------------------------------------------------- Thu Apr 3 07:32:24 UTC 2014 - schwab@suse.de diff --git a/glibc-testsuite.spec b/glibc-testsuite.spec index ca9740b..c99df16 100644 --- a/glibc-testsuite.spec +++ b/glibc-testsuite.spec @@ -260,8 +260,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch -# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision -Patch2004: pthread-mutex-destroy.patch +# PATCH-FIX-UPSTREAM Properly handle forced elision in pthread_mutex_trylock (BZ #16657) +Patch2004: pthread-mutex-trylock-elision.patch # PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629) Patch2005: aarch64-setcontext.patch diff --git a/glibc-utils.changes b/glibc-utils.changes index f346b76..a98fc17 100644 --- a/glibc-utils.changes +++ b/glibc-utils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 7 09:06:32 UTC 2014 - schwab@suse.de + +- pthread-mutex-destroy.patch: Remove +- pthread-mutex-trylock-elision.patch: Properly handle forced elision in + pthread_mutex_trylock (bnc#865968, BZ #16657) + ------------------------------------------------------------------- Thu Apr 3 07:32:24 UTC 2014 - schwab@suse.de diff --git a/glibc-utils.spec b/glibc-utils.spec index 92ce4d9..2c981c9 100644 --- a/glibc-utils.spec +++ b/glibc-utils.spec @@ -259,8 +259,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch -# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision -Patch2004: pthread-mutex-destroy.patch +# PATCH-FIX-UPSTREAM Properly handle forced elision in pthread_mutex_trylock (BZ #16657) +Patch2004: pthread-mutex-trylock-elision.patch # PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629) Patch2005: aarch64-setcontext.patch diff --git a/glibc.changes b/glibc.changes index f346b76..a98fc17 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 7 09:06:32 UTC 2014 - schwab@suse.de + +- pthread-mutex-destroy.patch: Remove +- pthread-mutex-trylock-elision.patch: Properly handle forced elision in + pthread_mutex_trylock (bnc#865968, BZ #16657) + ------------------------------------------------------------------- Thu Apr 3 07:32:24 UTC 2014 - schwab@suse.de diff --git a/glibc.spec b/glibc.spec index 720f07a..3ea5f0c 100644 --- a/glibc.spec +++ b/glibc.spec @@ -260,8 +260,8 @@ Patch2001: resolv-dont-ignore-second-answer.patch Patch2002: ldd-system-interp.patch # PATCH-FIX-UPSTREAM Don't close or flush stdio streams on abort (BZ #15436) Patch2003: abort-no-flush.patch -# PATCH-FIX-UPSTREAM Skip checks in pthread_mutex_destroy when doing elision -Patch2004: pthread-mutex-destroy.patch +# PATCH-FIX-UPSTREAM Properly handle forced elision in pthread_mutex_trylock (BZ #16657) +Patch2004: pthread-mutex-trylock-elision.patch # PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629) Patch2005: aarch64-setcontext.patch diff --git a/pthread-mutex-destroy.patch b/pthread-mutex-destroy.patch deleted file mode 100644 index 4ecd866..0000000 --- a/pthread-mutex-destroy.patch +++ /dev/null @@ -1,61 +0,0 @@ -[PATCH] Skip checks in pthread_mutex_destroy when doing elision - -When doing elisison the __nusers field is not updated, thus can have an -arbitrary value. - - [BZ #16657] - * nptl/pthread_mutex_destroy.c (__pthread_mutex_destroy): Skip - checks when doing elision. - * nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c: New file. - -Index: glibc-2.18/nptl/pthread_mutex_destroy.c -=================================================================== ---- glibc-2.18.orig/nptl/pthread_mutex_destroy.c -+++ glibc-2.18/nptl/pthread_mutex_destroy.c -@@ -21,6 +21,9 @@ - - #include - -+#ifndef DO_ELISION -+# define DO_ELISION(m) 0 -+#endif - - int - __pthread_mutex_destroy (mutex) -@@ -28,7 +31,8 @@ __pthread_mutex_destroy (mutex) - { - LIBC_PROBE (mutex_destroy, 1, mutex); - -- if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 -+ if (!DO_ELISION (mutex) -+ && (mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0 - && mutex->__data.__nusers != 0) - return EBUSY; - -Index: glibc-2.18/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c -=================================================================== ---- /dev/null -+++ glibc-2.18/nptl/sysdeps/unix/sysv/linux/x86/pthread_mutex_destroy.c -@@ -0,0 +1,22 @@ -+/* Elided version of pthread_mutex_destroy. -+ Copyright (C) 2014 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 -+ . */ -+ -+#include -+#include "force-elision.h" -+ -+#include "nptl/pthread_mutex_destroy.c" diff --git a/pthread-mutex-trylock-elision.patch b/pthread-mutex-trylock-elision.patch new file mode 100644 index 0000000..6886125 --- /dev/null +++ b/pthread-mutex-trylock-elision.patch @@ -0,0 +1,53 @@ +[PATCH] Properly handle forced elision in pthread_mutex_trylock + + BZ #16657 + * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use + FORCE_ELISION instead of DO_ELISION. + * sysdeps/unix/sysv/linux/x86/force-elision.h (DO_ELISION): + Remove. +--- + nptl/pthread_mutex_trylock.c | 7 +++---- + nptl/sysdeps/unix/sysv/linux/x86/force-elision.h | 5 ----- + 2 files changed, 3 insertions(+), 9 deletions(-) + +Index: glibc-2.19/nptl/pthread_mutex_trylock.c +=================================================================== +--- glibc-2.19.orig/nptl/pthread_mutex_trylock.c ++++ glibc-2.19/nptl/pthread_mutex_trylock.c +@@ -26,8 +26,8 @@ + #define lll_trylock_elision(a,t) lll_trylock(a) + #endif + +-#ifndef DO_ELISION +-#define DO_ELISION(m) 0 ++#ifndef FORCE_ELISION ++#define FORCE_ELISION(m, s) + #endif + + /* We don't force elision in trylock, because this can lead to inconsistent +@@ -77,8 +77,7 @@ __pthread_mutex_trylock (mutex) + return 0; + + case PTHREAD_MUTEX_TIMED_NP: +- if (DO_ELISION (mutex)) +- goto elision; ++ FORCE_ELISION (mutex, goto elision); + /*FALL THROUGH*/ + case PTHREAD_MUTEX_ADAPTIVE_NP: + case PTHREAD_MUTEX_ERRORCHECK_NP: +Index: glibc-2.19/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h +=================================================================== +--- glibc-2.19.orig/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h ++++ glibc-2.19/nptl/sysdeps/unix/sysv/linux/x86/force-elision.h +@@ -16,11 +16,6 @@ + License along with the GNU C Library; if not, see + . */ + +-/* Check for elision on this lock without upgrading. */ +-#define DO_ELISION(m) \ +- (__pthread_force_elision \ +- && (m->__data.__kind & PTHREAD_MUTEX_NO_ELISION_NP) == 0) \ +- + /* Automatically enable elision for existing user lock kinds. */ + #define FORCE_ELISION(m, s) \ + if (__pthread_force_elision \