summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* nptl: Update struct pthread_unwind_buf [BZ #22743]hjl/pr22743/masterH.J. Lu2018-01-268-34/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In glibc 2.28, the size of cancel_jmp_buf in struct pthread_unwind_buf has been increased to match the size of __jmp_buf_tag on Linux/x86 in order to save and restore shadow stack register. pthread_unwind_buf is used in <pthread.h>, whose address is passed from applications to libpthread. To access the private data in struct pthread_unwind_buf, which is placed after cancel_jmp_buf, in libpthread, we must know which struct pthread_unwind_buf, before glibc 28 and after glibc 2.28, is used in caller. If the size of caller's struct pthread_unwind_buf is smaller than what libpthread expects, libpthread will override caller's stack since struct pthread_unwind_buf is placed on caller's stack. We enable shadow stack at run-time only if program and all used shared objects, including dlopened ones, are shadow stack enabled, which means that they must be compiled with GCC 8 or above and glibc 2.28 or above. Since we need to save and restore shadow stack register only if shadow stack is enabled, we can safely assume that caller is compiled with smaller struct pthread_unwind_buf on stack if shadow stack isn't enabled at run-time. For callers with larger struct pthread_unwind_buf, but shadow stack isn't enabled, we just have some unused space on caller's stack. struct pthread_unwind_buf is changed to union of 1. struct cancel_jmp_buf[1], which contains the common fields of struct full and struct compat_pthread_unwind_buf. 2. struct full_pthread_unwind_buf, which is the full layout of the cleanup buffer. 3. struct compat_pthread_unwind_buf, which is the compatible layout of the cleanup buffer. A macro, UNWIND_BUF_PRIV, is added to get the pointer to the priv field. By default, it uses the priv field of struct compat_pthread_unwind_buf. If a target defines NEED_SAVED_MASK_IN_CANCEL_JMP_BUF, it must provide its own version of UNEIND_BUF_PRIV to get the pointer to the priv field. On Linux/x86, it uses the priv field of struct compat_pthread_unwind_buf if shadow stack is disabled and struct full_pthread_unwind_buf if shadow stack is enabled. Note: There is an unused pointer space in pthread_unwind_buf_data. But it isn't unsuitable for saving and restoring shadow stack register since x32 is a 64-bit process with 32-bit software pointer and kernel may place x32 shadow stack above 4GB. We need to save and restore 64-bit shadow stack register for x32. [BZ #22743] * csu/libc-start.c (LIBC_START_MAIN): Use the full version of the cleanup buffer. * nptl/cleanup.c (__pthread_register_cancel): Use UNWIND_BUF_PRIV to access the priv field in the cleanup buffer. (__pthread_unregister_cancel): Likewise. * nptl/cleanup_defer.c (__pthread_register_cancel_defer): Likewise. (__pthread_unregister_cancel_restore): Likewise. * nptl/unwind.c (unwind_stop): Likewise. (__pthread_unwind_next): Likewise. * nptl/descr.h (pthread_unwind_buf_data): New. (full_pthread_unwind_buf): Likewise. (compat_pthread_unwind_buf): Likewise. (pthread_unwind_buf): Updated to use full_pthread_unwind_buf and compat_pthread_unwind_buf. (UNWIND_BUF_PRIV): New. Macro to get pointer to the priv field in the cleanup buffer. * nptl/pthread_create.c (START_THREAD_DEFN): Use the full version of the cleanup buffer. (__pthread_create_2_1): Use THREAD_COPY_ADDITONAL_INFO to copy additonal info if defined. * sysdeps/unix/sysv/linux/x86/nptl/pthreadP.h: Use the full version of the cleanup buffer to check cancel_jmp_buf size. * sysdeps/unix/sysv/linux/x86/pthreaddef.h (THREAD_COPY_ADDITONAL_INFO): New. (UNWIND_BUF_PRIV): Likewise.
* Revert "Revert Intel CET changes to __jmp_buf_tag (Bug 22743)"H.J. Lu2018-01-2612-12/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2ec0e7eade0ea1258acd5c6f5e5e9bfaeb5041a8. This is needed to save and restore shadow stack register in setjmp and longjmp. [BZ #22563] * sysdeps/i386/nptl/tcb-offsets.sym (FEATURE_1_OFFSET): New. * sysdeps/i386/nptl/tls.h (tcbhead_t): Add feature_1. * sysdeps/x86_64/nptl/tcb-offsets.sym (FEATURE_1_OFFSET): New. * sysdeps/x86_64/nptl/tls.h (tcbhead_t): Rename __glibc_unused1 to feature_1. [BZ #22563] * bits/types/__cancel_jmp_buf_tag.h: New file. * sysdeps/unix/sysv/linux/x86/bits/types/__cancel_jmp_buf_tag.h * sysdeps/unix/sysv/linux/x86/pthreaddef.h: Likewise. * sysdeps/unix/sysv/linux/x86/nptl/pthreadP.h: Likewise. * nptl/Makefile (headers): Add bits/types/__cancel_jmp_buf_tag.h. * nptl/descr.h [NEED_SAVED_MASK_IN_CANCEL_JMP_BUF] (pthread_unwind_buf): Add saved_mask to cancel_jmp_buf. * sysdeps/nptl/pthread.h: Include <bits/types/__cancel_jmp_buf_tag.h>. (__pthread_unwind_buf_t): Use struct __cancel_jmp_buf_tag with __cancel_jmp_buf. * sysdeps/unix/sysv/linux/hppa/pthread.h: Likewise.
* Revert Intel CET changes to __jmp_buf_tag (Bug 22743)Carlos O'Donell2018-01-2513-136/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit cba595c350e52194e10c0006732e1991e3d0803b and commit f81ddabffd76ac9dd600b02adbf3e1dac4bb10ec, ABI compatibility with applications was broken by increasing the size of the on-stack allocated __pthread_unwind_buf_t beyond the oringal size. Applications only have the origianl space available for __pthread_unwind_register, and __pthread_unwind_next to use, any increase in the size of __pthread_unwind_buf_t causes these functions to write beyond the original structure into other on-stack variables leading to segmentation faults in common applications like vlc. The only workaround is to version those functions which operate on the old sized objects, but this must happen in glibc 2.28. Thank you to Andrew Senkevich, H.J. Lu, and Aurelien Jarno, for submitting reports and tracking the issue down. The commit reverts the above mentioned commits and testing on x86_64 shows that the ABI compatibility is restored. A tst-cleanup1 regression test linked with an older glibc now passes when run with the newly built glibc. Previously a tst-cleanup1 linked with an older glibc would segfault when run with an affected glibc build. Tested on x86_64 with no regressions. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* hurd build-many-glibcs.py: use hurd mainline for nowSamuel Thibault2018-01-262-2/+2
| | | | | * scripts/build-many-glibcs.py (checkout_vcs): Make hurd mainline the default for now.
* Add ChangeLog entry for "uk_UA: Add alternative month names".Rafal Luzynski2018-01-261-0/+10
|
* Add support for the RISC-V-specific ELF flagsPalmer Dabbelt2018-01-254-0/+30
| | | | | | | | | | | | | | | | | | | | The RISC-V port defines ELF flags that enforce compatibility between various objects. This adds the shared support necessary for these flags. 2018-01-25 Palmer Dabbelt <palmer@sifive.com> * elf/cache.c (print_entry): Add FLAG_RISCV_FLOAT_ABI_SOFT and FLAG_RISCV_FLOAT_ABI_DOUBLE. * elf/elf.h (EF_RISCV_RVC): New define. (EF_RISCV_FLOAT_ABI): Likewise. (EF_RISCV_FLOAT_ABI_SOFT): Likewise. (EF_RISCV_FLOAT_ABI_SINGLE): Likewise. (EF_RISCV_FLOAT_ABI_DOUBLE): Likewise. (EF_RISCV_FLOAT_ABI_QUAD): Likewise. * sysdeps/generic/ldconfig.h (FLAG_RISCV_FLOAT_ABI_SOFT): New define. (FLAG_RISCV_FLOAT_ABI_DOUBLE): Likewise.
* LIBC_SLIBDIR_RTLDDIR: substitute arguments in single quotesAndreas Schwab2018-01-2511-22/+36
| | | | | | | The arguments of the LIBC_SLIBDIR_RTLDDIR macro are used both in unquoted and single quoted context, so that neither shell nor makefile variable references work. Consistently put them in single quotes so that they can refer to makefile variables.
* uk_UA: Add alternative month names (bug 10871).Rafal Luzynski2018-01-251-13/+5
| | | | | | | | | | | | | | | Primary month names are in a genitive case now, alternative month names are in a nominative case. The alternative digits hack is no longer needed and has been removed. [BZ #10871] * localedata/locales/uk_UA (mon): Renamed to... (alt_mon): This. (alt_digits): "0" removed and then renamed to... (mon): This. (date_fmt): Definition changed not to use the alternative digits hack.
* build-many-glibcs.py: Fix hurd-vcs checkoutSamuel Thibault2018-01-252-2/+6
| | | | * scripts/build-many-glibcs.py (checkout_vcs): Run autoconf.
* build-many-glibcs.py: Add hurd vcs supportSamuel Thibault2018-01-252-0/+8
| | | | * scripts/build-many-glibcs.py (checkout_vcs): Add hurd repository URL.
* Add soft-float ColdFire to build-many-glibcs.py.Joseph Myers2018-01-242-0/+8
| | | | | | | | | | | | | | Since it turns out soft-float ColdFire has a different glibc ABI to hard-float ColdFire, as well as various differences in which glibc code gets built, this patch adds such a configuration to build-many-glibcs.py to (hopefully) complete the set of ABIs being tested. (Note that the build for soft-float ColdFire is currently broken even with GCC mainline - I have a glibc patch to fix this, but it needs before-and-after build-many-glibcs.py comparison of stripped binaries for all configurations before being committed.) * scripts/build-many-glibcs.py (Context.add_all_configs): Add soft-float ColdFire configuration.
* Add localplt.data for ColdFire.Joseph Myers2018-01-243-0/+22
| | | | | | | | | | | | | | | The sole failure for ColdFire in the compilation part of the glibc testsuite is the localplt test. This patch adds a localplt baseline for ColdFire to eliminate that failure. The difference from the existing m68k baseline is that no PLT entry for _Unwind_Find_FDE is expected, because ColdFire does not set libc_cv_gcc_unwind_find_fde=yes. Tested with build-many-glibcs.py. * sysdeps/unix/sysv/linux/m68k/localplt.data: Move to .... * sysdeps/unix/sysv/linux/m68k/m680x0/localplt.data: ... here. * sysdeps/unix/sysv/linux/m68k/coldfire/localplt.data: New file.
* Add no-FPU ColdFire math_private.h.Joseph Myers2018-01-242-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | As with some other soft-float configurations, no-FPU ColdFire needs various fenv.h functions and glibc-internal macros overridden in math_private.h to avoid references to undefined FE_* macros when building glibc. This patch adds a suitable math_private.h, based on the MicroBlaze one (Nios II and Tile also have similar files). There's a case for having such a file in sysdeps/ieee754/soft-fp so this logic is applied more generally to configurations without exceptions and rounding modes, even when the relevant macros are defined in fenv.h - the only case where that might be inappropriate is ARM soft-float (where the fenv.h functions might or might not work at runtime, depending on whether the processor used at runtime supports VFP). There's also a case that soft-float configurations (on processors with both hard-float and soft-float) should more consistently avoid defining FE_* macros in bits/fenv.h when not actually supported. But both of those are separate potential cleanups. This allows the no-FPU ColdFire build to get further (another fix is needed to allow the build to complete). * sysdeps/m68k/coldfire/nofpu/math_private.h: New file. Based on MicroBlaze file.
* Add jmp_buf-macros.h for no-FPU ColdFire.Joseph Myers2018-01-243-0/+13
| | | | | | | | | | | | | | | Continuing the fixes for ColdFire glibc build with build-many-glibcs.py, given a GCC patch for the libgcc build failure, this patch adds jmp_buf-macros.h for no-FPU ColdFire. This allows the no-FPU build to progress further than without the patch (although other fixes are still needed for the build to complete). * sysdeps/unix/sysv/linux/m68k/coldfire/jmp_buf-macros.h: Move to .... * sysdeps/unix/sysv/linux/m68k/coldfire/fpu/jmp_buf-macros.h: ... here. * sysdeps/unix/sysv/linux/m68k/coldfire/nofpu/jmp_buf-macros.h: New file.
* Add jmp_buf-macros.h for ColdFire.Joseph Myers2018-01-243-0/+13
| | | | | | | | | | | | | | | | | | | | | | This patch adds a jmp_buf-macros.h for ColdFire. In conjunction with a GCC patch to fix the libgcc build failure for ColdFire <https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02064.html> this suffices to restore the build (tested with build-many-glibcs.py). A further patch will be needed for soft-float ColdFire (while the function-calling ABI is the same for hard-float and soft-float ColdFire, it turns out the glibc ABI is not - so another ColdFire variant will be needed in build-many-glibcs.py), but I'll deal with that separately. Tested with build-many-glibcs.py (m68k-linux-gnu and m68k-linux-gnu-coldfire). (There's a localplt test failure for coldfire; that's the only failure in the compilation part of the testsuite.) * sysdeps/unix/sysv/linux/m68k/jmp_buf-macros.h: Move to .... * sysdeps/unix/sysv/linux/m68k/m680x0/jmp_buf-macros.h: ... here. * sysdeps/unix/sysv/linux/m68k/coldfire/jmp_buf-macros.h: New file.
* aarch64: Revert the change of the __reserved member of mcontext_tSzabolcs Nagy2018-01-243-2/+14
| | | | | | | | | | | | | | | | | | | | | | The uc_mcontext.__reserved member of ucontext_t is a user visible API, that should not be changed, because this is the only way to access cpu states of various extensions of linux asm/sigcontext.h, it does not violate namespace rules either, so revert this part of the commit commit 4fa9b3bfe6759c82beb4b043a54a3598ca467289 Commit: Joseph Myers <joseph@codesourcery.com> Fix mcontext_t sigcontext namespace (bug 21457). (In principle the user can type cast &uc_mcontext to struct sigcontext* to use the linux sigcontext fields, but that's not the existing practice since mcontext_t used to be a typedef of struct sigcontext.) [BZ #22742] * sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (__glibc_reserved1): Rename to __reserved and add comment. * sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym (__glibc_reserved1): Rename to __reserved.
* Add build-many-glibcs.py support for Hurd.Joseph Myers2018-01-242-10/+82
| | | | | | | | | | | | | | | | | | | | | | | This patch adds build-many-glibcs.py support for GNU Hurd. Builds of the i686-gnu configuration will fail until sufficient support is merged to master, so completing build-many-glibcs.py coverage of all glibc ABIs and making results accurately reflect the broken state of builds for Hurd. * scripts/build-many-glibcs.py (Context.add_all_configs): Add i686-gnu configurations. (Context.run_builds): Include mig, gnumach and hurd in components considered. (Context.checkout): Add mig, gnumach and hurd to components. (Context.checkout_tar): Add URL mappings for mig, gnumach and hurd. (Context.bot_cycle): Check for changes to mig, gnumach and hurd. (Config.build): Install gnumach headers, build mig and install hurd headers for 'gnu' OS. (Config.install_gnumach_headers): New function. (Config.install_hurd_headers): Likewise. (Glibc.build_glibc): Do not use /usr for 'gnu' OS. Specifiy MIG when building for 'gnu' OS.
* NEWS: Fix spelling mistake: "%ob" -> "%Ob".Rafal Luzynski2018-01-231-1/+1
|
* NEWS: fix spelling mistakeDmitry V. Levin2018-01-231-1/+1
|
* NEWS: Fix spelling mistake.Carlos O'Donell2018-01-231-1/+1
|
* NEWS: Document static application consequenes of %OB/%Ob.Carlos O'Donell2018-01-231-0/+15
|
* manual: Fix spelling of "Auxiliary."Tobias Klauser2018-01-232-1/+6
|
* manual: Touch up documentation for strftime and ALTMON_* constants.Rical Jasan2018-01-223-13/+27
| | | | | | | | | | | | | | "%OB" is considered a conversion specifier ("B" is the format specifier), and the list of format specifiers for months in the description of the optional "O" modifier was incomplete. A cross-reference from the ALTMON_* constants to the strftime section is also provided. Lastly, some grammatical fixes (commas) are made and paragraphs refactored (rewrapped). * manual/locale.texi (ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, ALTMON_11, ALTMON_12): Improve documentation. * manual/time.texi (strftime): Likewise.
* Fix the wording in NEWS to use "or later"Szabolcs Nagy2018-01-221-2/+2
|
* Update NEWS with binutils version requirement for static PIE supportSzabolcs Nagy2018-01-221-1/+2
|
* pl_PL: Add alternative month names (bug 10871).Rafal Luzynski2018-01-222-3/+14
| | | | | | | | [BZ #10871] * localedata/locales/pl_PL: Alternative month names added, primary month names are genitive now. * time/tst-strptime.c (day_tests): Actually use a genitive case of a month name in Polish language.
* Documentation to the above changes (bug 10871).Rafal Luzynski2018-01-224-11/+83
| | | | | | | | | | | [BZ #10871] * manual/locale.texi: Document ALTMON_1..12 constants for nl_langinfo. Specify when to use ALTMON instead of MON. * manual/time.texi (strftime, strptime): Document GNU extension permitting O modifier with %B and %b. Specify when to use %OB instead of %B. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Abbreviated alternative month names (%Ob) also added (bug 10871).Rafal Luzynski2018-01-2212-62/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the previous changes also repeated to support abbreviated alternative month names. In most languages which have declension and need nominative/genitive month names the abbreviated forms for both cases are the same. An example where they do differ is May in Russian: this name is too short to be abbreviated so even the abbreviated form features the declension suffixes. [BZ #10871] * locale/C-time.c (_nl_C_LC_TIME): Add abbreviated alternative month names, define them as the same as abbreviated month names explicitly. * locale/categories.def (LC_TIME): Add ab_alt_mon and wide-ab_alt_mon. * locale/langinfo.h: (_NL_ABALTMON_1, _NL_ABALTMON_2, _NL_ABALTMON_3, _NL_ABALTMON_4, _NL_ABALTMON_5, _NL_ABALTMON_6, _NL_ABALTMON_7, _NL_ABALTMON_8, _NL_ABALTMON_9, _NL_ABALTMON_10, _NL_ABALTMON_11, _NL_ABALTMON_12, _NL_WABALTMON_1, _NL_WABALTMON_2, _NL_WABALTMON_3, _NL_WABALTMON_4, _NL_WABALTMON_5, _NL_WABALTMON_6, _NL_WABALTMON_7, _NL_WABALTMON_8, _NL_WABALTMON_9, _NL_WABALTMON_10, _NL_WABALTMON_11, _NL_WABALTMON_12): New enum constants. * locale/programs/ld-time.c (struct locale_time_t): Add ab_alt_mon, wab_alt_mon, and ab_alt_mon_defined members. (time_output): Output ab_alt_mon and wab_alt_mon members. (time_read): Read them, initialize them as copies of abmon and wabmon respectively if they are missing, initialize ab_alt_mon_defined. * locale/programs/locfile-kw.gperf (ab_alt_mon): Define. * locale/programs/locfile-kw.h: Regenerate. * locale/programs/locfile-token.h (tok_ab_alt_mon): New enum constant. * time/Makefile [$(run-built-tests) = yes] (LOCALES): Add es_ES.UTF-8 and ru_RU.UTF-8. * time/strftime_l.c (a_altmonth, aam_len): New macros. [!COMPILE_WIDE] (ABALTMON_1): New macro. (__strftime_internal): Handle %Ob and %Oh formats. * time/strptime_l.c [_LIBC] (ab_alt_month_name): New macro. (__strptime_internal): Handle %Ob and %Oh formats. * time/tst-strptime.c (day_tests): Add more tests to parse different forms of month names including the new %Ob format specifier. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Implement alternative month names (bug 10871).Rafal Luzynski2018-01-2213-64/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some languages (Slavic, Baltic, etc.) require a genitive case of the month name when formatting a full date (with the day number) while they require a nominative case when referring to the month standalone. This requirement cannot be fulfilled without providing two forms for each month name. From now it is specified that nl_langinfo(MON_1) series (up to MON_12) and strftime("%B") generate the month names in the grammatical form used when the month is a part of a complete date. If the grammatical form used when the month is named by itself is needed, the new values nl_langinfo(ALTMON_1) (up to ALTMON_12) and strftime("%OB") are supported. This new feature is optional so the languages which do not need it or do not yet provide the updated locales simply do not use it and their behaviour is unchanged. [BZ #10871] * locale/C-time.c (_nl_C_LC_TIME): Add alternative month names, define them as the same as primary full month names explicitly. * locale/categories.def (LC_TIME): Add alt_mon and wide-alt_mon. * locale/langinfo.h (__ALTMON_1, __ALTMON_2, __ALTMON_3, __ALTMON_4, __ALTMON_5, __ALTMON_6, __ALTMON_7, __ALTMON_8, __ALTMON_9, __ALTMON_10, __ALTMON_11, __ALTMON_12, _NL_WALTMON_1, _NL_WALTMON_2, _NL_WALTMON_3, _NL_WALTMON_4, _NL_WALTMON_5, _NL_WALTMON_6, _NL_WALTMON_7, _NL_WALTMON_8, _NL_WALTMON_9, _NL_WALTMON_10, _NL_WALTMON_11, _NL_WALTMON_12): New enum constants. [__USE_GNU] (ALTMON_1, ALTMON_2, ALTMON_3, ALTMON_4, ALTMON_5, ALTMON_6, ALTMON_7, ALTMON_8, ALTMON_9, ALTMON_10, ALTMON_11, ALTMON_12): New macros. * locale/programs/ld-time.c (struct locale_time_t): Add alt_mon, walt_mon, and alt_mon_defined members. (time_output): Output alt_mon and walt_mon members. (time_read): Read them, initialize them as copies of mon and wmon respectively if they are missing, initialize alt_mon_defined. * locale/programs/locfile-kw.gperf (alt_mon): Define. * locale/programs/locfile-kw.h: Regenerate. * locale/programs/locfile-token.h (tok_alt_mon): New enum constant. * localedata/tst-langinfo.c (map): Add tests for the new constants ALTMON_1 .. ALTMON_12. * time/Makefile [$(run-built-tests) = yes] (LOCALES): Add fr_FR.UTF-8 and pl_PL.UTF-8. * time/strftime_l.c (f_altmonth): New macro. (__strftime_internal): Handle %OB format. * time/strptime_l.c [_LIBC] (alt_month_name): New macro. (__strptime_internal): Handle %OB format. * time/tst-strptime.c (day_tests): Add tests to parse different forms of month names including the new %OB format specifier. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* powerpc: Fix syscalls during early process initialization [BZ #22685]Tulio Magno Quites Machado Filho2018-01-194-4/+47
| | | | | | | | | | | | | | | | | | | | | | | | | The tunables framework needs to execute syscall early in process initialization, before the TCB is available for consumption. This behavior conflicts with powerpc{|64|64le}'s lock elision code, that checks the TCB before trying to abort transactions immediately before executing a syscall. This patch adds a powerpc-specific implementation of __access_noerrno that does not abort transactions before the executing syscall. Tested on powerpc{|64|64le}. [BZ #22685] * sysdeps/powerpc/powerpc32/sysdep.h (ABORT_TRANSACTION_IMPL): Renamed from ABORT_TRANSACTION. (ABORT_TRANSACTION): Redirect to ABORT_TRANSACTION_IMPL. * sysdeps/powerpc/powerpc64/sysdep.h (ABORT_TRANSACTION, ABORT_TRANSACTION_IMPL): Likewise. * sysdeps/unix/sysv/linux/powerpc/not-errno.h: New file. Reuse Linux code, but remove the code that aborts transactions. Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> Tested-by: Aurelien Jarno <aurelien@aurel32.net>
* generic if_ether.h: Fix buildSamuel Thibault2018-01-192-0/+5
| | | | * sysdeps/generic/netinet/if_ether.h: Include <stdint.h>.
* locales gu_IN, lo_LA: Fix obvious typos in dates.Rafal Luzynski2018-01-193-2/+9
| | | | | | | | | Reported-by: Robert Pluim <rpluim@gmail.com> * localedata/locales/gu_IN (LC_IDENTIFICATION): Fix an obvious typo in date: "2004-14-09" should be "2004-09-14". * localedata/locales/lo_LA: Fix an obvious typo in date in the header: "2003-15-09" should be "2003-09-15".
* Fix integer overflows in internal memalign and malloc functions [BZ #22343]Arjun Shankar2018-01-184-8/+286
| | | | | | | | | | | | | | | | | | | | | | | | When posix_memalign is called with an alignment less than MALLOC_ALIGNMENT and a requested size close to SIZE_MAX, it falls back to malloc code (because the alignment of a block returned by malloc is sufficient to satisfy the call). In this case, an integer overflow in _int_malloc leads to posix_memalign incorrectly returning successfully. Upon fixing this and writing a somewhat thorough regression test, it was discovered that when posix_memalign is called with an alignment larger than MALLOC_ALIGNMENT (so it uses _int_memalign instead) and a requested size close to SIZE_MAX, a different integer overflow in _int_memalign leads to posix_memalign incorrectly returning successfully. Both integer overflows affect other memory allocation functions that use _int_malloc (one affected malloc in x86) or _int_memalign as well. This commit fixes both integer overflows. In addition to this, it adds a regression test to guard against false successful allocations by the following memory allocation functions when called with too-large allocation sizes and, where relevant, various valid alignments: malloc, realloc, calloc, reallocarray, memalign, posix_memalign, aligned_alloc, valloc, and pvalloc.
* ChangeLog: Fix an entry for [BZ #22657]Rafal Luzynski2018-01-181-2/+1
| | | | | | | Remove myself, give the full credit to Egmont Koblinger. When committing someone else's changes, one should put the contributor's name in the change log entry.
* locales bho_NP, mai_IN, mai_NP: Fix an obvious typo in date.Rafal Luzynski2018-01-184-3/+10
| | | | | | | * localedata/locales/bho_NP (LC_IDENTIFICATION): Fix an obvious typo in date: "2017-24-07" should be "2017-07-24". * localedata/locales/mai_IN: Likewise. * localedata/locales/mai_NP: Likewise.
* Update translations from the Translation ProjectDmitry V. Levin2018-01-172-540/+545
| | | | * po/ru.po: Update translations.
* Fix backtrace for hppa (bug 22719).Joseph Myers2018-01-172-0/+6
| | | | | | | | | | | | | | | | | | | The only architecture in glibc that uses the generic debug/backtrace.c is hppa. The debug/tst-backtrace* tests fail for hppa, so in fact the generic debug/backtrace.c is not functional anywhere. Instead, the x86_64 version is a reasonably generic version that uses _Unwind_Backtrace from libgcc to backtrace using unwind info, and is used by several architectures. This patch adds hppa to the architectures using it (leaving open the possibility of a subsequent cleanup for 2.28 of moving the x86_64 version to debug/backtrace.c, and removing all the frame.h files that are now unused). Reported by Adhemerval in <https://sourceware.org/ml/libc-alpha/2018-01/msg00564.html> that this does fix the backtrace test failures for hppa. [BZ #22719] * sysdeps/hppa/backtrace.c: New file.
* x86-64: Properly align La_x86_64_retval to VEC_SIZE [BZ #22715]H.J. Lu2018-01-172-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | _dl_runtime_profile calls _dl_call_pltexit, passing a pointer to La_x86_64_retval which is allocated on stack. The lrv_vector0 field in La_x86_64_retval must be aligned to size of vector register. When allocating stack space for La_x86_64_retval, we need to make sure that the address of La_x86_64_retval + RV_VECTOR0_OFFSET is aligned to VEC_SIZE. This patch checks the alignment of the lrv_vector0 field and pads the stack space if needed. Tested with x32 and x86-64 on SSE4, AVX and AVX512 machines. It fixed FAIL: elf/tst-audit10 FAIL: elf/tst-audit4 FAIL: elf/tst-audit5 FAIL: elf/tst-audit6 FAIL: elf/tst-audit7 on x32 AVX512 machine. [BZ #22715] * sysdeps/x86_64/dl-trampoline.h (_dl_runtime_profile): Properly align La_x86_64_retval to VEC_SIZE.
* Use LIBGCC_S_SO in x86_64 backtrace.Joseph Myers2018-01-162-1/+7
| | | | | | | | | | | | | | The x86_64 backtrace implementation is used as a generic implementation (unwinding via unwind info and _Unwind_Backtrace) by various other architectures. This patch makes it more generic by making it use LIBGCC_S_SO from gnu/lib-names.h instead of hardcoding the libgcc_s.so.1 name, so that it can also be used on hppa which uses libgcc_s.so.4. Tested for x86_64. * sysdeps/x86_64/backtrace.c: Include <gnu/lib-names.h>. (init): Use LIBGCC_S_SO not hardcoded "libgcc_s.so.1".
* nptl/tst-thread-exit-clobber: Run with any C++ compilerFlorian Weimer2018-01-162-2/+8
| | | | | We do not need thread_local support in the C++11 comiler, and the minimum GCC version for glibc has C++11 support (if it has C++ support).
* aarch64: Update bits/hwcap.h for Linux 4.15.Szabolcs Nagy2018-01-163-2/+16
| | | | | | | | | | | | Define new HWCAP bits and add their name to dl-procinfo.c following the linux definitions. Synchronizing with v4.15-rc8 version of linux, these are not expected to change before the 4.15 release. * sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h (HWCAP_SHA3): Define. (HWCAP_SM3, HWCAP_SM4, HWCAP_ASIMDDP, HWCAP_SHA512, HWCAP_SVE): Define. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c (_dl_aarch64_cap_flags): Update. (_DL_HWCAP_COUNT): Update.
* aarch64: make HWCAP updates less error proneSzabolcs Nagy2018-01-163-7/+12
| | | | | | | | | | | Remove unused _DL_HWCAP_LAST definition and move _DL_HWCAP_COUNT where it is needed (dl-procinfo.h always includes dl-procinfo.c). * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (_DL_HWCAP_LAST): Remove. (_DL_HWCAP_COUNT): Move to ... * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.c (_DL_HWCAP_COUNT): ... here.
* nptl/tst-minstack-throw: Compile in C++11 mode with GNU extensionsFlorian Weimer2018-01-162-0/+6
|
* Add NT_ARM_SVE to elf.hAlan Hayward2018-01-152-0/+6
| | | | | | This definition is for AArch64 SVE registers in elf core dumps. * elf/elf.h (NT_ARM_SVE): Define.
* nptl: Add PTHREAD_MIN_STACK C++ throw test [BZ #22636]Florian Weimer2018-01-153-2/+100
|
* Update build-many-glibcs.py binutils, mpfr, mpc versions.Joseph Myers2018-01-152-3/+9
| | | | | | * scripts/build-many-glibcs.py (Context.checkout): Default binutils version to 2.30 branch, MPFR version to 4.0.0 and MPC version to 1.1.0.
* Synchronize DF_1_* flags with binutils (Bug 22707)Carlos O'Donell2018-01-132-0/+8
| | | | | | | | | | This patch synchronizes DF_1_* flags with binutils and ensures that all DF_1_* flags defined in binutil's include/elf/common.h are also defined glibc's elf/elf.h. This is a user visible change since elf/elf.h is installed by default as /usr/include/elf.h. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
* powerpc: Fix llround spurious inexact on 32-bit POWER4 [BZ #22697]Tulio Magno Quites Machado Filho2018-01-122-0/+11
| | | | | | | | | | This issue is similar to BZ #19235, where spurious exceptions are created from adding 0.5 then converting to an integer. The solution is based on Joseph's fix for BZ #19235. [BZ #22697] * sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S (__llround): Do not add 0.5 to integer or out-of-range arguments.
* Update translations from the Translation ProjectDmitry V. Levin2018-01-129-4338/+4330
| | | | | | | | | | | * po/bg.po: Update translations. * po/cs.po: Likewise. * po/de.po: Likewise. * po/ko.po: Likewise. * po/pl.po: Likewise. * po/sv.po: Likewise. * po/uk.po: Likewise. * po/vi.po: Likewise.
* aarch64: fix static pie enabled libc when main is in a shared librarySzabolcs Nagy2018-01-122-2/+16
| | | | | | | | | | | | | | | | | In the static pie enabled libc, crt1.o uses the same position independent code as rcrt1.o and crt1.o is used instead of Scrt1.o when -no-pie executables are linked. When main is not defined in the executable, but in a shared library crt1.o is currently broken, it assumes main is local. (glibc has a test for this but i missed it in my previous testing.) To make both rcrt1.o and crt1.o happy with the same code, a wrapper is introduced around main: with this crt1.o works with extern main symbol while rcrt1.o does not depend on GOT relocations. (The change only affects static pie enabled libc. Further simplification of start.S is possible in the future by using the same approach for Scrt1.o too.) * aarch64/start.S (_start): Use __wrap_main. (__wrap_main): New local symbol.