Author: aurel32 Date: 2015-09-13 17:41:06 +0000 (Sun, 13 Sep 2015) New Revision: 6572
Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu-r2.diff glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu2.diff glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-start.diff glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fptr-table-size.diff glibc-package/branches/glibc-2.21/debian/patches/hppa/local-setcontext.diff Removed: glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fpu.diff Modified: glibc-package/branches/glibc-2.21/debian/changelog glibc-package/branches/glibc-2.21/debian/patches/series Log: Merge 2.19-20 release into the experimental branch Modified: glibc-package/branches/glibc-2.21/debian/changelog =================================================================== --- glibc-package/branches/glibc-2.21/debian/changelog 2015-09-13 17:02:54 UTC (rev 6571) +++ glibc-package/branches/glibc-2.21/debian/changelog 2015-09-13 17:41:06 UTC (rev 6572) @@ -56,8 +56,6 @@ installed. They are still tested when calling the build-arch or binary-arch targets, but not anymore when calling the build-indep or binary-indep targets. - * sysdeps.mk/mips*.mk: force the ISA until it gets propagated to all - GCC versions. [ Steven Chamberlain ] * sysdeps/kfreebsd.mk: find kfreebsd-kernel-headers in multiarch path. @@ -200,6 +198,7 @@ - debian/patches/amd64/submitted-rwlock-stack-imbalance.diff: Dropped. - debian/patches/any/cvs-check_pf-infinite-loop.diff: Merged. - debian/patches/any/cvs-getnetbyname.diff: Merged. + - debian/patches/any/cvs-pie-lt_executable.diff: Merged. - debian/patches/any/cvs-regex-alloca.diff: Merged. - debian/patches/any/cvs-resolv-first-query-failure.diff: Merged. - debian/patches/any/cvs-socketcall-syscall.diff: Merged. @@ -303,8 +302,9 @@ -- Adam Conrad <adcon...@0c3.net> Fri, 06 Mar 2015 13:47:43 -0700 -glibc (2.19-20~0) UNRELEASED; urgency=medium +glibc (2.19-20) unstable; urgency=medium + [ Samuel Thibault ] * patches/hurd-i386/tg-mmap32th_bit.diff: New patch to fix libpciaccess mapping of BARs above 2GiB. Closes: #793543. * rules.d/build.mk: Also install crt0.o in stage1, if any. @@ -329,8 +329,27 @@ * control, control.d/main: Bump mig dependency to get the gnu-type alias in non-cross case too. - -- Samuel Thibault <sthiba...@debian.org> Sun, 09 Aug 2015 20:00:16 +0000 + [ Aurelien Jarno ] + * Update from upstream stable branch: + - Fix pthread_mutex_trylock with lock elision. Closes: #759197, + #788999. + - Fix gprof entry point on ppc64el. Closes: #794222. + - Fix a buffer overflow in getanswer_r (CVE-2015-1781). Closes: #796105. + - Fix getaddrinfo sometimes returning uninitialized data with nscd. + Closes: #798515. + * sysdeps.mk/mips*.mk: force the ISA until it gets propagated to all GCC + versions. + * Update hppa patches. Closes: #785664: + - Replace patches/hppa/local-fpu.diff by upstream patch cvs-fpu-r2.diff. + - Add patches/hppa/cvs-fpu2.diff from upstream. + - Add patches/hppa/local-fptr-table-size.diff from Carlos O'Donnell. + - Add patches/hppa/local-setcontext.diff. + - Add patches/hppa/cvs-start.diff from upstream. + * patches/any/cvs-pie-lt_executable.diff: new patch from upstream to fix + explicit loader invocation with PIE binaries. Closes: #796899. + -- Aurelien Jarno <aure...@debian.org> Sun, 13 Sep 2015 18:39:36 +0200 + glibc (2.19-19) unstable; urgency=medium * patches/hurd-i386/cvs-mlock.diff: New patch to permit one to use mlock Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu-r2.diff =================================================================== --- glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu-r2.diff (rev 0) +++ glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu-r2.diff 2015-09-13 17:41:06 UTC (rev 6572) @@ -0,0 +1,57 @@ +2015-03-07 John David Anglin <dang...@gcc.gnu.org> + + * sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Don't modify + bufptr in asms. + * sysdeps/hppa/fpu/fesetenv.c (fesetenv): Likewise. + +Index: glibc-2.21/sysdeps/hppa/fpu/feholdexcpt.c +=================================================================== +--- glibc-2.21.orig/sysdeps/hppa/fpu/feholdexcpt.c ++++ glibc-2.21/sysdeps/hppa/fpu/feholdexcpt.c +@@ -29,8 +29,8 @@ feholdexcept (fenv_t *envp) + /* Store the environment. */ + bufptr = clear.buf; + __asm__ ( +- "fstd,ma %%fr0,8(%1)\n" +- : "=m" (clear), "+r" (bufptr) : : "%r0"); ++ "fstd %%fr0,0(%1)\n" ++ : "=m" (clear) : "r" (bufptr) : "%r0"); + memcpy (envp, &clear.env, sizeof (fenv_t)); + + /* Clear exception queues */ +@@ -40,11 +40,9 @@ feholdexcept (fenv_t *envp) + /* Now clear all flags */ + clear.env.__status_word &= ~(FE_ALL_EXCEPT << 27); + +- /* Load the new environment. Note: fr0 must load last to enable T-bit +- Thus we start bufptr at the end and work backwards */ +- bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4); ++ /* Load the new environment. Note: fr0 must load last to enable T-bit. */ + __asm__ ( +- "fldd,mb -8(%0),%%fr0\n" ++ "fldd 0(%0),%%fr0\n" + : : "r" (bufptr), "m" (clear) : "%r0"); + + return 0; +Index: glibc-2.21/sysdeps/hppa/fpu/fesetenv.c +=================================================================== +--- glibc-2.21.orig/sysdeps/hppa/fpu/fesetenv.c ++++ glibc-2.21/sysdeps/hppa/fpu/fesetenv.c +@@ -33,7 +33,7 @@ fesetenv (const fenv_t *envp) + we want to use from the environment specified by the parameter. */ + bufptr = temp.buf; + __asm__ ( +- "fstd,ma %%fr0,8(%1)\n" ++ "fstd %%fr0,0(%1)\n" + : "=m" (temp) : "r" (bufptr) : "%r0"); + + temp.env.__status_word &= ~(FE_ALL_EXCEPT +@@ -54,7 +54,7 @@ fesetenv (const fenv_t *envp) + we take advantage of that to load in reverse order so fr0 + is loaded last and T-Bit is enabled. */ + __asm__ ( +- "fldd,mb -8(%1),%%fr0\n" ++ "fldd 0(%1),%%fr0\n" + : : "m" (temp), "r" (bufptr) : "%r0" ); + + /* Success. */ Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu2.diff =================================================================== --- glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu2.diff (rev 0) +++ glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-fpu2.diff 2015-09-13 17:41:06 UTC (rev 6572) @@ -0,0 +1,109 @@ +Index: glibc-2.21/sysdeps/hppa/fpu/feupdateenv.c +=================================================================== +--- glibc-2.21.orig/sysdeps/hppa/fpu/feupdateenv.c ++++ glibc-2.21/sysdeps/hppa/fpu/feupdateenv.c +@@ -29,9 +29,22 @@ + __asm__ ("fstd %%fr0,0(%1) \n\t" + "fldd 0(%1),%%fr0 \n\t" + : "=m" (s.l) : "r" (&s.l)); +- memcpy(&temp, envp, sizeof(fenv_t)); +- /* Currently raised exceptions not cleared */ +- temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27); ++ ++ /* Given environment with exception flags not cleared. */ ++ if ((envp != FE_DFL_ENV) && (envp != FE_NOMASK_ENV)) ++ { ++ memcpy(&temp, envp, sizeof(fenv_t)); ++ temp.__status_word |= s.sw[0] & (FE_ALL_EXCEPT << 27); ++ } ++ ++ /* Default environment with exception flags not cleared. */ ++ if (envp == FE_DFL_ENV) ++ temp.__status_word = s.sw[0] & (FE_ALL_EXCEPT << 27); ++ ++ /* All traps enabled and current exception flags not cleared. */ ++ if (envp == FE_NOMASK_ENV) ++ temp.__status_word = (s.sw[0] & (FE_ALL_EXCEPT << 27)) | FE_ALL_EXCEPT; ++ + /* Install new environment. */ + __fesetenv (&temp); + /* Success. */ +Index: glibc-2.21/sysdeps/hppa/fpu/fpu_control.h +=================================================================== +--- glibc-2.21.orig/sysdeps/hppa/fpu/fpu_control.h ++++ glibc-2.21/sysdeps/hppa/fpu/fpu_control.h +@@ -19,7 +19,7 @@ + #ifndef _FPU_CONTROL_H + #define _FPU_CONTROL_H + +-/* Masking of interrupts */ ++/* Masking of interrupts. */ + #define _FPU_MASK_PM 0x00000001 /* Inexact (I) */ + #define _FPU_MASK_UM 0x00000002 /* Underflow (U) */ + #define _FPU_MASK_OM 0x00000004 /* Overflow (O) */ +@@ -30,6 +30,8 @@ + #define _FPU_HPPA_MASK_RM 0x00000600 /* Rounding mode mask */ + /* Masking of interrupt enable bits. */ + #define _FPU_HPPA_MASK_INT 0x0000001f /* Interrupt mask */ ++/* Shift by 27 to install flag bits. */ ++#define _FPU_HPPA_SHIFT_FLAGS 27 + + /* There are no reserved bits in the PA fpsr (though some are undefined). */ + #define _FPU_RESERVED 0x00000000 +@@ -45,7 +47,7 @@ typedef unsigned int fpu_control_t; + #define _FPU_GETCW(cw) \ + ({ \ + union { __extension__ unsigned long long __fpreg; unsigned int __halfreg[2]; } __fullfp; \ +- /* Get the current status word. */ \ ++ /* Get the current status word. */ \ + __asm__ ("fstd %%fr0,0(%1)\n\t" \ + "fldd 0(%1),%%fr0\n\t" \ + : "=m" (__fullfp.__fpreg) : "r" (&__fullfp.__fpreg) : "%r0"); \ +@@ -54,7 +56,10 @@ typedef unsigned int fpu_control_t; + + #define _FPU_SETCW(cw) \ + ({ \ +- union { __extension__ unsigned long long __fpreg; unsigned int __halfreg[2]; } __fullfp; \ ++ union { __extension__ unsigned long long __fpreg; unsigned int __halfreg[2]; } __fullfp; \ ++ /* Get the current status word and set the control word. */ \ ++ __asm__ ("fstd %%fr0,0(%1)\n\t" \ ++ : "=m" (__fullfp.__fpreg) : "r" (&__fullfp.__fpreg) : "%r0"); \ + __fullfp.__halfreg[0] = cw; \ + __asm__ ("fldd 0(%1),%%fr0\n\t" \ + : : "m" (__fullfp.__fpreg), "r" (&__fullfp.__fpreg) : "%r0" ); \ +Index: glibc-2.21/sysdeps/hppa/fpu/fsetexcptflg.c +=================================================================== +--- glibc-2.21.orig/sysdeps/hppa/fpu/fsetexcptflg.c ++++ glibc-2.21/sysdeps/hppa/fpu/fsetexcptflg.c +@@ -18,19 +18,25 @@ + <http://www.gnu.org/licenses/>. */ + + #include <fenv.h> +-#include <math.h> ++#include <fpu_control.h> + + int + fesetexceptflag (const fexcept_t *flagp, int excepts) + { +- union { unsigned long long l; unsigned int sw[2]; } s; ++ fpu_control_t fpsr; ++ fpu_control_t fpsr_new; + + /* Get the current status word. */ +- __asm__ ("fstd %%fr0,0(%1)" : "=m" (s.l) : "r" (&s.l) : "%r0"); +- /* Install new raised trap bits */ +- s.sw[0] |= (*flagp & excepts & FE_ALL_EXCEPT) << 27; ++ _FPU_GETCW (fpsr); ++ excepts &= FE_ALL_EXCEPT; ++ ++ /* Install new raised flags. */ ++ fpsr_new = fpsr & ~(excepts << _FPU_HPPA_SHIFT_FLAGS); ++ fpsr_new |= (*flagp & excepts) << _FPU_HPPA_SHIFT_FLAGS; ++ + /* Store the new status word. */ +- __asm__ ("fldd 0(%0),%%fr0" : : "r" (&s.l), "m" (s.l) : "%r0"); ++ if (fpsr != fpsr_new) ++ _FPU_SETCW (fpsr_new); + + /* Success. */ + return 0; Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-start.diff =================================================================== --- glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-start.diff (rev 0) +++ glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-start.diff 2015-09-13 17:41:06 UTC (rev 6572) @@ -0,0 +1,44 @@ +Index: glibc-2.21/sysdeps/hppa/start.S +=================================================================== +--- glibc-2.21.orig/sysdeps/hppa/start.S ++++ glibc-2.21/sysdeps/hppa/start.S +@@ -42,7 +42,11 @@ + /* Have the linker create plabel words so we get PLABEL32 + relocs and not 21/14. The use of 21/14 relocs is only + supported in the latest dynamic linker. */ +- .section .rodata ++#ifdef SHARED ++ .section .data.rel.ro,"aw",@progbits ++#else ++ .section .rodata,"a",@progbits ++#endif + .align 4 + .Lpmain: + .word P%main +@@ -52,6 +56,10 @@ + .word P%__libc_csu_fini + .Lp__libc_csu_init: + .word P%__libc_csu_init ++#ifdef SHARED ++.Lp__global: ++ .word $global$ ++#endif + + .text + .align 4 +@@ -122,10 +130,14 @@ _start: + /* void *stack_end (7th argument) */ + stw %sp, -60(%sp) + ++#ifdef SHARED ++ addil LT'.Lp__global, %r19 ++ ldw RT'.Lp__global(%r1), %dp ++#else + /* load global */ + ldil L%$global$, %dp + ldo R%$global$(%dp), %dp +- ++#endif + bl __libc_start_main,%r2 + nop + /* die horribly if it returned (it shouldn't) */ Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fptr-table-size.diff =================================================================== --- glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fptr-table-size.diff (rev 0) +++ glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fptr-table-size.diff 2015-09-13 17:41:06 UTC (rev 6572) @@ -0,0 +1,54 @@ +Index: glibc-2.21/sysdeps/hppa/dl-fptr.c +=================================================================== +--- glibc-2.21.orig/sysdeps/hppa/dl-fptr.c ++++ glibc-2.21/sysdeps/hppa/dl-fptr.c +@@ -28,6 +28,7 @@ + #include <dl-fptr.h> + #include <dl-unmap-segments.h> + #include <atomic.h> ++#include <libc-internal.h> + + #ifndef ELF_MACHINE_BOOT_FPTR_TABLE_LEN + /* ELF_MACHINE_BOOT_FPTR_TABLE_LEN should be greater than the number of +@@ -181,24 +182,29 @@ + static inline ElfW(Addr) * __attribute__ ((always_inline)) + make_fptr_table (struct link_map *map) + { +- const ElfW(Sym) *symtab +- = (const void *) D_PTR (map, l_info[DT_SYMTAB]); ++ const ElfW(Sym) *symtab = (const void *) D_PTR (map, l_info[DT_SYMTAB]); + const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]); + ElfW(Addr) *fptr_table; + size_t size; + size_t len; ++ const ElfW(Sym) *symtabend; + +- /* XXX Apparently the only way to find out the size of the dynamic +- symbol section is to assume that the string table follows right +- afterwards... */ +- len = ((strtab - (char *) symtab) ++ /* Determine the end of the dynamic symbol table using the hash. */ ++ if (map->l_info[DT_HASH] != NULL) ++ symtabend = (symtab + ((Elf_Symndx *) D_PTR (map, l_info[DT_HASH]))[1]); ++ else ++ /* There is no direct way to determine the number of symbols in the ++ dynamic symbol table and no hash table is present. The ELF ++ binary is ill-formed but what shall we do? Use the beginning of ++ the string table which generally follows the symbol table. */ ++ symtabend = (const ElfW(Sym) *) strtab; ++ ++ len = (((char *) symtabend - (char *) symtab) + / map->l_info[DT_SYMENT]->d_un.d_val); +- size = ((len * sizeof (fptr_table[0]) + GLRO(dl_pagesize) - 1) +- & -GLRO(dl_pagesize)); +- /* XXX We don't support here in the moment systems without MAP_ANON. +- There probably are none for IA-64. In case this is proven wrong +- we will have to open /dev/null here and use the file descriptor +- instead of the hard-coded -1. */ ++ size = ALIGN_UP (len * sizeof (fptr_table[0]), GLRO(dl_pagesize)); ++ ++ /* We don't support systems without MAP_ANON. We avoid using malloc ++ because this might get called before malloc is setup. */ + fptr_table = __mmap (NULL, size, + PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, + -1, 0); Deleted: glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fpu.diff =================================================================== --- glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fpu.diff 2015-09-13 17:02:54 UTC (rev 6571) +++ glibc-package/branches/glibc-2.21/debian/patches/hppa/local-fpu.diff 2015-09-13 17:41:06 UTC (rev 6572) @@ -1,46 +0,0 @@ -Index: eglibc-2.18/sysdeps/hppa/fpu/feholdexcpt.c -=================================================================== ---- eglibc-2.18.orig/sysdeps/hppa/fpu/feholdexcpt.c 2013-06-15 13:37:04.000000000 -0400 -+++ eglibc-2.18/sysdeps/hppa/fpu/feholdexcpt.c 2014-04-09 21:01:32.492451011 -0400 -@@ -29,8 +29,8 @@ - /* Store the environment. */ - bufptr = clear.buf; - __asm__ ( -- "fstd,ma %%fr0,8(%1)\n" -- : "=m" (clear), "+r" (bufptr) : : "%r0"); -+ "fstd %%fr0,0(%1)\n" -+ : "=m" (clear) : "r" (bufptr) : "%r0"); - memcpy (envp, &clear.env, sizeof (fenv_t)); - - /* Clear exception queues */ -@@ -44,7 +44,7 @@ - Thus we start bufptr at the end and work backwards */ - bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4); - __asm__ ( -- "fldd,mb -8(%0),%%fr0\n" -+ "fldd 0(%0),%%fr0\n" - : : "r" (bufptr), "m" (clear) : "%r0"); - - return 0; -Index: eglibc-2.18/sysdeps/hppa/fpu/fesetenv.c -=================================================================== ---- eglibc-2.18.orig/sysdeps/hppa/fpu/fesetenv.c 2013-06-15 13:37:04.000000000 -0400 -+++ eglibc-2.18/sysdeps/hppa/fpu/fesetenv.c 2014-04-09 20:59:45.221386729 -0400 -@@ -33,7 +33,7 @@ - we want to use from the environment specified by the parameter. */ - bufptr = temp.buf; - __asm__ ( -- "fstd,ma %%fr0,8(%1)\n" -+ "fstd %%fr0,0(%1)\n" - : "=m" (temp) : "r" (bufptr) : "%r0"); - - temp.env.__status_word &= ~(FE_ALL_EXCEPT -@@ -54,7 +54,7 @@ - we take advantage of that to load in reverse order so fr0 - is loaded last and T-Bit is enabled. */ - __asm__ ( -- "fldd,mb -8(%1),%%fr0\n" -+ "fldd 0(%1),%%fr0\n" - : : "m" (temp), "r" (bufptr) : "%r0" ); - - /* Success. */ Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/local-setcontext.diff =================================================================== --- glibc-package/branches/glibc-2.21/debian/patches/hppa/local-setcontext.diff (rev 0) +++ glibc-package/branches/glibc-2.21/debian/patches/hppa/local-setcontext.diff 2015-09-13 17:41:06 UTC (rev 6572) @@ -0,0 +1,15 @@ +Index: glibc-2.21/sysdeps/unix/sysv/linux/hppa/setcontext.S +=================================================================== +--- glibc-2.21.orig/sysdeps/unix/sysv/linux/hppa/setcontext.S ++++ glibc-2.21/sysdeps/unix/sysv/linux/hppa/setcontext.S +@@ -139,8 +139,8 @@ ENTRY(__setcontext) + nop + + /* No further context available. Exit now. */ +- bl _exit, %r2 +- ldi -1, %r26 ++ bl HIDDEN_JUMPTARGET(exit), %r2 ++ ldi 0, %r26 + + + .Lerror: Modified: glibc-package/branches/glibc-2.21/debian/patches/series =================================================================== --- glibc-package/branches/glibc-2.21/debian/patches/series 2015-09-13 17:02:54 UTC (rev 6571) +++ glibc-package/branches/glibc-2.21/debian/patches/series 2015-09-13 17:41:06 UTC (rev 6572) @@ -60,9 +60,13 @@ hppa/local-stack-grows-up.diff hppa/local-elf-make-cflags.diff hppa/local-fcntl-osync.diff -hppa/local-fpu.diff hppa/local-shmlba.diff hppa/local-pthread_spin_unlock.diff +hppa/cvs-fpu-r2.diff +hppa/cvs-fpu2.diff +hppa/local-fptr-table-size.diff +hppa/local-setcontext.diff +hppa/cvs-start.diff hurd-i386/local-enable-ldconfig.diff hurd-i386/tg-context_functions.diff