about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
...
* Include sys/rseq.h in tst-rseq-disable.cStefan Liebler2023-07-251-0/+1
| | | | | | | | | | | Starting with commit 2c6b4b272e6b4d07303af25709051c3e96288f2d "nptl: Unconditionally use a 32-byte rseq area", the testcase misc/tst-rseq-disable is UNSUPPORTED as RSEQ_SIG is not defined. The mentioned commit removes inclusion of sys/rseq.h in nptl/descr.h. Thus just include sys/rseq.h in the tst-rseq-disable.c as also done in tst-rseq.c and tst-rseq-nptl.c. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* string: Fix tester with fortify enabledAdhemerval Zanella Netto2023-07-241-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | If fortify is enabled, the truncated output warning is issued by the wrapper itself: In function ‘strncpy’, inlined from ‘test_strncpy’ at tester.c:505:10: ../string/bits/string_fortified.h:95:10: error: ‘__builtin_strncpy’ destination unchanged after copying no bytes from a string of length 3 [-Werror=stringop-truncation] 95 | return __builtin___strncpy_chk (__dest, __src, __len, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 | __glibc_objsize (__dest)); | ~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../include/bits/string_fortified.h:1, from ../string/string.h:548, from ../include/string.h:60, from tester.c:33, from inl-tester.c:6: In function ‘strncpy’, inlined from ‘test_strncpy’ at tester.c:505:10: Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* string: Fix bug-strncat1 with fortify enabledAdhemerval Zanella Netto2023-07-241-6/+8
| | | | | | | | | | | | | | If fortify is enabled, the truncated output warning is issued by the wrapper itself: bug-strncat1.c: In function ‘main’: bug-strncat1.c:14:3: error: ‘__builtin___strncat_chk’ output truncated copying 1 byte from a string of length 2 [-Werror=stringop-truncation] 14 | strncat (d, "\5\6", 1); | ^ Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* nscd: Use errval, not errno to guide cache update (bug 30662)Florian Weimer2023-07-242-2/+2
| | | | | | | | | The errno variable is potentially clobbered by the preceding send call. It is not related to the to-be-cached information. The parallel code in hstcache.c and servicescache.c already uses errval. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* Restore lookup of IPv4 mapped addresses in files database (bug 25457)Andreas Schwab2023-07-246-9/+128
| | | | | This was broken by commit 9c02d0784d ("nss_files: Remove RES_USE_INET6 from hosts processing"), which removed too much.
* Revert "MIPS: Sync elf.h from binutils"Andreas K. Hüttel2023-07-221-137/+3
| | | | | | | | | Leads to build failures (preprocessor redefinitions), and there is not enough time to address this properly. Deferred until after 2.38 release. This reverts commit 59dc07637fa1a693bd7599a98b0735697544077b. Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* riscv: Update rvd libm test ulpsAurelien Jarno2023-07-221-0/+1
| | | | | | | | Generated on a VisionFive 2 board running Linux version 6.4.2 and GCC 13.1.0. Needed due to commit cf7ffdd8a5f6 ("added pair of inputs for hypotf in binary32").
* MIPS: Sync elf.h from binutilsYing Huang2023-07-221-3/+137
| | | | | | | | Add new definitions for the MIPS target, specifically: relocation types, machine flags, section type names, and object attribute tags and values. On MIPS64, up to three relocations may be specified within r_info, by the r_type, r_type2, and r_type3 fields, so add new macros to get the respective reloc types for MIPS64.
* Merge translations (bg, hr, pl, sv)Andreas K. Hüttel2023-07-224-10/+106
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* nptl: Unconditionally use a 32-byte rseq areaFlorian Weimer2023-07-211-4/+14
| | | | | | | If the kernel headers provide a larger struct rseq, we used that size as the argument to the rseq system call. As a result, rseq registration would fail on older kernels which only accept size 32.
* hurd: Fix tst-openlocSamuel Thibault2023-07-201-1/+2
| | | | | | | On GNU/Hurd, O_RDWR actually is O_WRONLY|O_RDONLY, so checking through bitness really is wrong. O_ACCMODE is there for this. Fixes: 5324d258427f ("fileops: Don't process ,ccs= as individual mode flags (BZ#18906)")
* scripts: Fix fortify checks if compiler does not support _FORTIFY_SOURCE=3Adhemerval Zanella2023-07-205-30/+30
| | | | | | | | | | | | The 30379efad1 added _FORTIFY_SOURCE checks without check if compiler does support all used fortify levels. This patch fixes it by first checking at configure time the maximum support fortify level and using it instead of a pre-defined one. Checked on x86_64 with gcc 11, 12, and 13. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Tested-by: Florian Weimer <fweimer@redhat.com>
* configure: Disable building libcrypt by defaultSiddhesh Poyarekar2023-07-206-27/+40
| | | | | | | | | | | | We mentioned eventual dropping of libcrypt in the 2.28 NEWS. Actually put that plan in motion by first disabling building libcrypt by default. note in NEWS that the library will be dropped completely in a future release. Also add a couple of builds into build-many-glibcs.py. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* nptl: Make tst-tls3mod.so explicitly lazyArsen Arsenović2023-07-201-0/+1
| | | | | | | | | | | | Fixes the following test-time errors, that lead to FAILs, on toolchains that set -z now out o the box, such as the one used on Gentoo Hardened: .../build-x86-x86_64-pc-linux-gnu-nptl $ grep '' nptl/tst-tls3*.out nptl/tst-tls3.out:dlopen failed nptl/tst-tls3-malloc.out:dlopen failed Reviewed-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* make ‘struct pthread’ a complete typePaul Eggert2023-07-191-4/+4
| | | | | | | | * nptl/descr.h (struct pthread): Remove end_padding member, which made this type incomplete. (PTHREAD_STRUCT_END_PADDING): Stop using end_padding. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* scripts: Add fortify checks on installed headersAdhemerval Zanella2023-07-191-13/+23
| | | | | | | | | | The _FORTIFY_SOURCE is used as default by some system compilers, and there is no way to check if some fortify extension does not trigger any conformance issue. Checked on x86_64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update x86_64 libm-test-ulps (x32 ABI)Andreas K. Hüttel2023-07-191-13/+14
| | | | | | | | | Based on feedback by Mike Gilbert <floppym@gentoo.org> Linux-6.1.38-dist x86_64 AMD Phenom-tm- II X6 1055T Processor -march=amdfam10 failures occur for x32 ABI Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Fix getting return address in elf/tst-audit28.c.Stefan Liebler2023-07-191-6/+13
| | | | | | | | | | | | | | | Starting with commit 1bcfe0f732066ae5336b252295591ebe7e51c301, the test was enhanced and the object for __builtin_return_address (0) is searched with _dl_find_object. Unfortunately on e.g. s390 (31bit), a postprocessing step is needed as the highest bit has to be masked out. This can be done with __builtin_extract_return_addr. Without this postprocessing, _dl_find_object returns with -1 and the content of dlfo is invalid, which may lead to segfaults in basename. Therefore those checks are now only done on success. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* [PATCH v1] x86: Use `3/4*sizeof(per-thread-L3)` as low bound for NT threshold.Noah Goldstein2023-07-181-3/+12
| | | | | | | | | On some machines we end up with incomplete cache information. This can make the new calculation of `sizeof(total-L3)/custom-divisor` end up lower than intended (and lower than the prior value). So reintroduce the old bound as a lower bound to avoid potentially regressing code where we don't have complete information to make the decision. Reviewed-by: DJ Delorie <dj@redhat.com>
* x86: Fix slight bug in `shared_per_thread` cache size calculation.Noah Goldstein2023-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | After: ``` commit af992e7abdc9049714da76cae1e5e18bc4838fb8 Author: Noah Goldstein <goldstein.w.n@gmail.com> Date: Wed Jun 7 13:18:01 2023 -0500 x86: Increase `non_temporal_threshold` to roughly `sizeof_L3 / 4` ``` Split `shared` (cumulative cache size) from `shared_per_thread` (cache size per socket), the `shared_per_thread` *can* be slightly off from the previous calculation. Previously we added `core` even if `threads_l2` was invalid, and only used `threads_l2` to divide `core` if it was present. The changed version only included `core` if `threads_l2` was valid. This change restores the old behavior if `threads_l2` is invalid by adding the entire value of `core`. Reviewed-by: DJ Delorie <dj@redhat.com>
* Update i686 libm-test-ulps (again)Andreas K. Hüttel2023-07-191-1/+1
| | | | | | | | Based on feedback by Arsen Arsenović <arsen@gentoo.org> Linux-6.1.38-gentoo-dist-hardened x86_64 AMD Ryzen 7 3800X 8-Core Processor -march=x86-64-v2 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Update i686 libm-test-ulpsAndreas K. Hüttel2023-07-181-0/+1
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Merge translations (de, ro, uk, zh_TW)Andreas K. Hüttel2023-07-1838-5087/+5184
| | | | | | | Line numbers, version numbers, template date changed everywhere Nontrivial changes in de, ro, uk, zh_TW Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Regenerate libc.potAndreas K. Hüttel2023-07-171-159/+183
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* configure: Use autoconf 2.71Siddhesh Poyarekar2023-07-1772-2655/+4257
| | | | | | | | | | | | | | Bump autoconf requirement to 2.71 to allow regenerating configure on more recent distributions. autoconf 2.71 has been in Fedora since F36 and is the current version in Debian stable (bookworm). It appears to be current in Gentoo as well. All sysdeps configure and preconfigure scripts have also been regenerated; all changes are trivial transformations that do not affect functionality. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update sparc libm-test-ulpsAdhemerval Zanella2023-07-171-0/+1
|
* s390: Add the clone3 wrapperAdhemerval Zanella2023-07-133-0/+157
| | | | | | | | | It follows the internal signature: extern int clone3 (struct clone_args *__cl_args, size_t __size, int (*__func) (void *__arg), void *__arg); Checked on s390x-linux-gnu and s390-linux-gnu.
* manual: Fix typos in struct dl_find_objectBert Wesarg2023-07-131-2/+2
| | | | | Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Reviewed-by: Florian Weimer <fweimer@redhat.com>
* sparc: Fix la_symbind for bind-now (BZ 23734)Adhemerval Zanella2023-07-129-14/+66
| | | | | | | | | | | | | | | | | | | | | The sparc ABI has multiple cases on how to handle JMP_SLOT relocations, (sparc_fixup_plt/sparc64_fixup_plt). For BINDNOW, _dl_audit_symbind will be responsible to setup the final relocation value; while for lazy binding _dl_fixup/_dl_profile_fixup will call the audit callback and tail cail elf_machine_fixup_plt (which will call sparc64_fixup_plt). This patch fixes by issuing the SPARC specific routine on bindnow and forwarding the audit value to elf_machine_fixup_plt for lazy resolution. It fixes the la_symbind for bind-now tests on sparc64 and sparcv9: elf/tst-audit24a elf/tst-audit24b elf/tst-audit24c elf/tst-audit24d Checked on sparc64-linux-gnu and sparcv9-linux-gnu. Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
* i386: make debug wrappers compatible with static PIEAndreas Schwab2023-07-124-8/+8
| | | | Static PIE requires the use of PLT relocation.
* LoongArch: Fix soft-float bug about _dl_runtime_resolve{,lsx,lasx}caiyinyu2023-07-113-11/+9
|
* LoongArch: Add vector implementation for _dl_runtime_resolve.caiyinyu2023-07-118-69/+244
|
* LoongArch: config: Added HAVE_LOONGARCH_VEC_ASM.caiyinyu2023-07-113-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | This patch checks if assembler supports vector instructions to generate LASX/LSX code or not, and then define HAVE_LOONGARCH_VEC_ASM macro We have added support for vector instructions in binutils-2.41 See: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=75b2f521b101d974354f6ce9ed7c054d8b2e3b7a commit 75b2f521b101d974354f6ce9ed7c054d8b2e3b7a Author: mengqinggang <mengqinggang@loongson.cn> Date: Thu Jun 22 10:35:28 2023 +0800 LoongArch: gas: Add lsx and lasx instructions support gas/ChangeLog: * config/tc-loongarch.c (md_parse_option): Add lsx and lasx option. (loongarch_after_parse_args): Add lsx and lasx option. opcodes/ChangeLog: * loongarch-opc.c (struct loongarch_ase): Add lsx and lasx instructions.
* sysdeps: Add missing hidden definitions for i386Frédéric Bérat2023-07-102-0/+2
| | | | | Add missing libc_hidden_builtin_def for memset_chk and MEMCPY_CHK on i386.
* sysdeps/s390: Exclude fortified routines from being built with _FORTIFY_SOURCEFrédéric Bérat2023-07-101-0/+20
| | | | | | | | Depending on build configuration, the [routine]-c.c files may be chosen to provide fortified routines implementation. While [routines].c implementation were automatically excluded, the [routines]-c.c ones were not. This patch fixes that by adding these file to the list to be filtered.
* Translations: Add new ro support and update others.Carlos O'Donell2023-07-0710-67/+7910
| | | | | | | This brings in the new Romanian language translations, and updates nine other translations. Important translations in this update include the Italian and Japanese translations for ESTALE which remove the mention of "NFS" from the error message translation.
* elf: _dl_find_object may return 1 during early startup (bug 30515)Florian Weimer2023-07-072-1/+12
| | | | | | | | | | | | Success is reported with a 0 return value, and failure is -1. Enhance the kitchen sink test elf/tst-audit28 to cover _dl_find_object as well. Fixes commit 5d28a8962dcb ("elf: Add _dl_find_object function") and bug 30515. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
* LoongArch: config: Rewrite check on static PIE.caiyinyu2023-07-072-14/+14
| | | | | It's better to add "\" before "EOF" and remove "\" before "$".
* Revert "hppa: Drop 16-byte pthread lock alignment"John David Anglin2023-07-062-9/+3
| | | | | This change reverts commits c4468cd3995b4236ea886901109b194641132b08 and ab991a3d1b401ded6bd4f027352da8262b021a11.
* realloc: Limit chunk reuse to only growing requests [BZ #30579]Siddhesh Poyarekar2023-07-061-8/+15
| | | | | | | | | | | | | | | | | | | | | The trim_threshold is too aggressive a heuristic to decide if chunk reuse is OK for reallocated memory; for repeated small, shrinking allocations it leads to internal fragmentation and for repeated larger allocations that fragmentation may blow up even worse due to the dynamic nature of the threshold. Limit reuse only when it is within the alignment padding, which is 2 * size_t for heap allocations and a page size for mmapped allocations. There's the added wrinkle of THP, but this fix ignores it for now, pessimizing that case in favor of keeping fragmentation low. This resolves BZ #30579. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reported-by: Nicolas Dusart <nicolas@freedelity.be> Reported-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Tested-by: Aurelien Jarno <aurelien@aurel32.net>
* vfscanf-internal: Remove potentially unbounded allocasAdhemerval Zanella2023-07-065-17/+197
| | | | | | | | | | | Some locales define a list of mapping pairs of alternate digits and separators for input digits (to_inpunct). This require the scanf to create a list of all possible inputs for the optional type modifier 'I'. Checked on x86_64-linux-gnu. Reviewed-by: Joe Simmons-Talbott <josimmon@redhat.com>
* fileops: Don't process ,ccs= as individual mode flags (BZ#18906)Joe Simmons-Talbott2023-07-052-1/+34
| | | | | | | | | | | In processing the first 7 individual characters of the mode for fopen if ,ccs= is used those characters will be processed as well. Stop processing individual mode flags once a comma is encountered. This has the effect of requiring ,ccs= to be the last mode flag in the mode string. Add a testcase to check that the ,ccs= mode flag is not processed as individual mode flags. Reviewed-by: DJ Delorie <dj@redhat.com>
* sysdeps/ieee754/ldbl-128ibm-compat: Fix warn unused resultFrédéric Bérat2023-07-052-14/+17
| | | | | | | Return value from *scanf and *asprintf routines are now properly checked in test-scanf-ldbl-compat-template.c and test-printf-ldbl-compat.c. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* libio/bits/stdio2-decl.h: Avoid PLT entries with _FORTIFY_SOURCEFrédéric Bérat2023-07-051-1/+1
| | | | | | | The change is meant to avoid unwanted PLT entry for the fgets_unlocked routine when _FORTIFY_SOURCE is set. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* libio/bits/stdio2.h: Clearly separate declaration from definitionsFrédéric Bérat2023-07-052-48/+49
| | | | | | | | Move declarations from libio/bits/stdio.h to existing libio/bits/stdio2-decl.h. This will enable future use of __REDIRECT_FORTIFY in place of some __REDIRECT. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* misc/bits/syslog.h: Clearly separate declaration from definitionFrédéric Bérat2023-07-057-10/+46
| | | | | | | | This allows to include bits/syslog-decl.h in include/sys/syslog.h and therefore be able to create the libc_hidden_builtin_proto (__syslog_chk) prototype. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* misc/bits/select2.h: Clearly separate declaration from definitionsFrédéric Bérat2023-07-056-4/+40
| | | | | | | | | The __fdelt_chk declaration needs to be available so that libc_hidden_proto can be used while not redefining __FD_ELT. Thus, misc/bits/select-decl.h is created to hold the corresponding prototypes. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* unistd: Avoid PLT entries with _FORTIFY_SOURCEFrédéric Bérat2023-07-055-3/+10
| | | | | | | The change is meant to avoid unwanted PLT entries for the read_chk, getdomainname_chk and getlogin_r_chk routines when _FORTIFY_SOURCE is set. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* posix/bits/unistd.h: Clearly separate declaration from definitionsFrédéric Bérat2023-07-055-153/+202
| | | | | | | | | | | This change is similar to what was done for bits/wchar2.h. Routines declaration are moved into a dedicated bits/unistd-decl.h file which is then included into the bits/unistd.h file. This will allow to adapt the files so that PLT entries are not created when _FORTIFY_SOURCE is enabled. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
* wchar: Avoid PLT entries with _FORTIFY_SOURCEFrédéric Bérat2023-07-055-2/+23
| | | | | | | | | | The change is meant to avoid unwanted PLT entries for the wmemset and wcrtomb routines when _FORTIFY_SOURCE is set. On top of that, ensure that *_chk routines have their hidden builtin definitions available. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>