commit bdac1623cca4c3d1683e24cc7d093201c5d9fa26 Author: Florian Weimer Date: Tue Feb 6 09:19:03 2018 +0100 Record CVE-2018-6551 in NEWS and ChangeLog [BZ #22774] (cherry picked from commit 71aa429b029fdb6f9e65d44050388b51eca460d6) diff --git a/ChangeLog b/ChangeLog index f3fe271..76e2767 100644 --- a/ChangeLog +++ b/ChangeLog @@ -710,7 +710,9 @@ 2018-01-18 Arjun Shankar [BZ #22343] + [BZ #22774] CVE-2018-6485 + CVE-2018-6551 * malloc/malloc.c (checked_request2size): call REQUEST_OUT_OF_RANGE after padding. (_int_memalign): check for integer overflow before calling diff --git a/NEWS b/NEWS index a71c103..0f7b0d5 100644 --- a/NEWS +++ b/NEWS @@ -262,6 +262,10 @@ Security related changes: an object size near the value of SIZE_MAX, would return a pointer to a buffer which is too small, instead of NULL. Reported by Jakub Wilk. + CVE-2018-6551: The malloc function, when called with an object size near + the value of SIZE_MAX, would return a pointer to a buffer which is too + small, instead of NULL. + The following bugs are resolved with this release: [866] glob: glob should match dangling symlinks commit ce8a6550fa33363f9c5043fe1b3e9900c1145888 Author: H.J. Lu Date: Mon Feb 5 05:46:38 2018 -0800 sparc: Check PIC instead of SHARED in start.S [BZ #22638] Since start.o may be compiled as PIC, we should check PIC instead of SHARED. [BZ #22638] * sysdeps/sparc/sparc32/start.S (_start): Check PIC instead of SHARED. * sysdeps/sparc/sparc64/start.S (_start): Likewise. (cherry picked from commit 371b220f6208968d5f4bffc9f66bf885930a42a5) diff --git a/ChangeLog b/ChangeLog index 76e2767..6b1369a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-02-05 H.J. Lu + + [BZ #22638] + * sysdeps/sparc/sparc32/start.S (_start): Check PIC instead of + SHARED. + 2018-02-01 Dmitry V. Levin * version.h (RELEASE): Set to "stable". diff --git a/sysdeps/sparc/sparc32/start.S b/sysdeps/sparc/sparc32/start.S index 1db7327..46ba8b6 100644 --- a/sysdeps/sparc/sparc32/start.S +++ b/sysdeps/sparc/sparc32/start.S @@ -42,7 +42,7 @@ .global _start .type _start,#function _start: -#ifdef SHARED +#ifdef PIC SETUP_PIC_REG(l7) #endif @@ -57,7 +57,7 @@ _start: add %sp, 23*4, %o2 /* Load the addresses of the user entry points. */ -#ifndef SHARED +#ifndef PIC sethi %hi(main), %o0 sethi %hi(__libc_csu_init), %o3 sethi %hi(__libc_csu_fini), %o4 diff --git a/sysdeps/sparc/sparc64/start.S b/sysdeps/sparc/sparc64/start.S index e1865f1..75ff509 100644 --- a/sysdeps/sparc/sparc64/start.S +++ b/sysdeps/sparc/sparc64/start.S @@ -42,7 +42,7 @@ .global _start .type _start,#function _start: -#ifdef SHARED +#ifdef PIC SETUP_PIC_REG(l7) #endif @@ -58,7 +58,7 @@ _start: add %sp, STACK_BIAS+23*8, %o2 /* Load the addresses of the user entry points. */ -#ifndef SHARED +#ifndef PIC sethi %hi(main), %o0 sethi %hi(__libc_csu_init), %o3 sethi %hi(__libc_csu_fini), %o4 commit c8ad6ac1d1ac7600138b9dbd0b92e88c36cc999c Author: Dmitry V. Levin Date: Tue Feb 6 09:31:30 2018 +0000 NEWS: add an entry for bug 22638 diff --git a/NEWS b/NEWS index 0f7b0d5..4bb08b1 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,14 @@ See the end for copying conditions. Please send GNU C library bug reports via using `glibc' in the "product" field. +Version 2.27.1 + +The following bugs are resolved with this release: + + [22638] sparc: static binaries are broken if glibc is built by gcc + configured with --enable-default-pie + + Version 2.27 Major new features: commit 00c5a2d77a541fa005cb460bd1a45f51f1aa71ea Author: H.J. Lu Date: Mon Feb 5 06:17:18 2018 -0800 Add a missing ChangeLog item in commit 371b220f620 (cherry picked from commit 658050164df9bce9ef8f2ccb1b74ba9ee2b2f4af) diff --git a/ChangeLog b/ChangeLog index 6b1369a..65ebfbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ [BZ #22638] * sysdeps/sparc/sparc32/start.S (_start): Check PIC instead of SHARED. + * sysdeps/sparc/sparc64/start.S (_start): Likewise. 2018-02-01 Dmitry V. Levin commit 56170e064e2b21ce204f0817733e92f1730541ea Author: Igor Gnatenko Date: Wed Feb 7 13:53:10 2018 +0100 Linux: use reserved name __key in pkey_get [BZ #22797] _key is not reserved name and we should avoid using that. It seems that it was simple typo when pkey_* was implemented. (cherry picked from commit 388ff7bd0d57d7061fdd39a2f26f65687e8058da) diff --git a/ChangeLog b/ChangeLog index 65ebfbc..cfe43e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-02-07 Igor Gnatenko + + [BZ #22797] + * sysdeps/unix/sysv/linux/bits/mman-shared.h (pkey_get): Add + missing second underscore to parameter name. + 2018-02-05 H.J. Lu [BZ #22638] diff --git a/NEWS b/NEWS index 4bb08b1..1e4cb10 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ The following bugs are resolved with this release: [22638] sparc: static binaries are broken if glibc is built by gcc configured with --enable-default-pie + [22797] Linux: use reserved name __key in pkey_get Version 2.27 diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h index 7715e68..d15ba95 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-shared.h +++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h @@ -61,7 +61,7 @@ int pkey_set (int __key, unsigned int __access_rights) __THROW; /* Return the access rights for the current thread for KEY, which must have been allocated using pkey_alloc. */ -int pkey_get (int _key) __THROW; +int pkey_get (int __key) __THROW; /* Free an allocated protection key, which must have been allocated using pkey_alloc. */ commit 750a1c253f81a9dfe2cef5a568c68a5838ab46b9 Author: DJ Delorie Date: Fri Feb 9 18:37:15 2018 -0500 [RISC-V] Fix parsing flags in ELF64 files. When ldconfig reads Elf64 files to determine the ABI, it used the Elf32 type, so read the wrong location, and stored the wrong ABI type in the cache, making the cache useless. This patch uses an Elf64 type for Elf64 objects instead. Note that pre-patch caches might need to be manually removed and regenerated to get the correct ABIs stored. [BZ #22827] * sysdeps/unix/sysv/linux/riscv/readelflib.c (process_elf_file): Use 64-bit ELF type for 64-bit ELF objects. (cherry picked from commit 6a1ff640dcec04905d8518983ad6252d38b7a733) diff --git a/ChangeLog b/ChangeLog index cfe43e3..7be7772 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-02-09 DJ Delorie + + [BZ #22827] + * sysdeps/unix/sysv/linux/riscv/readelflib.c (process_elf_file): Use + 64-bit ELF type for 64-bit ELF objects. + 2018-02-07 Igor Gnatenko [BZ #22797] diff --git a/sysdeps/unix/sysv/linux/riscv/readelflib.c b/sysdeps/unix/sysv/linux/riscv/readelflib.c index 6e249ff..7e27e0c 100644 --- a/sysdeps/unix/sysv/linux/riscv/readelflib.c +++ b/sysdeps/unix/sysv/linux/riscv/readelflib.c @@ -43,6 +43,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag, { ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents; Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header; + Elf64_Ehdr *elf64_header = (Elf64_Ehdr *) elf_header; int ret; long flags; @@ -59,7 +60,7 @@ process_elf_file (const char *file_name, const char *lib, int *flag, { ret = process_elf64_file (file_name, lib, flag, osversion, soname, file_contents, file_length); - flags = elf32_header->e_flags; + flags = elf64_header->e_flags; } /* RISC-V linkers encode the floating point ABI as part of the ELF headers. */ commit 55171cd08f86b76ba140283d1b00bb903b49b6f4 Author: Adhemerval Zanella Date: Wed Feb 14 14:03:13 2018 -0200 Update SH libm-tests-ulps * sysdeps/sh/libm-test-ulps: Update. Signed-off-by: Adhemerval Zanella diff --git a/ChangeLog b/ChangeLog index 7be7772..cd72813 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-02-14 Adhemerval Zanella + + * sysdeps/sh/libm-test-ulps: Update. + 2018-02-09 DJ Delorie [BZ #22827] diff --git a/sysdeps/sh/libm-test-ulps b/sysdeps/sh/libm-test-ulps index da4224c..11c5f32 100644 --- a/sysdeps/sh/libm-test-ulps +++ b/sysdeps/sh/libm-test-ulps @@ -1,13 +1,31 @@ # Begin of automatic generation # Maximal error of functions: -Function: "acos_towardzero": +Function: "acos": float: 1 ifloat: 1 -Function: "acosh": +Function: "acos_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 + +Function: "acosh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "acosh_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "asin": +float: 1 +ifloat: 1 Function: "asin_towardzero": double: 1 @@ -18,16 +36,55 @@ ifloat: 1 Function: "asinh": double: 1 float: 1 +idouble: 1 +ifloat: 1 + +Function: "asinh_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "atan": +float: 1 ifloat: 1 Function: "atan2": float: 1 ifloat: 1 -Function: "atanh": +Function: "atan2_towardzero": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: "atan_towardzero": +double: 1 float: 1 +idouble: 1 ifloat: 1 +Function: "atanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "atanh_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "cabs": +double: 1 +idouble: 1 + +Function: "cabs_towardzero": +double: 1 +idouble: 1 + Function: Real part of "cacos": double: 1 float: 2 @@ -35,18 +92,52 @@ idouble: 1 ifloat: 2 Function: Imaginary part of "cacos": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 +ifloat: 2 + +Function: Real part of "cacos_towardzero": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: Imaginary part of "cacos_towardzero": +double: 4 +float: 2 +idouble: 4 ifloat: 2 Function: Real part of "cacosh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "cacosh": double: 1 float: 2 idouble: 1 ifloat: 2 -Function: Imaginary part of "cacosh": +Function: Real part of "cacosh_towardzero": +double: 4 +float: 2 +idouble: 4 +ifloat: 2 + +Function: Imaginary part of "cacosh_towardzero": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "carg": +float: 1 +ifloat: 1 + +Function: "carg_towardzero": double: 1 float: 2 idouble: 1 @@ -59,15 +150,27 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "casin": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 +ifloat: 2 + +Function: Real part of "casin_towardzero": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 + +Function: Imaginary part of "casin_towardzero": +double: 4 +float: 2 +idouble: 4 ifloat: 2 Function: Real part of "casinh": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Imaginary part of "casinh": @@ -76,8 +179,22 @@ float: 1 idouble: 1 ifloat: 1 +Function: Real part of "casinh_towardzero": +double: 4 +float: 2 +idouble: 4 +ifloat: 2 + +Function: Imaginary part of "casinh_towardzero": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 + Function: Real part of "catan": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Imaginary part of "catan": @@ -86,6 +203,18 @@ float: 1 idouble: 1 ifloat: 1 +Function: Real part of "catan_towardzero": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: Imaginary part of "catan_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + Function: Real part of "catanh": double: 1 float: 1 @@ -93,13 +222,33 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "catanh": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Function: "cbrt": +Function: Real part of "catanh_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "catanh_towardzero": double: 1 -float: 1 +float: 2 idouble: 1 +ifloat: 2 + +Function: "cbrt": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 + +Function: "cbrt_towardzero": +double: 3 +float: 1 +idouble: 3 ifloat: 1 Function: Real part of "ccos": @@ -114,6 +263,18 @@ float: 1 idouble: 1 ifloat: 1 +Function: Real part of "ccos_towardzero": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + +Function: Imaginary part of "ccos_towardzero": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 + Function: Real part of "ccosh": double: 1 float: 1 @@ -126,6 +287,18 @@ float: 1 idouble: 1 ifloat: 1 +Function: Real part of "ccosh_towardzero": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Imaginary part of "ccosh_towardzero": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 + Function: Real part of "cexp": double: 2 float: 1 @@ -138,27 +311,63 @@ float: 2 idouble: 1 ifloat: 2 -Function: Real part of "clog": +Function: Real part of "cexp_towardzero": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 + +Function: Imaginary part of "cexp_towardzero": +double: 1 +float: 3 +idouble: 1 +ifloat: 3 + +Function: Real part of "clog": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 Function: Imaginary part of "clog": float: 1 ifloat: 1 Function: Real part of "clog10": +double: 3 +float: 4 +idouble: 3 +ifloat: 4 + +Function: Imaginary part of "clog10": double: 2 float: 2 idouble: 2 ifloat: 2 -Function: Imaginary part of "clog10": +Function: Real part of "clog10_towardzero": +double: 5 +float: 5 +idouble: 5 +ifloat: 5 + +Function: Imaginary part of "clog10_towardzero": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 + +Function: Real part of "clog_towardzero": +double: 4 +float: 4 +idouble: 4 +ifloat: 4 + +Function: Imaginary part of "clog_towardzero": double: 1 -float: 1 +float: 3 idouble: 1 -ifloat: 1 +ifloat: 3 Function: "cos": float: 1 @@ -184,42 +393,90 @@ ifloat: 1 Function: Real part of "cpow": double: 2 -float: 4 +float: 5 idouble: 2 -ifloat: 4 +ifloat: 5 Function: Imaginary part of "cpow": float: 2 ifloat: 2 +Function: Real part of "cpow_towardzero": +double: 4 +float: 8 +idouble: 4 +ifloat: 8 + +Function: Imaginary part of "cpow_towardzero": +double: 1 +float: 2 +idouble: 1 +ifloat: 2 + Function: Real part of "csin": double: 1 float: 1 idouble: 1 ifloat: 1 -Function: Real part of "csinh": -float: 1 -ifloat: 1 +Function: Real part of "csin_towardzero": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 -Function: Imaginary part of "csinh": +Function: Imaginary part of "csin_towardzero": double: 1 float: 1 idouble: 1 ifloat: 1 -Function: Real part of "csqrt": -double: 1 +Function: Real part of "csinh": float: 1 -idouble: 1 ifloat: 1 -Function: Imaginary part of "csqrt": +Function: Imaginary part of "csinh": double: 1 float: 1 idouble: 1 ifloat: 1 +Function: Real part of "csinh_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "csinh_towardzero": +double: 2 +float: 3 +idouble: 2 +ifloat: 3 + +Function: Real part of "csqrt": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Imaginary part of "csqrt": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: Real part of "csqrt_towardzero": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 + +Function: Imaginary part of "csqrt_towardzero": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 + Function: Real part of "ctan": double: 1 float: 1 @@ -246,9 +503,9 @@ ifloat: 3 Function: Real part of "ctanh": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "ctanh": double: 2 @@ -270,25 +527,51 @@ ifloat: 3 Function: "erf": double: 1 +float: 1 idouble: 1 +ifloat: 1 -Function: "erfc": +Function: "erf_towardzero": double: 1 float: 1 idouble: 1 ifloat: 1 +Function: "erfc": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + +Function: "erfc_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 + Function: "exp10": +double: 2 +idouble: 2 + +Function: "exp10_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + +Function: "exp2": double: 1 idouble: 1 -Function: "exp10_towardzero": +Function: "exp2_towardzero": double: 1 idouble: 1 Function: "exp_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 Function: "expm1": double: 1 @@ -298,21 +581,31 @@ ifloat: 1 Function: "expm1_towardzero": double: 1 -float: 1 +float: 2 idouble: 1 -ifloat: 1 +ifloat: 2 Function: "fma_towardzero": double: 1 idouble: 1 Function: "gamma": +double: 4 +float: 3 +idouble: 4 +ifloat: 3 + +Function: "gamma_towardzero": +double: 5 +float: 3 +idouble: 5 +ifloat: 3 + +Function: "hypot": double: 1 -float: 1 idouble: 1 -ifloat: 1 -Function: "hypot": +Function: "hypot_towardzero": double: 1 idouble: 1 @@ -322,44 +615,94 @@ float: 2 idouble: 2 ifloat: 2 +Function: "j0_towardzero": +double: 3 +float: 1 +idouble: 3 +ifloat: 1 + Function: "j1": double: 1 float: 2 idouble: 1 ifloat: 2 +Function: "j1_towardzero": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + Function: "jn": double: 4 float: 4 idouble: 4 ifloat: 4 +Function: "jn_towardzero": +double: 5 +float: 5 +idouble: 5 +ifloat: 5 + Function: "lgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 4 +float: 3 +idouble: 4 +ifloat: 3 + +Function: "lgamma_towardzero": +double: 5 +float: 3 +idouble: 5 +ifloat: 3 Function: "log": float: 1 ifloat: 1 Function: "log10": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 +Function: "log10_towardzero": +double: 2 +float: 1 +idouble: 2 +ifloat: 1 + Function: "log1p": +double: 1 +float: 1 +idouble: 1 +ifloat: 1 + +Function: "log1p_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "log2": +double: 2 float: 1 +idouble: 2 ifloat: 1 +Function: "log2_towardzero": +double: 2 +idouble: 2 + Function: "pow": float: 1 ifloat: 1 Function: "pow_towardzero": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "sin": @@ -376,9 +719,27 @@ Function: "sincos": float: 1 ifloat: 1 -Function: "sinh_towardzero": +Function: "sincos_towardzero": double: 1 +float: 1 idouble: 1 +ifloat: 1 + +Function: "sinh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "sinh_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "tan": +float: 1 +ifloat: 1 Function: "tan_towardzero": double: 1 @@ -386,11 +747,29 @@ float: 1 idouble: 1 ifloat: 1 +Function: "tanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "tanh_towardzero": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + Function: "tgamma": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 +double: 5 +float: 4 +idouble: 5 +ifloat: 4 + +Function: "tgamma_towardzero": +double: 5 +float: 4 +idouble: 5 +ifloat: 4 Function: "y0": double: 2 @@ -398,16 +777,34 @@ float: 1 idouble: 2 ifloat: 1 +Function: "y0_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 + Function: "y1": double: 3 float: 2 idouble: 3 ifloat: 2 +Function: "y1_towardzero": +double: 3 +float: 2 +idouble: 3 +ifloat: 2 + Function: "yn": double: 3 float: 2 idouble: 3 ifloat: 2 +Function: "yn_towardzero": +double: 3 +float: 3 +idouble: 3 +ifloat: 3 + # end of automatic generation commit 79543e547945085041e004b460c61135890a2607 Author: Dmitry V. Levin Date: Tue Feb 6 09:31:30 2018 +0000 NEWS: add an entry for bug 22827 diff --git a/NEWS b/NEWS index 1e4cb10..40c0fbc 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ The following bugs are resolved with this release: [22638] sparc: static binaries are broken if glibc is built by gcc configured with --enable-default-pie [22797] Linux: use reserved name __key in pkey_get + [22827] RISC-V ELF64 parser mis-reads flag in ldconfig Version 2.27 commit 516fa6080481a1433c173320b1c1432868e1e38a Author: Dmitry V. Levin Date: Fri Dec 29 23:19:32 2017 +0000 linux/aarch64: sync sys/ptrace.h with Linux 4.15 [BZ #22433] Remove compat-specific constants that were never exported by kernel headers under these names. Before linux commit v3.7-rc1~16^2~1 they were exported with COMPAT_ prefix, and since that commit they are not exported at all. * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (__ptrace_request): Remove arm-specific PTRACE_GET_THREAD_AREA, PTRACE_GETHBPREGS, and PTRACE_SETHBPREGS. (cherry picked from commit 2fd4bbaa1446f1be700e10c526cf585a796c4991) diff --git a/ChangeLog b/ChangeLog index cd72813..08f2612 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-02-10 Dmitry V. Levin + + [BZ #22433] + * sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h (__ptrace_request): + Remove arm-specific PTRACE_GET_THREAD_AREA, PTRACE_GETHBPREGS, + and PTRACE_SETHBPREGS. + 2018-02-14 Adhemerval Zanella * sysdeps/sh/libm-test-ulps: Update. diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h index 4be45b9..444edbb 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/aarch64/sys/ptrace.h @@ -78,18 +78,10 @@ enum __ptrace_request PTRACE_DETACH = 17, #define PT_DETACH PTRACE_DETACH - PTRACE_GET_THREAD_AREA = 22, - /* Continue and stop at the next entry to or return from syscall. */ PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL - /* Get all hardware breakpoint registers. */ - PTRACE_GETHBPREGS = 29, - - /* Set all hardware breakpoint registers. */ - PTRACE_SETHBPREGS = 30, - /* Set ptrace filter options. */ PTRACE_SETOPTIONS = 0x4200, #define PT_SETOPTIONS PTRACE_SETOPTIONS commit 1b7671f6e19d2f8f71752a25e490337dbbcb1d12 Author: Sean McKean Date: Fri Feb 2 11:59:31 2018 +0100 time: Reference CLOCKS_PER_SEC in clock comment [BZ #22735] (cherry picked from commit 09e56b9e18f987105e39768f907db800e9330930) diff --git a/ChangeLog b/ChangeLog index 08f2612..4c0b250 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-02-02 Sean McKean + + [BZ #22735] + * time/time.h (clock): Reference CLOCKS_PER_SEC in comment. + 2018-02-10 Dmitry V. Levin [BZ #22433] diff --git a/NEWS b/NEWS index 40c0fbc..d7f1567 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ The following bugs are resolved with this release: [22638] sparc: static binaries are broken if glibc is built by gcc configured with --enable-default-pie + [22735] Misleading typo in time.h source comment regarding CLOCKS_PER_SECOND [22797] Linux: use reserved name __key in pkey_get [22827] RISC-V ELF64 parser mis-reads flag in ldconfig diff --git a/time/time.h b/time/time.h index 49d3043..4b55e34 100644 --- a/time/time.h +++ b/time/time.h @@ -68,7 +68,7 @@ typedef __pid_t pid_t; __BEGIN_DECLS /* Time used by the program so far (user time + system time). - The result / CLOCKS_PER_SECOND is program time in seconds. */ + The result / CLOCKS_PER_SEC is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ commit d5f136743d84ca2f7786ad796451b41881a8786b Author: Aurelien Jarno Date: Sun Feb 18 18:23:14 2018 +0100 Fix posix/tst-glob_lstat_compat on alpha [BZ #22818] The tst-glob_lstat_compat test needs to run tests on the previous version of glob. On alpha, there are three versions of glob, GLIBC_2.0, GLIBC_2.1 and GLIBC_2.27, while on other architectures there are only the GLIBC_2.0 and GLIBC_2.27 version. Therefore on alpha the previous version is GLIBC_2.1 and not GLIBC_2.0. Changelog: [BZ #22818] * posix/tst-glob_lstat_compat.c [__alpha__] (glob): Access the GLIBC_2.1 version. (cherry picked from commit f8d79582896c52cc2b50bdd030a3ec27ef23b587) diff --git a/ChangeLog b/ChangeLog index 4c0b250..25624b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-02-18 Aurelien Jarno + + [BZ #22818] + * posix/tst-glob_lstat_compat.c [__alpha__] (glob): Access + the GLIBC_2.1 version. + 2018-02-02 Sean McKean [BZ #22735] diff --git a/NEWS b/NEWS index d7f1567..e40fa8d 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ The following bugs are resolved with this release: configured with --enable-default-pie [22735] Misleading typo in time.h source comment regarding CLOCKS_PER_SECOND [22797] Linux: use reserved name __key in pkey_get + [22818] posix/tst-glob_lstat_compat failure on alpha [22827] RISC-V ELF64 parser mis-reads flag in ldconfig diff --git a/posix/tst-glob_lstat_compat.c b/posix/tst-glob_lstat_compat.c index c46bc9e..22cd1f0 100644 --- a/posix/tst-glob_lstat_compat.c +++ b/posix/tst-glob_lstat_compat.c @@ -35,7 +35,14 @@ #if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_27) __typeof (glob) glob; +/* On alpha glob exists in version GLIBC_2_0, GLIBC_2_1, and GLIBC_2_27. + This test needs to access the version prior to GLIBC_2_27, which is + GLIBC_2_1 on alpha, GLIBC_2_0 elsewhere. */ +# ifdef __alpha__ +compat_symbol_reference (libc, glob, glob, GLIBC_2_1); +# else compat_symbol_reference (libc, glob, glob, GLIBC_2_0); +# endif /* Compat glob should not call gl_lstat since for some old binaries it might be unitialized (for instance GNUmake). Check if it is indeed commit 6031b49c397a7f88d9f27f2ad4f53ad0ced57bde Author: Rical Jasan Date: Wed Jan 24 01:03:38 2018 -0800 manual: Fix Texinfo warnings about improper node names. A number of cross-references to the GCC info manual cause Texinfo warnings; e.g.: ./creature.texi:11: warning: @xref node name should not contain `.' This is due to "gcc.info" being used in the INFO-FILE-NAME (fourth) argument. Changing it to "gcc" removes these warnings. (Manually confirmed equivalent behaviour for make info, html, and pdf.) * manual/creature.texi: Convert references to gcc.info to gcc. * manual/stdio.texi: Likewise. * manual/string.texi: Likewise. (cherry picked from commit 1f6676d7da1b7c864e9a5d59fe9162a88bd21952) diff --git a/ChangeLog b/ChangeLog index 25624b6..abbcc70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-02-09 Rical Jasan + + * manual/creature.texi: Convert references to gcc.info to gcc. + * manual/stdio.texi: Likewise. + * manual/string.texi: Likewise. + 2018-02-18 Aurelien Jarno [BZ #22818] diff --git a/manual/creature.texi b/manual/creature.texi index 96f8ee0..2e05958 100644 --- a/manual/creature.texi +++ b/manual/creature.texi @@ -8,7 +8,7 @@ is controlled by which @dfn{feature test macros} you define. If you compile your programs using @samp{gcc -ansi}, you get only the @w{ISO C} library features, unless you explicitly request additional features by defining one or more of the feature macros. -@xref{Invoking GCC,, GNU CC Command Options, gcc.info, The GNU CC Manual}, +@xref{Invoking GCC,, GNU CC Command Options, gcc, The GNU CC Manual}, for more information about GCC options.@refill You should define these macros by using @samp{#define} preprocessor diff --git a/manual/stdio.texi b/manual/stdio.texi index 5d7b50c..38be236 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -1808,7 +1808,7 @@ verifies that the correct number and types of arguments are supplied. There is also a GNU C syntax to tell the compiler that a function you write uses a @code{printf}-style format string. @xref{Function Attributes, , Declaring Attributes of Functions, -gcc.info, Using GNU CC}, for more information. +gcc, Using GNU CC}, for more information. @node Table of Output Conversions @subsection Table of Output Conversions @@ -2730,7 +2730,7 @@ This tells the compiler that @code{eprintf} uses a format string like the format string appears as the first argument; and the arguments to satisfy the format begin with the second. @xref{Function Attributes, , Declaring Attributes of Functions, -gcc.info, Using GNU CC}, for more information. +gcc, Using GNU CC}, for more information. @node Parsing a Template String @subsection Parsing a Template String @@ -3478,7 +3478,7 @@ verifies that the correct number and types of arguments are supplied. There is also a GNU C syntax to tell the compiler that a function you write uses a @code{scanf}-style format string. @xref{Function Attributes, , Declaring Attributes of Functions, -gcc.info, Using GNU CC}, for more information. +gcc, Using GNU CC}, for more information. @node Table of Input Conversions @subsection Table of Input Conversions @@ -4033,7 +4033,7 @@ know that a function uses a @code{scanf}-style format string. Then it can check the number and types of arguments in each call to the function, and warn you when they do not match the format string. For details, see @ref{Function Attributes, , Declaring Attributes of Functions, -gcc.info, Using GNU CC}. +gcc, Using GNU CC}. @node EOF and Errors @section End-Of-File and Errors diff --git a/manual/string.texi b/manual/string.texi index ac02c6d..b07cfb4 100644 --- a/manual/string.texi +++ b/manual/string.texi @@ -1087,7 +1087,7 @@ are often easier and safer automatic techniques that cause buffer overruns to reliably terminate a program, such as GCC's @option{-fcheck-pointer-bounds} and @option{-fsanitize=address} options. @xref{Debugging Options,, Options for Debugging Your Program -or GCC, gcc.info, Using GCC}. Because truncation functions can mask +or GCC, gcc, Using GCC}. Because truncation functions can mask application bugs that would otherwise be caught by the automatic techniques, these functions should be used only when the application's underlying logic requires truncation. commit aa02f2b2f53363fb4b8cfc508989fc161e28b6d9 Author: Rical Jasan Date: Fri Feb 16 08:21:47 2018 -0800 manual: Fix a syntax error. The opening parenthesis for function arguments in an @deftypefun need to be separated from the function name. This isn't just a matter of the GNU coding style---it causes the "(void" (in this case) to be rendered as a part of the function name, causing a visual defect, and also results in a warning to the following effect during `make pdf': Warning: unbalanced parentheses in @def...) * manual/platform.texi (__riscv_flush_icache): Fix @deftypefun syntax. (cherry picked from commit 16efad5171ac1ac2c8728405f2703045f08c494b) diff --git a/ChangeLog b/ChangeLog index abbcc70..8eb6078 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-02-16 Rical Jasan + + * manual/platform.texi (__riscv_flush_icache): Fix @deftypefun + syntax. + 2018-02-09 Rical Jasan * manual/creature.texi: Convert references to gcc.info to gcc. diff --git a/manual/platform.texi b/manual/platform.texi index b8721a0..504addc 100644 --- a/manual/platform.texi +++ b/manual/platform.texi @@ -123,7 +123,7 @@ when it is not allowed, the priority is set to medium. Cache management facilities specific to RISC-V systems that implement the Linux ABI are declared in @file{sys/cachectl.h}. -@deftypefun {void} __riscv_flush_icache(void *@var{start}, void *@var{end}, unsigned long int @var{flags}) +@deftypefun {void} __riscv_flush_icache (void *@var{start}, void *@var{end}, unsigned long int @var{flags}) @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}} Enforce ordering between stores and instruction cache fetches. The range of addresses over which ordering is enforced is specified by @var{start} and commit b4108a361f05ee87122b86aa7d799e4512013588 Author: Rical Jasan Date: Fri Feb 16 08:47:20 2018 -0800 manual: Improve documentation of get_current_dir_name. [BZ #6889] This is a minor rewording to clarify the behaviour of get_current_dir_name. Additionally, the @vindex is moved above the @deftypefun so that following links give a better result with regard to context. [BZ #6889] * manual/filesys.texi (get_current_dir_name): Clarify behaviour. (cherry picked from commit 7d15ef84f50a80cb170f8ce3457010f59e221cb8) diff --git a/ChangeLog b/ChangeLog index 8eb6078..727b2f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-02-19 Rical Jasan + + [BZ #6889] + * manual/filesys.texi (get_current_dir_name): Clarify behaviour. + 2018-02-16 Rical Jasan * manual/platform.texi (__riscv_flush_icache): Fix @deftypefun diff --git a/NEWS b/NEWS index e40fa8d..5571c59 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ Version 2.27.1 The following bugs are resolved with this release: + [6889] 'PWD' mentioned but not specified [22638] sparc: static binaries are broken if glibc is built by gcc configured with --enable-default-pie [22735] Misleading typo in time.h source comment regarding CLOCKS_PER_SECOND diff --git a/manual/filesys.texi b/manual/filesys.texi index ca77996..cc70a6b 100644 --- a/manual/filesys.texi +++ b/manual/filesys.texi @@ -147,19 +147,20 @@ necessarily enough space to contain the directory name. That is why this function is deprecated. @end deftypefn +@vindex PWD @deftypefun {char *} get_current_dir_name (void) @standards{GNU, unistd.h} @safety{@prelim{}@mtsafe{@mtsenv{}}@asunsafe{@ascuheap{}}@acunsafe{@acsmem{} @acsfd{}}} @c Besides getcwd, which this function calls as a fallback, it calls @c getenv, with the potential thread-safety issues that brings about. -@vindex PWD -This @code{get_current_dir_name} function is basically equivalent to -@w{@code{getcwd (NULL, 0)}}. The only difference is that the value of -the @code{PWD} variable is returned if this value is correct. This is a -subtle difference which is visible if the path described by the -@code{PWD} value is using one or more symbol links in which case the -value returned by @code{getcwd} can resolve the symbol links and -therefore yield a different result. +The @code{get_current_dir_name} function is basically equivalent to +@w{@code{getcwd (NULL, 0)}}, except the value of the @env{PWD} +environment variable is first examined, and if it does in fact +correspond to the current directory, that value is returned. This is +a subtle difference which is visible if the path described by the +value in @env{PWD} is using one or more symbolic links, in which case +the value returned by @code{getcwd} would resolve the symbolic links +and therefore yield a different result. This function is a GNU extension. @end deftypefun commit e51dfc04ef9bc7bf7d44ac76b12a20bbadbe9add Author: Adhemerval Zanella Date: Mon Mar 5 14:46:24 2018 -0300 powerpc: Fix TLE build for SPE (BZ #22926) Some SPE opcodes clashes with some recent PowerISA opcodes and until recently gas did not complain about it. However binutils recently changed it and now VLE configured gas does not support to assembler some instruction that might class with VLE (HTM for instance). It also does not help that glibc build hardware lock elision support as default (regardless of assembler support). Although runtime will not actually enables TLE on SPE hardware (since kernel will not advertise it), I see little advantage on adding HTM support on SPE built glibc. SPE uses an incompatible ABI which does not allow share the same build with default powerpc and HTM code slows down SPE without any benefict. This patch fixes it by only building HTM when SPE configuration is not used. Checked with a powerpc-linux-gnuspe build. I also did some sniff tests on a e500 hardware without any issue. [BZ #22926] * sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION_IMPL): Define empty for __SPE__. * sysdeps/powerpc/sysdep.h (ABORT_TRANSACTION): Likewise. * sysdeps/unix/sysv/linux/powerpc/elision-lock.c (__lll_lock_elision): Do not build hardware transactional code for __SPE__. * sysdeps/unix/sysv/linux/powerpc/elision-trylock.c (__lll_trylock_elision): Likewise. * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c (__lll_unlock_elision): Likewise. Cherry-pick from e921c89e01389161c036ec09112da6e18aeaa688. diff --git a/ChangeLog b/ChangeLog index 727b2f9..494f98b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2018-03-07 Adhemerval Zanella + + [BZ #22926] + * sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION_IMPL): Define + empty for __SPE__. + * sysdeps/powerpc/sysdep.h (ABORT_TRANSACTION): Likewise. + * sysdeps/unix/sysv/linux/powerpc/elision-lock.c (__lll_lock_elision): + Do not build hardware transactional code for __SPE__. + * sysdeps/unix/sysv/linux/powerpc/elision-trylock.c + (__lll_trylock_elision): Likewise. + * sysdeps/unix/sysv/linux/powerpc/elision-unlock.c + (__lll_unlock_elision): Likewise. + 2018-02-19 Rical Jasan [BZ #6889] diff --git a/sysdeps/powerpc/powerpc32/sysdep.h b/sysdeps/powerpc/powerpc32/sysdep.h index 8e32a2a..5f1294e 100644 --- a/sysdeps/powerpc/powerpc32/sysdep.h +++ b/sysdeps/powerpc/powerpc32/sysdep.h @@ -90,7 +90,7 @@ GOT_LABEL: ; \ cfi_endproc; \ ASM_SIZE_DIRECTIVE(name) -#if ! IS_IN(rtld) +#if !IS_IN(rtld) && !defined(__SPE__) # define ABORT_TRANSACTION_IMPL \ cmpwi 2,0; \ beq 1f; \ diff --git a/sysdeps/powerpc/sysdep.h b/sysdeps/powerpc/sysdep.h index 03db75f..8a6d236 100644 --- a/sysdeps/powerpc/sysdep.h +++ b/sysdeps/powerpc/sysdep.h @@ -174,7 +174,7 @@ we abort transaction just before syscalls. [1] Documentation/powerpc/transactional_memory.txt [Syscalls] */ -#if !IS_IN(rtld) +#if !IS_IN(rtld) && !defined(__SPE__) # define ABORT_TRANSACTION \ ({ \ if (THREAD_GET_TM_CAPABLE ()) \ diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c index b7093fe..98a23f0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c @@ -45,6 +45,7 @@ int __lll_lock_elision (int *lock, short *adapt_count, EXTRAARG int pshared) { +#ifndef __SPE__ /* adapt_count is accessed concurrently but is just a hint. Thus, use atomic accesses but relaxed MO is sufficient. */ if (atomic_load_relaxed (adapt_count) > 0) @@ -82,5 +83,6 @@ __lll_lock_elision (int *lock, short *adapt_count, EXTRAARG int pshared) aconf.skip_lock_out_of_tbegin_retries); use_lock: +#endif return LLL_LOCK ((*lock), pshared); } diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c index b74a810..fabb03b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c @@ -30,6 +30,7 @@ int __lll_trylock_elision (int *futex, short *adapt_count) { +#ifndef __SPE__ /* Implement POSIX semantics by forbiding nesting elided trylocks. */ __libc_tabort (_ABORT_NESTED_TRYLOCK); @@ -65,5 +66,6 @@ __lll_trylock_elision (int *futex, short *adapt_count) } use_lock: +#endif return lll_trylock (*futex); } diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c index dcfab19..14e0680 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c @@ -23,6 +23,7 @@ int __lll_unlock_elision (int *lock, short *adapt_count, int pshared) { +#ifndef __SPE__ /* When the lock was free we're in a transaction. */ if (*lock == 0) __libc_tend (0); @@ -39,5 +40,8 @@ __lll_unlock_elision (int *lock, short *adapt_count, int pshared) lll_unlock ((*lock), pshared); } +#else + lll_unlock ((*lock), pshared); +#endif return 0; } commit 3a53ef9b02eb98c66c04309176ed47c9c73eac59 Author: Aurelien Jarno Date: Fri Mar 9 00:14:27 2018 +0100 sparc32: Add nop before __startcontext to stop unwinding [BZ #22919] On sparc32 tst-makecontext fails, as backtrace called within a context created by makecontext to yield infinite backtrace. Fix that the same way than nios2 by adding a nop just before __startcontext. This is needed as otherwise FDE lookup just repeatedly finds __setcontext's FDE in an infinite loop, due to the convention of using 'address - 1' for FDE lookup. Changelog: [BZ #22919] * sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S (__startcontext): Add nop before __startcontext, add explaining comments. (cherry picked from commit 9aa5c222b9e0409143410a02b6364a3b25dbf028) diff --git a/ChangeLog b/ChangeLog index 494f98b..3ae0ecd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-03-09 Aurelien Jarno + + [BZ #22919] + * sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S (__startcontext): + Add nop before __startcontext, add explaining comments. + 2018-03-07 Adhemerval Zanella [BZ #22926] diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S b/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S index 695f172..283aef1 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/setcontext.S @@ -95,6 +95,19 @@ END(__setcontext) weak_alias (__setcontext, setcontext) +/* We add an NOP here to separate between __setcontext/__startcontext. The + wanted behavior that happens is: when unwinding from a function called + inside a makecontext() context, FDE lookup will use '&__startcontext - 1', + then returns NULL for no FDE found, and immediately ends the unwind, in + a normal fashion. + + If this NOP word does not exist, FDE lookup just repeatedly finds + __setcontext's FDE in an infinite loop, due to the convention of using + 'address - 1' for FDE lookup. Modifiying/deleting the below + __startcontext's FDE has no help on this. */ + + nop + /* This is the helper code which gets called if a function which is registered with 'makecontext' returns. In this case we have to install the context listed in the uc_link element of the context