about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* localedata: add gbm_IN localeMike FABIAN2024-01-172-0/+178
| | | | Resolves: BZ # 19479
* Define ISO 639-3 "gbm" (Garhwali)Mike FABIAN2024-01-171-0/+1
| | | | | | | | Related: BZ # 19479 References: https://iso639-3.sil.org/code/gbm https://en.wikipedia.org/wiki/Garhwali_language
* Update syscall lists for Linux 6.7Joseph Myers2024-01-1727-2/+107
| | | | | | | | | Linux 6.7 adds the futex_requeue, futex_wait and futex_wake syscalls, and enables map_shadow_stack for architectures previously missing it. Update syscall-names.list and regenerate the arch-syscall.h headers with build-many-glibcs.py update-syscalls. Tested with build-many-glibcs.py.
* Use Linux 6.7 in build-many-glibcs.pyJoseph Myers2024-01-171-1/+1
| | | | | | | This patch makes build-many-glibcs.py use Linux 6.7. Tested with build-many-glibcs.py (host-libraries, compilers and glibcs builds).
* stdlib: Remove unused is_aligned function from qsort.cAdhemerval Zanella2024-01-171-13/+0
| | | | Checked on x86_64-linux-gnu.
* NEWS: Mention PLT rewrite on x86-64H.J. Lu2024-01-161-0/+4
| | | | Mention PLT rewrite on x86-64 for glibc 2.39.
* stdlib: Verify heapsort for two-element casesKuan-Wei Chiu2024-01-161-3/+1
| | | | | | | | Adjust the testing approach to start from scenarios with only 2 elements, as insertion sort no longer handles such cases. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* stdlib: Fix heapsort for cases with exactly two elementsKuan-Wei Chiu2024-01-161-1/+1
| | | | | | | | | | When malloc fails to allocate a buffer and falls back to heapsort, the current heapsort implementation does not perform sorting when there are exactly two elements. Heapsort is now skipped only when there is exactly one element. Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* localedata: anp_IN: Fix abbreviated month namesMike FABIAN2024-01-151-16/+14
| | | | | | | | | Resolves: BZ # 31239 The correct abbreviated month names were apparently given in the comment above `abmon`. But the value of `abmon` was apparently just copied from the value of `mon` and this mistake was hard to see because code point notation <Uxxxx> was used. After converting to UTF-8 it was obvious that there was apparently a copy and paste mistake.
* stdlib: Reinstate stable mergesort implementation on qsortAdhemerval Zanella2024-01-157-446/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mergesort removal from qsort implementation (commit 03bf8357e8) had the side-effect of making sorting nonstable. Although neither POSIX nor C standard specify that qsort should be stable, it seems that it has become an instance of Hyrum's law where multiple programs expect it. Also, the resulting introsort implementation is not faster than the previous mergesort (which makes the change even less appealing). This patch restores the previous mergesort implementation, with the exception of machinery that checks the resulting allocation against the _SC_PHYS_PAGES (it only adds complexity and the heuristic not always make sense depending on the system configuration and load). The alloca usage was replaced with a fixed-size buffer. For the fallback mechanism, the implementation uses heapsort. It is simpler than quicksort, and it does not suffer from adversarial inputs. With memory overcommit, it should be rarely triggered. The drawback is mergesort requires O(n) extra space, and since it is allocated with malloc the function is AS-signal-unsafe. It should be feasible to change it to use mmap, although I am not sure how urgent it is. The heapsort is also nonstable, so programs that require a stable sort would still be subject to this latent issue. The tst-qsort5 is removed since it will not create quicksort adversarial inputs with the current qsort_r implementation. Checked on x86_64-linux-gnu and aarch64-linux-gnu. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* x86-64: Check if mprotect works before rewriting PLTH.J. Lu2024-01-153-1/+75
| | | | | | | | | | | | | | | | Systemd execution environment configuration may prohibit changing a memory mapping to become executable: MemoryDenyWriteExecute= Takes a boolean argument. If set, attempts to create memory mappings that are writable and executable at the same time, or to change existing memory mappings to become executable, or mapping shared memory segments as executable, are prohibited. When it is set, systemd service stops working if PLT rewrite is enabled. Check if mprotect works before rewriting PLT. This fixes BZ #31230. This also works with SELinux when deny_execmem is on. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* aarch64: Add NEWS entry about libmvec for 2.39Szabolcs Nagy2024-01-151-0/+7
| | | | | | Auto-vectorizing scalar calls is now supported. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* localedata/unicode-gen/utf8_gen.py: fix Hangul syllable nameMike FABIAN2024-01-142-400/+400
| | | | Resolves: BZ # 29506
* x86_64: Optimize ffsll function code size.Sunil K Pandey2024-01-131-5/+5
| | | | | | | | | | | | | | | | | Ffsll function randomly regress by ~20%, depending on how code gets aligned in memory. Ffsll function code size is 17 bytes. Since default function alignment is 16 bytes, it can load on 16, 32, 48 or 64 bytes aligned memory. When ffsll function load at 16, 32 or 64 bytes aligned memory, entire code fits in single 64 bytes cache line. When ffsll function load at 48 bytes aligned memory, it splits in two cache line, hence random regression. Ffsll function size reduction from 17 bytes to 12 bytes ensures that it will always fit in single 64 bytes cache line. This patch fixes ffsll function random performance regression. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* localedata: Remove redundant commentsMike FABIAN2024-01-1387-260/+14
|
* RISC-V: Enable static-pie.Yanzhang Wang2024-01-123-1/+77
| | | | | | | | | This patch referents the commit 374cef3 to add static-pie support. And because the dummy link map is used when relocating ourselves, so need not to set __global_pointer$ at this time. It will also check whether toolchain supports to build static-pie. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* linux: Fix fstat64 on alpha and sparc64Adhemerval Zanella2024-01-121-2/+5
| | | | | | | | | | The 551101e8240b7514fc646d1722f8b79c90362b8f change is incorrect for alpha and sparc, since __NR_stat is defined by both kABI. Use __NR_newfstat to check whether to fallback to __NR_fstat64 (similar to what fstatat64 does). Checked on sparc64-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* math: remove exp10 wrappersWilco Dijkstra2024-01-1229-8/+71
| | | | | | | | Remove the error handling wrapper from exp10. This is very similar to the changes done to exp and exp2, except that we also need to handle pow10 and pow10l. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Benchtests: Increase benchmark iterationsWilco Dijkstra2024-01-122-2/+2
| | | | | | | Increase benchmark iterations for math and vector math functions to improve timing accuracy. Vector math benchmarks now take 1-3 seconds on a modern CPU. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* debug/getwd_chk.c: warning should be emitted for the __getwd_chk symbol.Frederic Cambus2024-01-121-1/+1
| | | | | | | | Otherwise the warning message for the getwd symbol ends up being duplicated. Signed-off-by: Frederic Cambus <fred@statdns.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Make __getrandom_nocancel set errno and add a _nostatus versionXi Ruoyao2024-01-124-2/+19
| | | | | | | | | | | | | | | | The __getrandom_nocancel function returns errors as negative values instead of errno. This is inconsistent with other _nocancel functions and it breaks "TEMP_FAILURE_RETRY (__getrandom_nocancel (p, n, 0))" in __arc4random_buf. Use INLINE_SYSCALL_CALL instead of INTERNAL_SYSCALL_CALL to fix this issue. But __getrandom_nocancel has been avoiding from touching errno for a reason, see BZ 29624. So add a __getrandom_nocancel_nostatus function and use it in tcache_key_initialize. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* x86-64/cet: Make CET feature check specific to Linux/x86H.J. Lu2024-01-119-37/+120
| | | | | | CET feature bits in TCB, which are Linux specific, are used to check if CET features are active. Move CET feature check to Linux/x86 directory. Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
* Incorporate translations (zh_CN)Andreas K. Hüttel2024-01-111-582/+580
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* Define ISO 639-3 "glk" (Gilaki)Mike FABIAN2024-01-111-0/+1
| | | | | | | | Resolves: BZ # 27163 References: https://iso639-3.sil.org/code/glk https://en.wikipedia.org/wiki/Gilaki_language
* resolv: Fix endless loop in __res_context_queryStefan Liebler2024-01-112-4/+8
| | | | | | | | | | | | | | | | | | | | | Starting with commit 40c0add7d48739f5d89ebba255c1df26629a76e2 "resolve: Remove __res_context_query alloca usage" there is an endless loop in __res_context_query if __res_context_mkquery fails e.g. if type is invalid. Then the scratch buffer is resized to MAXPACKET size and it is retried again. Before the mentioned commit, it was retried only once and with the mentioned commit, there is no check and it retries in an endless loop. This is observable with xtest resolv/tst-resolv-qtypes which times out after 300s. This patch retries mkquery only once as before the mentioned commit. Furthermore, scratch_buffer_set_array_size is now only called with nelem=2 if type is T_QUERY_A_AND_AAAA (also see mentioned commit). The test tst-resolv-qtypes is also adjusted to verify that <func> is really returning with -1 in case of an invalid type. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* localedata: revert all the remaining locale sources to UTF-8Mike FABIAN2024-01-11205-6090/+6088
|
* localedata: am_ET ber_DZ en_GB en_PH en_US fil_PH kab_DZ om_ET om_KE ti_ET ↵Mike FABIAN2024-01-118-132/+132
| | | | tl_PH: convert to UTF-8
* localedata: resolve cyclic dependenciesMike FABIAN2024-01-1111-1050/+226
| | | | Resolves: BZ # 24006
* localedata: kv_RU: convert to UTF-8Mike FABIAN2024-01-111-57/+57
|
* localedata: add new locale kv_RUMike FABIAN2024-01-112-0/+165
| | | | Resolves: BZ # 30605
* elf: Fix tst-nodeps2 test failure.Carlos O'Donell2024-01-101-1/+4
| | | | | | | | | | | | | | | | | After 78ca44da0160a0b442f0ca1f253e3360f044b2ec ("elf: Relocate libc.so early during startup and dlmopen (bug 31083)") we start seeing tst-nodeps2 failures when building the testsuite with --enable-hard-coded-path-in-tests. When building the testsuite with --enable-hard-coded-path-in-tests the tst-nodeps2-mod.so is not built with the required DT_RUNPATH values and the test escapes the test framework and loads the system libraries and aborts. The fix is to use the existing $(link-test-modules-rpath-link) variable to set DT_RUNPATH correctly. No regressions on x86_64. Reviewed-by: Florian Weimer <fweimer@redhat.com>
* localedata: Sort Makefile variables.Carlos O'Donell2024-01-101-219/+298
| | | | | | Sort Makefile variables using scrips/sort-makefile-lines.py. No regressions on x86_64.
* locale: Sort Makefile variables.Carlos O'Donell2024-01-101-29/+97
| | | | | | Sort Makefile variables using scrips/sort-makefile-lines.py. No regressions on x86_64.
* i386: Remove CET support bitsH.J. Lu2024-01-1012-89/+45
| | | | | | | | | | | | 1. Remove _dl_runtime_resolve_shstk and _dl_runtime_profile_shstk. 2. Move CET offsets from x86 cpu-features-offsets.sym to x86-64 features-offsets.sym. 3. Rename x86 cet-control.h to x86-64 feature-control.h since it is only for x86-64 and also used for PLT rewrite. 4. Add x86-64 ldsodefs.h to include feature-control.h. 5. Change TUNABLE_CALLBACK (set_plt_rewrite) to x86-64 only. 6. Move x86 dl-procruntime.c to x86-64. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86-64/cet: Move check-cet.awk to x86_64H.J. Lu2024-01-102-1/+1
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86-64/cet: Move dl-cet.[ch] to x86_64 directoriesH.J. Lu2024-01-103-65/+47
| | | | | | Since CET is only enabled for x86-64, move dl-cet.[ch] to x86_64 directories. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* x86: Move x86-64 shadow stack startup codesH.J. Lu2024-01-101-1/+1
| | | | | | Move sysdeps/x86/libc-start.h to sysdeps/x86_64/libc-start.h and use sysdeps/generic/libc-start.h for i386. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Fix deprecated utcnow() usage in build-many-glibcs.pyJoseph Myers2024-01-101-1/+1
| | | | | | | | | | | | Running build-many-glibcs.py with Python 3.12 or later produces a warning: build-many-glibcs.py:566: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC). build_time = datetime.datetime.utcnow() Replace with datetime.datetime.now(datetime.timezone.utc) (the datetime.UTC constant is new in 3.11, so not suitable for use in this script at present).
* Fix invalid escape sequence in build-many-glibcs.pyJoseph Myers2024-01-101-1/+1
| | | | | | | | | | | | Running build-many-glibcs.py with Python 3.12 or later produces a warning: build-many-glibcs.py:173: SyntaxWarning: invalid escape sequence '\.' m = re.fullmatch('([0-9]+)\.([0-9]+)[.0-9]*', l) Use a raw string instead to avoid that warning. (Note: I haven't checked whether any other Python scripts included with glibc might have issues with newer Python versions.)
* math: Fix test-fenv.c feupdateenv testsAdhemerval Zanella2024-01-101-0/+1
| | | | | | | | | | The feupdateenv tests added by 802aef27b2 do not restore the floating point mask, which might keep some floating point exception enabled and thus make the feupdateenv_single_test raise an unexpected signal. Checked on x86_64-linux-gnu and aarch64-linux-gnu (on Apple M1 trapping is supported). Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
* Remove installed header rule on $(..)include/%.hH.J. Lu2024-01-091-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On x86-64 machine with [hjl@gnu-cfl-3 x86-glibc]$ ls -l /usr/include/asm/prctl.h sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h -rw-r--r-- 1 hjl hjl 825 Jan 9 09:41 sysdeps/unix/sysv/linux/x86_64/include/asm/prctl.h -rw-r--r-- 1 root root 1170 Nov 27 16:00 /usr/include/asm/prctl.h [hjl@gnu-cfl-3 x86-glibc]$ glibc configured with --enable-cet build failed: make[2]: Entering directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' ../Makerules:327: update target '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.h' due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/gnu/lib-names-64.stmp : ../Makeconfig:1216: update target '/export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.h' due to: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/libc-modules.stmp : ../Makerules:1126: update target '/usr/include/asm/prctl.h' due to: ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h force-install /usr/bin/install -c -m 644 ../sysdeps/unix/sysv/linux/x86_64/64/../include/asm/prctl.h /usr/include/asm/prctl.h /usr/bin/install: cannot remove '/usr/include/asm/prctl.h': Permission denied make[2]: *** [../Makerules:1126: /usr/include/asm/prctl.h] Error 1 make[2]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc/iconv' make[1]: *** [Makefile:484: iconv/subdir_lib] Error 2 make[1]: Leaving directory '/export/gnu/import/git/gitlab/x86-glibc' make: *** [Makefile:9: all] Error 2 This is triggered by the rule in Makerules: $(inst_includedir)/%.h: $(..)include/%.h $(+force) $(do-install) Since no files under include/ should be installed, remove it from Makerules. Tested it on x86-64. There are no differences in the installed header files.
* i386: Fail if configured with --enable-cetAdhemerval Zanella2024-01-095-13/+12
| | | | | | Since it is only supported for x86_64. Checked on i686-linux-gnu.
* i386: Remove CET supportAdhemerval Zanella2024-01-0931-770/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | CET is only support for x86_64, this patch reverts: - faaee1f07ed x86: Support shadow stack pointer in setjmp/longjmp. - be9ccd27c09 i386: Add _CET_ENDBR to indirect jump targets in add_n.S/sub_n.S - c02695d7764 x86/CET: Update vfork to prevent child return - 5d844e1b725 i386: Enable CET support in ucontext functions - 124bcde683 x86: Add _CET_ENDBR to functions in crti.S - 562837c002 x86: Add _CET_ENDBR to functions in dl-tlsdesc.S - f753fa7dea x86: Support IBT and SHSTK in Intel CET [BZ #21598] - 825b58f3fb i386-mcount.S: Add _CET_ENDBR to _mcount and __fentry__ - 7e119cd582 i386: Use _CET_NOTRACK in i686/memcmp.S - 177824e232 i386: Use _CET_NOTRACK in memcmp-sse4.S - 0a899af097 i386: Use _CET_NOTRACK in memcpy-ssse3-rep.S - 7fb613361c i386: Use _CET_NOTRACK in memcpy-ssse3.S - 77a8ae0948 i386: Use _CET_NOTRACK in memset-sse2-rep.S - 00e7b76a8f i386: Use _CET_NOTRACK in memset-sse2.S - 90d15dc577 i386: Use _CET_NOTRACK in strcat-sse2.S - f1574581c7 i386: Use _CET_NOTRACK in strcpy-sse2.S - 4031d7484a i386/sub_n.S: Add a missing _CET_ENDBR to indirect jump - target - Checked on i686-linux-gnu.
* x86: Move CET infrastructure to x86_64Adhemerval Zanella2024-01-0962-265/+270
| | | | | | | | The CET is only supported for x86_64 and there is no plan to add kernel support for i386. Move the Makefile rules and files from the generic x86 folder to x86_64 one. Checked on x86_64-linux-gnu and i686-linux-gnu.
* localedata: su_ID: make lang_name agree with CLDRMike FABIAN2024-01-091-1/+1
|
* localedata: add new locale su_IDMike FABIAN2024-01-092-0/+165
| | | | Resolves: BZ # 27312
* localedata: add new locale zgh_MAMike FABIAN2024-01-093-0/+192
| | | | | | Resolves: BZ # 12908 https://iso639-3.sil.org/code/zgh
* INSTALL: regenerateMark Wielaard2024-01-091-7/+7
|
* localedata: add tok/UTF-8 to SUPPORTEDMike FABIAN2024-01-091-0/+1
|
* localedata: tok: add yY and nN to yesexpr and noexprMike FABIAN2024-01-091-2/+2
| | | | See: https://sourceware.org/bugzilla/show_bug.cgi?id=31221#c2