From 9be22cb468ec126c467495fa7705c630e14f1bcc Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Fri, 20 May 2022 12:19:44 +0200 Subject: [PATCH] intial package creation Signed-off-by: Toshaan Bharvani --- SOURCES/ChangeLog.old | 10288 ++++++++++++++++ SOURCES/bench.mk | 77 + SOURCES/glibc-bench-compare | 153 + SOURCES/glibc-c-utf8-locale-1.patch | 980 ++ SOURCES/glibc-c-utf8-locale-2.patch | 1437 +++ SOURCES/glibc-c-utf8-locale-3.patch | 65 + SOURCES/glibc-c-utf8-locale-4.patch | 734 ++ SOURCES/glibc-c-utf8-locale-5.patch | 691 ++ SOURCES/glibc-cs-path.patch | 44 + SOURCES/glibc-deprecated-selinux-makedb.patch | 20 + SOURCES/glibc-deprecated-selinux-nscd.patch | 17 + SOURCES/glibc-fedora-linux-tcsetattr.patch | 61 + SOURCES/glibc-fedora-localedata-rh61908.patch | 49 + SOURCES/glibc-fedora-localedef.patch | 21 + SOURCES/glibc-fedora-manual-dircategory.patch | 31 + SOURCES/glibc-fedora-nscd.patch | 20 + SOURCES/glibc-fedora-nsswitch.patch | 46 + SOURCES/glibc-nscd-sysconfig.patch | 21 + SOURCES/glibc-python3.patch | 30 + SOURCES/glibc-rh1070416.patch | 38 + SOURCES/glibc-rh1988382.patch | 619 + SOURCES/glibc-rh2023422-1.patch | 250 + SOURCES/glibc-rh2023422-2.patch | 37 + SOURCES/glibc-rh2023422-3.patch | 19 + SOURCES/glibc-rh2024347-1.patch | 98 + SOURCES/glibc-rh2024347-10.patch | 74 + SOURCES/glibc-rh2024347-11.patch | 592 + SOURCES/glibc-rh2024347-12.patch | 73 + SOURCES/glibc-rh2024347-13.patch | 42 + SOURCES/glibc-rh2024347-2.patch | 259 + SOURCES/glibc-rh2024347-3.patch | 150 + SOURCES/glibc-rh2024347-4.patch | 130 + SOURCES/glibc-rh2024347-5.patch | 904 ++ SOURCES/glibc-rh2024347-6.patch | 49 + SOURCES/glibc-rh2024347-7.patch | 1130 ++ SOURCES/glibc-rh2024347-8.patch | 43 + SOURCES/glibc-rh2024347-9.patch | 278 + SOURCES/glibc-rh2027789.patch | 23 + SOURCES/glibc-rh2029410.patch | 143 + SOURCES/glibc-rh2032647-1.patch | 2024 +++ SOURCES/glibc-rh2032647-2.patch | 585 + SOURCES/glibc-rh2032647-3.patch | 25 + SOURCES/glibc-rh2032647-4.patch | 189 + SOURCES/glibc-rh2032647-5.patch | 45 + SOURCES/glibc-rh2032647-6.patch | 49 + SOURCES/glibc-rh2040657-1.patch | 547 + SOURCES/glibc-rh2040657-10.patch | 73 + SOURCES/glibc-rh2040657-11.patch | 37 + SOURCES/glibc-rh2040657-12.patch | 158 + SOURCES/glibc-rh2040657-2.patch | 42 + SOURCES/glibc-rh2040657-3.patch | 171 + SOURCES/glibc-rh2040657-4.patch | 58 + SOURCES/glibc-rh2040657-5.patch | 32 + SOURCES/glibc-rh2040657-6.patch | 549 + SOURCES/glibc-rh2040657-7.patch | 633 + SOURCES/glibc-rh2040657-8.patch | 146 + SOURCES/glibc-rh2040657-9.patch | 52 + SOURCES/glibc-rh2058224-1.patch | 296 + SOURCES/glibc-rh2058224-2.patch | 62 + SOURCES/glibc-rh2058230.patch | 37 + SOURCES/glibc-rh827510.patch | 37 + SOURCES/glibc-upstream-2.34-1.patch | 26 + SOURCES/glibc-upstream-2.34-10.patch | 34 + SOURCES/glibc-upstream-2.34-100.patch | 95 + SOURCES/glibc-upstream-2.34-101.patch | 431 + SOURCES/glibc-upstream-2.34-102.patch | 485 + SOURCES/glibc-upstream-2.34-103.patch | 24 + SOURCES/glibc-upstream-2.34-104.patch | 26 + SOURCES/glibc-upstream-2.34-105.patch | 234 + SOURCES/glibc-upstream-2.34-106.patch | 44 + SOURCES/glibc-upstream-2.34-107.patch | 35 + SOURCES/glibc-upstream-2.34-11.patch | 62 + SOURCES/glibc-upstream-2.34-12.patch | 117 + SOURCES/glibc-upstream-2.34-13.patch | 279 + SOURCES/glibc-upstream-2.34-14.patch | 411 + SOURCES/glibc-upstream-2.34-15.patch | 117 + SOURCES/glibc-upstream-2.34-16.patch | 31 + SOURCES/glibc-upstream-2.34-17.patch | 26 + SOURCES/glibc-upstream-2.34-18.patch | 377 + SOURCES/glibc-upstream-2.34-19.patch | 27 + SOURCES/glibc-upstream-2.34-2.patch | 33 + SOURCES/glibc-upstream-2.34-20.patch | 29 + SOURCES/glibc-upstream-2.34-21.patch | 44 + SOURCES/glibc-upstream-2.34-22.patch | 137 + SOURCES/glibc-upstream-2.34-23.patch | 32 + SOURCES/glibc-upstream-2.34-24.patch | 355 + SOURCES/glibc-upstream-2.34-25.patch | 204 + SOURCES/glibc-upstream-2.34-26.patch | 129 + SOURCES/glibc-upstream-2.34-27.patch | 37 + SOURCES/glibc-upstream-2.34-28.patch | 154 + SOURCES/glibc-upstream-2.34-29.patch | 101 + SOURCES/glibc-upstream-2.34-3.patch | 32 + SOURCES/glibc-upstream-2.34-30.patch | 208 + SOURCES/glibc-upstream-2.34-31.patch | 201 + SOURCES/glibc-upstream-2.34-32.patch | 42 + SOURCES/glibc-upstream-2.34-33.patch | 37 + SOURCES/glibc-upstream-2.34-34.patch | 41 + SOURCES/glibc-upstream-2.34-35.patch | 83 + SOURCES/glibc-upstream-2.34-36.patch | 47 + SOURCES/glibc-upstream-2.34-37.patch | 137 + SOURCES/glibc-upstream-2.34-38.patch | 41 + SOURCES/glibc-upstream-2.34-39.patch | 466 + SOURCES/glibc-upstream-2.34-4.patch | 24 + SOURCES/glibc-upstream-2.34-40.patch | 151 + SOURCES/glibc-upstream-2.34-41.patch | 489 + SOURCES/glibc-upstream-2.34-42.patch | 117 + SOURCES/glibc-upstream-2.34-43.patch | 30 + SOURCES/glibc-upstream-2.34-44.patch | 177 + SOURCES/glibc-upstream-2.34-45.patch | 68 + SOURCES/glibc-upstream-2.34-46.patch | 41 + SOURCES/glibc-upstream-2.34-47.patch | 102 + SOURCES/glibc-upstream-2.34-48.patch | 97 + SOURCES/glibc-upstream-2.34-49.patch | 101 + SOURCES/glibc-upstream-2.34-5.patch | 22 + SOURCES/glibc-upstream-2.34-50.patch | 63 + SOURCES/glibc-upstream-2.34-51.patch | 191 + SOURCES/glibc-upstream-2.34-52.patch | 37 + SOURCES/glibc-upstream-2.34-53.patch | 37 + SOURCES/glibc-upstream-2.34-54.patch | 32 + SOURCES/glibc-upstream-2.34-55.patch | 37 + SOURCES/glibc-upstream-2.34-56.patch | 65 + SOURCES/glibc-upstream-2.34-57.patch | 74 + SOURCES/glibc-upstream-2.34-58.patch | 35 + SOURCES/glibc-upstream-2.34-59.patch | 35 + SOURCES/glibc-upstream-2.34-6.patch | 65 + SOURCES/glibc-upstream-2.34-60.patch | 32 + SOURCES/glibc-upstream-2.34-61.patch | 34 + SOURCES/glibc-upstream-2.34-62.patch | 21 + SOURCES/glibc-upstream-2.34-63.patch | 21 + SOURCES/glibc-upstream-2.34-64.patch | 81 + SOURCES/glibc-upstream-2.34-65.patch | 33 + SOURCES/glibc-upstream-2.34-66.patch | 37 + SOURCES/glibc-upstream-2.34-67.patch | 50 + SOURCES/glibc-upstream-2.34-68.patch | 27 + SOURCES/glibc-upstream-2.34-69.patch | 52 + SOURCES/glibc-upstream-2.34-7.patch | 35 + SOURCES/glibc-upstream-2.34-70.patch | 130 + SOURCES/glibc-upstream-2.34-71.patch | 39 + SOURCES/glibc-upstream-2.34-72.patch | 377 + SOURCES/glibc-upstream-2.34-73.patch | 442 + SOURCES/glibc-upstream-2.34-74.patch | 337 + SOURCES/glibc-upstream-2.34-75.patch | 53 + SOURCES/glibc-upstream-2.34-76.patch | 165 + SOURCES/glibc-upstream-2.34-77.patch | 33 + SOURCES/glibc-upstream-2.34-78.patch | 82 + SOURCES/glibc-upstream-2.34-79.patch | 102 + SOURCES/glibc-upstream-2.34-8.patch | 140 + SOURCES/glibc-upstream-2.34-80.patch | 56 + SOURCES/glibc-upstream-2.34-81.patch | 64 + SOURCES/glibc-upstream-2.34-82.patch | 276 + SOURCES/glibc-upstream-2.34-83.patch | 121 + SOURCES/glibc-upstream-2.34-84.patch | 173 + SOURCES/glibc-upstream-2.34-85.patch | 109 + SOURCES/glibc-upstream-2.34-86.patch | 26 + SOURCES/glibc-upstream-2.34-87.patch | 329 + SOURCES/glibc-upstream-2.34-88.patch | 28 + SOURCES/glibc-upstream-2.34-89.patch | 47 + SOURCES/glibc-upstream-2.34-9.patch | 24 + SOURCES/glibc-upstream-2.34-91.patch | 36 + SOURCES/glibc-upstream-2.34-92.patch | 36 + SOURCES/glibc-upstream-2.34-97.patch | 360 + SOURCES/glibc-upstream-2.34-98.patch | 62 + SOURCES/glibc-upstream-2.34-99.patch | 24 + SOURCES/glibc.attr | 3 + SOURCES/glibc.req.in | 42 + SOURCES/nscd.conf | 1 + SOURCES/parse-SUPPORTED.py | 40 + SOURCES/wrap-find-debuginfo.sh | 117 + SPECS/glibc.spec | 2629 ++++ 169 files changed, 40070 insertions(+) create mode 100644 SOURCES/ChangeLog.old create mode 100644 SOURCES/bench.mk create mode 100755 SOURCES/glibc-bench-compare create mode 100644 SOURCES/glibc-c-utf8-locale-1.patch create mode 100644 SOURCES/glibc-c-utf8-locale-2.patch create mode 100644 SOURCES/glibc-c-utf8-locale-3.patch create mode 100644 SOURCES/glibc-c-utf8-locale-4.patch create mode 100644 SOURCES/glibc-c-utf8-locale-5.patch create mode 100644 SOURCES/glibc-cs-path.patch create mode 100644 SOURCES/glibc-deprecated-selinux-makedb.patch create mode 100644 SOURCES/glibc-deprecated-selinux-nscd.patch create mode 100644 SOURCES/glibc-fedora-linux-tcsetattr.patch create mode 100644 SOURCES/glibc-fedora-localedata-rh61908.patch create mode 100644 SOURCES/glibc-fedora-localedef.patch create mode 100644 SOURCES/glibc-fedora-manual-dircategory.patch create mode 100644 SOURCES/glibc-fedora-nscd.patch create mode 100644 SOURCES/glibc-fedora-nsswitch.patch create mode 100644 SOURCES/glibc-nscd-sysconfig.patch create mode 100644 SOURCES/glibc-python3.patch create mode 100644 SOURCES/glibc-rh1070416.patch create mode 100644 SOURCES/glibc-rh1988382.patch create mode 100644 SOURCES/glibc-rh2023422-1.patch create mode 100644 SOURCES/glibc-rh2023422-2.patch create mode 100644 SOURCES/glibc-rh2023422-3.patch create mode 100644 SOURCES/glibc-rh2024347-1.patch create mode 100644 SOURCES/glibc-rh2024347-10.patch create mode 100644 SOURCES/glibc-rh2024347-11.patch create mode 100644 SOURCES/glibc-rh2024347-12.patch create mode 100644 SOURCES/glibc-rh2024347-13.patch create mode 100644 SOURCES/glibc-rh2024347-2.patch create mode 100644 SOURCES/glibc-rh2024347-3.patch create mode 100644 SOURCES/glibc-rh2024347-4.patch create mode 100644 SOURCES/glibc-rh2024347-5.patch create mode 100644 SOURCES/glibc-rh2024347-6.patch create mode 100644 SOURCES/glibc-rh2024347-7.patch create mode 100644 SOURCES/glibc-rh2024347-8.patch create mode 100644 SOURCES/glibc-rh2024347-9.patch create mode 100644 SOURCES/glibc-rh2027789.patch create mode 100644 SOURCES/glibc-rh2029410.patch create mode 100644 SOURCES/glibc-rh2032647-1.patch create mode 100644 SOURCES/glibc-rh2032647-2.patch create mode 100644 SOURCES/glibc-rh2032647-3.patch create mode 100644 SOURCES/glibc-rh2032647-4.patch create mode 100644 SOURCES/glibc-rh2032647-5.patch create mode 100644 SOURCES/glibc-rh2032647-6.patch create mode 100644 SOURCES/glibc-rh2040657-1.patch create mode 100644 SOURCES/glibc-rh2040657-10.patch create mode 100644 SOURCES/glibc-rh2040657-11.patch create mode 100644 SOURCES/glibc-rh2040657-12.patch create mode 100644 SOURCES/glibc-rh2040657-2.patch create mode 100644 SOURCES/glibc-rh2040657-3.patch create mode 100644 SOURCES/glibc-rh2040657-4.patch create mode 100644 SOURCES/glibc-rh2040657-5.patch create mode 100644 SOURCES/glibc-rh2040657-6.patch create mode 100644 SOURCES/glibc-rh2040657-7.patch create mode 100644 SOURCES/glibc-rh2040657-8.patch create mode 100644 SOURCES/glibc-rh2040657-9.patch create mode 100644 SOURCES/glibc-rh2058224-1.patch create mode 100644 SOURCES/glibc-rh2058224-2.patch create mode 100644 SOURCES/glibc-rh2058230.patch create mode 100644 SOURCES/glibc-rh827510.patch create mode 100644 SOURCES/glibc-upstream-2.34-1.patch create mode 100644 SOURCES/glibc-upstream-2.34-10.patch create mode 100644 SOURCES/glibc-upstream-2.34-100.patch create mode 100644 SOURCES/glibc-upstream-2.34-101.patch create mode 100644 SOURCES/glibc-upstream-2.34-102.patch create mode 100644 SOURCES/glibc-upstream-2.34-103.patch create mode 100644 SOURCES/glibc-upstream-2.34-104.patch create mode 100644 SOURCES/glibc-upstream-2.34-105.patch create mode 100644 SOURCES/glibc-upstream-2.34-106.patch create mode 100644 SOURCES/glibc-upstream-2.34-107.patch create mode 100644 SOURCES/glibc-upstream-2.34-11.patch create mode 100644 SOURCES/glibc-upstream-2.34-12.patch create mode 100644 SOURCES/glibc-upstream-2.34-13.patch create mode 100644 SOURCES/glibc-upstream-2.34-14.patch create mode 100644 SOURCES/glibc-upstream-2.34-15.patch create mode 100644 SOURCES/glibc-upstream-2.34-16.patch create mode 100644 SOURCES/glibc-upstream-2.34-17.patch create mode 100644 SOURCES/glibc-upstream-2.34-18.patch create mode 100644 SOURCES/glibc-upstream-2.34-19.patch create mode 100644 SOURCES/glibc-upstream-2.34-2.patch create mode 100644 SOURCES/glibc-upstream-2.34-20.patch create mode 100644 SOURCES/glibc-upstream-2.34-21.patch create mode 100644 SOURCES/glibc-upstream-2.34-22.patch create mode 100644 SOURCES/glibc-upstream-2.34-23.patch create mode 100644 SOURCES/glibc-upstream-2.34-24.patch create mode 100644 SOURCES/glibc-upstream-2.34-25.patch create mode 100644 SOURCES/glibc-upstream-2.34-26.patch create mode 100644 SOURCES/glibc-upstream-2.34-27.patch create mode 100644 SOURCES/glibc-upstream-2.34-28.patch create mode 100644 SOURCES/glibc-upstream-2.34-29.patch create mode 100644 SOURCES/glibc-upstream-2.34-3.patch create mode 100644 SOURCES/glibc-upstream-2.34-30.patch create mode 100644 SOURCES/glibc-upstream-2.34-31.patch create mode 100644 SOURCES/glibc-upstream-2.34-32.patch create mode 100644 SOURCES/glibc-upstream-2.34-33.patch create mode 100644 SOURCES/glibc-upstream-2.34-34.patch create mode 100644 SOURCES/glibc-upstream-2.34-35.patch create mode 100644 SOURCES/glibc-upstream-2.34-36.patch create mode 100644 SOURCES/glibc-upstream-2.34-37.patch create mode 100644 SOURCES/glibc-upstream-2.34-38.patch create mode 100644 SOURCES/glibc-upstream-2.34-39.patch create mode 100644 SOURCES/glibc-upstream-2.34-4.patch create mode 100644 SOURCES/glibc-upstream-2.34-40.patch create mode 100644 SOURCES/glibc-upstream-2.34-41.patch create mode 100644 SOURCES/glibc-upstream-2.34-42.patch create mode 100644 SOURCES/glibc-upstream-2.34-43.patch create mode 100644 SOURCES/glibc-upstream-2.34-44.patch create mode 100644 SOURCES/glibc-upstream-2.34-45.patch create mode 100644 SOURCES/glibc-upstream-2.34-46.patch create mode 100644 SOURCES/glibc-upstream-2.34-47.patch create mode 100644 SOURCES/glibc-upstream-2.34-48.patch create mode 100644 SOURCES/glibc-upstream-2.34-49.patch create mode 100644 SOURCES/glibc-upstream-2.34-5.patch create mode 100644 SOURCES/glibc-upstream-2.34-50.patch create mode 100644 SOURCES/glibc-upstream-2.34-51.patch create mode 100644 SOURCES/glibc-upstream-2.34-52.patch create mode 100644 SOURCES/glibc-upstream-2.34-53.patch create mode 100644 SOURCES/glibc-upstream-2.34-54.patch create mode 100644 SOURCES/glibc-upstream-2.34-55.patch create mode 100644 SOURCES/glibc-upstream-2.34-56.patch create mode 100644 SOURCES/glibc-upstream-2.34-57.patch create mode 100644 SOURCES/glibc-upstream-2.34-58.patch create mode 100644 SOURCES/glibc-upstream-2.34-59.patch create mode 100644 SOURCES/glibc-upstream-2.34-6.patch create mode 100644 SOURCES/glibc-upstream-2.34-60.patch create mode 100644 SOURCES/glibc-upstream-2.34-61.patch create mode 100644 SOURCES/glibc-upstream-2.34-62.patch create mode 100644 SOURCES/glibc-upstream-2.34-63.patch create mode 100644 SOURCES/glibc-upstream-2.34-64.patch create mode 100644 SOURCES/glibc-upstream-2.34-65.patch create mode 100644 SOURCES/glibc-upstream-2.34-66.patch create mode 100644 SOURCES/glibc-upstream-2.34-67.patch create mode 100644 SOURCES/glibc-upstream-2.34-68.patch create mode 100644 SOURCES/glibc-upstream-2.34-69.patch create mode 100644 SOURCES/glibc-upstream-2.34-7.patch create mode 100644 SOURCES/glibc-upstream-2.34-70.patch create mode 100644 SOURCES/glibc-upstream-2.34-71.patch create mode 100644 SOURCES/glibc-upstream-2.34-72.patch create mode 100644 SOURCES/glibc-upstream-2.34-73.patch create mode 100644 SOURCES/glibc-upstream-2.34-74.patch create mode 100644 SOURCES/glibc-upstream-2.34-75.patch create mode 100644 SOURCES/glibc-upstream-2.34-76.patch create mode 100644 SOURCES/glibc-upstream-2.34-77.patch create mode 100644 SOURCES/glibc-upstream-2.34-78.patch create mode 100644 SOURCES/glibc-upstream-2.34-79.patch create mode 100644 SOURCES/glibc-upstream-2.34-8.patch create mode 100644 SOURCES/glibc-upstream-2.34-80.patch create mode 100644 SOURCES/glibc-upstream-2.34-81.patch create mode 100644 SOURCES/glibc-upstream-2.34-82.patch create mode 100644 SOURCES/glibc-upstream-2.34-83.patch create mode 100644 SOURCES/glibc-upstream-2.34-84.patch create mode 100644 SOURCES/glibc-upstream-2.34-85.patch create mode 100644 SOURCES/glibc-upstream-2.34-86.patch create mode 100644 SOURCES/glibc-upstream-2.34-87.patch create mode 100644 SOURCES/glibc-upstream-2.34-88.patch create mode 100644 SOURCES/glibc-upstream-2.34-89.patch create mode 100644 SOURCES/glibc-upstream-2.34-9.patch create mode 100644 SOURCES/glibc-upstream-2.34-91.patch create mode 100644 SOURCES/glibc-upstream-2.34-92.patch create mode 100644 SOURCES/glibc-upstream-2.34-97.patch create mode 100644 SOURCES/glibc-upstream-2.34-98.patch create mode 100644 SOURCES/glibc-upstream-2.34-99.patch create mode 100644 SOURCES/glibc.attr create mode 100644 SOURCES/glibc.req.in create mode 100644 SOURCES/nscd.conf create mode 100644 SOURCES/parse-SUPPORTED.py create mode 100644 SOURCES/wrap-find-debuginfo.sh create mode 100644 SPECS/glibc.spec diff --git a/SOURCES/ChangeLog.old b/SOURCES/ChangeLog.old new file mode 100644 index 0000000..a0b9a7f --- /dev/null +++ b/SOURCES/ChangeLog.old @@ -0,0 +1,10288 @@ +* Fri Jul 30 2021 Siddhesh Poyarekar - 2.33.9000-56 +- Port post scripts for gconv-extra to lua and drop dependency across + architectures for x86 multilib (#1988344). + +* Thu Jul 29 2021 Florian Weimer - 2.33.9000-55 +- Auto-sync with upstream branch master, + commit c37fc3ebf0607ce1953c565ffe56d56555eeb25e: +- Update libc.pot for 2.34 release. +- x86-64: Add Avoid_Short_Distance_REP_MOVSB +- Typo: Rename HAVE_CLONE3_WAPPER to HAVE_CLONE3_WRAPPER +- build-many-glibcs.py: Add x86_64-linux-gnu-minimal configuration +- tests: use xmalloc to allocate implementation array +- xmalloc: Fix warnings with gcc analyzer +- __cxa_thread_atexit_impl: Abort on allocation failure [BZ #18524] +- manual: Drop the .so suffix in libc_malloc_debug description +- hurd: _Fork: unlock malloc before calling fork child hooks + +* Tue Jul 27 2021 Florian Weimer - 2.33.9000-54 +- Revert to old C.UTF-8 locale + +* Mon Jul 26 2021 Siddhesh Poyarekar - 2.33.9000-53 +- Loosen dependency on glibc-gconv-extra (#1812191). + +* Mon Jul 26 2021 Florian Weimer - 2.33.9000-52 +- Switch to new version of C.UTF-8 locale + +* Mon Jul 26 2021 Florian Weimer - 2.33.9000-51 +- Auto-sync with upstream branch master, + commit ddcc612ce923038b867083a0c55d6e034951155a: +- Exclude static tests for mcheck and malloc-check +- i386: Regenerate ulps + +* Sat Jul 24 2021 Florian Weimer - 2.33.9000-50 +- Auto-sync with upstream branch master, + commit d34ed66f96fa9316654d7adb2afcce4be1d1c4f5: +- manual: Document unsupported cases for interposition +- x86: Install [BZ #27958] +- Fix build and tests with --disable-tunables + +* Sat Jul 24 2021 Florian Weimer - 2.33.9000-49 +- Remove both old and new library names in glibc-hwcaps removal (#1983677) + +* Fri Jul 23 2021 Florian Weimer - 2.33.9000-48 +- Auto-sync with upstream branch master, + commit 9a7ab0769b295cbf5232140401742a8f34bda3de: +- hurd: Fix glob lstat compatibility +- socket: Add time64 alias for setsockopt +- socket: Add time64 alias for getsockopt +- mcheck Fix malloc_usable_size [BZ #22057] +- Remove malloc hooks [BZ #23328] +- Move malloc_{g,s}et_state to libc_malloc_debug +- glibc.malloc.check: Wean away from malloc hooks +- mtrace: Wean away from malloc hooks +- Simplify __malloc_initialized +- mcheck: Wean away from malloc hooks [BZ #23489] +- Move malloc hooks into a compat DSO +- Remove __morecore and __default_morecore +- Remove __after_morecore_hook +- Make mcheck tests conditional on GLIBC_2.23 or earlier +- posix: Add sysconf(_SC_{MIN,}SIGSTKSZ) support +- malloc: Fix tst-mallocfork3-malloc-check link +- ARC: elf: make type safe +- ARC: fp: (micro)optimize FPU_STATUS read by eliding FWE bit clearing + +* Thu Jul 22 2021 Fedora Release Engineering - 2.33.9000-47 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jul 21 2021 Florian Weimer - 2.33.9000-46 +- Auto-sync with upstream branch master, + commit 77ede5f010f1b144e067ec035e422a13bb57c55d: +- socket: Add time64 alias for sendmsg +- socket: Add time64 alias for recvmsg +- socket: Add time64 alias for sendmmsg +- Linux: Add time64 alias for prctl +- io: Add time64 alias for fcntl +- misc: Add time64 alias for ioctl +- RISC-V: Update rv64 ULPs +- resolv: Do not install libnss_dns.a, libnss_dns.so +- hurd: Add support for spawn_do_closefrom +- elf: Fix tst-cpu-features-cpuinfo on some AMD systems (BZ #28090) +- i386: Add the clone3 wrapper + +* Mon Jul 19 2021 Florian Weimer - 2.33.9000-45 +- Remove glibc-hwcaps multilibs on upgrade (#1983677) + +* Mon Jul 19 2021 Florian Weimer - 2.33.9000-44 +- Auto-sync with upstream branch master, + commit ee5ed99922ca90bcea4a2f9a48a0c9ae4b534ece: +- nss: Directly load nss_dns, without going through dlsym/dlopen +- resolv: Move nss_dns into libc +- resolv: Move res_query functions into libc +- resolv: Move res_mkquery, res_nmkquery into libc +- resolv: Move res_send, res_nsend into libc +- resolv: Move res_hostalias into its own file, along with hostalias +- resolv: Move __res_context_hostalias into its own file and into libc +- resolv: Move res_queriesmatch to its own file and into libc +- resolv: Move res_nameinquery to its own file and into libc +- resolv: Move ns_samename into its own file, and into libc +- resolv: Move ns_makecanon into its own file, and into libc +- resolv: Move res_isourserver to its own file and reformat to GNU style +- resolv: Move __res_get_nsaddr to its own file and into libc +- resolv: Rename res_comp.c to res-name-checking.c and move into libc +- resolv: Move dn_skipname to its own file and into libc +- resolv: Move dn_comp to its own file and into libc +- resolv: Move _getlong, _getshort, __putlong, __putshort to res-putget +- resolv: Move dn_expand to its own file and into libc +- resolv: Move ns_name_compress into its own file and into libc +- resolv: Move ns_name_pack into its own file and into libc +- resolv: Move ns_name_pton into its own file and into libc +- resolv: Move ns_name_uncompress into its own file and into libc +- resolv: Move ns_name_skip to its own file and into libc (bug 28091) +- resolv: Deprecate legacy interfaces in libresolv +- tst-safe-linking: make false positives even more improbable +- htl: Do not expose pthread hidden proto outside libpthread +- elf: Fix a wrong array access on tst-tls20 +- elf: Add -Wl,--no-as-needed for tst-tls-manydynamic*mod-dep-bad.so (BZ #28089) +- resolv: Move ns_name_unpack to its own file and into libc +- resolv: Remove unnecessary res_isourserver_p call from send_dg +- resolv: Move ns_name_ntop to its own file and into libc +- nss_dns: Do not use deprecated packet parsing functions +- resolv: Sort Makefile routines and Versions lexicographically +- socket: Add hidden prototype for setsockopt +- elf: Fix DTV gap reuse logic (BZ #27135) +- Fix linknamespace errors and local-plt-usages in nss_files. +- Add static tests for __clone_internal +- x86-64: Add the clone3 wrapper +- Add an internal wrapper for clone, clone2 and clone3 +- nss: Fix build error with --disable-nscd +- htl: Fix linking static examples against libpthread +- htl: Let libc call __pthread_mutex_{,try,un}lock +- posix: Ignore non opened files on tst-spawn5 +- mcheck: Align struct hdr to MALLOC_ALIGNMENT bytes [BZ #28068] + +* Thu Jul 15 2021 Siddhesh Poyarekar - 2.33.9000-43 +- Run postun only if the main gconv-modules configuration file exists. + (#1981013) +- Own %{libdir}/gconv/gconv-modules.d +- Rearrange file list command so that gconv-modules.cache is no longer + marked as %config + +* Tue Jul 13 2021 Florian Weimer - 2.33.9000-42 +- Perform systemd re-exec even if glibc.i686 is installed + +* Tue Jul 13 2021 Florian Weimer - 2.33.9000-41 +- Re-exec systemd on upgrades + +* Mon Jul 12 2021 Florian Weimer - 2.33.9000-40 +- Merge files NSS service module into libc. +- Restore vDSO acceleration for time functions on older kernels for i686. +- Auto-sync with upstream branch master, + commit 72e84d1db22203e01a43268de71ea8669eca2863: +- Linux: Use 32-bit vDSO for clock_gettime, gettimeofday, time (BZ# 28071) +- Reduce pollution due to dynamic PTHREAD_STACK_MIN +- Fix failing nss/tst-nss-files-hosts-long. +- nis: nis_local_group may read from __nisgroup[-1] (bug 28075) +- hurd _Fork: Drop duplicate malloc_fork_lock calls +- support: Replace _SC_MINSIGSTKSZ with _SC_SIGSTKSZ +- support: Replace MINSIGSTKSZ with sysconf (_SC_MINSIGSTKSZ) +- Define PTHREAD_STACK_MIN to sysconf(_SC_THREAD_STACK_MIN) +- Force building with -fno-common +- Add a generic malloc test for MALLOC_ALIGNMENT +- Properly run tst-spawn5 directly [BZ #28067] +- build-many-glibcs.py: Add glibcs-arm-linux-gnueabihf-thumb +- nptl: Use out-of-line wake function in __libc_lock_unlock slow path +- powerpc64le: Fix typo in configure +- powerpc64: Remove strcspn ifunc from the loader +- x86: Remove wcsnlen-sse4_1 from wcslen ifunc-impl-list [BZ #28064] +- x86-64: Test strlen and wcslen with 0 in the RSI register [BZ #28064] +- x86_64: Remove unneeded static PIE check for undefined weak diagnostic +- Add NT_ARM_PAC_ENABLED_KEYS to elf.h +- posix: Add posix_spawn_file_actions_addclosefrom_np +- io: Add closefrom [BZ #10353] +- linux: Add close_range +- support: Add support_stack_alloc +- _int_realloc is static +- Move mcheck symbol from stdlib to malloc +- nss: Do not install static linker input files for libnss_files +- elf/tests: Make thrlock and noload depend on libm +- Harden tcache double-free check +- nss: Access nss_files through direct references +- nss_files: Move into libc +- nss_files: Add generic code for set*ent, end*ent and file open +- nss_files: Allocate nscd file registration data on the heap +- libio: Replace internal _IO_getdelim symbol with __getdelim +- libio: Add hidden prototype for ungetc +- inet: Add hidden prototype for __inet_network +- Update MIPS libm-test-ulps +- Update powerpc-nofpu libm-test-ulps +- soft-fp: Add __extendhfsf2/__extendhfdf2, __truncsfhf2/__truncdfhf2, + __eqhf2/__nehf2 +- Update kernel version to 5.13 in tst-mman-consts.py +- tests-exclude-mcheck: Fix typo + +* Wed Jul 07 2021 Florian Weimer - 2.33.9000-39 +- Auto-sync with upstream branch master, + commit 7a5db2e82fbb6c3a6e3fdae02b7166c5d0e8c7a8: +- elf: Clean up GLIBC_PRIVATE exports of internal libdl symbols +- nptl: Reduce the GLIBC_PRIVATE ABI +- nptl: Remove GLIBC_2.34 versions of __pthread_mutex_lock, + __pthread_mutex_unlock +- nptl: Use internal low-level lock type for !IS_IN (libc) +- glibc.malloc.check: Fix nit in documentation +- Exclude tst-realloc from tests-mcheck +- linux: Fix setsockopt fallback +- linux: Use the expected size for SO_TIMESTAMP{NS} convertion +- linux: Consolidate Linux setsockopt implementation +- linux: Consolidate Linux getsockopt implementation +- manual: fix description for preadv() + +* Tue Jul 06 2021 Florian Weimer - 2.33.9000-38 +- Auto-sync with upstream branch master, + commit 832f50be6c9c010e46180d14126bbb81f35e808c: +- linux: Check for null value msghdr struct before use +- elf: Call free from base namespace on error in dl-libc.c [BZ #27646] + +* Mon Jul 05 2021 Florian Weimer - 2.33.9000-37 +- Move libanl.a into glibc-devel. +- Auto-sync with upstream branch master, + commit 91fb0f17a5779da6e7877eb74119a83dbe8bf167: +- hooks.c: Remove incorrect comment +- mtrace: Add attribute nocommon to mallwatch +- Move glibc.malloc.check implementation into its own file +- mtrace: Deprecate mallwatch and tr_break +- Drop source dependencies on hooks.c and arena.c +- malloc: Initiate tcache shutdown even without allocations [BZ #28028] +- Add mcheck tests to malloc +- iconvconfig: Use the public feof_unlocked +- resolv: Move libanl into libc (if libpthread is in libc) +- powerpc: optimize strcpy/stpcpy for POWER9/10 +- soft-fp: Add __extendhfxf2 and __truncxfhf2 +- x86: Check RTM_ALWAYS_ABORT for RTM [BZ #28033] +- Update syscall lists for Linux 5.13 +- s390: Fix MEMCHR_Z900_G5 ifunc-variant if n>=0x80000000 [BZ #28024] +- Fix extra PLT reference in libc.so due to __glob64_time64 if build with gcc 7.5 on 32bit. +- AArch64: Add hp-timing.h +- AArch64: Improve strnlen performance + +* Wed Jun 30 2021 Florian Weimer - 2.33.9000-36 +- Auto-sync with upstream branch master, + commit eb68d7d23cc411acdf68a60f194343a6774d6194: +- Linux: Avoid calling malloc indirectly from __get_nprocs (#1975693) +- Use Linux 5.13 in build-many-glibcs.py + +* Wed Jun 30 2021 Florian Weimer - 2.33.9000-35 +- Drop glibc-s390x-roundeven.patch, applied upstream. +- Move libutil.a into glibc-devel. +- Auto-sync with upstream branch master, + commit 734c60ebb607086ad6d67b2544d6b7baba72a652: +- login: Move libutil into libc +- login: Rework hidden prototypes for __setutent, __utmpname, __endutent +- login: Hidden prototypes for _getpt, __ptsname_r, grantpt, unlockpt +- nptl_db: Re-use the ELF-to-abilist converter for ABI checking +- Add RFC 8335 Definitions from Linux 5.13 +- nss: Fix NSS_DECLARE_MODULE_FUNCTIONS handling of _nss_*_endnetgrent +- s390x: Update math: redirect roundeven function +- posix: Add _Fork [BZ #4737] + +* Mon Jun 28 2021 Florian Weimer - 2.33.9000-34 +- Move librt.a to glibc-devel (#1977058) + +* Mon Jun 28 2021 Florian Weimer - 2.33.9000-33 +- Dropped patches glibc-nosymlink-*.patch, glibc-iconvconfig-corruption.patch, + glibc-libthread_db-dynsym-*.patch; applied upstream. +- Auto-sync with upstream branch master, + commit dd45734e322a03287d34d8af9b7da7b35cfddb8e: +- nptl: Add glibc.pthread.stack_cache_size tunable +- nptl: Export libthread_db-used symbols under GLIBC_PRIVATE +- nptl: Rename nptl_version to __nptl_version +- nptl_db: Clean up main/rtld variable handling +- arm: align stack in clone [BZ 28020] +- Linux: Cleanups after librt move +- Linux: Move timer_settime, __timer_settime64 from librt to libc +- Linux: Move timer_gettime, __timer_gettime64 from librt to libc +- Linux: Move timer_getoverrun from librt to libc +- Linux: Move timer_create, timer_delete from librt to libc +- Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.h +- Install shared objects under their ABI names +- elf: Generalize name-based DSO recognition in ldconfig +- Makerules: Remove lib-version, $(subdir-version) +- nptl_db: Install libthread_db under a regular implementation name +- iconvconfig: Fix multiple issues +- wordexp: handle overflow in positional parameter number (bug 28011) +- Update math: redirect roundeven function +- Use GCC builtins for roundeven functions if desired. +- x86_64: roundeven with sse4.1 support +- math: redirect roundeven function + +* Mon Jun 28 2021 Florian Weimer - 2.33.9000-32 +- Switch to new version of libthread_db .dynsym patch + +* Mon Jun 28 2021 Florian Weimer - 2.33.9000-31 +- Further .symtab adjustment: Keep all __GI_* symbols (#1975895) + +* Mon Jun 28 2021 Florian Weimer - 2.33.9000-30 +- Keep most of .symtab in libc.so.6 (#1975895) + +* Sun Jun 27 2021 Florian Weimer - 2.33.9000-29 +- Apply emergency patch to fix iconvconfig corruption + +* Sun Jun 27 2021 Florian Weimer - 2.33.9000-28 +- Adjust glibc.req so that egrep does not cause eu-readelf to fail + +* Sun Jun 27 2021 Florian Weimer - 2.33.9000-27 +- Drop glibc-revert-dtv-gap-reuse.patch, applied upstream. +- Auto-sync with upstream branch master, + commit 2c16cb88a6e5ace0fb7cedca86860ea7bde522a7: +- Linux: Move timer helper routines from librt to libc +- Linux: Move mq_unlink from librt to libc +- Linux: Move mq_send, mq_timedsend, __mq_timedsend_time64 to libc +- Linux: Move mq_receive, mq_timedreceive, __mq_timedreceive_time64 to libc +- Linux: Move mq_open, __mq_open_2 from librt to libc +- Linux: Move mq_notify from librt to libc +- Linux: Move mq_getattr from librt to libc +- Linux: Move mq_setattr from librt to libc +- Linux: Move mq_close from librt to libc +- Linux: Move lio_listio, lio_listio64 from librt to libc +- rt: Rework lio_listio implementation +- Linux: Move aio_write, aio_write64 into libc +- Linux: Move aio_suspend, aio_suspend64, __aio_suspend_time64 to libc +- Linux: Move aio_return, aio_return64 into libc +- Linux: Move aio_read, aio_read64 into libc +- Linux: Move aio_fsync, aio_fsync64 into libc +- Linux: Move aio_error, aio_error64 into libc +- Linux: Move aio_cancel, aio_cancel64 into libc +- Linux: Move aio_init from librt into libc +- support: Fix xclone build failures on ia64 and hppa +- elf: Disable most of TLS modid gaps processing [BZ #27135] +- elf: Fix glibc-hwcaps priorities with cache flags mismatches [BZ #27046] +- * NEWS: Clarify _TIME_BITS change. +- x86: Remove unnecessary overflow check from wcsnlen-sse4_1.S +- String: Add three more overflow tests cases to test-strnlen.c +- Consolidate pthread_atfork +- posix: Do not clobber errno by atfork handlers +- posix: Consolidate fork implementation +- support: Add xclone +- x86: Fix tst-cpu-features-cpuinfo on Ryzen 9 (BZ #27873) +- x86: Copy IBT and SHSTK usable only if CET is enabled +- x86: Fix overflow bug in wcsnlen-sse4_1 and wcsnlen-avx2 [BZ #27974] +- x86: Fix overflow bug with wmemchr-sse2 and wmemchr-avx2 [BZ #27974] +- String: Add overflow tests for strnlen, memchr, and strncat [BZ #27974] +- x86-64: Add wcslen optimize for sse4.1 +- x86-64: Move strlen.S to multiarch/strlen-vec.S +- hurd: Fix build after 52a5fe70a2 +- nptl: Use SA_RESTART for SIGCANCEL handler +- doc: _TIME_BITS defaults may change +- More mcheck -> malloc-check refactoring +- Add NEWS item for gconv-modules.d change +- Handle DT_UNKNOWN in gconv-modules.d +- iconvconfig: Use common gconv module parsing function +- gconv_conf: Split out configuration file processing +- gconv_conf: Remove unused variables +- iconv: Remove alloca use in gconv-modules configuration parsing +- Remove unsused symbols from nptl/Versions +- linux: Only use 64-bit syscall if required for clock_nanosleep +- linux: Only use 64-bit syscall if required for internal futex +- linux: Only use 64-bit syscall if required for utimensat family +- linux: Only use 64-bit syscall if required for sigtimedwait +- linux: Only use 64-bit syscall if required for mq_timedsend +- linux: Only use 64-bit syscall if required for mq_timedreceive +- linux: Only use 64-bit syscall if required for timerfd_settime +- linux: Only use 64-bit syscall if required for semtimedop +- linux: timerfd_gettime minor cleanup +- linux: Remove time64-support +- linux: Remove supports_time64 () from clock_gettime +- linux: Remove supports_time64 () from clock_getres +- linux: Only use 64-bit syscall if required for select +- linux: Only use 64-bit syscall if required for pselect +- linux: Only use 64-bit syscall if required for ppoll +- support: Add support_create_timer +- Use 64 bit time_t stat internally +- malloc: Drop __malloc_initialized from Versions +- tst-mcheck: Rename to tst-malloc-check +- Add hidden prototypes for fsync, fdatasync +- nptl: Move pthreadP.h into sysdeps directory +- rt: Move generic implementation from sysdeps/pthread to rt +- rt: Move shm_unlink into libc +- rt: Move shm_open into libc +- rt: Replace generic stub of shm_unlink with the posix version +- rt: Replace generic stub of shm_open with the posix version +- Fix librt-routines-var issues for !PTHREAD_IN_LIBC +- rt: Lexicographically sort Versions file; librt-routines in Makefile +- elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646] +- Makeconfig: Fix time64-compat.mk target + +* Sun Jun 27 2021 Florian Weimer - 2.33.9000-26 +- Add automatic requires if building against glibc development snapshots + +* Thu Jun 24 2021 Carlos O'Donell - 2.33.9000-25 +- Fix thread local storage corruption (#1974970) + +* Tue Jun 22 2021 Siddhesh Poyarekar - 2.33.9000-24 +- Strengthen dependency on glibc-gconv-extra. + +* Fri Jun 18 2021 Florian Weimer - 2.33.9000-23 +- Make glibc-all-langpacks require glibc-gconv-extra in buildroots (#1973663) + +* Thu Jun 17 2021 Florian Weimer - 2.33.9000-22 +- Export libthread_db symbols under GLBIC_PRIVATE (#1965374) + +* Thu Jun 17 2021 Florian Weimer - 2.33.9000-21 +- Redo the crafted libc.so.6 symbol table for valgrind (#1965374) + +* Thu Jun 17 2021 Florian Weimer - 2.33.9000-20 +- Remove .symtab from libc.so.6 again (#1965374) + +* Thu Jun 17 2021 Florian Weimer - 2.33.9000-19 +- Drop glibc-rh697421.patch: The ISO-10646-UCS-2// alias for UTF-8 is incorrect + (#1972520) + +* Wed Jun 16 2021 Florian Weimer - 2.33.9000-18 +- Rebuild against rawhide gcc + +* Tue Jun 15 2021 Florian Weimer - 2.33.9000-17 +- Dropped glibc-gconv-modules-revert.patch, applied upstream. +- Auto-sync with upstream branch master, + commit aa9a7f629632c9180de89632d4f2c1e6039f7781: +- nptl: Export _pthread_cleanup_push, _pthread_cleanup_pop again +- s390x: Align child stack while clone. [BZ #27968] +- y2038: Add test coverage +- libsupport: Add 64-bit time_t support for stat functions +- libsupport: Add 64-bit time_t support for time functions +- io: Add ftw64 with 64-bit time_t support +- io: Add fts64 with 64-bit time_t support +- posix: Add glob64 with 64-bit time_t support +- y2038: Add support for 64-bit time on legacy ABIs +- time: Add 64-bit time support for getdate +- y2038: Add __USE_TIME_BITS64 support for socket-constants.h +- y2038: Use a common definition for shmid_ds +- y2038: Use a common definition for semid_ds +- y2038: Use a common definition for msqid_ds +- y2038: Use a common definition for stat +- y2038: linux: Add __USE_TIME_BITS64 support for struct timex +- y2038: Add __USE_TIME_BITS64 support for struct utimbuf +- y2038: Add __USE_TIME_BITS64 support for struct timespec +- y2038: Add __USE_TIME_BITS64 support for struct timeval +- y2038: Add __USE_TIME_BITS64 support for time_t +- linux: Add recvvmsg fallback for 64-bit time_t SO_TIMESTAMP{NS} +- linux: Add fallback for 64-bit time_t SO_TIMESTAMP{NS} +- linux: Add fallback for 64-bit time_t SO_{RCV,SND}TIMEO +- linux: s390: Add libanl.abilist in s390 and s390x +- linux: mips: Split libanl.abilist in n32 and n64 +- linux: mips: Split librt.abilist in n32 and n64 +- Reinstate gconv-modules as the default configuration file + +* Tue Jun 15 2021 Florian Weimer - 2.33.9000-16 +- Preserve some symbols in libc.so.6's symtab (#1965374) + +* Tue Jun 15 2021 Florian Weimer - 2.33.9000-15 +- Install shared objects under their ABI names, avoiding symlinks (#1652867) + +* Mon Jun 14 2021 Siddhesh Poyarekar - 2.33.9000-14 +- Add a conditional dependency for glibc-gconv-extra.i686 in x86_64. + +* Mon Jun 14 2021 Siddhesh Poyarekar - 2.33.9000-13 +- Auto-sync with upstream branch master, + commit ebae2f5a6f971a8f0b6c99e00f9c45ef7433924a. +- Revert gconv configuration file name to gconv-modules. + +* Thu Jun 03 2021 Florian Weimer - 2.33.9000-12 +- libdl is no longer a separate shared object. +- CVE-2021-33574: Use-after-free via mq_notify (#1965410) +- Auto-sync with upstream branch master, + commit 466c1ea15f461edb8e3ffaf5d86d708876343bbf: +- dlfcn: Rework static dlopen hooks +- dlfcn: Eliminate GLIBC_PRIVATE dependency from tststatic2 +- dlfcn: Cleanups after -ldl is no longer required +- dlfcn: Move dlopen into libc +- dlfcn: Move dlvsym into libc +- dlfcn: Move dlinfo into libc +- dlfcn: Move dladdr1 into libc +- dlfcn: Move dlmopen into libc +- dlfcn: Move dlsym into libc +- dlfcn: Move dladdr into libc +- dlfcn: Move dlclose into libc +- Improve test coverage of strlen function +- fix typo +- dlfcn: Move dlerror into libc +- Add libc ABI extension kludge for baseline-violating libdl symbols +- scripts/versions.awk: Add local: * to all version nodes +- Add missing symbols to Version files +- Fix use of __pthread_attr_copy in mq_notify (bug 27896) +- Use __pthread_attr_copy in mq_notify (bug 27896) +- Update floating-point feature test macro handling for C2X +- stdio-common: Remove _IO_vfwscanf +- aarch64: align stack in clone [BZ #27939] +- powerpc: Optimized memcmp for power10 +- x86-64: Align child stack to 16 bytes [BZ #27902] + +* Mon May 31 2021 Florian Weimer - 2.33.9000-11 +- glibc-sigsetxid-sa_onstack.patch was applied upstream +- Auto-sync with upstream branch master, + commit 271ec55d0ae795f03d92e3aa61bff69a31a19e3a: +- support: Do not build xpthread_attr_setaffinity_np for hurd +- nptl: Add pthread_attr_setaffinity_np failure test +- support: Add xpthread_attr_setaffinity_np wrapper +- nptl: Move createthread to pthread_create +- nptl: Move Linux createthread to nptl +- nptl: Install SIGSETXID handler with SA_ONSTACK [BZ #27914] +- aarch64: Added optimized memset for A64FX +- aarch64: Added optimized memcpy and memmove for A64FX +- benchtests: Fixed bench-memcpy-random: buf1: mprotect failed +- aarch64: Added Vector Length Set test helper script +- aarch64: define BTI_C and BTI_J macros as NOP unless HAVE_AARCH64_BTI +- config: Added HAVE_AARCH64_SVE_ASM for aarch64 +- tst-mallinfo2.c: Use correct multiple for total variable + +* Wed May 26 2021 Florian Weimer - 2.33.9000-10 +- nptl: Install SIGSETXID handler with SA_ONSTACK [BZ #27914] + +* Tue May 25 2021 Florian Weimer - 2.33.9000-9 +- Auto-sync with upstream branch master, + commit ac0353af81a23535f517586a5d04427120a157ac. +- This removes libpthread as a separate shared object. New programs + will depend on the GLIBC_2.34 symbol version. Upstream development + brings in the following noteworthy bug fixes: +- ppc64le: scv ABI error handling fails to check IS_ERR_VALUE (#1962971) +- CVE-2021-27645 glibc: Use-after-free in addgetnetgrentX function in + netgroupcache.c (#1932590) +- Linking the main program with jemalloc causes sysconf to deadlock in + audit mode (#1909920) + +* Fri May 21 2021 Florian Weimer - 2.33.9000-8 +- Switch back to a unified glibc-headers package for downstream (#1940686) + +* Fri May 21 2021 Florian Weimer - 2.33.9000-7 +- aarch64: Enable optional memory tagging support + +* Tue May 11 2021 Florian Weimer - 2.33.9000-6 +- Use distribution mechanism for debuginfo (#1661510, #1886295, #1905611) + +* Thu May 6 2021 Florian Weimer - 2.33.9000-5 +- Build locales in parallel again + +* Tue May 4 2021 Florian Weimer - 2.33.9000-4 +- Various changes to get glibc building again, using selected upstream + backports. +- Re-enable -Werror by default. +- This release introduces __libc_start_main@@GLIBC_2.34, so binaries + are not compatible with glibc 2.33. Building binaries against this + glibc version is not recommended because of the partial libpthread + transition. +- glibc-upstream-amx-detection.patch: Fix build failure after GCC 11.1 update. +- glibc-upstream-malloc-test-hang.patch: Avoid test hang due to + annobin/binutils bug (#1951492) + +* Wed Mar 03 2021 Arjun Shankar - 2.33.9000-3 +- Drop glibc-rh819430.patch; fixed upstream. +- Auto-sync with upstream branch master, + commit f01a61e13872109b3b233158ab664364bd1879bc: +- i386: Regenerate ulps +- x86: Add CPU-specific diagnostics to ld.so --list-diagnostics +- x86: Automate generation of PREFERRED_FEATURE_INDEX_1 bitfield +- ld.so: Implement the --list-diagnostics option +- powerpc: Update libm-test-ulps +- tst: Add test for utimes +- tst: Add test for utime +- tst: Add test for futimens +- nptl: __libc_cleanup_push/__libc_cleanup_pop require -fexceptions +- elf: Build __dl_iterate_phdr with unwinding support [BZ #27498] +- nptl: Use for accessing the libgcc_s unwinder +- Implement _Unwind_Resume in libc on top of +- Move sysdeps/gnu/unwind-resume.c to sysdeps/generic/unwind-resume.c +- __frame_state_for: Use for unwinder access +- sparc: Implement backtrace on top +- m68k: Implement backtrace on top of +- i386: Implement backtrace on top of +- arm: Implement backtrace on top of +- backtrace: Implement on top of +- Implement for dynamically loading the libgcc_s unwinder +- Correct buffer end pointer in IO_wdefault_doallocate (BZ #26874) +- aarch64: update ulps. +- Add inputs that generate larger error bounds +- Reduce the statically linked startup code [BZ #23323] +- posix: Falling back to non wide mode in case of encoding error [BZ #14185] +- nptl: Move elision implementations into libc +- NEWS: Add missing bug closures +- added rt to malloc/Depend [BZ #27132] +- x86: Use x86/nptl/pthreaddef.h +- nptl: Move futex-internal into libc +- nptl: Move lowlevellock into libc [BZ #15648] +- nptl: Move futex-internal.c into main nptl directory +- nptl: Reformat Versions +- nptl: Split libpthread-routines into one routine per line +- x86: Remove unused variables for raw cache sizes from cacheinfo.h +- Use Linux 5.11 in build-many-glibcs.py. +- : Correct x86_cpu_TBM +- x86_64/clone.S: Upate comments +- i386/clone.S: Remove redundant EBX load +- aarch64: Remove the unused __read_tp symbol +- build-many-glibcs.py: Use make -O for more consistent log output + +* Sun Feb 21 2021 Carlos O'Donell - 2.33.9000-2 +- Auto-sync with upstream branch master, + commit e9e7f24543e6d1b0a31641f144697e261df6ccd7: +- configure: Replace obsolete AC_TRY_LINK with AC_LINK_IFELSE +- configure: Remove obsolete AC_CHECK_TOOL_PREFIX +- configure: Replace obsoleted AC_HELP_STRING with AS_HELP_STRING +- Update syscall lists for Linux 5.11. +- Correct hppa EFD_NONBLOCK, IN_NONBLOCK, SFD_NONBLOCK and TFD_NONBLOCK defines. +- string: Work around GCC PR 98512 in rawmemchr +- tst: time: Provide Y2038 tests for mktime (tst-mktime4.c) +- tst: Provide test for difftime +- tst: Provide test for ctime +- tst: Provide test for sched_rr_get_interval +- S390: Add new hwcap values. +- aarch64: Fix sys/ptrace.h if linux headers are included +- elf: Do not copy vDSO soname when setting up link map +- x86: Remove the extra space between "# endif" +- hurd: Fix fstatfs build failure +- linux: Remove stat-check.c +- linux: Remove overflow.h +- linux: Consolidate internal_statvfs +- linux: Consolidate statvfs implementations +- linux: Consolidate fstatvfs implementations +- linux: Consolidate statfs implementations +- linux: Consolidate fstatfs implementations +- linux: Set LFS statfs as default +- linux: Set default kernel_stat.h to LFS +- linux: Fix STATFS_IS_STATFS64 definition + +* Fri Feb 12 2021 Florian Weimer - 2.33.9000-1 +- Auto-sync with upstream branch master, + commit 228f30ab4724d4087d5f52018873fde22efea6e2: +- tunables: Disallow negative values for some tunables +- x86: Use SIZE_MAX instead of (long int)-1 for tunable range value +- tunables: Simplify TUNABLE_SET interface +- setrlimit/getrlimit: Use __nonnull to avoid null pointer +- benchtests: Updated json bench-variant attribute +- regex: stop using alloca +- regexec: remove alloca usage in build_trtable +- regex: remove alloca usage on regex set_regs +- malloc: Sync dynarray with gnulib +- misc: Sync cdefs.h with gnulib +- linux: Fix __sem_check_add_mapping search_sem +- linux: Fix __sem_check_add_mapping name length +- Add more ptrace constants for AArch64 and PowerPC. +- strchr: Add additional benchmarks and tests +- x86-64: Refactor and improve performance of strchr-avx2.S +- pthread: Remove alloca usage from __sem_check_add_mapping +- pthread: Refactor semaphore code +- linux: Require /dev/shm as the shared memory file system +- sunrpc: Fix typo in xdr_string comment +- tst: Provide test for ppoll +- tst: Provide test for timerfd related functions +- x86: Add PTWRITE feature detection [BZ #27346] +- nsswitch: return result when nss database is locked [BZ #27343] +- printf: Add smoke tests for long double +- Add NT_ARM_TAGGED_ADDR_CTRL from Linux 5.10 to elf.h. +- argp: Avoid undefined behaviour when invoking qsort(). +- argp: Improve comments. +- argp: Don't pass invalid arguments to isspace, isalnum, isalpha, isdigit. +- argp: Don't rely on undefined behaviour of _tolower(). +- argp: fix pointer-subtraction bug +- Use binutils 2.36 branch in build-many-glibcs.py. +- manual: Correct description of ENTRY [BZ #17183] +- nptl: Remove private futex optimization [BZ #27304] +- stdio-common: Add a few double formatting tests [BZ #27245] +- posix/tst-rfc3484: Fix compile failure linking to local __stat64 +- i686: Regenerate ULPs +- tst-rtld-list-tunables.sh: Unset glibc tunables +- linux: Remove shmmax check from tst-sysvshm-linux +- x86: Adding an upper bound for Enhanced REP MOVSB. +- Fix version.h for glibc 2.34 development +- Add MS_NOSYMFOLLOW from Linux 5.10 to . +- Move _SC_MINSIGSTKSZ/_SC_SIGSTKSZ entry in NEWS +- libSegFault: Fix printing signal number [BZ #27249] +- hurd TIOCFLUSH: fix fixing argument +- sysconf: Add _SC_MINSIGSTKSZ/_SC_SIGSTKSZ [BZ #20305] +- hurd TIOCFLUSH: Cope BSD 4.1 semantic +- tst-mallinfo2.c: Remove useless trailing semicolon for macro +- elf: Replace a --defsym trick with an object file to be compatible with LLD +- Open master branch for glibc 2.34 development +- Prepare for glibc 2.33 release +- Update NEWS with bugs +- Update translations +- NEWS: Fix typo in CVE-2021-3326 entry +- elf: Fix tests that rely on ld.so.cache for cross-compiling +- NEWS: Mention CVE-2021-3326 (iconv assertion with ISO-20220-JP-3) +- NEWS: Add entry for glibc-hwcaps and deprecate legacy hwcaps +- x86: Properly set usable CET feature bits [BZ #26625] +- Update translations +- Update libc.pot for 2.33 release +- Update ia64 libm-test-ulps +- sh: Update libm-tests-ulps +- ia64: Fix brk call on statup +- Update sparc libm-test-ulps +- Update alpha libm-test-ulps +- powerpc64: Workaround sigtramp vdso return call +- Fix nss/tst-reload2 for systems without PATH_MAX +- nsswitch: do not reload if "/" changes +- elf: Limit tst-prelink-cmp target archs +- CVE-2021-3326: gconv: Fix assertion failure in ISO-2022-JP-3 module (#1921917) + +* Wed Jan 27 2021 Arjun Shankar - 2.32.9000-29 +- Auto-sync with upstream branch master, + commit df359a25ba6f6bda06104229fbfe284c1fb30915: +- Revert "Make libc symbols hidden in static PIE" [BZ #27237] +- benchtests: Do not build bench-timing-type with MODULE_NAME=libc +- aarch64: Fix the list of tested IFUNC variants [BZ #26818] +- Update INSTALL with package versions that are known to work +- aarch64: Move and update the definition of MTE_ENABLED +- Fix misplaced const +- Update C-SKY libm-test-ulps +- manual: Correct argument order in mount examples [BZ #27207] +- linux: mips: Fix getdents64 fallback on mips64-n32 +- x86: Properly match CPU features in /proc/cpuinfo [BZ #27222] +- x86-64: Update tst-glibc-hwcaps-2.c for x86-64 baseline +- powerpc64: Select POWER9 machine for the scv instruction +- x86: Check ifunc resolver with CPU_FEATURE_USABLE [BZ #27072] +- Revert "linux: Move {f}xstat{at} to compat symbols" for static build +- aarch64: revert memcpy optimze for kunpeng to avoid performance degradation +- Make libc symbols hidden in static PIE +- csu: Move static pie self relocation later [BZ #27072] +- Use hidden visibility for early static PIE code +- csu: Avoid weak ref for __ehdr_start in static PIE +- configure: Check for static PIE support +- elf: Avoid RELATIVE relocs in __tunables_init +- elf: Make the tunable struct definition internal only +- : Remove the C preprocessor magic +- posix: Fix fnmatch.c on bootstrap +- stdlib: Add testcase for BZ #26241 +- posix: Fix regex_internal.h on bootstrap +- Use in __libc_init_secure +- elf: Avoid RELATIVE relocation for _dl_sysinfo +- libmvec: Add extra-test-objs to test-extras +- Hurd: Add rtld-strncpy-c.c +- Update MIPS libm-test-ulps. +- Update arm libm-test-ulps. +- Update powerpc-nofpu libm-test-ulps. +- Update hppa libm-test-ulps +- ARC: nofpu: Regenerate ulps +- ld.so: Add --list-tunables to print tunable values +- math/test-tgmath2: Fix fabs failure when no long double +- x86: Move x86 processor cache info to cpu_features +- Fix x86 build with --enable-tunable=no +- ifuncmain6pie: Remove the circular IFUNC dependency [BZ #20019] + +* Tue Jan 26 2021 Fedora Release Engineering - 2.32.9000-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Jan 23 2021 Arjun Shankar - 2.32.9000-27 +- Introduce new glibc-doc.noarch subpackage (#1346925) +- Move the reference manual info pages from glibc-devel to glibc-doc +- Move debugger interface documentation from glibc to glibc-doc +- Remove unnecessary README, INSTALL, NEWS files from glibc +- Remove unnecessary README.timezone and gai.conf files from glibc-common + +* Thu Jan 14 2021 Arjun Shankar - 2.32.9000-26 +- Deprecate nscd (#1905135) +- https://fedoraproject.org/wiki/Changes/DeprecateNSCD + +* Wed Jan 13 2021 Carlos O'Donell - 2.32.9000-25 +- Auto-sync with upstream branch master, + commit cf1290064598def8dfeddec3d86d98495aee1fba: +- Use the right argument code in unnormal tests +- ldconfig/x86: Store ISA level in cache and aux cache +- elf: work around a gcc bug in elf_get_dynamic_info +- x86: Set header.feature_1 in TCB for always-on CET [BZ #27177] +- posix: consume less entropy on tempname +- Makerules: Do not require startup files for format.lds probe object +- install: Replace scripts/output-format.sed with objdump -f [BZ #26559] +- math: Add BZ#18980 fix back on dbl-64 cosh +- posix: Sync tempname with gnulib [BZ #26648] +- posix: Fix return value of system if shell can not be executed [BZ #27053] +- support: Add xchmod wrapper +- Update STATX_ATTR_DAX value from Linux 5.10. +- riscv: Initialize $gp before resolving the IRELATIVE relocation +- riscv: support GNU indirect function +- posix: Correct attribute access mode on readlinkat [BZ #27024]. +- Add xfchmod to libsupport +- Add xchdir to libsupport. +- POSIX locale: Fix typo in comment +- ARC: Regenerate ulps +- mntent: Use __putc_unlocked instead of fputc_unlocked +- aarch64: define PI_STATIC_AND_HIDDEN +- Update NEWS for CVE-2019-25013. +- x86: Support GNU_PROPERTY_X86_ISA_1_V[234] marker [BZ #26717] +- Remove dbl-64/wordsize-64 (part 2) +- Remove dbl-64/wordsize-64 +- Add SEGV_MTEAERR and SEGV_MTESERR from Linux 5.10. +- support: Add support_small_thread_stack_size +- stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ #26341] [BZ #24970] +- malloc: Add scratch_buffer_dupfree +- Import filename.h from gnulib +- Import idx.h from gnulib +- alpha: Provide wait4 for static library [BZ #27150] +- aarch64: push the set of rules before falling into slow path +- nptl: Fix comment typo in pthread_cond_wait.c +- x86: Check IFUNC definition in unrelocated executable [BZ #20019] +- hurd: Fix mmap(!MAP_FIXED) on bogus address + +* Mon Jan 04 2021 Florian Weimer - 2.32.9000-24 +- Drop glibc-fedora-__libc_multiple_libcs.patch. Replaced by upstream's + __libc_initial flag. +- Adjust glibc-rh819430.patch to upstream's gnulib merge of fnmatch. +- Disable -Werror again due to GCC PR98512. +- Auto-sync with upstream branch master, + commit 3ec5d83d2a237d39e7fd6ef7a0bc8ac4c171a4a5: +- x86-64: Avoid rep movsb with short distance [BZ #27130] +- aarch64: fix stack missing after sp is updated +- nptl: Remove set*id, set*gid files which are not built +- Drop nan-pseudo-number.h usage from tests +- posix: Sync fnmatch with gnulib +- Sync flexmember.h with gnulib +- Sync intprops.h with gnulib +- posix: Sync glob code with gnulib +- posix: Sync regex code with gnulib +- Move generic nan-pseudo-number.h to ldbl-96 +- Sync FDL from https://www.gnu.org/licenses/fdl-1.3.texi +- Sync move-if-change from Gnulib +- Update automatically-generated copyright dates +- Update copyright dates not handled by scripts/update-copyrights. +- Update copyright dates with scripts/update-copyrights +- aarch64: use PTR_ARG and SIZE_ARG instead of DELOUSE +- nonstring: Enable __FORTIFY_LEVEL=3 +- string: Enable __FORTIFY_LEVEL=3 +- Introduce _FORTIFY_SOURCE=3 +- Warn on unsupported fortification levels +- powerpc: Use scv instruction on clone when available +- powerpc: Runtime selection between sc and scv for syscalls +- malloc: preserve errno on mcheck hooks [BZ #17924] +- x86 long double: Add tests for pseudo normal numbers +- x86 long double: Consider pseudo numbers as signaling +- io: Remove xmknod{at} implementations +- io: Remove xstat implementations +- free: preserve errno [BZ#17924] +- hurd: Accept including hurd/version.h +- hurd: Add WSTOPPED/WCONTINUED/WEXITED/WNOWAIT support [BZ #23091] +- support: Make support_process_state_wait wait less +- hurd: set sigaction for signal preemptors in arch-independent file +- hurd: Fix spawni SPAWN_XFLAGS_TRY_SHELL with empty argv +- hurd: Try shell in posix_spawn* only in compat mode +- Remove _ISOMAC check from +- x86: Remove the duplicated CPU_FEATURE_CPU_P +- Partially revert 681900d29683722b1cb0a8e565a0585846ec5a61 +- x86 long double: Support pseudo numbers in isnanl +- x86 long double: Support pseudo numbers in fpclassifyl +- MTE: Do not pad size in realloc_check +- tests-mcheck: New variable to run tests with MALLOC_CHECK_=3 +- elf: Account for glibc-hwcaps/ prefix in _dl_important_hwcaps +- misc: Use __ferror_unlocked instead of ferror +- s390x: Regenerate ulps +- powerpc: Regenerate ulps +- addmntent: Remove unbounded alloca usage from getmntent [BZ#27083] +- : Add Intel LAM support +- i386: Regenerate ulps +- aarch64: update ulps. +- aarch64: Add aarch64-specific files for memory tagging support +- aarch64: Add sysv specific enabling code for memory tagging +- linux: Add compatibility definitions to sys/prctl.h for MTE +- malloc: Basic support for memory tagging in the malloc() family +- elf: Add a tunable to control use of tagged memory +- config: Allow memory tagging to be enabled when configuring glibc +- alpha: Remove anonymous union in struct stat [BZ #27042] +- add inputs to auto-libm-test-in yielding larger errors (binary64, x86_64) +- m68k: fix clobbering a5 in setjmp() [BZ #24202] +- iconv add iconv_close before the function returned with bad value. +- iconv: use iconv_close after iconv_open +- Fix buffer overrun in EUC-KR conversion module (bz #24973) +- hurd: Make trampoline fill siginfo ss_sp from sc_uesp +- Hurd: make sigstates hold a reference on thread ports +- profil-counter: Add missing SIGINFO case +- hurd: implement SA_SIGINFO signal handlers. +- hurd: Fix ELF_MACHINE_USER_ADDRESS_MASK value +- hurd: Note when the vm_map kernel bug was fixed +- hurd: Also turn KERN_INVALID_ADDRESS to EINVAL +- ieee754: Remove unused __sin32 and __cos32 +- ieee754: Remove slow paths from asin and acos +- getenv: Move call to strlen to the branch it's used in. +- Update kernel version to 5.10 in tst-mman-consts.py. +- s390x: Require GCC 7.1 or later to build glibc. +- malloc: Use __libc_initial to detect an inner libc +- Replace __libc_multiple_libcs with __libc_initial flag +- {nptl,htl}/semaphoreP.h: clean up +- htl: Get sem_open/sem_close/sem_unlink support [BZ #25524] +- pthread: Move semaphore initialization for open to semaphoreP.h +- Mark __libc_freeres_fn as used [BZ #27002] +- Update syscall lists for Linux 5.10. +- htl: Add pshared semaphore support +- hurd: Add LLL_PRIVATE and LLL_SHARED +- hurd: Add __libc_open and __libc_close +- htl: Add futex-internal.h +- hurd: Add __lll_abstimed_wait_intr +- hurd: make lll_* take a variable instead of a ptr +- hurd: Rename LLL_INITIALIZER to LLL_LOCK_INITIALIZER +- Use Linux 5.10 in build-many-glibcs.py. + +* Wed Dec 16 2020 DJ Delorie - 2.32.9000-23 +- Fix conditionals for _enable_debug_packages and benchtests [BZ #1902514] + +* Tue Dec 15 2020 Patsy Griffin - 2.32.9000-22 +- Auto-sync with upstream branch master, + commit 4d0985543f479a6f421d4d8a9e0d1dc71c9c2c53. +- elf: Record libc.so link map when it is the main program (bug 20972) +- Use GMP 6.2.1 in build-many-glibcs.py. +- aarch64: remove the strlen_asimd symbol +- aarch64: fix static PIE start code for BTI [BZ #27068] +- elf: Fix failure handling in _dl_map_object_from_fd +- elf: inline lose for error handling +- Remove strtoimax, strtoumax, wcstoimax, wcstoumax inlines +- nsswitch: handle missing actions properly +- x86: Remove the default REP MOVSB threshold tunable value [BZ #27061] +- elf.h: Remove SHF_GNU_BUILD_NOTE. +- elf.h: fix spelling typos in comments +- Fix spelling and grammar in several comments +- malloc: Detect infinite-loop in _int_free when freeing tcache [BZ#27052] +- elf: Fix dl-load.c +- elf: Include libc.so.6 as main program in dependency sort (bug 20972) +- support: Add support_slibdir_prefix variable +- aarch64: Use mmap to add PROT_BTI instead of mprotect [BZ #26831] +- elf: Pass the fd to note processing +- elf: Move note processing after l_phdr is updated +- aarch64: align address for BTI protection [BZ #26988] +- aarch64: Fix missing BTI protection from dependencies [BZ #26926] +- Fix linknamespace errors in nss_database.c if build with -Os. +- treewide: fix incorrect spelling of indices in comments +- linux: Consolidate brk implementation +- elf: Include in cache.c +- s390x: Add glibc-hwcaps support +- elf: Fix run-time dependencies of tst-dlopen-fail-2 +- Handle out-of-memory case in svc_tcp.c/svc_unix.c:rendezvous_request. +- elf: Fix incorrect comparison in sort_priorities_by_name +- S390: Derive float_t from FLT_EVAL_METHOD +- Fix parsing of /sys/devices/system/cpu/online (bug 25859) +- Make strtoimax, strtoumax, wcstoimax, wcstoumax into aliases +- Fixed typos in "NEWS for version 2.32" +- Add NEWS entry for CVE-2020-29562 (BZ #26923) +- iconv: Fix incorrect UCS4 inner loop bounds (BZ#26923) +- Drop glibc-rh1906066 and glibc-rh741105 patches fixed by sync. + +* Mon Dec 14 2020 Florian Weimer - 2.32.9000-21 +- Re-enable -Werror everywhere (#1888246) + +* Wed Dec 09 2020 DJ Delorie - 2.32.9000-20 +- nsswitch: handle missing actions properly (temporary fix for 1906066) + +* Mon Dec 07 2020 Arjun Shankar - 2.32.9000-19 +- Auto-sync with upstream branch master, + commit 088e9625378f25607acff3daf7a79cbdee497043: +- x86: Rename readelflib.c +- nsswitch: use new internal API (callers) +- nsswitch: user new internal API (tests) +- nsswitch: use new internal API (core) +- nss: Implement +- : New abstraction for combining NSS modules and NSS actions +- nss: Introduce +- Add scripts/move-symbol-to-libc.py + +* Fri Dec 04 2020 Arjun Shankar - 2.32.9000-18 +- Drop glibc-revert-fxstat-compat.patch; applied upstream. +- Drop glibc-revert-mknod-compat.patch; applied upstream. +- Auto-sync with upstream branch master, + commit 4c38c1a229bc3628269ad98bd7e8d31d118d91f6: +- powerpc64le: Add glibc-hwcaps support +- x86: Adjust tst-cpu-features-supports.c for GCC 11 +- x86: Set RDRAND usable if CPU supports RDRAND +- elf: Add missing header to elf/dl-hwcaps.h +- lowlevellock-futex: Remove not used macros +- futex: Remove not used futex_reltimed_wait{_cancelable} +- y2038: Convert gai_suspend to support 64 bit time +- symbols: Add defines for libanl's libanl_hidden_{def|proto} +- x86_64: Add glibc-hwcaps support +- elf: Add glibc-hwcaps subdirectory support to ld.so cache processing +- elf: Process glibc-hwcaps subdirectories in ldconfig +- elf: Implement tail merging of strings in ldconfig +- elf: Implement a string table for ldconfig, with tail merging +- elf: Add extension mechanism to ld.so.cache +- elf: Add endianness markup to ld.so.cache (bug 27008) +- elf: Add glibc-hwcaps support for LD_LIBRARY_PATH +- elf: Synchronize section header flags with binutils +- x86: Fix THREAD_SELF definition to avoid ld.so crash (bug 27004) +- htl: Add hidden def for __pthread_create/detach +- manual: Clarify File Access Modes section and add O_PATH +- htl: Add missing symbols +- Revert "linux: Move xmknod{at} to compat symbols" +- Revert "linux: Move {f}xstat{at} to compat symbols" +- elf.h: Fix spelling of EM_TILE64 comment +- nptl: Fix __futex_clocklock64 return error check [BZ #26964] +- powerpc64le: ifunc select *f128 routines in multiarch mode +- y2038: Convert aio_suspend to support 64 bit time +- Fix typo in NEWS file +- nptl: Add EOVERFLOW checks for futex calls +- nptl: Fix PTHREAD_PRIO_PROTECT timed lock +- sh: Add sh4 fpu Implies folder +- io: nftw/ftw: Fix stack overflow with large nopenfd [BZ #26353] +- elf: Introduce enum opt_format in the ldconfig implementation +- support: Add support_copy_file +- NEWS entry for commit b4f020c9b408fb3d1d3d4901c4a71839145f8791 +- timezone: Change zdump installation to bin directory +- nptl: Return EINVAL for invalid clock for pthread_clockjoin_np +- nptl: Return EINVAL for pthread_mutex_clocklock/PI with CLOCK_MONOTONIC [BZ #26801] +- nptl: Replace lll_futex_wake with futex-internal.h +- nptl: Replace lll_futex_supported_clockid with futex-internal.h +- nptl: Replace lll_futex_{timed_}wait by futex-internal.h +- nptl: Replace lll_timedwait with __futex_abstimed_wait64 +- nptl: Replace __futex_clocklock_wait64 with __futex_abstimed_wait64 +- nptl: Remove _futex_clock_wait_bitset64 +- nptl: Consolidate __futex_abstimed_wait_{cancelable}64 +- nptl: Extend __futex_abstimed_wait_cancelable64 comment +- nptl: Remove clockwait_tid +- nptl: Remove futex_wait_cancelable +- nptl: Remove unused internal futex functions +- Mark mtrace tests UNSUPPORTED if bug-ga2.mtrace or tst-leaks2.mtrace are missing +- elf: Fix uninitialized variable for _dl_write +- powerpc: Make PT_THREAD_POINTER available to assembly code +- Use libnss_files.so for tests posix/bug-ga2 and resolv/tst-leaks2 [BZ #26821] +- hurd report-wait: Fix stpcpy usage +- hurd S_msg_report_wait: Fix detecting fd ports +- hurd S_msg_report_wait: Fix reporting ports +- hurd: Fix strcpy calls +- hurd: Fix _S_msg_get/set_env_variable prototype +- hurd: Enable using ifunc +- Add {,sysdep-}ld-library-path make variable +- nptl: Move stack list variables into _rtld_global +- hurd: let _dl_argv and __libc_stack_end be relro +- hurd: Remove some remnants of cthreads +- nanosleep: Pass NULL when rem == NULL on ports with __TIMESIZE != 64 +- y2038: Convert thrd_sleep to support 64 bit time +- y2038: Convert mtx_timedlock to support 64 bit time +- y2038: Convert cnd_timedwait to support 64 bit time +- hurd: Drop CLOCK_MONOTONIC change which slipped in +- hurd: make ptsname fail with ENOTTY on non-master-pty +- mach: Add missing assert.h include +- hurd: break relocation loop between libc.so and lib{mach,hurd}user.so +- Remove obsolete defines for HPUX support from fcntl.h and update O_NONBLOCK. +- Remove tls.h inclusion from internal errno.h +- nptl: Eliminate and __is_smp +- powerpc: Eliminate UP macro conditionals +- x86: Remove UP macro. Define LOCK_PREFIX unconditionally. +- alpha: Remove UP preprocessor conditionals +- hurd: Make sure signals get started +- hurd: initialize libpthread before starting the signal thread +- hurd: Make _hurd_libc_proc_init idempotent +- powerpc: Add optimized stpncpy for POWER9 +- powerpc: Add optimized strncpy for POWER9 +- Don't use nested function in test-ffs +- Use __builtin___stpncpy_chk when available +- tests: Remove NULL check for an array +- hurd: Move {,f,l}xstat{,at} and xmknod{at} to compat symbols +- hurd: Notify the proc server later during initialization +- htl: Initialize later +- htl: Keep thread signals blocked during its initialization +- htl: Fix spurious symbols in namespaces +- Use O_CLOEXEC in sysconf [BZ #26791] +- struct _Unwind_Exception alignment should not depend on compiler flags +- hurd: keep only required PLTs in ld.so +- hurd: Add missing startup calls +- riscv: Get cache information through sysconf +- RISC-V: Add _dl_start_user. + +* Thu Nov 26 2020 Florian Weimer - 2.32.9000-17 +- s390x: Do not rewrite program interpreter symlink (make install is enough) + +* Tue Nov 10 2020 Carlos O'Donell - 2.32.9000-16 +- Remove the work around for systemd-nspawn (#1869030). + +* Mon Nov 09 2020 DJ Delorie - 2.32.9000-15 +- Auto-sync with upstream branch master, + commit 75a193b7611bade31a150dfcc528b973e3d46231. +- linux: Allow adjtime with NULL argument [BZ #26833] +- aarch64: Add unwind information to _start (bug 26853) +- bsd unlockpt: unlockpt needs to fail with EINVAL, not ENOTTY +- Rearrange bsd_getpt vs bsd_openpt and implement posix_openpt on BSD +- Remove __warndecl +- Remove __warn_memset_zero_len [BZ #25399] +- iconv: Accept redundant shift sequences in IBM1364 [BZ #26224] +- msg: Remove redundant #include header +- tst-setuid1-static-ENV: Add $(common-objpfx)nss [BZ #26820] + +* Tue Nov 03 2020 Patsy Griffin - 2.32.9000-14 +- Auto-sync with upstream branch master, + commit e156dabc766d6f6f99ce9402999eae380a3ec1f2. +- aarch64: Add variant PCS lazy binding test [BZ #26798] +- aarch64: Fix DT_AARCH64_VARIANT_PCS handling [BZ #26798] +- hurd: Correct 'ethenet' spelling +- Avoid -Wstringop-overflow warning in pthread_cleanup_push macros +- Disable spurious -Warray-bounds for ypclnt.c (bug 26687) +- Do not use array parameter to new_composite_name (bug 26726) +- Disable spurious -Wstringop-overflow for setjmp/longjmp (bug 26647) +- malloc debug: fix compile error when enable macro MALLOC_DEBUG > 1 +- tst-tcfree2: adjust coding style. +- elf: In ldconfig, extract the new_sub_entry function from search_dir +- Use MPC 1.2.1 in build-many-glibcs.py. +- Argument Syntax: Use "option", @option, and @command. +- elf: Unify old and new format cache handling code in ld.so +- x86: Restore processing of cache size tunables in init_cacheinfo +- Make elf.h header self contained. +- x86: Optimizing memcpy for AMD Zen architecture. +- Hurd: Fix ftime build +- Add IP_RECVERR_RFC4884 and IPV6_RECVERR_RFC4884 from Linux 5.9. +- misc: Add internal __getauxval2 function +- Remove NEWS entry about ftime removal +- time: Add 64-bit time_t support for ftime +- Reinstate ftime and add deprecate message on ftime usage +- Update kernel version to 5.9 in tst-mman-consts.py. +- Amend grammar and add a description +- Fix typo in NEWS file +- Remove timing related checks of time/tst-cpuclock1 +- Update syscall lists for Linux 5.9. +- Use Linux 5.9 in build-many-glibcs.py. +- Reword description of SXID_* tunable properties +- New benchtest: pthread locks +- y2038: nptl: Provide __futex_clock_wait_bitset64 to support 64 bit bitset +- C-SKY: Make dynamic linker's name compitable with the older gcc. +- Revert "C-SKY:Fix dynamic linker's name when mfloat-abi=softfp." +- Move vtimes to a compatibility symbol +- y2038: linux: Provide __time64 implementation +- rt: Fix typos in comments in +- C-SKY:Fix dynamic linker's name when mfloat-abi=softfp. +- Drop the glibc-revert-ftime-compat.patch. + +* Thu Oct 29 2020 DJ Delorie - 2.32.9000-13 +- Add BuildRequires for perl (malloc/mtrace) if running the testsuite. + +* Wed Oct 21 2020 Siddhesh Poyarekar - 2.32.9000-12 +- Revert __xstat64 symbol removal. +- Revert xmknod* symbol removal. +- Revert ftime symbol removal. + +* Sun Oct 18 2020 Patsy Griffin - 2.32.9000-11 +- Auto-sync with upstream branch master, + commit 0f09154c64005e78b61484ae87b5ea2028051ea0. +- x86: Initialize CPU info via IFUNC relocation [BZ 26203] +- Add NEWS entry for ftime compatibility move +- support: Add create_temp_file_in_dir +- linux: Add __readdir_unlocked +- linux: Simplify opendir buffer allocation +- linux: Move posix dir implementations to Linux +- linux: Add 64-bit time_t support for wait3 +- Move ftime to a compatibility symbol +- linux: Fix time64 support for futimesat +- linux: Use INTERNAL_SYSCALL on fstatat{64} +- shm tests: Append PID to names passed to shm_open [BZ #26737] +- sysvipc: Fix tst-sysvshm-linux on x32 +- x86/CET: Update vfork to prevent child return +- resolv: Serialize processing in resolv/tst-resolv-txnid-collision +- statfs: add missing f_flags assignment +- y2038: Remove not used __fstatat_time64 define +- y2038: nptl: Convert pthread_mutex_{clock|timed}lock to support 64 bit +- sysvipc: Return EINVAL for invalid shmctl commands +- sysvipc: Fix IPC_INFO and SHM_INFO handling [BZ #26636] +- AArch64: Use __memcpy_simd on Neoverse N2/V1 +- resolv: Handle transaction ID collisions in parallel queries (bug 26600) +- support: Provide a way to clear the RA bit in DNS server responses +- support: Provide a way to reorder responses within the DNS test server +- Add missing stat/mknod symbol on libc.abilist some ABIs +- manual: correct the spelling of "MALLOC_PERTURB_" [BZ #23015] +- manual: replace an obsolete collation example with a valid one +- rtld: fix typo in comment +- elf: Add missing header to elf/dl-usage.c +- hurd: support clock_gettime(CLOCK_PROCESS/THREAD_CPUTIME_ID) +- linux: Move xmknod{at} to compat symbols +- linux: Add {f}stat{at} y2038 support +- linux: Move {f}xstat{at} to compat symbols +- linux: Disentangle fstatat from fxstatat +- linux: Implement {l}fstat{at} in terms of fstatat +- linux: Move the struct stat{64} to struct_stat.h +- Remove mknod wrapper functions, move them to symbols +- Remove stat wrapper functions, move them to exported symbols +- : Add FSRCS/FSRS/FZLRM support +- : Add Intel HRESET support +- : Add AVX-VNNI support +- : Add AVX512_FP16 support +- : Add Intel UINTR support +- elf: Do not pass GLRO(dl_platform), GLRO(dl_platformlen) to _dl_important_hwcaps +- elf: Enhance ld.so --help to print HWCAP subdirectories +- elf: Add library search path information to ld.so --help +- sunrpc: Adjust RPC function declarations to match Sun's (bug 26686] +- Avoid GCC 11 -Warray-parameter warnings [BZ #26686]. +- elf: Make __rtld_env_path_list and __rtld_search_dirs global variables +- elf: Print the full name of the dynamic loader in the ld.so help message +- elf: Use the term "program interpreter" in the ld.so help message +- scripts/update-copyrights: Update csu/version.c, elf/dl-usage.c +- elf: Implement ld.so --version +- nptl: Add missing cancellation flags on lockf +- Update mips64 libm-test-ulps +- Update alpha libm-test-ulps +- elf: Implement ld.so --help +- elf: Record whether paths come from LD_LIBRARY_PATH or --library-path +- elf: Move ld.so error/help output to _dl_usage +- elf: Extract command-line/environment variables state from rtld.c + +* Wed Oct 14 2020 Florian Weimer - 2.32.9000-10 +- Disable -Werror on ELN (#1888246) + +* Wed Oct 14 2020 Florian Weimer - 2.32.9000-9 +- Make glibc.spec self-contained (#1887097) + +* Thu Oct 08 2020 Arjun Shankar - 2.32.9000-8 +- Drop glibc-fix-float128-benchtests.patch; applied upstream. +- Auto-sync with upstream branch master, + commit 72d36ffd7db55ae599f4c77feb0eae25a0f3714e: +- elf: Implement __rtld_malloc_is_complete +- __vfscanf_internal: fix aliasing violation (bug 26690) +- Revert "Fix missing redirects in testsuite targets" +- nptl: Add missing cancellation flags on futex_internal and pselect32 +- elf: Implement _dl_write +- elf: Do not search HWCAP subdirectories in statically linked binaries +- Linux: Require properly configured /dev/pts for PTYs +- Linux: unlockpt needs to fail with EINVAL, not ENOTTY (bug 26053) +- login/tst-grantpt: Convert to support framework, more error checking +- posix: Fix -Warray-bounds instances building timer_create [BZ #26687] +- Replace Minumum/minumum with Minimum/minimum +- Optimize scripts/merge-test-results.sh +- Fix GCC 11 -Warray-parameter warning for __sigsetjmp (bug 26647) +- manual: Fix typo +- y2038: nptl: Convert pthread_rwlock_{clock|timed}{rd|wr}lock to support 64 + bit time +- Y2038: nptl: Provide futex_abstimed_wait64 supporting 64 bit time +- sysvipc: Return EINVAL for invalid msgctl commands +- sysvipc: Fix IPC_INFO and MSG_INFO handling [BZ #26639] +- sysvipc: Return EINVAL for invalid semctl commands +- sysvipc: Fix SEM_STAT_ANY kernel argument pass [BZ #26637] +- aarch64: enforce >=64K guard size [BZ #26691] +- sysvipc: Fix semtimedop for Linux < 5.1 for 64-bit ABI +- nptl: futex: Move __NR_futex_time64 alias to beginning of futex-internal.h +- nptl: Provide proper spelling for 32 bit version of futex_abstimed_wait +- string: Fix strerrorname_np return value [BZ #26555] +- Set tunable value as well as min/max values +- ld.so: add an --argv0 option [BZ #16124] +- Reversing calculation of __x86_shared_non_temporal_threshold +- linux: Add time64 recvmmsg support +- linux: Add time64 support for nanosleep +- linux: Consolidate utimes +- linux: Use 64-bit time_t syscall on clock_getcputclockid +- linux: Add time64 sigtimedwait support +- linux: Add time64 select support +- nptl: Fix __futex_abstimed_wait_cancellable32 +- sysvipc: Fix semtimeop for !__ASSUME_DIRECT_SYSVIPC_SYSCALLS +- hurd: add ST_RELATIME +- intl: Handle translation output codesets with suffixes [BZ #26383] +- bench-strcmp.c: Add workloads on page boundary +- bench-strncmp.c: Add workloads on page boundary +- strcmp: Add a testcase for page boundary +- strncmp: Add a testcase for page boundary [BZ #25933] +- Set locale related environment variables in debugglibc.sh +- benchtests: Run _Float128 tests only on architectures that support it +- powerpc: Protect dl_powerpc_cpu_features on INIT_ARCH() [BZ #26615] +- x86: Harden printf against non-normal long double values (bug 26649) +- x86: Use one ldbl2mpn.c file for both i386 and x86_64 +- Define __THROW to noexcept for C++11 and later + +* Mon Sep 21 2020 Arjun Shankar - 2.32.9000-7 +- Adjust glibc-rh741105.patch. +- Add glibc-fix-float128-benchtests.patch to allow building on armv7hl. +- Auto-sync with upstream branch master, + commit cdf645427d176197b82f44308a5e131d69fb53ad: +- Update mallinfo2 ABI, and test +- Allow memset local PLT reference for RISC-V. +- powerpc: fix ifunc implementation list for POWER9 strlen and stpcpy +- nscd: bump GC cycle during cache pruning (bug 26130) +- x86: Use HAS_CPU_FEATURE with IBT and SHSTK [BZ #26625] +- : Add Intel Key Locker support +- Fix handling of collating symbols in fnmatch (bug 26620) +- pselect.c: Pass a pointer to SYSCALL_CANCEL [BZ #26606] +- y2038: nptl: Convert sem_{clock|timed}wait to support 64 bit time +- hurd: Add __x86_get_cpu_features to ld.abilist +- x86: Install [BZ #26124] +- linux: Add time64 pselect support +- linux: Add time64 semtimedop support +- linux: Add ppoll time64 optimization +- linux: Simplify clock_getres +- Update sparc libm-test-ulps +- Remove internal usage of extensible stat functions +- Linux: Consolidate xmknod +- linux: Consolidate fxstatat{64} +- linux: Consolidate fxstat{64} +- linux: Consolidate lxstat{64} +- linux: Consolidate xstat{64} +- linux: Define STAT64_IS_KERNEL_STAT64 +- linux: Always define STAT_IS_KERNEL_STAT +- Update powerpc libm-test-ulps +- benchtests: Add "workload" traces for sinf128 +- benchtests: Add "workload" traces for sinf +- benchtests: Add "workload" traces for sin +- benchtests: Add "workload" traces for powf128 +- benchtests: Add "workload" traces for pow +- benchtests: Add "workload" traces for expf128 +- benchtests: Add "workload" traces for exp +- nptl: futex: Provide correct indentation for part of + __futex_abstimed_wait_cancelable64 + +* Tue Sep 08 2020 DJ Delorie - 2.32.9000-6 +- Auto-sync with upstream branch master, + commit e74b61c09a2a2ab52153e731225ccba5078659b1. +- Disable -Wstringop-overread for some string tests +- string: Fix GCC 11 `-Werror=stringop-overread' error +- C11 threads: Fix inaccuracies in testsuite +- elf.h: Add aarch64 bti/pac dynamic tag constants +- x86: Set CPU usable feature bits conservatively [BZ #26552] + +* Wed Sep 02 2020 Patsy Griffin - 2.32.9000-5 +- Auto-sync with upstream branch master, + commit 86a912c8634f581ea42ec6973553dde7f058cfbf. +- Update i686 ulps. +- Use LFS readdir in generic POSIX getcwd [BZ# 22899] +- linux: Remove __ASSUME_ATFCTS +- Sync getcwd with gnulib +- x86-64: Fix FMA4 detection in ifunc [BZ #26534] +- y2038: nptl: Convert pthread_cond_{clock|timed}wait to support 64 bit time +- malloc: Fix mallinfo deprecation declaration +- x32: Add and regenerate arch-syscall.h +- Add mallinfo2 function that support sizes >= 4GB. +- Remove obsolete default/nss code +- AArch64: Improve backwards memmove performance +- Add RISC-V 32-bit target to build-many-glibcs.py +- Documentation for the RISC-V 32-bit port +- RISC-V: Build infrastructure for 32-bit port +- RISC-V: Add rv32 path to RTLDLIST in ldd +- riscv32: Specify the arch_minimum_kernel as 5.4 +- RISC-V: Fix llrint and llround missing exceptions on RV32 +- RISC-V: Add the RV32 libm-test-ulps +- RISC-V: Add 32-bit ABI lists +- RISC-V: Add hard float support for 32-bit CPUs +- RISC-V: Support the 32-bit ABI implementation +- RISC-V: Add arch-syscall.h for RV32 +- RISC-V: Add path of library directories for the 32-bit +- RISC-V: Support dynamic loader for the 32-bit +- RISC-V: Add support for 32-bit vDSO calls +- RISC-V: Use 64-bit-time syscall numbers with the 32-bit port +- RISC-V: Cleanup some of the sysdep.h code +- RISC-V: Use 64-bit time_t and off_t for RV32 and RV64 +- io/lockf: Include bits/types.h before __OFF_T_MATCHES_OFF64_T check +- elf/tst-libc_dlvsym: Add a TEST_COMPAT around some symbol tests +- hurd: define BSD 4.3 ioctls only under __USE_MISC +- string: test strncasecmp and strncpy near page boundaries +- linux: Simplify utimensat +- linux: Simplify timerfd_settime +- linux: Simplify timer_gettime +- linux: Simplify sched_rr_get_interval +- linux: Simplify ppoll +- linux: Simplify mq_timedsend +- linux: Simplify mq_timedreceive +- linux: Simplify clock_settime +- linux: Simplify clock_nanosleep +- linux: Simplify clock_gettime +- linux: Simplify clock_adjtime +- linux: Add helper function to optimize 64-bit time_t fallback support +- S390: Sync HWCAP names with kernel by adding aliases [BZ #25971] +- [vcstocl] Import ProjectQuirks from its own file +- build-many-glibcs.py: Add a s390x -O3 glibc variant. +- Fix namespace violation in stdio.h and sys/stat.h if build with optimization. [BZ #26376] +- Add C2x BOOL_MAX and BOOL_WIDTH to limits.h. +- Use MPC 1.2.0 in build-many-glibcs.py. +- Add new STATX_* constants from Linux 5.8 to bits/statx-generic.h. +- Correct locking and cancellation cleanup in syslog functions (bug 26100) + +* Thu Aug 20 2020 Carlos O'Donell - 2.32.9000-4 +- Support building glibc in a mock chroot using older systemd-nspawn (#1869030). + +* Tue Aug 18 2020 Carlos O'Donell - 2.32.9000-3 +- Suggest installing minimal localization e.g. C, POSIX, C.UTF-8. + +* Mon Aug 17 2020 DJ Delorie - 2.32.9000-2 +- Auto-sync with upstream branch master, + commit cb7e7a5ca1d6d25d59bc038bdc09630e507c41e5. +- nptl: Handle NULL abstime [BZ #26394] +- Update build-many-glibcs.py for binutils ia64 obsoletion. +- Update kernel version to 5.8 in tst-mman-consts.py. +- y2038: nptl: Convert pthread_{clock|timed}join_np to support 64 bit time +- aarch64: update ulps. + +* Wed Aug 12 2020 Patsy Griffin - 2.32.9000-1 +- Auto-sync with upstream branch master, + commit 0be0845b7a674dbfb996f66cd03d675f0f6028dc: +- S390: Regenerate ULPs. +- manual: Fix sigdescr_np and sigabbrev_np return type (BZ #26343) +- math: Update x86_64 ulps +- math: Regenerate auto-libm-test-out-j0 +- manual: Put the istrerrorname_np and strerrordesc_np return type in braces +- Linux: Use faccessat2 to implement faccessat (bug 18683) +- manual: Fix strerrorname_np and strerrordesc_np return type (BZ #26343) +- math: Fix inaccuracy of j0f for x >= 2^127 when sin(x)+cos(x) is tiny +- Update syscall lists for Linux 5.8. +- Use Linux 5.8 in build-many-glibcs.py. +- htl: Enable tst-cancelx?[45] +- tst-cancel4: Make blocking on write more portable +- hurd: Add missing hidden def +- hurd: Rework sbrk +- hurd: Implement basic sched_get/setscheduler +- x86: Rename Intel CPU feature names +- manual: Fix some @code/@var formatting glitches chapter Date And Time +- Copy regex_internal.h from Gnulib +- Copy regex BITSET_WORD_BITS porting from Gnulib +- Sync regex.h from Gnulib +- Sync mktime.c from Gnulib +- Sync intprops.h from Gnulib +- Open master branch for glibc 2.33 development. + +* Thu Aug 06 2020 Arjun Shankar - 2.32-1 +- Auto-sync with upstream branch release/2.32/master, + commit 3de512be7ea6053255afed6154db9ee31d4e557a: +- Prepare for glibc 2.32 release. +- Regenerate configure scripts. +- Update NEWS with bugs. +- Update translations. +- Don't mix linker error messages into edited scripts +- benchtests/README update. +- RISC-V: Update lp64d libm-test-ulps according to HiFive Unleashed +- aarch64: update NEWS about branch protection +- Add NEWS entry for CVE-2016-10228 (bug 19519) +- powerpc: Fix incorrect cache line size load in memset (bug 26332) +- Update Nios II libm-test-ulps file. + +* Fri Jul 31 2020 Patsy Griffin - 2.31.9000-24 +- Auto-sync with upstream branch master, + commit 7f1a08cff82255cd4252a2c75fd65b80a6a170bf. +- Move NEWS entry for CVE-2020-1751 to the 2.31 section +- NEWS: Deprecate weak libpthread symbols for single-threaded checks +- NEWS: Deprecate nss_hesiod +- nptl: Zero-extend arguments to SETXID syscalls [BZ #26248] +- Use binutils 2.35 branch in build-many-glibcs.py. +- aarch64: Use future HWCAP2_MTE in ifunc resolver +- Update x86-64 libm-test-ulps +- aarch64: Respect p_flags when protecting code with PROT_BTI +- Disable warnings due to deprecated libselinux symbols used by nss and nscd +- Regenerate INSTALL for ARC port updates. +- Update libc.pot for 2.32 release. +- powerpc: Fix POWER10 selection +- powerpc64le: guarantee a .gnu.attributes section [BZ #26220] + +* Wed Jul 29 2020 Florian Weimer - 2.31.9000-23 +- Inherit -mbranch-protection=standard from redhat-rpm-config (for aarch64) + +* Mon Jul 27 2020 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 22 2020 Carlos O'Donell - 2.31.9000-21 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Tue Jul 21 2020 Arjun Shankar - 2.31.9000-20 +- Add glibc-deprecated-selinux-makedb.patch and + glibc-deprecated-selinux-nscd.patch to work around libselinux API + deprecations. +- Drop glibc-rseq-disable.patch; rseq support removed upstream. (#1855729) +- Auto-sync with upstream branch master, + commit ec2f1fddf29053957d061dfe310f106388472a4f: +- libio: Remove __libc_readline_unlocked +- shadow: Implement fgetspent_r using __nss_fgetent_r +- pwd: Implement fgetpwent_r using __nss_fgetent_r +- gshadow: Implement fgetsgent_r using __nss_fgetent_r (bug 20338) +- grp: Implement fgetgrent_r using __nss_fgetent_r +- nss: Add __nss_fgetent_r +- libio: Add fseterr_unlocked for internal use +- nss_files: Use generic result pointer in parse_line +- nss_files: Consolidate line parse declarations in +- nss_compat: Do not use mmap to read database files (bug 26258) +- nss_files: Consolidate file opening in __nss_files_fopen +- Update powerpc-nofpu libm-test-ulps. +- Use MPFR 4.1.0 in build-many-glibcs.py. +- elf: Change TLS static surplus default back to 1664 +- hurd: Fix longjmp check for sigstate +- hurd: Fix longjmp early in initialization +- manual: New signal and errno string functions are AS-safe +- AArch64: Improve strlen_asimd performance (bug 25824) +- Move from sunrpc to inet +- en_US: Minimize changes to date_fmt (Bug 25923) +- Linux: Remove rseq support +- manual: Use Unicode instead HTML entities for characters (bug 19737) +- Add NEWS entry for CVE-2020-6096 (bug 25620) +- arm: remove string/tst-memmove-overflow XFAIL +- AArch64: Rename IS_ARES to IS_NEOVERSE_N1 +- AArch64: Add optimized Q-register memcpy +- AArch64: Align ENTRY to a cacheline +- Correct timespec implementation [BZ #26232] +- Remove --enable-obsolete-rpc configure flag +- hurd: Fix build-many-glibcs.py +- x86: Support usable check for all CPU features +- string: Make tst-strerror/tst-strsignal unsupported if msgfmt is not installed +- malloc: Deprecate more hook-related functionality +- elf: Support at least 32-byte alignment in static dlopen +- x86: Remove __ASSEMBLER__ check in init-arch.h +- x86: Remove the unused __x86_prefetchw +- Documentation for ARC port +- build-many-glibcs.py: Enable ARC builds +- ARC: Build Infrastructure +- ARC: ABI lists +- ARC: Linux Startup and Dynamic Loading +- ARC: Linux ABI +- ARC: Linux Syscall Interface +- ARC: hardware floating point support +- ARC: math soft float support +- ARC: Atomics and Locking primitives +- ARC: Thread Local Storage support +- ARC: startup and dynamic linking code +- ARC: ABI Implementation +- Fix time/tst-cpuclock1 intermitent failures +- powerpc64: Fix calls when r2 is not used [BZ #26173] +- Add NEWS entry for Update to Unicode 13.0.0 [BZ #25819] +- Update i686 libm-test-ulps +- Fix memory leak in __printf_fp_l (bug 26215). +- Fix double free in __printf_fp_l (bug 26214). +- linux: Fix syscall list generation instructions +- sysv: linux: Add 64-bit time_t variant for shmctl +- sysvipc: Remove the linux shm-pad.h file +- sysvipc: Split out linux struct shmid_ds +- sysv: linux: Add 64-bit time_t variant for msgctl +- sysvipc: Remove the linux msq-pad.h file +- sysvipc: Split out linux struct semid_ds +- sysv: linux: Add 64-bit time_t variant for semctl + +* Fri Jul 10 2020 Florian Weimer - 2.31.9000-19 +- Disable rseq registration by default to help Firefox (#1855729) + +* Thu Jul 09 2020 Florian Weimer - 2.31.9000-18 +- Auto-sync with upstream branch master, + commit ffb17e7ba3a5ba9632cee97330b325072fbe41dd: +- rtld: Avoid using up static TLS surplus for optimizations [BZ #25051] +- rtld: Account static TLS surplus for audit modules +- rtld: Add rtld.nns tunable for the number of supported namespaces +- Remove --enable-obsolete-nsl configure flag +- Move non-deprecated RPC-related functions from sunrpc to inet +- aarch64: add NEWS entry about branch protection support +- aarch64: redefine RETURN_ADDRESS to strip PAC +- aarch64: fix pac-ret support in _mcount +- aarch64: Add pac-ret support to assembly files +- aarch64: configure check for pac-ret code generation +- aarch64: ensure objects are BTI compatible +- aarch64: enable BTI at runtime +- aarch64: fix RTLD_START for BTI +- aarch64: fix swapcontext for BTI +- aarch64: Add BTI support to assembly files +- aarch64: Rename place holder .S files to .c +- aarch64: configure test for BTI support +- Rewrite abi-note.S in C. +- rtld: Clean up PT_NOTE and add PT_GNU_PROPERTY handling +- string: Move tst-strsignal tst-strerror to tests-container +- string: Fix prototype mismatch in sigabbrev_np, __sigdescr_np +- arm: CVE-2020-6096: Fix multiarch memcpy for negative length (#1820332) +- arm: CVE-2020-6096: fix memcpy and memmove for negative length (#1820332) +- sunrpc: Remove hidden aliases for global data symbols (bug 26210) +- hurd: Fix strerror not setting errno +- tst-strsignal: fix checking for RT signals support +- hurd: Evaluate fd before entering the critical section +- CVE-2016-10228: Rewrite iconv option parsing (#1428292) +- nss: Remove cryptographic key support from nss_files, nss_nis, nss_nisplus +- sunrpc: Do not export getrpcport by default +- sunrpc: Do not export key handling hooks by default +- sunrpc: Turn clnt_sperrno into a libc_hidden_nolink_sunrpc symbol +- string: Add strerrorname_np and strerrordesc_np +- string: Add sigabbrev_np and sigdescr_np +- string: Add strerror_l on test-strerror-errno +- string: Add strerror, strerror_r, and strerror_l test +- string: Add strsignal test +- string: Simplify strerror_r +- string: Use tls-internal on strerror_l +- string: Implement strerror in terms of strerror_l +- string: Remove old TLS usage on strsignal +- linux: Fix __NSIG_WORDS and add __NSIG_BYTES +- signal: Move sys_errlist to a compat symbol +- signal: Move sys_siglist to a compat symbol +- signal: Add signum-{generic,arch}.h +- Remove most vfprintf width/precision-dependent allocations (bug 14231, bug 26211). +- elf: Do not signal LA_ACT_CONSISTENT for an empty namespace [BZ #26076] +- Fix stringop-overflow errors from gcc 10 in iconv. +- x86: Add thresholds for "rep movsb/stosb" to tunables +- Use C2x return value from getpayload of non-NaN (bug 26073). +- x86: Detect Extended Feature Disable (XFD) +- x86: Correct bit_cpu_CLFSH [BZ #26208] +- manual: Document __libc_single_threaded +- Add the __libc_single_threaded variable +- Linux: rseq registration tests +- Linux: Use rseq in sched_getcpu if available +- Linux: Perform rseq registration at C startup and thread creation +- tst-cancel4: deal with ENOSYS errors +- manual: Show copyright information not just in the printed manual + + +* Thu Jul 02 2020 Carlos O'Donell - 2.31.9000-17 +- Auto-sync with upstream branch master, + commit c6aac3bf3663709cdefde5f5d5e9e875d607be5e. +- Fix typo in comment in bug 26137 fix. +- Fix strtod multiple-precision division bug (bug 26137). +- Linux: Fix UTC offset setting in settimeofday for __TIMESIZE != 64 +- random: range is not portably RAND_MAX [BZ #7003] +- Update kernel version to 5.7 in tst-mman-consts.py. +- powerpc: Add support for POWER10 +- hurd: Simplify usleep timeout computation +- htl: Enable cancel*16 an cancel*20 tests +- hurd: Add remaining cancelation points +- hurd: fix usleep(ULONG_MAX) +- hurd: Make fcntl(F_SETLKW*) cancellation points +- hurd: make wait4 a cancellation point +- hurd: Fix port definition in HURD_PORT_USE_CANCEL +- hurd: make close a cancellation point +- hurd: make open and openat cancellation points +- hurd: clean fd and port on thread cancel +- htl: Move cleanup handling to non-private libc-lock +- htl: Fix includes for lockfile +- htl: avoid cancelling threads inside critical sections +- tst-cancel4-common.c: fix calling socketpair +- x86: Detect Intel Advanced Matrix Extensions +- Set width of JUNGSEONG/JONGSEONG characters from UD7B0 to UD7FB to 0 [BZ #26120] +- S390: Optimize __memset_z196. +- S390: Optimize __memcpy_z196. +- elf: Include (for size_t), in +- nptl: Don't madvise user provided stack +- S390: Regenerate ULPs. +- htl: Add wrapper header for with hidden __sem_post +- elf: Include in because bool is used +- htl: Fix case when sem_*wait is canceled while holding a token +- htl: Make sem_*wait cancellations points +- htl: Simplify non-cancel path of __pthread_cond_timedwait_internal +- htl: Enable tst-cancel25 test +- powerpc: Add new hwcap values +- aarch64: MTE compatible strncmp +- aarch64: MTE compatible strcmp +- aarch64: MTE compatible strrchr +- aarch64: MTE compatible memrchr +- aarch64: MTE compatible memchr +- aarch64: MTE compatible strcpy +- Add MREMAP_DONTUNMAP from Linux 5.7 +- x86: Update CPU feature detection [BZ #26149] + +* Mon Jun 22 2020 DJ Delorie - 2.31.9000-16 +- Auto-sync with upstream branch master, + commit ea04f0213135b13d80f568ca2c4127c2ec112537. +- aarch64: Remove fpu Makefile +- m68k: Use sqrt{f} builtin for coldfire +- arm: Use sqrt{f} builtin +- riscv: Use sqrt{f} builtin +- s390: Use sqrt{f} builtin +- sparc: Use sqrt{f} builtin +- mips: Use sqrt{f} builtin +- alpha: Use builtin sqrt{f} +- i386: Use builtin sqrtl +- x86_64: Use builtin sqrt{f,l} +- powerpc: Use sqrt{f} builtin +- s390x: Use fma{f} builtin +- aarch64: Use math-use-builtins for ceil{f} +- math: Decompose math-use-builtins.h +- hurd: Add mremap +- ia64: Use generic exp10f +- New exp10f version without SVID compat wrapper +- i386: Use generic exp10f +- math: Optimized generic exp10f with wrappers +- benchtests: Add exp10f benchmark + +* Fri Jun 19 2020 Patsy Franklin - 2.31.9000-15 +- Auto-sync with upstream branch master, + commit 27f8864bd41f0f1b61e8e947d9a030b1a0d23df9. +- x86: Update F16C detection [BZ #26133] +- Fix avx2 strncmp offset compare condition check [BZ #25933] +- nptl: Remove now-spurious tst-cancelx9 references +- x86_64: Use %xmmN with vpxor to clear a vector register +- x86: Correct bit_cpu_CLFLUSHOPT [BZ #26128] +- powerpc64le: refactor e_sqrtf128.c +- Update syscall-names.list for Linux 5.7. +- ieee754/dbl-64: Reduce the scope of temporary storage variables +- manual: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np +- ld.so: Check for new cache format first and enhance corruption check +- hurd: Fix __writev_nocancel_nostatus +- hurd: Make send* cancellation points +- htl: Enable more cancellation tests +- hurd: Make write and pwrite64 cancellation points +- htl: Fix cleanup support for IO locking +- htl: Move cleanup stack to variable shared between libc and pthread +- htl: initialize first and prevent from unloading +- htl: Add noreturn attribute on __pthread_exit forward +- hurd: Make recv* cancellation points +- powerpc: Automatic CPU detection in preconfigure +- Use Linux 5.7 in build-many-glibcs.py. +- htl: Enable more cancel tests +- htl: Fix linking static tests by factorizing the symbols list +- Add "%d" support to _dl_debug_vdprintf +- aarch64: MTE compatible strlen +- aarch64: MTE compatible strchr +- aarch64: MTE compatible strchrnul +- AArch64: Merge Falkor memcpy and memmove implementations +- hurd: document that gcc&gdb look at the trampoline code +- pthread: Move back linking rules to nptl and htl +- htl: Enable more tests +- htl: Fix registration of atfork handlers in modules +- htl: Fix tls initialization for already-created threads +- hurd: Make read and pread64 cancellable +- hurd: Fix unwinding over interruptible RPC +- htl: Enable but XFAIL tst-flock2, tst-signal1, tst-signal2 +- hurd: XFAIL more tests that require setpshared support +- hurd: Briefly document in xfails the topics of the bugzilla entries +- htl: Enable more tests +- htl: Add sem_clockwait support +- htl: fix register-atfork ordering +- hurd: Fix hang in _hurd_raise_signal from pthread_kill +- hurd: Reject raising invalid signals +- hurd: fix clearing SS_ONSTACK when longjmp-ing from sighandler +- hurd: Add pointer guard support +- hurd: Add stack guard support +- dl-runtime: reloc_{offset,index} now functions arch overide'able +- powerpc64le: add optimized strlen for P9 +- powerpc64le: use common fmaf128 implementation + +* Fri Jun 05 2020 Patsy Griffin - 2.31.9000-14 +- Auto-sync with upstream branch master, + commit e52434a2e4d1105272daaef87678da950fbec73f. +- benchtests: Restore the clock_gettime option +- Update HP_TIMING_NOW for _ISOMAC in sysdeps/generic/hp-timing.h +- Replace val with __val in TUNABLE_SET_VAL_IF_VALID_RANGE +- support: Fix detecting hole support on >2KB-block filesystems +- powerpc: Fix powerpc64le due a7a3435c9a +- manual/jobs.texi: remove unused var from example code +- powerpc/fpu: use generic fma functions +- aarch/fpu: use generic builtins based math functions +- ieee754: provide gcc builtins based generic fma functions +- ieee754: provide gcc builtins based generic sqrt functions +- Linux: Use __pthread_attr_setsigmask_internal for timer helper thread +- nptl: Add pthread_attr_setsigmask_np, pthread_attr_getsigmask_np +- nptl: Make pthread_attr_t dynamically extensible +- nptl: Destroy the default thread attribute as part of freeres +- nptl: Change type of __default_pthread_attr +- nptl: Use __pthread_attr_setaffinity_np in pthread_getattr_np +- nptl: Use __pthread_getattr_default_np in pthread_create +- nptl: Add internal alias __pthread_getattr_default_np +- htl: Fix gsync_wait symbol exposition +- htl: Make pthread_cond_destroy wait for threads to be woken +- htl: Enable more cond tests +- tst-cond11: Fix build with _SC_MONOTONIC_CLOCK > 0 +- mbstowcs: Document, test, and fix null pointer dst semantics (Bug 25219) +- build: Use FAIL_EXIT1 () on failure to exec child [BZ #23990] +- manual: Fix backtraces code example [BZ #10441] +- hurd: Fix fexecve +- i386: Remove unused file sysdeps/unix/i386/sysdep.S +- hurd: fix ptsname error when called on a non-tty +- hurd: Fix fdopendir checking for directory type +- i386: Remove NO_TLS_DIRECT_SEG_REFS handling +- Hurd: Move internals into wrapper header +- Hurd: Use __sigmask in favor of deprecated sigmask +- hurd: Fix pselect atomicity +- elf: Remove extra hwcap mechanism from ldconfig +- elf: Do not read hwcaps from the vDSO in ld.so +- linux: Use internal DIR locks when accessing filepos on telldir +- Update i386 libm-test-ulps +- htl: Add clock variants +- signal: Deprecate additional legacy signal handling functions +- elf: Turn _dl_printf, _dl_error_printf, _dl_fatal_printf into functions +- x86: Update Intel Atom processor family optimization +- elf.h: add aarch64 property definitions +- elf.h: Add PT_GNU_PROPERTY +- : Add libpthread hidden alias support +- nptl: Use __pthread_attr_copy in pthread_setattr_default_np +- nptl: Use __pthread_attr_copy in pthread_getattr_default_np (bug 25999) +- nptl: Add __pthread_attr_copy for copying pthread_attr_t objects +- nptl: Make __pthread_attr_init, __pthread_attr_destroy available internally +- nptl: Move pthread_gettattr_np into libc +- nptl: Move pthread_getaffinity_np into libc +- nptl: Move pthread_attr_setaffinity_np into libc +- nptl: Replace some stubs with the Linux implementation +- Linux: Add missing handling of tai field to __ntp_gettime64 +- Mention GCC 10 attribute access. +- y2038: Replace __clock_gettime with __clock_gettime64 +- manual: Add missing section and node for clockid_t wait functions +- y2038: linux: Provide __ntp_gettimex64 implementation +- y2038: linux: Provide __ntp_gettime64 implementation +- y2038: Provide conversion helpers for struct __ntptimeval64 +- y2038: Introduce struct __ntptimeval64 - new internal glibc type +- y2038: linux: Provide __adjtime64 implementation +- y2038: linux: Provide ___adjtimex64 implementation +- y2038: linux: Provide __clock_adjtime64 implementation +- ldconfig: Default to the new format for ld.so.cache +- nss_compat: internal_end*ent may clobber errno, hiding ERANGE [BZ #25976] +- powerpc: Optimized rawmemchr for POWER9 +- x86: Add --enable-cet=permissive +- Remove NO_CTORS_DTORS_SECTIONS macro +- elf: Assert that objects are relocated before their constructors run +- powerpc: Optimized stpcpy for POWER9 +- powerpc: Optimized strcpy for POWER9 +- x86: Move CET control to _dl_x86_feature_control [BZ #25887] +- sunrpc/tst-udp-*: Fix timeout value +- Linux: Remove remnants of the getcpu cache +- Update timezone code from tzcode 2020a +- aarch64: fix strcpy and strnlen for big-endian [BZ #25824] +- locale: Add transliteration for Geresh, Gershayim (U+05F3, U+05F4) +- string: Fix string/tst-memmove-overflow to compile with GCC 7 +- Add arch-syscall.h dependency for generating sysd-syscalls file +- arm: XFAIL string/tst-memmove-overflow due to bug 25620 +- elf: Remove redundant add_to_global_resize_failure call from dl_open_args +- string: Add string/tst-memmove-overflow, a test case for bug 25620 +- support: Add support_blob_repeat_allocate_shared +- nptl: wait for pending setxid request also in detached thread (bug 25942) +- aarch64: Accept PLT calls to __getauxval within libc.so +- Use unsigned constants for ICMP6 filters [BZ #22489] +- Linux: Enhance glibcsyscalls.py to support listing system calls + +* Mon May 11 2020 DJ Delorie - 2.31.9000-13 +- Auto-sync with upstream branch master, + commit 978e8ac39f8ba2d694031e521511da1ae803ccfc. +- Suppress GCC 10 true positive warnings [BZ #25967] +- POWER: Add context-synchronizing instructions to pkey_write [BZ #25954] +- hurd: Add missing sigstate members initialization +- x86-64: Use RDX_LP on __x86_shared_non_temporal_threshold [BZ #25966] +- linux: Remove assembly umount2 implementation +- signal: Use for sigemptyset, sigfillset +- ckb_IQ, or_IN locales: Add missing reorder-end keywords +- semaphore: consolidate arch headers into a generic one +- Use GCC 10 branch in build-many-glibcs.py. +- Document the internal _ and N_ macros +- y2038: Provide conversion helpers for struct __timex64 +- y2038: Introduce struct __timex64 - new internal glibc type +- y2038: include: Move struct __timeval64 definition to a separate file +- y2038: nscd: Modify nscd_helper to use __clock_gettime64 +- y2038: inet: Convert inet deadline to support 64 bit time +- y2038: hurd: Provide __clock_gettime64 function +- y2038: Export __clock_gettime64 to be usable in other libraries +- manual: Document the O_NOFOLLOW open flag +- powerpc64le/power9: guard power9 strcmp against rtld usage [BZ# 25905] +- float128: use builtin_signbitf128 always +- improve out-of-bounds checking with GCC 10 attribute access [BZ #25219] +- nios2: delete sysdeps/unix/sysv/linux/nios2/kernel-features.h +- powerpc: Rename argN to _argN in LOADARGS_N [BZ #25902] +- locale/tst-localedef-path-norm: Don't create $(complocaledir) +- support: Set errno before testing it. +- localedef: Add tests-container test for --no-hard-links. +- test-container: Support $(complocaledir) and mkdirp. +- i386: Remove unused variable in sysdeps/x86/cacheinfo.c +- Add a C wrapper for prctl [BZ #25896] +- powerpc64le: Enable support for IEEE long double +- powerpc64le: blacklist broken GCC compilers (e.g GCC 7.5.0) +- powerpc64le: bump binutils version requirement to >= 2.26 +- powerpc64le: raise GCC requirement to 7.4 for long double transition +- Rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI +- ldbl-128ibm-compat: workaround GCC 9 C++ PR90731 +- x86: Add the test case of __get_cpu_features support for Zhaoxin processors +- x86: Add cache information support for Zhaoxin processors +- x86: Add CPU Vendor ID detection support for Zhaoxin processors +- Update translations +- Add C wrappers for process_vm_readv/process_vm_writev [BZ #25810] +- generic/typesizes.h: Add support for 32-bit arches with 64-bit types +- semctl: Remove the sem-pad.h file +- bits/sem.h: Split out struct semid_ds +- Mark unsigned long arguments with U in more syscalls [BZ #25810] +- elf: Add initial flag argument to __libc_early_init +- Add SYSCALL_ULONG_ARG_[12] to pass long to syscall [BZ #25810] +- Makeconfig: Use $(error ...) to output error message +- manual: Fix typos in the fexecve description +- misc: Remove sstk from the autogenerated system call list +- Remove unused floating-point configuration from gmp-impl.h. +- support: Implement key create/delete +- nptl/tst-setuid1-static: Improve isolation from system objects +- Increase the timeout of locale/tst-localedef-path-norm +- Use 2020 as copyright year. +- misc: Turn sstk into a compat symbol +- manual: Document the fexecve function +- nptl: Start new threads with all signals blocked [BZ #25098] +- localedef: Add verbose messages for failure paths. +- Remove most gmp-mparam.h headers. +- elf: Implement __libc_early_init +- elf: Introduce +- Add a syscall test for [BZ #25810] +- elf: Support lld-style link map for librtld.map +- signal: Only handle on NSIG signals on signal functions (BZ #25657) +- linux: Use pthread_sigmask on sigprocmask +- ia64: Remove sigprocmask/sigblock objects from libpthread +- nptl: Move pthread_sigmask implementation to libc +- Bug 25819: Update to Unicode 13.0.0 + +* Wed Apr 29 2020 Florian Weimer - 2.31.9000-12 +- nss_db.x86_64 should install nss_db.i686 if glibc.i686 is installed (#1807821) +- Likewise for nss_hesiod. + +* Mon Apr 27 2020 Florian Weimer - 2.31.9000-11 +- Introduce glibc-headers-x86, glibc-headers-s390 packages (#1828332) +- Remove the glibc-headers package + +* Mon Apr 20 2020 DJ Delorie - 2.31.9000-10 +- Auto-sync with upstream branch master, + commit 0798b8ecc8da8667362496c1217d18635106c609. +- ARC: Update syscall-names.list for ARC specific syscalls +- Revert "x86_64: Add SSE sfp-exceptions" +- provide y2038 safe socket constants for default/asm-generic ABI +- x86_64: Add SSE sfp-exceptions +- Remove __NO_MATH_INLINES +- i686: Add INTERNAL_SYSCALL_NCS 6 argument support +- Reset converter state after second wchar_t output (Bug 25734) +- Fix typo in posix/tst-fnmatch.input (Bug 25790) + +* Wed Apr 15 2020 Patsy Griffin - 2.31.9000-9 +- Auto-sync with upstream branch master, + commit 076f09afbac1aa57756faa7a8feadb7936a724e4. +- Linux: Remove and the sysctl function +- posix: Add wait4 test case +- linux: wait4: Fix incorrect return value comparison +- hurd: add mach_print function +- x32: Properly pass long to syscall [BZ #25810] +- Add GRND_INSECURE from Linux 5.6 to sys/random.h +- Update kernel version to 5.6 in tst-mman-consts.py. + +* Wed Apr 15 2020 Florian Weimer - 2.31.9000-8 +- nsswitch.conf: don't add sss to shadow line + +* Wed Apr 08 2020 Carlos O'Donell - 2.31.9000-7 +- Auto-sync with upstream branch master, + commit b1caa144c74678097cada5a54eda2996bb459d8f. +- Update mips libm-test-ulps +- Update alpha libm-test-ulps +- Update ia64 libm-test-ulps +- Update sparc libm-test-ulps +- Update arm libm-test-ulps +- Update aarch64 libm-test-ulps +- Updates to the shn_MM locale [BZ #25532] +- powerpc: Update ULPs and xfail more ibm128 outputs +- i386: Remove build support for GCC older than GCC 6 +- oc_FR locale: Fix spelling of April (bug 25639) +- Update hppa libm-test-ulps +- y2038: linux: Provide __mq_timedreceive_time64 implementation +- y2038: linux: Provide __mq_timedsend_time64 implementation +- y2038: include: Move struct __timespec64 definition to a separate file +- malloc: ensure set_max_fast never stores zero [BZ #25733] +- powerpc64le: enforce non-specific long double in .gnu.attributes section +- powerpc64le: workaround ieee long double / _Float128 stdc++ bug +- powerpc64le: Enforce -mabi=ibmlongdouble when -mfloat128 used +- powerpc64le/multiarch: don't generate strong aliases for fmaf128-ppc64 +- ldbl-128ibm: simplify iscanonical.h +- i386: Disable check_consistency for GCC 5 and above [BZ #25788] +- Add IPPROTO_ETHERNET and IPPROTO_MPTCP from Linux 5.6 to netinet/in.h. +- Update syscall lists for Linux 5.6. +- elf: Implement DT_AUDIT, DT_DEPAUDIT support [BZ #24943] +- elf: Simplify handling of lists of audit strings +- support: Change xgetline to return 0 on EOF +- nptl: Remove x86_64 cancellation assembly implementations [BZ #25765] +- aarch64: update bits/hwcap.h +- Add tests for Safe-Linking +- S390: Regenerate ULPs. +- sysv/alpha: Use generic __timeval32 and helpers +- linux: Use long time_t for wait4/getrusage +- resource: Add a __rusage64 struct +- linux: Use long time_t __getitimer/__setitimer +- sysv: Define __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64 +- math: Add inputs that yield larger errors for float type (x86_64) + +* Tue Mar 31 2020 DJ Delorie - 2.31.9000-6 +- Auto-sync with upstream branch master, + commit 49c3c37651e2d2ec4ff8ce21252bbbc08a9d6639. +- Fix alignment bug in Safe-Linking +- Typo fixes and CR cleanup in Safe-Linking +- Use Linux 5.6 and GMP 6.2.0 in build-many-glibcs.py. +- Add new file missed in previous hppa commit. +- powerpc: Add support for fmaf128() in hardware +- Fix data race in setting function descriptors during lazy binding on hppa. +- sparc: Move __fenv_{ld,st}fsr to fenv-private.h +- x86: Remove feraiseexcept optimization +- math: Remove fenvinline.h +- hurd: Make O_TRUNC update mtime/ctime +- Add Safe-Linking to fastbins and tcache +- Add benchtests for roundeven and roundevenf. +- time: Add a __itimerval64 struct +- time: Add a timeval with a 32-bit tv_sec and tv_usec +- sysv/linux: Rename alpha functions to be alpha specific +- ARC: add definitions to elf/elf.h +- powerpc64: apply -mabi=ibmlongdouble to special files +- powerpc64le: add -mno-gnu-attribute to *f128 objects and difftime +- Makeconfig: sandwich gnulib-tests between libc/ld linking of tests +- powerpc64le: Ensure correct ldouble compiler flags are used +- Fix tests which expose ldbl -> _Float128 redirects +- ldbl-128ibm-compat: PLT redirects for using ldbl redirects internally + +* Wed Mar 25 2020 Patsy Franklin - 2.31.9000-5 +- Auto-sync with upstream branch master, + commit 4eda036f5b897fa8bc20ddd2099b5a6ed4239dc9. +- stdlib: Move tst-system to tests-container +- support/shell-container.c: Add builtin kill +- support/shell-container.c: Add builtin exit +- support/shell-container.c: Return 127 if execve fails +- Add NEWS entry for CVE-2020-1751 (bug 25423) +- posix: Fix system error return value [BZ #25715] +- y2038: fix: Add missing libc_hidden_def attribute for some syscall wrappers +- Extended Char Intro: Use getwc in example (Bug 25626) +- stdio: Add tests for printf multibyte convertion leak [BZ#25691] +- stdio: Remove memory leak from multibyte convertion [BZ#25691] +- Add NEWS entry for CVE-2020-1752 (bug 25414) +- math: Remove inline math tests +- Remove __LIBC_INTERNAL_MATH_INLINES +- math: Remove mathinline +- m68k: Remove mathinline.h +- oc_FR locale: Fix spelling of Thursday (bug 25639) +- x86: Remove ARCH_CET_LEGACY_BITMAP [BZ #25397] +- Fix build with GCC 10 when long double = double. +- nscd/cachedumper.c : fix whitespace +- Fix nscd/cachedumper.c compile errors +- manual: Fix inconsistent declaration of wcsrchr [BZ #24655] +- nscd: add cache dumper + +* Fri Mar 13 2020 Patsy Franklin - 2.31.9000-4 +- Auto-sync with upstream branch master, + commit 2de7fe62534b7a6461c633114f03e9dff394f5f7. +- parse_tunables: Fix typo in comment +- ldconfig: trace origin paths with -v +- test-container: print errno when execvp fails +- [AArch64] Improve integer memcpy +- Add NEWS entry for CVE-2020-10029 (bug 25487) +- gcc PR 89877: miscompilation due to missing cc clobber in longlong.h macros +- mips: Fix wrong INTERNAL_SYSCALL_ERROR_P check from bc2eb9321e +- elf: Fix wrong indentation from commit eb447b7b4b +- y2038: linux: Provide __futimesat64 implementation +- y2038: linux: Provide __lutimes64 implementation +- y2038: linux: Provide __futimes64 implementation +- y2038: fix: Add missing libc_hidden_def for __futimens64 +- sparc: Move sigreturn stub to assembly +- ldbl-128ibm: Let long double files have specific compiler flags +- ldbl-128ibm-compat: Add tests for IBM long double functions +- powerpc: Fix feraiseexcept and feclearexcept macros +- arm: Fix softp-fp Implies (BZ #25635) +- Remove reference of --without-fp on configure +- linux/sysipc: Include linux/posix_types.h for __kernel_mode_t +- Improve IFUNC check [BZ #25506] +- linux: Clear mode_t padding bits (BZ#25623) +- linux: Remove aarch64 ipc_priv.h +- Linux: Use __fstatat64 in fchmodat implementation +- Linux: Use AT_FDCWD in utime, utimes when calling utimensat +- S390: Remove backchain-based fallback and use generic backtrace.c. +- manual: Fix wrong declaration of wcschr [BZ #24654] +- manual: Fix typo in parse_printf_format example [BZ #24638] + +* Thu Mar 5 2020 Florian Weimer - 2.31.9000-3 +- Emergency patch for broken utimes/utime functions + +* Tue Mar 03 2020 Patsy Franklin - 2.31.9000-2 +- Auto-sync with upstream branch master, + commit 78c9d0c6efabe2067ef7f93cd36325f54c60adc2. +- Update translations +- Convert Python scripts to Python 3 +- alpha: Do not build with -fpic +- y2038: linux: Provide __utime64 implementation +- y2038: linux: Provide __utimes64 implementation +- y2038: Introduce struct __utimbuf64 - new internal glibc type +- microblaze: vfork is always available +- m68k: getpagesize syscall number is always available +- Linux: epoll_pwait syscall number is always available +- x86_64: Do not define __NR_semtimedop in +- ia64: Do not define __NR_semtimedop in +- Linux: open_by_handle_at syscall number is always available +- Linux: set_robust_list syscall number is always available +- Linux: pciconfig_iobase syscall number is always available on alpha +- Linux: getdents64 syscall number is always available on MIPS +- Linux: Clean up preadv2, pwritev2 system call names +- Linux: exit_group syscall number is always available +- Linux: set_tid_address syscall number is always available +- Linux: pkey_mprotect syscall number is always available +- Linux: rt_sigqueueinfo syscall number is always available +- Linux: getrandom syscall number is always available +- Linux: Clean up preadv, pwritev system call names +- Linux: Clean up pread64/pwrite64 system call names +- Linux: sigaltstack syscall number is always available +- Linux: sched_getaffinity syscall number is always available +- Linux: sched_setaffinity syscall number is always available +- Linux: statx syscall number is always available +- Linux: mq_* syscall numbers are always available +- Linux: mlock2 syscall number is always available +- Linux: copy_file_range syscall number is always available +- Linux: renameat2 syscall number is always available +- build-many-glibcs.py: Add list-compilers, list-glibcs commands +- build-many-glibcs.py: Add --shallow option +- Fixed typo in run_command_array() in support/shell-container.c +- Add missing libc_hidden_def for __utimensat64 +- elf: Add elf/check-wx-segment, a test for the presence of WX segments +- i386: Use comdat instead of .gnu.linkonce for i386 setup pic register (BZ #20543) +- ldbl-128ibm-compat: link tst-ldbl-efgcvt against loader too +- ldbl-128ibm-compat: enforce ibm128 on compat tests +- ldbl-128ibm-compat: Provide nexttoward functions +- ldbl-128ibm-compat: Provide a significand implementation +- ldbl-128ibm-compat: Redirect complex math functions +- ldbl-128ibm-compat: Redirect long double functions to f128/ieee128 functions +- posix: Remove posix waitid +- posix: Refactor tst-waitid (BZ #14666) +- support: Add support_process_state_wait +- malloc/tst-mallocfork2: Kill lingering process for unexpected failures + +* Wed Feb 26 2020 Patsy Franklin - 2.31.9000-1 +- Auto-sync with upstream branch master, + commit 758599bc9dcc5764e862bd9e1613c5d1e6efc5d3. +- elf: Apply attribute_relro to pointers in elf/dl-minimal.c +- powerpc: Refactor fenvinline.h +- nss_nis: Use NSS_DECLARE_MODULE_FUNCTIONS +- csu: Use ELF constructor instead of _init in libc.so +- ldbl-128ibm: make ieee754.h work with IEEE 128 long double +- ldbl-128ibm-compat: fixup subdir location of several funcs +- ldbl-128ibm-compat: enforce correct abi flags on internal file +- ldbl-128ibm-compat: Provide ieee128 symbols to narrow functions +- Undefine redirections after long double definition on __LDBL_COMPAT [BZ #23294] +- nios2: Fix Linux kABI for syscall return +- Fix use-after-free in glob when expanding ~user (bug 25414) +- nptl: Move pthread_setschedparam implementation into libc +- nptl: Move pthread_getschedparam implementation into libc +- Add hidden prototypes for __sched_getparam, __sched_getscheduler +- nptl: Move pthread_cond_init implementation into libc +- nptl: Move pthread_cond_destroy implementation into libc +- nptl: Move pthread_condattr_init implementation into libc +- nptl: Move pthread_condattr_destroy implementation into libc +- nptl: Move pthread_attr_setscope implementation into libc +- nptl: Move pthread_attr_getscope implementation into libc +- nptl: Move pthread_attr_setschedpolicy implementation into libc +- nptl: Move pthread_attr_getschedpolicy implementation into libc +- nptl: Sort routines list in Makefile alphabetically +- nptl: Use .NOTPARALLEL in Makefile only if actually running tests +- Block all signals on timer_create thread (BZ#10815) +- Fix tst-pkey expectations on pkey_get [BZ #23202] +- y2038: linux: Provide __gettimeofday64 implementation +- Linux: Work around kernel bugs in chmod on /proc/self/fd paths [BZ #14578] +- Introduce and ELF_INITFINI for all architectures +- mips: Fix bracktrace result for signal frames +- Move implementation of into a C file +- : Add type safety and port to Hurd +- Prepare redirections for IEEE long double on powerpc64le +- conform/conformtest.py: Extend tokenizer to cover character constants +- stdlib: Reduce namespace pollution in +- x86: Avoid single-argument _Static_assert in +- x86 tls: Use _Static_assert for TLS access size assertion +- htl: Link internal htl tests against libpthread +- pthread: Fix building tst-robust8 with nptl +- pthread: Move robust mutex tests from nptl to sysdeps/pthread +- htl: Remove stub warning for pthread_mutexattr_setpshared +- htl: Add missing functions and defines for robust mutexes +- htl: Only check pthread_self coherency when DEBUG is set +- hurd: Add THREAD_GET/SETMEM/_NC +- hurd tls: update comment about fields at the end of tcbhead +- ld.so: Do not export free/calloc/malloc/realloc functions [BZ #25486] +- Remove weak declaration of free from +- elf: Extract _dl_sym_post, _dl_sym_find_caller_map from elf/dl-sym.c +- elf: Introduce the rtld-stubbed-symbols makefile variable +- arm: fix use of INTERNAL_SYSCALL_CALL +- linux: Remove INTERNAL_SYSCALL_DECL +- nptl: Remove ununsed pthread-errnos.h rule +- linux: Consolidate INLINE_SYSCALL +- s390: Consolidate Linux syscall definition +- riscv: Avoid clobbering register parameters in syscall +- microblaze: Avoid clobbering register parameters in syscall +- nios2: Use Linux kABI for syscall return +- mips: Use Linux kABI for syscall return +- mips64: Consolidate Linux sysdep.h +- ia64: Use Linux kABI for syscall return +- alpha: Refactor syscall and Use Linux kABI for syscall return +- sparc: Avoid clobbering register parameters in syscall +- sparc: Use Linux kABI for syscall return +- powerpc: Use Linux kABI for syscall return +- powerpc: Consolidate Linux syscall definition +- i386: Enable CET support in ucontext functions +- tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex +- powerpc64: Add memory protection key support [BZ #23202] +- ldbl-128ibm-compat: Provide a scalb implementation +- Add a generic scalb implementation +- Adjust thresholds in Bessel function implementations (bug 14469). +- resolv: Fix ABA race in /etc/resolv.conf change detection [BZ #25420] +- resolv: Enhance __resolv_conf_load to capture file change data +- resolv: Fix file handle leak in __resolv_conf_load [BZ #25429] +- resolv: Use in __resolv_conf_get_current +- Add STATX_ATTR_VERITY from Linux 5.5 to bits/statx-generic.h. +- Use gcc -finput-charset=ascii for check-installed-headers. +- math/test-sinl-pseudo: Use stack protector only if available +- alpha: Fix static gettimeofday symbol +- nss_nisplus: Use NSS_DECLARE_MODULE_FUNCTIONS +- nss_dns: Use NSS_DECLARE_MODULE_FUNCTIONS +- nss_files: Use NSS_DECLARE_MODULE_FUNCTIONS +- nss_db: Use NSS_DECLARE_MODULE_FUNCTIONS +- nss_compat: Use NSS_DECLARE_MODULE_FUNCTIONS +- nss_hesiod: Use NSS_DECLARE_MODULE_FUNCTIONS +- nss: Add function types and NSS_DECLARE_MODULE_FUNCTIONS macro to +- nss_compat: Do not use nss_* names for function pointers +- Avoid ldbl-96 stack corruption from range reduction of pseudo-zero (bug 25487). +- mips: Fix argument passing for inlined syscalls on Linux [BZ #25523] +- mips: Use 'long int' and 'long long int' in linux syscall code +- alpha: Use generic gettimeofday implementation +- sunrpc: Properly clean up if tst-udp-timeout fails +- elf: avoid stack allocation in dl_open_worker +- elf: avoid redundant sort in dlopen +- elf: Allow dlopen of filter object to work [BZ #16272] +- Update translations +- Rename RWF_WRITE_LIFE_NOT_SET to RWH_WRITE_LIFE_NOT_SET following Linux 5.5. +- S390: Fix non-ascii character in fenv.h. +- io: Add io/tst-lchmod covering lchmod and fchmodat +- Linux: Emulate fchmodat with AT_SYMLINK_NOFOLLOW using O_PATH [BZ #14578] +- io: Implement lchmod using fchmodat [BZ #14578] +- Add internal header file +- elf.h: Add R_RISCV_IRELATIVE +- Fix typo in the name for Wednesday in Kurdish [BZ #9809] +- debug: Add missing locale dependencies of fortify tests +- htl C11 threads: Avoid pthread_ symbols visibility in static library +- hurd: Add __pthread_spin_wait and use it +- ldbl-128ibm-compat: set PRINTF_CHK flag in {,v}sprintf_chk +- Use --disable-gdbserver in build-many-glibcs.py. +- Improve random memcpy benchmark +- nptl: update default pthread-offsets.h +- nptl: add missing pthread-offsets.h +- htl: Avoid a local plt for pthread_self +- pthread: Move some join tests from nptl to sysdeps/pthread +- htl: Make joining self return EDEADLK +- pthread: Move most barrier tests from nptl to sysdeps/pthread +- htl: Fix barrier_wait with one thread +- pthread: Move most sem tests from nptl to sysdeps/pthread +- htl: Make sem_wait/sem_timedwait interruptible +- htl: Make sem_open return ENOSYS +- htl: Add support for semaphore maximum value +- pthread: Move key tests from nptl to sysdeps/pthread +- hurd: Make nanosleep a cancellation point +- htl: Add support for libc cancellation points +- htl: clean __pthread_get_cleanup_stack hidden proto +- htl: XFAIL rwlock tests which need pshared support +- pthread: Move some rwlock tests from nptl to sysdeps/pthread +- pthread: Move most once tests from nptl to sysdeps/pthread +- htl: support cancellation during pthread_once +- pthread: Move most cond tests from nptl to sysdeps/pthread +- htl: make pthread_cond_destroy return EBUSY on waiters +- htl: Report missing mutex lock on pthread_cond_*wait +- htl: Fix linking static testcases +- htl: Move __register_atfork from forward to own file +- pthread: Move some attr tests from nptl to sysdeps/pthread +- htl: Fix default guard size +- pthread: Move most mutex tests from nptl to sysdeps/pthread +- pthread: Move spin tests from nptl to sysdeps/pthread +- htl: make pthread_spin_lock really spin +- htl: Avoid check-installed-headers looking at inlines +- htl: Do not put spin_lock inlines in public headers +- pthread: Move basic tests from nptl to sysdeps/pthread +- htl: Fix calling pthread_exit in the child of a fork +- x86: Remove and use the generic version +- C11 threads: Move implementation to sysdeps/pthread +- htl: Add C11 threads types definitions +- C11 threads: make thrd_join more portable +- C11 threads: Fix thrd_t / pthread_t compatibility assertion +- C11 threads: do not require PTHREAD_DESTRUCTOR_ITERATIONS +- nptl: Move nptl-specific types to separate header +- htl: Make __PTHREAD_ONCE_INIT more flexible +- htl: Add support for C11 threads behavior +- htl: Add missing internal functions declarations +- htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy +- htl: Move internal mutex/rwlock symbols to GLIBC_PRIVATE +- Linux: Add io/tst-o_path-locks test +- support: Add the xlstat function +- htl: Remove duplicate files +- htl: Remove unused files +- resolv: Fix CNAME chaining in resolv/tst-resolv-ai_idn-common.c +- Remove a comment claiming that sin/cos round correctly. +- y2038: linux: Provide __settimeofday64 implementation +- y2038: Provide conversion helpers for struct __timeval64 +- y2038: alpha: Rename valid_timeval64_to_timeval to valid_timeval_to_timeval32 +- y2038: alpha: Rename valid_timeval_to_timeval64 to valid_timeval32_to_timeval +- y2038: Introduce struct __timeval64 - new internal glibc type +- y2038: Define __suseconds64_t type to be used with struct __timeval64 +- Update kernel version to 5.5 in tst-mman-consts.py. +- Update syscall lists for Linux 5.5. +- NEWS: Set fill-column hint to 72 +- y2038: linux: Provide __timespec_get64 implementation +- Use binutils 2.34 branch in build-many-glibcs.py. +- Run nptl/tst-pthread-getattr in a container +- test-container: add exec, cwd +- Use Linux 5.5 in build-many-glibcs.py. +- rt: avoid PLT setup in timer_[sg]ettime +- Update or_IN collation [BZ #22525] +- Fix ckb_IQ [BZ #9809] +- Add new locale: ckb_IQ (Kurdish/Sorani spoken in Iraq) [BZ #9809] +- list-fixed-bugs.py: Wrap at 72 chars +- y2038: linux: Provide __sched_rr_get_interval64 implementation +- y2038: linux: Provide __timerfd_settime64 implementation +- y2038: linux: Provide __timerfd_gettime64 implementation +- i386: Remove _exit.S +- i386: Use ENTRY/END in assembly codes +- i386-mcount.S: Add _CET_ENDBR to _mcount and __fentry__ +- i386/sub_n.S: Add a missing _CET_ENDBR to indirect jump target +- i386: Don't unnecessarily save and restore EAX, ECX and EDX [BZ# 25262] +- x86: Don't make 2 calls to dlerror () in a row +- Open master for 2.32 development + +* Mon Feb 03 2020 DJ Delorie - 2.31-1 +- Auto-sync with upstream branch release/2.31/master, + commit 9ea3686266dca3f004ba874745a4087a89682617. +- glibc 2.31 release +- Generate ChangeLog.old/ChangeLog.20 for 2.31 +- Add bugs fixed in 2.31 in NEWS +- Update newest tested versions of dependencies in install.texi +- Add more contributors to the manual +- Add note to NEWS about kernel headers dependency on risc-v +- Add Portuguese (Portugal) translation +- Add NEWS entry about 64-bit time_t syscall use on 32-bit targets +- nptl: Avoid using PTHREAD_MUTEX_DEFAULT in macro definition [BZ #25271] + +* Thu Jan 30 2020 Patsy Franklin - 2.30.9000-33 +- Auto-sync with upstream branch master, + commit 352bb99754ae7c83ff1b974f9c52244e974c9410. +- Build raise with -fasynchronous-unwind-tables. +- Fix locale/tst-locale-locpath cross-testing when sshd sets LANG. +- Fix elf/tst-rtld-preload cross-testing. +- Fix cross-testing of tst-ifunc-fault-* tests. +- gitlog-to-changelog: Drop scripts in favour of gnulib version +- Add NEWS entry about the change in handling of PT_GNU_STACK on MIPS +- Fix array overflow in backtrace on PowerPC (bug 25423) +- getaddrinfo: Fix resource leak after strdup failure in gethosts (swbz#25425) + +* Tue Jan 28 2020 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 20 2020 Patsy Franklin - 2.30.9000-31 +- Auto-sync with upstream branch master, + commit 92ce43eef7ac844782d50a8015d977d216fbadec. +- Run bench-timing-type with newly built libc. +- Get rid of Werror=maybe-uninitialized in res_send.c. +- translations: Update translations +- translations: Trim po files using msgattrib +- Update translations +- translations: Run msgmerge when downloading translations +- Fix maybe-uninitialized error on powerpc +- powerpc32: Fix syntax error in __GLRO macro +- Remove incorrect alloc_size attribute from pvalloc (swbz#25401) + +* Fri Jan 17 2020 Florian Weimer - 2.30.9000-30 +- Auto-sync with upstream branch master, + commit 70ba28f7ab2923d4e36ffc9d5d2e32357353b25c: +- Fix tst-pkey.c pkey_alloc return checks and manual +- powerpc: Move cache line size to rtld_global_ro +- powerpc: Initialize rtld_global_ro for static dlopen (swbz#20802) +- Revert outdated translations +- vcs-to-changelog: Add quirk for __nonnull +- elf: Add elf/tst-dlopenfail-2 (swbz#25396, #1395758) +- Clear GL(dl_initfirst) when freeing its link_map (swbz#25396, #1395758) +- Update Translations +- Fix "elf: Add tst-ldconfig-ld_so_conf-update test" on 32bit. +- elf: Add tst-ldconfig-ld_so_conf-update test +- sl_SI locale: Use "." as the thousands separator (swbz#25233) + +* Mon Jan 06 2020 Arjun Shankar - 2.30.9000-29 +- Auto-sync with upstream branch master, + commit cbce69e70dc4b04fefcc7257e593733b8b03856c: +- Multiple locales: Add date_fmt (bug 24054) +- Update libc.pot for 2.31 release +- Add libm_alias_finite for _finite symbols +- Linux: Fix clock_nanosleep time64 check +- linux: Fix vDSO macros build with time64 interfaces +- x86: Make x32 use x86 time implementation +- Remove vDSO support from make-syscall.sh +- linux: Update x86 vDSO symbols +- linux: Update mips vDSO symbols +- linux: Consolidate Linux gettimeofday +- linux: Consolidate time implementation +- elf: Enable relro for static build +- elf: Move vDSO setup to rtld (BZ#24967) +- linux: Add support for clock_gettime64 vDSO +- linux: Optimize fallback 32-bit clock_gettime +- linux: Enable vDSO clock_gettime64 for i386 +- linux: Enable vDSO clock_gettime64 for arm +- linux: Enable vDSO clock_gettime64 for mips +- linux: Add support for clock_getres64 vDSO +- linux: Optimize fallback 32-bit clock_getres +- htl: Use dso_handle.h +- htl: Drop common tcbhead_t definition +- htl: Move pthread_atfork to libc_nonshared.a +- htl: Add __errno_location and __h_errno_location +- hurd: Fix message reception for timer_thread + +* Thu Jan 02 2020 Florian Weimer - 2.30.9000-28 +- Auto-sync with upstream branch master, + commit cc47d5c5f53f6d845ac54698ae8929af15662c44: +- Linux: Use built-in system call tables +- lv_LV locale: Correct the time part of d_t_fmt (swbz#25324) +- km_KH locale: Use "%M" instead of "m" in d_t_fmt (swbz#25323) +- ldbl-128ibm-compat: Do not mix -mabi=*longdouble and -mlong-double-128 +- ldbl-128ibm-compat: Compiler flags for stdio functions +- Do not redirect calls to __GI_* symbols, when redirecting to *ieee128 +- aarch64: add default memcpy version for kunpeng920 +- aarch64: ifunc rename for kunpeng +- aarch64: Modify error-shown comments for strcpy +- linux: Consolidate sigprocmask +- Fix return code for __libc_signal_* functions +- nptl: Remove duplicate internal __SIZEOF_PTHREAD_MUTEX_T (swbz#25241) + +* Thu Dec 26 2019 Carlos O'Donell - 2.30.9000-27 +- Auto-sync with upstream branch master, + commit b8c210bcc74840d24c61d39bde15bea9daf3e271. +- mnw_MM, my_MM, and shn_MM locales: Do not use %Op +- Avoid compat symbols for totalorder in powerpc64le IEEE long double +- ldbl-128ibm-compat: Add *cvt functions +- Refactor *cvt functions implementation (2/2) +- Refactor *cvt functions implementation (1/2) +- Add exception-based flags for wait4 +- aarch64: Optimized memset for Kunpeng processor. +- aarch64: Optimized strlen for strlen_asimd +- aarch64: Add Huawei Kunpeng to tunable cpu list +- aarch64: Optimized implementation of memrchr +- aarch64: Optimized implementation of strnlen +- aarch64: Optimized implementation of strcpy +- aarch64: Optimized implementation of memcmp +- Consolidate wait3 implementations +- Implement waitpid in terms of wait4 +- linux: Use waitid on wait4 if __NR_wait4 is not defined +- Implement wait in terms of waitpid +- nptl: Move waitpid implementation to libc +- nptl: Move wait implementation to libc +- Remove __waitpid_nocancel +- Fix test isolation for elf/tst-ifunc-fault-lazy, elf/tst-ifunc-fault-bindnow +- Fix __libc_signal_block_all on sparc64 +- powerpc: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214] + +* Thu Dec 19 2019 Patsy Franklin - 2.30.9000-26 +- Auto-sync with upstream branch master, + commit 3dcad8158f43d71d5b8f6f317f82952ddf3468f3. +- hurd: Do not make sigprocmask available in ld.so +- build-many-glibcs.py: Do not build C++ PCHs by default +- hurd: Make getrandom honour GRND_NONBLOCK +- tunables: report sbrk() failure +- build-many-glibcs.py: Add mipsisa64r6el-linux-gnu target +- mips: Do not include hi and lo in __SYSCALL_CLOBBERS for R6 +- ldbl-128ibm-compat: Add ISO C99 versions of scanf functions +- ldbl-128ibm-compat: Fix selection of GNU and ISO C99 scanf +- hurd: Fix local PLT +- dlopen: Do not block signals +- dlopen: Rework handling of pending NODELETE status +- dlopen: Fix issues related to NODELETE handling and relocations +- hurd: Fix __close_nocancel_nostatus availability +- hurd: add getrandom and getentropy implementations +- hurd: Implement __close_nocancel_nostatus +- manual: clarify fopen with the x flag +- S390: Use sysdeps/ieee754/dbl-64/wordsize-64 on s390x. +- S390: Implement roundtoint and converttoint and define TOINT_INTRINSICS. +- S390: Implement math-barriers math_opt_barrier and math_force_eval. +- S390: Use libc_fe* macros in fe* functions. +- S390: Implement libc_fe* macros. +- S390: Use convert-to-fixed instruction for llround functions. +- S390: Use convert-to-fixed instruction for lround functions. +- S390: Use convert-to-fixed instruction for llrint functions. +- S390: Use convert-to-fixed instruction for lrint functions. +- S390: Use load-fp-integer instruction for roundeven functions. +- Adjust s_copysignl.c regarding code style. +- Adjust s_ceilf.c and s_ceill.c regarding code style. +- Adjust s_floorf.c and s_floorl.c regarding code style. +- Adjust s_rintf.c and s_rintl.c regarding code style. +- Adjust s_nearbyintf.c and s_nearbyintl.c regarding code style. +- Use GCC builtins for copysign functions if desired. +- Use GCC builtins for round functions if desired. +- Use GCC builtins for trunc functions if desired. +- Use GCC builtins for ceil functions if desired. +- Use GCC builtins for floor functions if desired. +- Use GCC builtins for rint functions if desired. +- Use GCC builtins for nearbyint functions if desired. +- Always use wordsize-64 version of s_round.c. +- Always use wordsize-64 version of s_trunc.c. +- Always use wordsize-64 version of s_ceil.c. +- Always use wordsize-64 version of s_floor.c. +- Always use wordsize-64 version of s_rint.c. +- Always use wordsize-64 version of s_nearbyint.c. +- ldconfig: Do not print a warning for a missing ld.so.conf file +- hurd: Fix using altstack while in an RPC call to be aborted +- Fix failure when CFLAGS contains -DNDEBUG (Bug 25251) + +* Mon Dec 09 2019 DJ Delorie - 2.30.9000-25 +- Auto-sync with upstream branch master, + commit 0487ebed2278b20971af4cabf186fd3681adccf0. +- nptl: Add more missing placeholder abi symbol from nanosleep move +- sysdeps/riscv/start.S: rename .Lload_gp to load_gp (bug 24376) +- y2038: linux: Provide __timer_settime64 implementation +- y2038: linux: Provide __timer_gettime64 implementation +- timer: Decouple x86_64 specific timer_settime from generic Linux implementation +- timer: Decouple x86_64 specific timer_gettime from generic Linux implementation +- time: Introduce glibc's internal struct __itimerspec64 +- Correct range checking in mallopt/mxfast/tcache [BZ #25194] +- misc/test-errno-linux: Handle EINVAL from quotactl +- : Define __CORRECT_ISO_CPP_STRING_H_PROTO for Clang [BZ #25232] +- build-many-glibcs.py: Move sparcv8 to extra_glibcs + +* Thu Dec 5 2019 Florian Weimer - 2.30.9000-24 +- Upstream patches for fallout from dlopen NODELETE changes (#1778344, #1778366) + +* Wed Dec 04 2019 Patsy Franklin - 2.30.9000-23 +- Auto-sync with upstream branch master, + commit ec138c67cbda8b5826a0a2a7ba456408117996dc. +- sysdeps: Add clock_gettime64 vDSO +- Do not use ld.so to open statically linked programs in debugglibc.sh +- Attach to test in container from debugglibc.sh +- Expand $(as-needed) and $(no-as-needed) throughout the build system +- x86: Assume --enable-cet if GCC defaults to CET [BZ #25225] +- ldbl-128ibm-compat: Add tests for strfroml, strtold, and wcstold +- ldbl-128ibm-compat: Add tests for strfmon and strfmon_l +- ldbl-128ibm-compat: Add strfmon_l with IEEE long double format +- ldbl-128ibm-compat: Replace http with https in new files +- elf: Do not run IFUNC resolvers for LD_DEBUG=unused [BZ #24214] +- elf/tst-dlopenfail: Disable --no-as-needed for tst-dlopenfailmod1.so +- hurd: Fix ld.so __access override from libc +- hurd: Fix ld.so __getcwd override from libc +- hurd: Make __sigprocmask GLIBC_PRIVATE +- hurd: Fix renameat2 error +- hurd: make strerror(0) coherent with other ports +- hurd: Fix ld.so link +- Update kernel version to 5.4 in tst-mman-consts.py. +- Update SOMAXCONN value from Linux 5.4. +- Update syscall-names.list for Linux 5.4. +- Fix syntax error in build-many-glibcs.py. +- Define MADV_COLD and MADV_PAGEOUT from Linux 5.4. + +* Mon Dec 2 2019 Florian Weimer - 2.30.9000-22 +- dlopen: Remove incorrect assert in activate_nodelete (#1778344) + +* Thu Nov 28 2019 Florian Weimer - 2.30.9000-21 +- Auto-sync with upstream branch master, + commit e37c2cf299b61ce18f62852f6c5624c27829b610: +- Move _dl_open_check to its original place in dl_open_worker +- Block signals during the initial part of dlopen +- Remove all loaded objects if dlopen fails, ignoring NODELETE (#1395758) +- Avoid late dlopen failure due to scope, TLS slotinfo updates (swbz#25112) +- Avoid late failure in dlopen in global scope update (swbz#25112) +- Lazy binding failures during dlopen/dlclose must be fatal (swbz#24304) +- resolv: Implement trust-ad option for /etc/resolv.conf (#1164339) +- dlsym: Do not determine caller link map if not needed +- libio: Disable vtable validation for pre-2.1 interposed handles (swbz#25203) +- ldbl-128ibm-compat: Add syslog functions +- ldbl-128ibm-compat: Add obstack printing functions +- ldbl-128ibm-compat: Reuse tests for err.h and error.h functions +- ldbl-128ibm-compat: Add error.h functions +- ldbl-128ibm-compat: Add err.h functions +- ldbl-128ibm-compat: Add argp_error and argp_failure +- sparc: Use atomic compiler builtins on sparc +- Remove 32 bit sparc v7 support + +* Wed Nov 27 2019 Arjun Shankar - 2.30.9000-20 +- Auto-sync with upstream branch master, + commit bfdb731438206b0f70fe7afa890681155c30b419: +- rtld: Check __libc_enable_secure for LD_PREFER_MAP_32BIT_EXEC (CVE-2019-19126) +- Introduce DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x +- Enable inlining issignalingf within glibc +- Don't use a custom wrapper macro around __has_include (bug 25189). +- Remove duplicate inline implementation of issignalingf +- misc: Set generic pselect as ENOSYS +- Use DEPRECATED_SCANF macro for remaining C99-compliant scanf functions +- ldbl-128ibm-compat: Add regular/wide character printing printing functions +- ldbl-128ibm-compat: Test double values and positional arguments +- ldbl-128ibm-compat: Add regular/wide character scanning functions +- arm: Fix armv7 selection after 'Split BE/LE abilist' +- Use Linux 5.4 in build-many-glibcs.py. +- sysdeps/posix: Simplify if expression in getaddrinfo +- sysdeps/posix/getaddrinfo: Return early on invalid address family +- ru_UA locale: use copy "ru_RU" in LC_TIME (bug 25044) +- locale: Greek -> ASCII transliteration table [BZ #12031] +- nptl: Cleanup mutex internal offset tests +- nptl: Add tests for internal pthread_rwlock_t offsets +- nptl: Remove rwlock elision definitions +- nptl: Add struct_mutex.h and struct_rwlock.h +- nptl: Add default pthreadtypes-arch.h and pthread-offsets.h +- Compile elf/rtld.c with -fno-tree-loop-distribute-patterns. +- nptl: Fix __PTHREAD_MUTEX_INITIALIZER for !__PTHREAD_MUTEX_HAVE_PREV +- S390: Fix handling of needles crossing a page in strstr z15 ifunc [BZ #25226] + +* Mon Nov 18 2019 Patsy Griffin - 2.30.9000-19 +- Auto-sync with upstream branch master, + commit 2a764c6ee848dfe92cb2921ed3b14085f15d9e79. +- Enhance _dl_catch_exception to allow disabling exception handling +- hurd: Suppress GCC 10 -Warray-bounds warning in init-first.c [BZ #25097] +- linux: Add comment on affinity set sizes to tst-skeleton-affinity.c +- Avoid zero-length array at the end of struct link_map [BZ #25097] +- Introduce link_map_audit_state accessor function +- Properly initialize audit cookie for the dynamic loader [BZ #25157] +- nios2: Work around backend bug triggered by csu/libc-tls.c (GCC PR 92499) +- Redefine _IO_iconv_t to store a single gconv step pointer [BZ #25097] +- Add new script for plotting string benchmark JSON output +- support: Fix support_set_small_thread_stack_size to build on Hurd +- login: Use pread64 in utmp implementation +- Clarify purpose of assert in _dl_lookup_symbol_x +- aarch64: Increase small and medium cases for __memcpy_generic +- login: Introduce matches_last_entry to utmp processing + +* Tue Nov 12 2019 Arjun Shankar - 2.30.9000-18 +- Auto-sync with upstream branch master, + commit cba932a5a9e91cffd7f4172d7e91f9b2efb1f84b: +- nptl: Move nanosleep implementation to libc +- Refactor nanosleep in terms of clock_nanosleep +- nptl: Refactor thrd_sleep in terms of clock_nanosleep +- math: enhance the endloop condition of function handle_input_flag +- hurd: Remove lingering references to the time function +- hurd: Use __clock_gettime in _hurd_select +- login: Remove double-assignment of fl.l_whence in try_file_lock +- nptl: Add missing placeholder abi symbol from nanosleep move +- login: Acquire write lock early in pututline [BZ #24882] +- Remove hppa pthreadP.h +- sysdeps/clock_nanosleep: Use clock_nanosleep_time64 if avaliable +- Fix array bounds violation in regex matcher (bug 25149) +- support: Add support_set_small_thread_stack_size +- linux: Reduce stack size for nptl/tst-thread-affinity-pthread +- y2038: linux: Provide __ppoll64 implementation +- Declare asctime_r, ctime_r, gmtime_r, localtime_r for C2X. +- support: Add xsetlocale function +- libio/tst-fopenloc: Use xsetlocale, xfopen, and xfclose +- Fix clock_nanosleep when interrupted by a signal +- slotinfo in struct dtv_slotinfo_list should be flexible array [BZ #25097] + +* Wed Nov 06 2019 Patsy Franklin - 2.30.9000-17 +- Auto-sync with upstream branch master, + commit 2a0356e1191804d57005e1cfe2a72f019b7a8cce. +- posix: Sync regex with gnulib +- Add mnw language code [BZ #25139] +- Add new locale: mnw_MM (Mon language spoken in Myanmar) [BZ #25139] +- S390: Fp comparison are now raising FE_INVALID with gcc 10. +- linux: pselect: Remove CALL_PSELECT6 macro +- Fix run-one-test so that it runs elf tests +- nptl: Fix niggles with pthread_clockjoin_np +- hppa: Align __clone stack argument to 8 bytes (Bug 25066) +- y2038: linux: Provide __futimens64 implementation +- y2038: linux: Provide __utimensat64 implementation +- nptl: Add pthread_timedjoin_np, pthread_clockjoin_np NULL timeout test +- nptl: Add pthread_clockjoin_np +- manual: Add documentation for pthread_tryjoin_np and pthread_timedjoin_np +- nptl: Convert tst-join3 to use libsupport +- Sync time/mktime.c with gnulib +- Sync timespec-{add,sub} with gnulib +- Sync intprops.h with gnulib +- Refactor adjtimex based on clock_adjtime +- Refactor PI mutexes internal definitions +- Remove pause and nanosleep not cancel wrappers +- nptl: Replace non cancellable pause/nanosleep with futex +- Consolidate lowlevellock-futex.h +- Consolidate futex-internal.h +- Base max_fast on alignment, not width, of bins (Bug 24903) +- Revise the documentation of simple calendar time. +- Make second argument of gettimeofday as 'void *' +- Use clock_gettime to implement gettimeofday. +- Use clock_gettime to implement timespec_get. +- Consolidate and deprecate ftime +- Change most internal uses of time to __clock_gettime. +- Use clock_gettime to implement time. +- Use clock_settime to implement settimeofday. +- Use clock_settime to implement stime; withdraw stime. +- Change most internal uses of __gettimeofday to __clock_gettime. +- Linux/Alpha: don't use timeval32 system calls. +- resolv/tst-idna_name_classify: Isolate from system libraries +- hurd: Support for file record locking +- Comment out initgroups from example nsswitch.conf (Bug 25146) + +* Mon Oct 28 2019 DJ Delorie - 2.30.9000-16 +- Auto-sync with upstream branch master, + commit 177a3d48a1c74d7b2cd6bfd48901519d25a5ecad. +- y2038: linux: Provide __clock_getres64 implementation +- time: Introduce function to check correctness of nanoseconds value +- Add Transliterations for Unicode Misc. Mathematical Symbols-A/B [BZ #23132] +- Install charmaps uncompressed in testroot +- Add wait-for-debugger test harness hooks +- Define __STATFS_MATCHES_STATFS64 +- hurd: Fix build after __pread64 usage in the dynamic loader +- sysdeps/stat: Handle 64-bit ino_t types on 32-bit hosts +- S390: Remove not needed stack frame in syscall function. + +* Fri Oct 25 2019 DJ Delorie - 2.30.9000-15 +- Add *.mo files to all-langpacks (#1624528) + +* Thu Oct 24 2019 DJ Delorie - 2.30.9000-14 +- Add Requires on basesystem for main package (#1757267) +- Add Requires on coreutils for glibc-headers (uses rm) + +* Wed Oct 23 2019 Arjun Shankar - 2.30.9000-13 +- Auto-sync with upstream branch master, + commit 7db1fe38de21831d53ceab9ae83493d8d1aec601: +- Include explicitly in Linux clock_settime.c +- Remove math-finite.h +- Remove finite-math tests +- Remove x64 _finite tests and references +- Fix testroot.pristine creation copying dynamic linker + +* Fri Oct 18 2019 Patsy Franklin - 2.30.9000-12 +- Auto-sync with upstream branch master, + commit ef21bd2d8c6805c0c186a01f7c5039189f51b8c4. +- loadarchive: guard against locale-archive corruption (Bug #25115) +- Undo accidental commit to ChangeLog.19. +- nptl: Document AS-safe functions in cancellation.c. +- elf: Use nocancel pread64() instead of lseek()+read() +- Add nocancel version of pread64() +- Add run-one-test convenience target and makefile help text +- Update sysvipc kernel-features.h files for Linux 5.1 +- S390: Add new s390 platform z15. +- nptl: SIGCANCEL, SIGTIMER, SIGSETXID are always defined +- nptl/tst-cancel25 needs to be an internal test +- Remove libc_hidden_def from __semtimedop stub +- sysvipc: Implement semop based on semtimedop +- ipc: Refactor sysvipc internal definitions +- Rename and split elf/tst-dlopen-aout collection of tests +- dlfcn: Remove remnants of caller sensitivity from dlinfo +- ldconfig: handle .dynstr located in separate segment (bug 25087) +- ldd: Print "not a dynamic executable" on standard error [BZ #24150] +- Add PTRACE_GET_SYSCALL_INFO from Linux 5.3 to sys/ptrace.h. +- Move ChangeLog to ChangeLog.old/ChangeLog.19 +- manual: Remove warning in the documentation of the abort function +- sysvipc: Set ipc_perm mode as mode_t (BZ#18231) +- Simplify note processing +- syscall-names.list: fix typos in comment +- y2038: linux: Provide __clock_settime64 implementation +- posix: Use posix_spawn for wordexp +- mips: Do not malloc on getdents64 fallback +- sparc: Assume GOTDATA support in the toolchain +- : Remove wrong comment about getdents64 declaration +- ChangeLog: Remove leading spaces before tabs and trailing whitespace +- Make tst-strftime2 and tst-strftime3 depend on locale generation +- posix/tst-wordexp-nocmd: Fix diagnostics output in test +- wordexp: Split out command execution tests from posix/wordexp-test + +* Tue Oct 08 2019 Arjun Shankar - 2.30.9000-11 +- Adjust glibc-rh741105.patch. +- Auto-sync with upstream branch master, + commit ca602c1536ce2777f95c07525f3c42d78812e665: +- Add TCP_TX_DELAY from Linux 5.3 to netinet/tcp.h +- [powerpc] fenv_private.h clean up +- [powerpc] libc_feupdateenv_test: optimize FPSCR access +- [powerpc] __fesetround_inline optimizations +- [powerpc] Rename fegetenv_status to fegetenv_control +- [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write +- [powerpc] Rename fesetenv_mode to fesetenv_control +- Add helper script for glibc debugging +- Update bits/mman.h constants and tst-mman-consts.py for Linux 5.3. +- y2038: Provide conversion helpers for struct __timespec64 +- Use binutils 2.33 branch in build-many-glibcs.py. +- Sync "language", "lang_name", "territory", "country_name" with CLDR/langtable +- Split up endian.h to minimize exposure of BYTE_ORDER. +- time: Add padding for the timespec if required +- Enable passing arguments to the inferior in debugglibc.sh +- [powerpc] No need to enter "Ignore Exceptions Mode" +- Y2038: Include proper header to provide support for struct timeval on HURD +- Disable warnings in string/tester.c at top level. +- string/endian.h: Restore the __USE_MISC conditionals +- Disable -Wmaybe-uninitialized for total_deadline in sunrpc/clnt_udp.c. +- ChangeLog update from my last commit +- nptl: Move pthread_attr_setinheritsched implementation into libc. +- elf: Never use the file ID of the main executable [BZ #24900] +- elf: Assign TLS modid later during dlopen [BZ #24930] +- nptl: Move pthread_attr_getschedparam implementation into libc +- riscv: Remove support for variable page sizes +- nptl: Move pthread_attr_setschedparam implementation into libc + +* Fri Sep 27 2019 Zbigniew JÄ™drzejewski-Szmek - 2.30.9000-10 +- Use full locale names in langpack descriptions (#1651375) + +* Thu Sep 26 2019 Patsy Franklin - 2.30.9000-9 +- Auto-sync with upstream branch master, + commit 464cd3a9d5f505d92bae9a941bb75b0d91ac14ee. +- y2038: Introduce struct __timespec64 - new internal glibc type +- auto-changelog: Remove latin1 from codecs +- Set the expects flags to clock_nanosleep +- Fix tst-sigcontext-get_pc rule name from a43565ac447b1 +- inet/net-internal.h: Fix uninitalised clntudp_call() variable +- Fix vDSO initialization on arm and mips +- Script to generate ChangeLog-like output from git log +- [powerpc] SET_RESTORE_ROUND optimizations and bug fix +- Fix building support_ptrace.c on i686-gnu. +- S390: Use _HP_TIMING_S390_H instead of _HP_TIMING_H. +- Update syscall-names.list for Linux 5.3. +- Use Linux 5.3 in build-many-glibcs.py. +- S390: Add support for HP_TIMING_NOW. +- Fix RISC-V vfork build with Linux 5.3 kernel headers. +- Add UNSUPPORTED check in elf/tst-pldd. +- sparc64: Use linux generic time implementation +- mips: Consolidate INTERNAL_VSYSCALL_CALL +- powerpc: Simplify vsyscall internal macros +- Refactor vDSO initialization code +- Remove PREPARE_VERSION and PREPARE_VERSION_KNOW +- Fix small error in HP_TIMING_PRINT trailing null char setting + +* Mon Sep 16 2019 Parag Nemade - 2.30.9000-8 +- Change Supplements "langpacks-" to "langpacks-core-" (#1729992) + +* Mon Sep 16 2019 DJ Delorie - 2.30.9000-7 +- Auto-sync with upstream branch master, + commit 1a6566094d3097f4a3037ab5555cddc6cb11c3a3. +- alpha: force old OSF1 syscalls for getegid, geteuid and getppid [BZ #24986] +- Fix http: URL in 'configure' +- Regenerate charmap-kw.h, locfile-kw.h +- Fix three GNU license URLs, along with trailing-newline issues. +- Prefer https to http for gnu.org and fsf.org URLs + +* Fri Sep 06 2019 Patsy Franklin - 2.30.9000-6 +- Auto-sync with upstream branch master, + commit 1b7f04070bd94f259e2ed24d6fb76309d64fb164. +- locale: Avoid zero-length array in _nl_category_names [BZ #24962] +- math: Replace const attribute with pure in totalorder* functions +- y2038: Introduce the __ASSUME_TIME64_SYSCALLS define +- Finish move of clock_* functions to libc. [BZ #24959] +- Update Alpha libm-test-ulps +- localedef: Use initializer for flexible array member [BZ #24950] +- Add misc/tst-mntent-autofs, testing autofs "ignore" filtering +- Use autofs "ignore" mount hint in getmntent_r/getmntent +- hurd: Fix build +- Use generic memset/memcpy/memmove in benchtests +- nptl: Move pthread_attr_getinheritsched implementation into libc +- hurd: Fix SS_ONSTACK support +- hurd: Remove optimizing anonymous maps as __vm_allocate. +- hurd: Fix poll and select POSIX compliancy details about errors +- hurd: Fix timeout handling in _hurd_select +- hurd getcwd: Allow unknown root directory +- hurd: Fix implementation of setitimer. +- hurd: Fix _hurd_select for single fd sets +- MIPS support for GNU hash +- sh: Split BE/LE abilist +- microblaze: Split BE/LE abilist +- arm: Split BE/LE abilist +- Correct the spelling of more contributors +- Fix posix/tst-regex by using UTF-8 and own test input +- [powerpc] fegetenv_status: simplify instruction generation +- [powerpc] fesetenv: optimize FPSCR access +- [powerpc] SET_RESTORE_ROUND improvements +- [powerpc] fe{en,dis}ableexcept, fesetmode: optimize FPSCR accesses +- [powerpc] fe{en,dis}ableexcept optimize bit translations +- misc: Use allocate_once in getmntent +- nptl: Move pthread_attr_setdetachstate implementation into libc +- login: pututxline could fail to overwrite existing entries [BZ #24902] +- Fix posix/tst-regex by using a dedicated input-file. + +* Tue Aug 27 2019 DJ Delorie - 2.30.9000-5 +- Move makedb from glibc-common to nss_db (#1704334) + +* Mon Aug 26 2019 DJ Delorie - 2.30.9000-4 +- Auto-sync with upstream branch master, + commit 1bced8cadc82077f0201801239e89eb24b68e9aa. +- Don't put non-ASCII into installed headers +- Fix spellings of contributor names in comments and doc +- [MIPS] Raise highest supported EI_ABIVERSION value [SWBZ #24916] +- mips: Force RWX stack for hard-float builds that can run on pre-4.8 kernels +- linux: Make profil_counter a compat_symbol (SWBZ#17726) +- Refactor sigcontextinfo.h +- Add RTLD_SINGLE_THREAD_P on generic single-thread.h +- Chinese locales: Set first_weekday to 2 (swbug 24682). +- powerpc: Fix typos and field name in comments +- Mark IDN tests unsupported with libidn2 before 2.0.5. +- Document strftime %Ob and %OB as C2X features. +- Remove dead regex code +- Fix bad pointer / leak in regex code +- Don't use the argument to time. +- Add tgmath.h macros for narrowing functions. +- Update i386 libm-test-ulps + +* Mon Aug 19 2019 Carlos O'Donell - 2.30.9000-3 +- Drop glibc-fedora-nscd-warnings.patch; applied upstream. +- Drop Source7: nsswitch.conf; applying patch to upstream. +- Add glibc-fedora-nsswitch.patch for Fedora customizations. +- Auto-sync with upstream branch master, + commit d34d4c80226b3f5a1b51a8e5b005a52fba07d7ba: +- Do not print backtraces on fatal glibc errors. +- elf: Self-dlopen failure with explict loader invocation (swbz#24900) +- login: Add nonstring attributes to struct utmp, struct utmpx (swbz#24899) +- login: Use struct flock64 in utmp (swbz#24880) +- login: Disarm timer after utmp lock acquisition (swbz#24879) + +* Fri Aug 16 2019 Carlos O'Donell - 2.30.9000-2 +- Fix C.UTF-8 to use full code ranges. + +* Thu Aug 15 2019 Florian Weimer - 2.30.9000-1 +- Auto-sync with upstream branch master, + commit 341da5b4b6253de9a7581a066f33f89cacb44dec. + +* Fri Aug 02 2019 Florian Weimer - 2.30-1 +- Drop glibc-rh1734680.patch, applied upstream. +- Auto-sync with upstream branch release/2.30/master, + commit be9a328c93834648e0bec106a1f86357d1a8c7e1: +- malloc: Remove unwanted leading whitespace in malloc_info (swbz#24867) +- glibc 2.30 release +- iconv: Revert steps array reference counting changes (#1734680) +- Restore r31 setting in powerpc32 swapcontext + +* Wed Jul 31 2019 Florian Weimer - 2.29.9000-37 +- Fix memory leak in iconv_open (#1734680) + +* Tue Jul 30 2019 Florian Weimer - 2.29.9000-36 +- Drop glibc-rh1732406.patch, fix for the regression applied upstream. +- Auto-sync with upstream branch master, + commit 8a814e20d443adc460a1030fa1a66aa9ae817483: +- nptl: Use uintptr_t for address diagnostic in nptl/tst-pthread-getattr +- Linux: Move getdents64 to +- test-container: Install with $(sorted-subdirs) (swbz#24794) +- gconv: Check reference count in __gconv_release_cache (#1732406) +- x86-64: Compile branred.c with -mprefer-vector-width=128 (swbz#24603) +- build-many-glibcs.py: Use Linux 5.2 by default +- Linux: Use in-tree copy of SO_ constants for !__USE_MISC (swbz#24532) +- test-container: Avoid copying unintended system libraries + +* Thu Jul 25 2019 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Jul 23 2019 Florian Weimer - 2.29.9000-34 +- Revert libio change that causes crashes (#1732406) + +* Mon Jul 22 2019 DJ Delorie - 2.29.9000-33 +- Auto-sync with upstream branch master, + commit dcf36bcad3f283f77893d3b157ef7bb2c99419f2. +- Add NEWS entry about the new AArch64 IFUNC resolver call ABI +- locale/C-translit.h.in: Cyrillic -> ASCII transliteration [BZ #2872] +- Linux: Update syscall-names.list to Linux 5.2 + +* Thu Jul 18 2019 DJ Delorie - 2.29.9000-32 +- Auto-sync with upstream branch master, + commit 3556658c5b8765480711b265abc901c67d5fc060. +- Regenerate po/libc.pot for 2.30 release. +- nptl: Add POSIX-proposed _clock functions to hppa pthread.h +- nptl: Remove unnecessary forwarding of pthread_cond_clockwait from libc +- Afar locales: Months and days updated from CLDR (bug 21897). +- nl_BE locale: Use "copy "nl_NL"" in LC_NAME (bug 23996). +- nl_BE and nl_NL locales: Dutch salutations (bug 23996). +- ga_IE and en_IE locales: Revert first_weekday removal (bug 24200). +- nptl: Remove futex_supports_exact_relative_timeouts +- Update NEWS for new _clockwait and _clocklock functions +- nptl: Add POSIX-proposed pthread_mutex_clocklock +- nptl: Rename lll_timedlock to lll_clocklock and add clockid parameter +- nptl: Add POSIX-proposed pthread_rwlock_clockrdlock & pthread_rwlock_clockwrlock +- nptl: pthread_rwlock: Move timeout validation into _full functions +- nptl: Add POSIX-proposed pthread_cond_clockwait +- nptl: Add POSIX-proposed sem_clockwait +- nptl: Add clockid parameter to futex timed wait calls +- posix: Fix large mmap64 offset for mips64n32 (BZ#24699) +- nss_db: fix endent wrt NULL mappings [BZ #24695] [BZ #24696] + +* Wed Jul 10 2019 Carlos O'Donell - 2.29.9000-31 +- Auto-sync with upstream branch master, + commit 30ba0375464f34e4bf8129f3d3dc14d0c09add17. +- Don't declare __malloc_check_init in (bug 23352) +- nftw: fill in stat buf for dangling links [BZ #23501] +- dl-vdso: Add LINUX_4 HASH CODE to support nds32 vdso mechanism +- riscv: restore ABI compatibility (bug 24484) +- aarch64: new ifunc resolver ABI +- nptl: Remove vfork IFUNC-based forwarder from libpthread [BZ #20188] +- malloc: Add nptl, htl dependency for the subdirectory [BZ #24757] +- Call _dl_open_check after relocation [BZ #24259] +- Linux: Use mmap instead of malloc in dirent/tst-getdents64 +- ld.so: Support moving versioned symbols between sonames [BZ #24741] +- io: Remove copy_file_range emulation [BZ #24744] +- Linux: Adjust gedents64 buffer size to int range [BZ #24740] +- powerpc: Use generic e_expf +- Linux: Add nds32 specific syscalls to syscall-names.list +- szl_PL locale: Fix a typo in the previous commit (bug 24652). + +* Mon Jun 24 2019 DJ Delorie - 2.29.9000-30 +- Auto-sync with upstream branch master, + commit 2bd81b60d6ffdf7e0d22006d69f4b812b1c80513. +- szl_PL locale: Spelling corrections (swbz 24652). +- nl_{AW,NL}: Correct the thousands separator and grouping (swbz 23831). +- Add missing VDSO_{NAME,HASH}_* macros and use them for PREPARE_VERSION_KNOWN +- nptl: Convert various tests to use libsupport +- support: Invent verbose_printf macro +- support: Add xclock_now helper function. + +* Fri Jun 21 2019 Florian Weimer - 2.29.9000-29 +- Auto-sync with upstream branch master, + commit 21cc130b78a4db9113fb6695e2b951e697662440: +- During exit, skip wide buffer handling for legacy stdio handles (#1722216) +- powerpc: add 'volatile' to asm +- powerpc: Fix static-linked version of __ppc_get_timebase_freq (swbz#24640) +- nl_AW locale: Correct the negative monetary format (swb#z24614) +- Fix gcc 9 build errors for make xcheck. (swbz#24556) +- dlfcn: Avoid one-element flexible array in Dl_serinfo (swbz#24166) +- elf: Refuse to dlopen PIE objects (swbz#24323) +- nl_NL locale: Correct the negative monetary format (swbz#24614) +- powerpc: Refactor powerpc64 lround/lroundf/llround/llroundf +- powerpc: refactor powerpc64 lrint/lrintf/llrint/llrintf + +* Mon Jun 17 2019 Florian Weimer - 2.29.9000-28 +- Auto-sync with upstream branch master, + commit 48c3c1238925410b4e777dc94e2fde4cc9132d44. +- Linux: Fix __glibc_has_include use for and statx (#1721129) +- : Inhibit macro expansion for __glibc_has_include +- Add IPV6_ROUTER_ALERT_ISOLATE from Linux 5.1 to bits/in.h +- aarch64: handle STO_AARCH64_VARIANT_PCS +- aarch64: add STO_AARCH64_VARIANT_PCS and DT_AARCH64_VARIANT_PCS +- powerpc: Remove optimized finite +- math: Use wordsize-64 version for finite +- powerpc: Remove optimized isinf +- math: Use wordsize-64 version for isinf +- powerpc: Remove optimized isnan +- math: Use wordsize-64 version for isnan +- benchtests: Add isnan/isinf/isfinite benchmark +- powerpc: copysign cleanup +- powerpc: consolidate rint +- libio: freopen of default streams crashes in old programs (swbz#24632) +- Linux: Deprecate and sysctl +- : Use Linux UAPI header for statx if available and useful + (#1721129) +- : Add __glibc_has_include macro +- Improve performance of memmem +- Improve performance of strstr +- Benchmark strstr hard needles +- Fix malloc tests build with GCC 10 + +* Mon Jun 10 2019 Patsy Franklin - 2.29.9000-27 +- Auto-sync with upstream branch master, + commit 51ea67d54882318c4fa5394c386f4816ddc22408. +- powerpc: get_rounding_mode: utilize faster method to get rounding mode +- riscv: Do not use __has_include__ +- powerpc: fegetexcept: utilize function instead of duplicating code +- iconv: Use __twalk_r in __gconv_release_shlib +- Fix iconv buffer handling with IGNORE error handler (swbz#18830) + +* Wed Jun 5 2019 Florian Weimer - 2.29.9000-26 +- Restore /usr/lib/locale/locale-archive under its original name (#1716710) + +* Tue Jun 4 2019 Florian Weimer - 2.29.9000-25 +- Add glibc version to locale-archive name (#1716710) + +* Mon Jun 03 2019 Carlos O'Donell - 2.29.9000-24 +- Auto-sync with upstream branch master, + commit dc91a19e6f71e1523f4ac179191a29b2131d74bb: +- Linux: Add oddly-named arm syscalls to syscall-names.list. +- arm: Remove ioperm/iopl/inb/inw/inl/outb/outw/outl support. +- Add INADDR_ALLSNOOPERS_GROUP from Linux 5.1 to netinet/in.h. + +* Sat Jun 01 2019 Carlos O'Donell - 2.29.9000-23 +- Convert glibc_post_upgrade to lua. + +* Sat Jun 01 2019 Florian Weimer - 2.29.9000-22 +- Remove support for filtering glibc-all-langpacks (#1715891) +- Auto-sync with upstream branch master, + commit 9250e6610fdb0f3a6f238d2813e319a41fb7a810: +- powerpc: Fix build failures with current GCC +- Remove unused get_clockfreq files +- powerpc: generic nearbyint/nearbyintf +- tt_RU: Add lang_name (swbz#24370) +- tt_RU: Fix orthographic mistakes in mon and abmon sections (swbz#24369) +- Add IGMP_MRDISC_ADV from Linux 5.1 to netinet/igmp.h. + +* Mon May 27 2019 Arjun Shankar - 2.29.9000-21 +- Auto-sync with upstream branch master, + commit 85188d8211698d1a255f0aec6529546db5c56de3: +- Remove support for PowerPC SPE extension +- elf: Add tst-ldconfig-bad-aux-cache test +- Add F_SEAL_FUTURE_WRITE from Linux 5.1 to bits/fcntl-linux.h +- nss_dns: Check for proper A/AAAA address alignment + +* Tue May 21 2019 DJ Delorie - 2.29.9000-20 +- Auto-sync with upstream branch master, + commit 46ae07324b1cd50fbf8f37a076d6babcfca7c510. +- Improve string benchtest timing +- sysvipc: Add missing bit of semtimedop s390 consolidation +- wcsmbs: Fix data race in __wcsmbs_clone_conv [swbz #24584] +- libio: Fix gconv-related memory leak [swbz #24583] +- libio: Remove codecvt vtable [swbz #24588] +- support: Expose sbindir as support_sbindir_prefix +- support: Add missing EOL terminators on timespec +- support: Correct confusing comment +- sysvipc: Consolidate semtimedop s390 +- sysvipc: Fix compat msgctl (swbz#24570) +- Add NT_ARM_PACA_KEYS and NT_ARM_PACG_KEYS from Linux 5.1 to elf.h. +- Small tcache improvements +- manual: Document O_DIRECTORY +- Update kernel-features.h files for Linux 5.1. +- nss_nis, nss_nisplus: Remove RES_USE_INET6 handling +- nss_files: Remove RES_USE_INET6 from hosts processing +- support: Report NULL blobs explicitly in TEST_COMPARE +- dlfcn: Guard __dlerror_main_freeres with __libc_once_get (once) [swbz# 24476] +- Add missing Changelog entry + +* Wed May 15 2019 Florian Weimer - 2.29.9000-19 +- Auto-sync with upstream branch master, + commit 32ff397533715988c19cbf3675dcbd727ec13e18: +- Fix crash in _IO_wfile_sync (#1710460) +- nss: Turn __nss_database_lookup into a compatibility symbol +- support: Add support_install_rootsbindir +- iconv: Remove public declaration of __gconv_transliterate +- Linux: Add the tgkill function +- manual: Adjust twalk_r documentation. +- elf: Fix tst-pldd for non-default --prefix and/or --bindir (swbz#24544) +- support: Export bindir path on support_path +- configure: Make --bindir effective +- x86: Remove arch-specific low level lock implementation +- nptl: Assume LLL_LOCK_INITIALIZER is 0 +- nptl: Small optimization for lowlevellock +- Add single-thread.h header +- locale: Update to Unicode 12.1.0 (swbz#24535) +- malloc: Fix tcache count maximum (swbz#24531) +- sem_close: Use __twalk_r +- support: Fix timespec printf +- nptl/tst-abstime: Use libsupport +- nptl: Convert some rwlock tests to use libsupport +- nptl: Use recent additions to libsupport in tst-sem5 +- nptl: Convert tst-cond11.c to use libsupport +- support: Add timespec.h +- Move nptl/tst-eintr1 to xtests (swbz#24537) +- powerpc: trunc/truncf refactor +- powerpc: round/roundf refactor +- powerpc: floor/floorf refactor +- support: Add xclock_gettime +- malloc/tst-mallocfork2: Use process-shared barriers +- Update syscall-names.list for Linux 5.1 +- Use GCC 9 in build-many-glibcs.py +- aarch64: thunderx2 memmove performance improvements +- misc/tst-tsearch: Additional explicit error checking +- elf: Fix elf/tst-pldd with --enable-hardcoded-path-in-tests (swbz#24506) +- misc: Add twalk_r function + +* Thu May 02 2019 Arjun Shankar - 2.29.9000-18 +- Auto-sync with upstream branch master, + commit 20aa5819586ac7ad11f711bab64feda307965191: +- semaphore.h: Add nonnull attributes +- powerpc: Remove power4 mpa optimization +- powerpc: Refactor ceil/ceilf +- Fix -O1 compilation errors with `__ddivl' and `__fdivl' [BZ #19444] +- Make mktime etc. compatible with __time64_t + +* Fri Apr 26 2019 Florian Weimer - 2.29.9000-17 +- Auto-sync with upstream branch master, + commit c57afec0a9b318bb691e0f5fa4e9681cf30df7a4: +- Increase BIND_NOW coverage (#1702671) +- Fix pldd hang (#1361689) +- riscv: remove DL_RO_DYN_SECTION (swbz#24484) +- locale: Add LOCPATH diagnostics to the locale program +- Reduce benchtests time + +* Mon Apr 22 2019 DJ Delorie - 2.29.9000-16 +- Auto-sync with upstream branch master, + commit 25f7a3c96116a9102df8bf7b04ef160faa32416d. +- malloc: make malloc fail with requests larger than PTRDIFF_MAX (BZ#23741) +- powerpc: Fix format issue from 3a16dd780eeba602 +- powerpc: fma using builtins +- powerpc: Use generic fabs{f} implementations +- mips: Remove rt_sigreturn usage on context function +- powerpc: Remove rt_sigreturn usage on context function +- support: Add support_capture_subprogram +- stdlib/tst-secure-getenv: handle >64 groups + +* Mon Apr 15 2019 Florian Weimer - 2.29.9000-15 +- Auto-sync with upstream branch master, + commit e3f454bac0f968216699ca405c127c858f0657c7: +- nss_dns: Do not replace root domain with empty string +- alloc_buffer: Return unqualified pointer type in alloc_buffer_next +- malloc: Set and reset all hooks for tracing (swbz#16573) + +* Thu Apr 11 2019 Florian Weimer - 2.29.9000-14 +- Run valgrind smoke test against the install tree + +* Thu Apr 11 2019 Florian Weimer - 2.29.9000-13 +- Do not use --g-libs with find-debuginfo.sh; it breaks valgrind (#1698824) + +* Wed Apr 10 2019 Florian Weimer - 2.29.9000-12 +- Strip debugging information from installed programs again (#1661510) + +* Tue Apr 09 2019 Carlos O'Donell - 2.29.9000-11 +- Drop glibc-warning-fix.patch. Microbenchmark code fixed upstream. +- Auto-sync with upstream branch master, + commit 648279f4af423c4783ec1dfa63cb7b46a7640217: +- powerpc: Use generic wcscpy optimization +- powerpc: Use generic wcschr optimization +- powerpc: Use generic wcsrchr optimization +- aarch64: thunderx2 memcpy implementation cleanup and streamlining +- resolv: Remove support for RES_USE_INET6 and the inet6 option +- resolv: Remove RES_INSECURE1, RES_INSECURE2 + +* Thu Apr 04 2019 Arjun Shankar - 2.29.9000-10 +- Auto-sync with upstream branch master, + commit 8260f23616c1a2a4e609f989a195fba7690a42ca: +- Fix strptime era handling, add more strftime tests [BZ #24394] +- time/tst-strftime2.c: Make the file easier to maintain +- time: Add tests for Minguo calendar [BZ #24293] +- ja_JP locale: Add entry for the new Japanese era [BZ #22964] +- Add Reiwa era tests to time/tst-strftime3.c + +* Mon Apr 01 2019 Arjun Shankar - 2.29.9000-9 +- Auto-sync with upstream branch master, + commit 993e3107af67edefcfc79a62ae55f7b98aa5151e: +- Add AArch64 HWCAPs from Linux 5.0 +- tt_RU: Fix orthographic mistakes in day and abday sections [BZ #24296] +- iconv, localedef: avoid floating point rounding differences [BZ #24372] +- Fix parentheses error in iconvconfig.c and ld-collate.c [BZ #24372] +- S390: New configure check and hwcap values for new CPU architecture arch13 +- S390: Add memmove, strstr, and memmem ifunc variants for arch13 +- nptl: Remove pthread_clock_gettime pthread_clock_settime +- linux: Assume clock_getres CLOCK_{PROCESS,THREAD}_CPUTIME_ID +- Remove __get_clockfreq +- Do not use HP_TIMING_NOW for random bits +- hp-timing: Refactor rtld usage, add generic support +- Add NT_ARM_PAC_MASK and NT_MIPS_MSA from Linux 5.0 to elf.h +- Add UDP_GRO from Linux 5.0 to netinet/udp.h +- nptl: Convert tst-sem5 & tst-sem13 to use libsupport +- nptl/tst-rwlock14: Test pthread_rwlock_timedwrlock correctly +- nss/tst-nss-files-alias-leak: add missing opening quote in printf +- math: Enable some math builtins for clang +- powerpc: Use __builtin_{mffs,mtfsf} +- RISC-V: Fix `test' operand error with soft-float ABI being configured + +* Wed Mar 20 2019 Carlos O'Donell - 2.29.9000-8 +- Add warnings and notes to /etc/nsswitch.conf and /etc/nscd.conf. + +* Mon Mar 18 2019 DJ Delorie - 2.29.9000-7 +- Auto-sync with upstream branch master, + commit 78919d3886c9543279ec755a701e279c62b44164. + +* Thu Mar 14 2019 Florian Weimer - 2.29.9000-6 +- Drop glibc-fedora-streams-rh436349.patch. STREAMS was removed upstream. +- Auto-sync with upstream branch master, + commit a0a0dc83173ce11ff45105fd32e5d14356cdfb9c: +- Remove obsolete, never-implemented XSI STREAMS declarations +- nss: Fix tst-nss-files-alias-truncated for default --as-needed linking +- scripts/check-obsolete-constructs.py: Process all headers as UTF-8. +- Use Linux 5.0 in build-many-glibcs.py. +- hurd: Add no-op version of __res_enable_icmp [BZ #24047] +- Move inttypes.h and stdint.h to stdlib. +- Use a proper C tokenizer to implement the obsolete typedefs test. +- Fix output of LD_SHOW_AUXV=1. + +* Wed Mar 13 2019 Florian Weimer - 2.29.9000-5 +- Drop glibc-rh1670028.patch, applied upstream +- Auto-sync with upstream branch master, + commit 38b52865d4ccfee3647f27e969e539a4396a73b1: +- elf: Add DF_1_KMOD, DF_1_WEAKFILTER, DF_1_NOCOMMON to +- resolv: Enable full ICMP errors for UDP DNS sockets [BZ #24047] +- C-SKY: add elf header definition for elfutils +- C-SKY: mark lr as undefined to stop unwinding +- C-SKY: remove user_regs definition +- C-SKY: fix sigcontext miss match +- Bug 24307: Update to Unicode 12.0.0 +- Break lines before not after operators, batch 4. +- check-wrapper-headers test: Adjust Fortran include file directory +- Fix location where math-vector-fortran.h is installed. + +* Wed Mar 06 2019 DJ Delorie - 2.29.9000-4 +- Auto-sync with upstream branch master, + commit 0ddb7ea842abf63516b74d4b057c052afc6ba863. +- nptl: Assume __ASSUME_FUTEX_CLOCK_REALTIME support +- powerpc: Fix build of wcscpy with --disable-multi-arch +- elf: Remove remnants of MAP_ANON emulation +- S390: Increase function alignment to 16 bytes. +- ja_JP: Change the offset for Taisho gan-nen from 2 to 1 [BZ #24162] +- ldbl-opt: Reuse test cases from misc/ that check long double +- ldbl-opt: Add error and error_at_line (bug 23984) +- ldbl-opt: Add err, errx, verr, verrx, warn, warnx, vwarn, and vwarnx (bug 23984) +- ldbl-opt: Reuse argp tests that print long double +- ldbl-opt: Add argp_error and argp_failure (bug 23983) +- elf/tst-big-note: Improve accuracy of test [BZ #20419] +- S390: Fix introduction of __wcscpy and weak wcscpy symbols. +- __netlink_assert_response: Add more __libc_fatal newlines [BZ #20271] +- Add more spaces before '('. +- elf: Add tests with a local IFUNC resolver [BZ #23937] +- elf/Makefile: Run IFUNC tests if binutils supports IFUNC +- powerpc: Fix linknamespace introduced by 4d8015639a75 +- hurd: Add renameat2 support for RENAME_NOREPLACE +- Fix -Wempty-body warnings in Hurd-specific code. +- Add some spaces before '('. +- wcsmbs: optimize wcsnlen +- wcsmbs: optimize wcsncpy +- wcsmbs: optimize wcsncat +- wcsmbs: optimize wcscpy +- wcsmbs: optimize wcscat +- wcsmbs: optimize wcpncpy +- wcsmbs: optimize wcpcpy +- Break further lines before not after operators. +- Add and move fall-through comments in system-specific code. + +* Fri Mar 1 2019 DJ Delorie - 2.29.9000-3 +- Add .gdb_index to debug information (rhbz#1680765) + +* Wed Feb 27 2019 Carlos O'Donell - 2.29.9000-2 +- Fix build failure related to microbenchmarks. + +* Tue Feb 26 2019 Carlos O'Donell - 2.29.9000-1 +- Auto-sync with upstream branch master, + commit e0cb7b6131ee5f2dca2938069b8b9590304e6f6b: +- nss_files: Fix /etc/aliases null pointer dereference (swbz#24059) +- regex: fix read overrun (swbz#24114) +- libio: use stdout in puts and putchar, etc (swbz#24051) +- aarch64: Add AmpereComputing emag to tunable cpu list +- aarch64: Optimized memset specific to AmpereComputing emag +- aarch64: Optimized memchr specific to AmpereComputing emag +- Require GCC 6.2 or later to build glibc +- manual: Document lack of conformance of sched_* functions (swbz#14829) +- libio: Use stdin consistently for input functions (swbz#24153) +- x86-64 memcmp: Use unsigned Jcc instructions on size (swbz#24155) +- Fix handling of collating elements in fnmatch (swbz#17396,swbz#16976) +- arm: Use "nr" constraint for Systemtap probes (swbz#24164) +- Fix alignment of TLS variables for tls variant TLS_TCB_AT_TP (swbz#23403) +- Add compiler barriers for pthread_mutex_trylock (swbz#24180) +- rt: Turn forwards from librt to libc into compat symbols (swbz#24194) +- Linux: Add gettid system call wrapper (swbz#6399) +- nptl: Avoid fork handler lock for async-signal-safe fork (swbz#24161) +- elf: Ignore LD_AUDIT interfaces if la_version returns 0 (swbz#24122) +- nptl: Reinstate pthread_timedjoin_np as a cancellation point (swbz#24215) +- nptl: Fix invalid Systemtap probe in pthread_join (swbz#24211) + +* Tue Feb 19 2019 Florian Weimer - 2.29-8 +- Drop glibc-rh1674280.patch. Different fix applied upstream. (#1674280) +- Auto-sync with upstream branch release/2.29/master, + commit 067fc32968b601493f4b247a3ac00caeea3f3d61: +- nptl: Fix invalid Systemtap probe in pthread_join (#1674280) + +* Mon Feb 11 2019 Florian Weimer - 2.29-7 +- Hotfix for invalid Systemtap probe in pthread_join (#1674280) + +* Mon Feb 11 2019 Florian Weimer - 2.29-6 +- Remove LRA bug on POWER workaround, fixed in gcc-9.0.1-0.4.fc30 (#1673018) + +* Mon Feb 11 2019 Florian Weimer - 2.29-5 +- Auto-sync with upstream branch release/2.29/master, + commit c096b008d2671028c21ac8cf01f18a2083e73c44: +- nptl: Avoid fork handler lock for async-signal-safe fork (swbz#24161) +- nptl: Add compiler barriers in pthread_mutex_trylock (swbz#24180) + +* Thu Feb 7 2019 Florian Weimer - 2.29-4 +- Work around LRA hang on ppc64le (#1673018) + +* Wed Feb 06 2019 Florian Weimer - 2.29-3 +- Auto-sync with upstream branch release/2.29/master, + commit 2de15ac95713a238dc258eb8977ecdfca811fc19: +- arm: Use "nr" constraint for Systemtap probes (#1196181) + +* Fri Feb 1 2019 Florian Weimer - 2.29-2 +- Eliminate %%glibcrelease macro. +- Switch to regular Release: pattern. + +* Thu Jan 31 2019 Carlos O'Donell - 2.29-1 +- Auto-sync with upstream branch release/2.29/master, + commit 86013ef5cea322b8f4b9c22f230c22cce369e947. +- nptl: Fix pthread_rwlock_try*lock stalls (swbz#23844) + +* Thu Jan 31 2019 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Jan 28 2019 DJ Delorie - 2.28.9000-37 +- Auto-sync with upstream branch master, + commit e1e47c912a8e557508362715f7468091def3ec4f. +- Update translations. +* Mon Jan 28 2019 Florian Weimer - 2.28.9000-36 +- resolv: Enable full ICMP error reporting in stub resolver (#1670028) + +* Mon Jan 28 2019 Florian Weimer - 2.28.9000-35 +- Remove obsolete scriptlets + +* Fri Jan 25 2019 Florian Weimer - 2.28.9000-34 +- Auto-sync with upstream branch master, + commit 83e6b59625f45db1eee93e5684091f740c52a083: +- elf: Revert LD_AUDIT fix for modules with invalid version (swbz#24122) +- strftime: Pass the additional flags from "%EY" to "%Ey" (swbz#24096) +- strftime: Set the default width of "%Ey" to 2 (swbz#23758) + +* Thu Jan 24 2019 Florian Weimer - 2.28.9000-33 +- Auto-sync with upstream branch master, + commit 3367acdb344a1d7fcf8f53748d301d652c8911dd: +- elf: Fix LD_AUDIT for modules with invalid version (swbz#24122) +- CVE-2016-10739: getaddrinfo: Fully parse IPv4 address strings (#1331390) +- resolv: Do not send queries for non-host-names in nss_dns (swbz#24112) +- malloc: Revert fastbins to old-style atomics + +* Wed Jan 23 2019 Florian Weimer - 2.28.9000-32 +- Use assembler to produce annobin notes for nonshared libraries (#1668822) + +* Wed Jan 16 2019 Carlos O'Donell - 2.28.9000-31 +- Auto-sync with upstream branch master, + commit 008b598e2a495024f9777006716cfd8668f3db33. +- x86-64: Optimize strcat/strncat, strcpy/strncpy and stpcpy/stpncpy with AVX2 +- powerpc: Fix VSCR position in ucontext (swbz#24088) +- AArch64: Add ifunc support for Ares +- soft-fp: Properly check _FP_W_TYPE_SIZE (swbz#24066) + +* Thu Jan 10 2019 Florian Weimer - 2.28.9000-30 +- Inherit -march=haswell flag from redhat-rpm-config + +* Mon Jan 07 2019 Arjun Shankar - 2.28.9000-29 +- Auto-sync with upstream branch master, + commit 2ef427168818ce04b03cecb7b739f9db0156e3e4. +- Require GCC 5 or later to build glibc (swbz#23993) +- Only build libm with -fno-math-errno (swbz#24024) +- sysdeps/ieee754: prevent maybe-uninitialized errors with -O (swbz#19444) +- Multiple locales: Use the correct 12-hour time formats (swbz#10496) +- sq_AL: Use the correct date and time formats (swbz#10496, swbz#23724) +- en_US: define date_fmt (swbz#24046) +- Remove executable bit from localedata/locales/bi_VU (swbz#23995) +- malloc: Always call memcpy in _int_realloc (swbz#24027) +- ARM: fix kernel assisted atomics with GCC 8 (swbz#24034) +- S390: Unify 31/64bit mem{set,cmp,cpy,pcpy}, bzero with ifunc handling +- S390: Refactor ifunc handling for several str* and wc* functions +- posix: Clear close-on-exec for posix_spawn adddup2 (swbz#23640) +- termios: Define TIOCSER_TEMT with __USE_MISC (swbz#17783) +- termios: Consolidate Baud Rate Selection definitions (swbz#23783) +- Y2038: add __{localtime64,gmttime64,ctime64}[_r] functions +- Y2038: make __difftime compatible with 64-bit time + +* Mon Dec 17 2018 DJ Delorie - 2.28.9000-28 +- Auto-sync with upstream branch master, + commit 6bbfc5c09fc5b5e3d4a0cddbbd4e2e457767dae7. +- Add statx conditionals for wordsize-32 *xstat.c +- regex: fix storage-exhaustion error (swbz#18040) +- regex: fix heap-use-after-free error (swbz#18040) +- manual: Document thread/task IDs for Linux + +* Thu Dec 13 2018 Carlos O'Donell - 2.28.9000-27 +- Auto-sync with upstream branch master, + commit ade8b817fead73b302d08c88cd44ea2ea56793d4. +- powerpc: missing CFI register information in __mpn_* functions (swbz#23614) +- rdlock stalls indefinitely on an unlocked pthread rwlock (swbz#23861) + +* Tue Dec 11 2018 Carlos O'Donell - 2.28.9000-26 +- Auto-sync with upstream branch master, + commit 505b5b292293a5d6bd4046a6bc7f8c2381a33da4. +- Fix powf overflow handling in non-nearest rounding mode (swbz#23961) +- test-container: move postclean outside of namespace changes (swbz#23948) +- Enable VDSO for static linking on mips (swbz#19767) + +* Mon Dec 10 2018 Florian Weimer - 2.28.9000-25 +- Auto-sync with upstream branch master, + commit 8d20a2f414fa52aceef8a0e3675415df54a840db: +- compat getdents64: Use correct offset for retry (swbz#23972) +- x86: Fix static analysis warning in tst-cet-property-2 (swbz#23490) +- malloc: Add another test for tcache double free check (swbz#23907) +- getcpu: New system call wrapper +- posix_spawn_file_actions_addfchdir_np: New function (swbz#17405) +- Preparations for the IBM long double transition +- Preparations for 64-bit time_t on 32-bit architectures +- Enable VDSO for static linking on arm (swbz#19767) + +* Mon Dec 03 2018 Florian Weimer - 2.28.9000-24 +- Auto-sync with upstream branch master, + commit 7b36d26b22d147ffc347f427f9fd584700578a94: +- CVE-2018-19591: if_nametoindex: Fix descriptor for overlong name (#1654000) +- Mutex: Add pthread mutex tunables +- stdlib: assert on NULL function pointer in atexit etc. (swbz#20544) +- Enable VDSO on i386 statically linked programs +- posix: Use posix_spawn on system +- posix: Use posix_spawn on popen (swbz#17490, swbz#22834) +- Fix _dl_profile_fixup data-dependency issue (swbz#23690) +- Enable VDSO for static linking on aarch64 + +* Thu Nov 29 2018 Carlos O'Donell - 2.28.9000-23 +- Move requirement on libgcc from glibc-devel to glibc (#1352973) + +* Tue Nov 27 2018 Carlos O'Donell - 2.28.9000-22 +- Add requires on explicit glibc version for glibc-nss-devel (#1651260) + +* Tue Nov 27 2018 Arjun Shankar - 2.28.9000-21 +- Drop glibc-rh1652495.patch. Applied upstream. (#1652495) +- Auto-sync with upstream branch master, + commit ce035c6e909ad20ef2fe13c92eab4e69f6495b61. + +* Mon Nov 26 2018 Florian Weimer - 2.28.9000-20 +- Do not use parallel make for building locales (#1652228) + +* Thu Nov 22 2018 Florian Weimer - 2.28.9000-19 +- malloc: Revert tcache double-free check (#1652495) + +* Tue Nov 20 2018 DJ Delorie - 2.28.9000-18 +- Auto-sync with upstream branch master, + commit bcdaad21d4635931d1bd3b54a7894276925d081d. +- malloc: tcache double free check +- [AArch64] Adjust writeback in non-zero memset +- Update config.guess and config.sub to current versions. +- support: Print timestamps in timeout handler +- Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl. + +* Fri Nov 16 2018 Florian Weimer - 2.28.9000-17 +- Auto-sync with upstream branch master, + commit 346ef23f197a0c8ba807c344bd39101b711050ee. + +* Fri Nov 09 2018 Florian Weimer - 2.28.9000-16 +- Auto-sync with upstream branch master, + commit 43257c335ad6b9e05fb882975e1776ff763164ee: +- Disable CET for binaries created by older link editors (#1648297) + +* Wed Nov 07 2018 Florian Weimer - 2.28.9000-15 +- Auto-sync with upstream branch master, + commit 00c86a37d1b63044e3169d1f2ebec23447c73f79. + +* Wed Nov 07 2018 Florian Weimer - 2.28.9000-14 +- Auto-sync with upstream branch master, + commit 1df872fd74f730bcae3df201a229195445d2e18a: +- libanl: Fix crash if first helper thread creation failed (#1646381) + +* Thu Nov 1 2018 Mike FABIAN - 2.28.9000-13 +- Include Esperanto (eo) in glibc-all-langpacks (#1643756) + +* Mon Oct 29 2018 DJ Delorie - 2.28.9000-12 +- Auto-sync with upstream branch master, + commit c6982f7efc1c70fe2d6160a87ee44d871ac85ab0. + +* Fri Oct 26 2018 Arjun Shankar - 2.28.9000-11 +- Auto-sync with upstream branch master, + commit fe61f17cfc18f17befca3280e828bb40e8c772b0. + +* Wed Oct 24 2018 Florian Weimer - 2.28.9000-10 +- Auto-sync with upstream branch master, + commit a27a4f4721837a5fb36ace833764b06a64c5af1c. + +* Thu Oct 18 2018 Florian Weimer - 2.28.9000-9 +- Auto-sync with upstream branch master, + commit 72771e53753647111d31c5c4bf43d8901e6baf7e. + +* Thu Sep 27 2018 Florian Weimer - 2.28.9000-8 +- Auto-sync with upstream branch master, + commit f841c97e515a1673485a2b12b3c280073d737890: +- stdlib/tst-setcontext9 test suite failure on ppc64le (#1623519) + +* Thu Sep 20 2018 Florian Weimer - 2.28.9000-7 +- Auto-sync with upstream branch master, + commit db9a8ad4ff3fc58e3773a9a4d0cabe3c1bc9c94c: +- gethostid: Missing NULL check for gethostbyname_r result (#1631338) +- stdlib/tst-setcontext9 test suite failure (#1623519) + +* Wed Sep 5 2018 Florian Weimer - 2.28.9000-6 +- Add python3-devel build dependency for downstream benefit + +* Wed Sep 05 2018 Carlos O'Donell - 2.28.9000-5 +- Provide compatibility support for linking against libpthread_nonshared.a + (#1625507) + +* Wed Aug 29 2018 Florian Weimer - 2.28.9000-4 +- Remove workaround for valgrind bug (#1600034) + +* Wed Aug 29 2018 Florian Weimer - 2.28.9000-3 +- Auto-sync with upstream branch master, + commit ff6b24501f70da7d6375d6f5929262b9509db39e. + +* Mon Aug 27 2018 Florian Weimer - 2.28.9000-2 +- Auto-sync with upstream branch master, + commit 99ea93ca31795469d2a1f1570f17a5c39c2eb7e2: +- nptl: Fix waiters-after-spinning case in pthread_cond_broadcast (#1622669) +- regex: Fix memory corruption when pattern and input contain NUL (#1622674) + +* Tue Aug 21 2018 Carlos O'Donell - 2.28.9000-1 +- Drop glibc-asflags.patch. Applied upstream. +- Drop glibc-rh1614705.patch. Applied upstream. +- Drop glibc-with-nonshared-cflags.patch. Applied upstream. +- Auto-sync with upstream branch master, + commit aa42b3dbcb0326badf377fec2c7fb2f34fdabecd. + +* Mon Aug 13 2018 Carlos O'Donell - 2.28-5 +- Remove abort() warning in manual (#1615608) + +* Fri Aug 10 2018 Florian Weimer - 2.28-4 +- Fix regression in readdir64@GLIBC_2.1 compat symbol (#1614705) + +* Thu Aug 2 2018 Florian Weimer - 2.28-3 +- Log /proc/sysinfo if available (on s390x) + +* Thu Aug 2 2018 Florian Weimer - 2.28-2 +- Honor %%{valgrind_arches} + +* Wed Aug 01 2018 Florian Weimer - 2.27.9000-43 +- Update to glibc 2.28 release tarball: +- Translation updates +- x86/CET: Fix property note parser (swbz#23467) +- x86: Add tst-get-cpu-features-static to $(tests) (swbz#23458) + +* Mon Jul 30 2018 Florian Weimer - 2.27.9000-42 +- Auto-sync with upstream branch master, + commit af86087f02a5522d8801a11d8381e04f95e33162: +- x86/CET: Don't parse beyond the note end +- Fix Linux fcntl OFD locks tests on unsupported kernels +- x86: Populate COMMON_CPUID_INDEX_80000001 for Intel CPUs (swbz#23459) +- x86: Correct index_cpu_LZCNT (swbz#23456) +- Fix string/tst-xbzero-opt if build with gcc head + +* Thu Jul 26 2018 Florian Weimer - 2.27.9000-41 +- Build with --enable-cet on x86_64, i686 +- Auto-sync with upstream branch master, + commit cfba5dbb10cc3abde632b46c60c10b2843917035: +- Keep expected behaviour for [a-z] and [A-z] (#1607286) +- Additional ucontext tests +- Intel CET enhancements +- ISO C11 threads support +- Fix out-of-bounds access in IBM-1390 converter (swbz#23448) +- New locale Yakut (Sakha) for Russia (sah_RU) (swbz#22241) +- os_RU: Add alternative month names (swbz#23140) +- powerpc64: Always restore TOC on longjmp (swbz#21895) +- dsb_DE locale: Fix syntax error and add tests (swbz#23208) +- Improve performance of the generic strstr implementation +- regcomp: Fix off-by-one bug in build_equiv_class (swbz#23396) +- Fix out of bounds access in findidxwc (swbz#23442) + +* Fri Jul 13 2018 Carlos O'Donell - 2.27.9000-40 +- Fix file list for glibc RPM packaging (#1601011). + +* Wed Jul 11 2018 Florian Weimer - 2.27.9000-39 +- Add POWER9 multilib (downstream only) + +* Wed Jul 11 2018 Florian Weimer - 2.27.9000-38 +- Auto-sync with upstream branch master, + commit 93304f5f7a32f73b551266c5a181db51d97a71e4: +- Install header +- Put the correct Unicode version number 11.0.0 into the generated files + +* Wed Jul 11 2018 Florian Weimer - 2.27.9000-37 +- Work around valgrind issue on i686 (#1600034) + +* Tue Jul 10 2018 Florian Weimer - 2.27.9000-36 +- Auto-sync with upstream branch master, + commit fd70af45528d59a00eb3190ef6706cb299488fcd: +- Add the statx function +- regexec: Fix off-by-one bug in weight comparison (#1582229) +- nss_files: Fix re-reading of long lines (swbz#18991) +- aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT +- aarch64: Remove HWCAP_CPUID from HWCAP_IMPORTANT +- conform/conformtest.pl: Escape literal braces in regular expressions +- x86: Use AVX_Fast_Unaligned_Load from Zen onwards. + +* Fri Jul 6 2018 Florian Weimer - 2.27.9000-35 +- Remove ppc64 multilibs + +* Fri Jul 06 2018 Florian Weimer - 2.27.9000-34 +- Auto-sync with upstream branch master, + commit 3a885c1f51b18852869a91cf59a1b39da1595c7a. + +* Thu Jul 5 2018 Florian Weimer - 2.27.9000-33 +- Enable build flags inheritance for nonshared flags + +* Wed Jul 4 2018 Florian Weimer - 2.27.9000-32 +- Add annobin annotations to assembler code (#1548438) + +* Wed Jul 4 2018 Florian Weimer - 2.27.9000-31 +- Enable -D_FORTIFY_SOURCE=2 for nonshared code + +* Mon Jul 02 2018 Florian Weimer - 2.27.9000-30 +- Auto-sync with upstream branch master, + commit b7b88cea4151d85eafd7ababc2e4b7ae1daeedf5: +- New locale: dsb_DE (Lower Sorbian) + +* Fri Jun 29 2018 Florian Weimer - 2.27.9000-29 +- Drop glibc-deprecate_libcrypt.patch. Variant applied upstream. (#1566464) +- Drop glibc-linux-timespec-header-compat.patch. Upstreamed. +- Auto-sync with upstream branch master, + commit e69d994a63afc2d367f286a2a7df28cbf710f0fe. + +* Thu Jun 28 2018 Florian Weimer - 2.27.9000-28 +- Drop glibc-rh1315108.patch. extend_alloca was removed upstream. (#1315108) +- Auto-sync with upstream branch master, + commit c49e18222e4c40f21586dabced8a49732d946917. + +* Thu Jun 21 2018 Florian Weimer - 2.27.9000-27 +- Compatibility fix for and + +* Thu Jun 21 2018 Florian Weimer - 2.27.9000-26 +- Auto-sync with upstream branch master, + commit f496b28e61d0342f579bf794c71b80e9c7d0b1b5. + +* Mon Jun 18 2018 Florian Weimer - 2.27.9000-25 +- Auto-sync with upstream branch master, + commit f2857da7cdb65bfad75ee30981f5b2fde5bbb1dc. + +* Mon Jun 18 2018 Florian Weimer - 2.27.9000-24 +- Auto-sync with upstream branch master, + commit 14beef7575099f6373f9a45b4656f1e3675f7372: +- iconv: Make IBM273 equivalent to ISO-8859-1 (#1592270) + +* Mon Jun 18 2018 Florian Weimer - 2.27.9000-23 +- Inherit the -msse2 build flag as well (#1592212) + +* Fri Jun 01 2018 Florian Weimer - 2.27.9000-22 +- Modernise nsswitch.conf defaults (#1581809) +- Adjust build flags inheritence from redhat-rpm-config +- Auto-sync with upstream branch master, + commit 104502102c6fa322515ba0bb3c95c05c3185da7a. + +* Fri May 25 2018 Florian Weimer - 2.27.9000-21 +- Auto-sync with upstream branch master, + commit c1dc1e1b34873db79dfbfa8f2f0a2abbe28c0514. + +* Wed May 23 2018 Florian Weimer - 2.27.9000-20 +- Auto-sync with upstream branch master, + commit 7f9f1ecb710eac4d65bb02785ddf288cac098323: +- CVE-2018-11237: Buffer overflow in __mempcpy_avx512_no_vzeroupper (#1581275) +- Drop glibc-rh1452750-allocate_once.patch, + glibc-rh1452750-libidn2.patch. Applied upstream. + +* Wed May 23 2018 Florian Weimer - 2.27.9000-19 +- Auto-sync with upstream branch master, + commit 8f145c77123a565b816f918969e0e35ee5b89153. + +* Thu May 17 2018 Florian Weimer - 2.27.9000-18 +- Do not run telinit u on upgrades (#1579225) +- Auto-sync with upstream branch master, + commit 632a6cbe44cdd41dba7242887992cdca7b42922a. + +* Fri May 11 2018 Florian Weimer - 2.27.9000-17 +- Avoid exporting some Sun RPC symbols with default versions (#1577210) +- Inherit the -mstackrealign flag if it is set +- Inherit compiler flags in the original order +- Auto-sync with upstream branch master, + commit 89aacb513eb77549a29df2638913a0f8178cf3f5: +- CVE-2018-11236: realpath: Fix path length overflow (#1581270, swbz#22786) + +* Fri May 11 2018 Florian Weimer - 2.27.9000-16 +- Use /usr/bin/python3 for benchmarks scripts (#1577223) + +* Thu Apr 19 2018 Florian Weimer - 2.27.9000-15 +- Auto-sync with upstream branch master, + commit 0085be1415a38b40a5a1a12e49368498f1687380. + +* Mon Apr 09 2018 Florian Weimer - 2.27.9000-14 +- Auto-sync with upstream branch master, + commit 583a27d525ae189bdfaa6784021b92a9a1dae12e. + +* Thu Mar 29 2018 Florian Weimer - 2.27.9000-13 +- Auto-sync with upstream branch master, + commit d39c0a459ef32a41daac4840859bf304d931adab: +- CVE-2017-18269: memory corruption in i386 memmove (#1580934) + +* Mon Mar 19 2018 Florian Weimer - 2.27.9000-12 +- Auto-sync with upstream branch master, + commit fbce6f7260c3847f14dfa38f60c9111978fb33a5. + +* Fri Mar 16 2018 Florian Weimer - 2.27.9000-11 +- Auto-sync with upstream branch master, + commit 700593fdd7aef1e36cfa8bad969faab76a6facda. + +* Wed Mar 14 2018 Florian Weimer - 2.27.9000-10 +- Auto-sync with upstream branch master, + commit 7108f1f944792ac68332967015d5e6418c5ccc88. + +* Mon Mar 12 2018 Florian Weimer - 2.27.9000-9 +- Auto-sync with upstream branch master, + commit da6d4404ecfd7eacba8c096b0761a5758a59da4b. + +* Tue Mar 6 2018 Florian Weimer - 2.27.9000-8 +- Enable annobin annotations (#1548438) + +* Thu Mar 01 2018 Florian Weimer - 2.27.9000-7 +- Auto-sync with upstream branch master, + commit 1a2f44a848663036c8a14671fe0faa3fed0b2a25: +- Remove spurios reference to libpthread_nonshared.a + +* Thu Mar 01 2018 Florian Weimer - 2.27.9000-6 +- Switch back to upstream master branch +- Drop glibc-rh1013801.patch, applied upstream. +- Drop glibc-fedora-nptl-linklibc.patch, no longer needed. +- Auto-sync with upstream branch master, + commit bd60ce86520b781ca24b99b2555e2ad389bbfeaa. + +* Wed Feb 28 2018 Florian Weimer - 2.27-5 +- Inherit as many flags as possible from redhat-rpm-config (#1550914) + +* Mon Feb 19 2018 Richard W.M. Jones - 2.27-4 +- riscv64: Add symlink from /usr/lib64/lp64d -> /usr/lib64 for ABI compat. +- riscv64: Disable valgrind smoke test on this architecture. + +* Wed Feb 14 2018 Florian Weimer - 2.27-3 +- Spec file cleanups: + - Remove %%defattr(-,root,root) + - Use shell to run ldconfig %%transfiletrigger + - Move %%transfiletrigger* to the glibc-common subpackage + - Trim changelog + - Include ChangeLog.old in the source RPM + +* Wed Feb 7 2018 Florian Weimer - 2.27-2.1 +- Linux: use reserved name __key in pkey_get (#1542643) +- Auto-sync with upstream branch release/2.27/master, + commit 56170e064e2b21ce204f0817733e92f1730541ea. + +* Wed Feb 07 2018 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Feb 05 2018 Carlos O'Donell - 2.27-1 +- Update to released glibc 2.27. +- Auto-sync with upstream branch master, + commit 23158b08a0908f381459f273a984c6fd328363cb. + +* Tue Jan 30 2018 Richard W.M. Jones - 2.26.9000-52 +- Disable -fstack-clash-protection on riscv64: + not supported even by GCC 7.3.1 on this architecture. + +* Mon Jan 29 2018 Florian Weimer - 2.26.9000-51 +- Explicitly run ldconfig in the buildroot +- Do not run ldconfig from scriptlets +- Put triggers into the glibc-common package, do not pass arguments to ldconfig + +* Mon Jan 29 2018 Florian Weimer - 2.26.9000-50 +- Auto-sync with upstream branch master, + commit cdd14619a713ab41e26ba700add4880604324dbb: +- libnsl: Turn remaining symbols into compat symbols (swbz#22701) +- be_BY, be_BY@latin, lt_LT, el_CY, el_GR, ru_RU, ru_UA, uk_UA: + Add alternative month names (swbz#10871) +- x86: Revert Intel CET changes to __jmp_buf_tag (swbz#22743) +- aarch64: Revert the change of the __reserved member of mcontext_t + +* Mon Jan 29 2018 Igor Gnatenko - 2.26.9000-49 +- Add file triggers to do ldconfig calls automatically + +* Mon Jan 22 2018 Florian Weimer - 2.26.9000-48 +- Auto-sync with upstream branch master, + commit 21c0696cdef617517de6e25711958c40455c554f: +- locale: Implement alternative month names (swbz#10871) +- locale: Change month names for pl_PL (swbz#10871) + +* Mon Jan 22 2018 Florian Weimer - 2.26.9000-47 +- Unconditionally build without libcrypt + +* Fri Jan 19 2018 Björn Esser - 2.26.9000-46 +- Remove deprecated libcrypt, gets replaced by libxcrypt +- Add applicable Requires on libxcrypt + +* Fri Jan 19 2018 Florian Weimer - 2.26.9000-45 +- Drop static PIE support on aarch64. It leads to crashes at run time. +- Remove glibc-rpcgen subpackage. See rpcsvc-proto. (#1531540) + +* Fri Jan 19 2018 Florian Weimer - 2.26.9000-44 +- Correct the list of static PIE architectures (#1247050) +- glibc_post_upgrade: Remove process restart logic +- glibc_post_upgrade: Integrate into the build process +- glibc_post_upgrade: Do not clean up tls subdirectories +- glibc_post_upgrade: Drop ia64 support +- Remove architecture-specific symbolic link for iconvconfig +- Auto-sync with upstream branch master, + commit 4612268a0ad8e3409d8ce2314dd2dd8ee0af5269: +- powerpc: Fix syscalls during early process initialization (swbz#22685) + +* Fri Jan 19 2018 Florian Weimer - 2.26.9000-43 +- Enable static PIE support on i386, x86_64 (#1247050) +- Remove add-on support (already gone upstream) +- Rework test suite status reporting +- Auto-sync with upstream branch master, + commit 64f63cb4583ecc1ba16c7253aacc192b6d088511: +- malloc: Fix integer overflows in memalign and malloc functions (swbz#22343) +- x86-64: Properly align La_x86_64_retval to VEC_SIZE (swbz#22715) +- aarch64: Update bits/hwcap.h for Linux 4.15 +- Add NT_ARM_SVE to elf.h + +* Wed Jan 17 2018 Florian Weimer - 2.26.9000-42 +- CVE-2017-14062, CVE-2016-6261, CVE-2016-6263: + Use libidn2 for IDNA support (#1452750) + +* Mon Jan 15 2018 Florian Weimer - 2.26.9000-41 +- CVE-2018-1000001: Make getcwd fail if it cannot obtain an absolute path + (#1533837) +- elf: Synchronize DF_1_* flags with binutils (#1439328) +- Auto-sync with upstream branch master, + commit 860b0240a5645edd6490161de3f8d1d1f2786025: +- aarch64: fix static pie enabled libc when main is in a shared library +- malloc: Ensure that the consolidated fast chunk has a sane size + +* Fri Jan 12 2018 Florian Weimer - 2.26.9000-40 +- libnsl: Do not install libnsl.so, libnsl.a (#1531540) +- Use unversioned Supplements: for langpacks (#1490725) +- Auto-sync with upstream branch master, + commit 9a08a366a7e7ddffe62113a9ffe5e50605ea0924: +- hu_HU locale: Avoid double space (swbz#22657) +- math: Make default libc_feholdsetround_noex_ctx use __feholdexcept + (swbz#22702) + +* Thu Jan 11 2018 Florian Weimer - 2.26.9000-39 +- nptl: Open libgcc.so with RTLD_NOW during pthread_cancel (#1527887) +- Introduce libnsl subpackage and remove NIS headers (#1531540) +- Use versioned Obsoletes: for libcrypt-nss. +- Auto-sync with upstream branch master, + commit 08c6e95234c60a5c2f37532d1111acf084f39345: +- nptl: Add tst-minstack-cancel, tst-minstack-exit (swbz#22636) +- math: ldbl-128ibm log1pl (-qNaN) spurious "invalid" exception (swbz#22693) + +* Wed Jan 10 2018 Florian Weimer - 2.26.9000-38 +- nptl: Fix stack guard size accounting (#1527887) +- Remove invalid Obsoletes: on glibc-header provides +- Require python3 instead of python during builds +- Auto-sync with upstream branch master, + commit 09085ede12fb9650f286bdcd805609ae69f80618: +- math: ldbl-128ibm lrintl/lroundl missing "invalid" exceptions (swbz#22690) +- x86-64: Add sincosf with vector FMA + +* Mon Jan 8 2018 Florian Weimer - 2.26.9000-37 +- Add glibc-rpcgen subpackage, until the replacement is packaged (#1531540) + +* Mon Jan 08 2018 Florian Weimer - 2.26.9000-36 +- Auto-sync with upstream branch master, + commit 579396ee082565ab5f42ff166a264891223b7b82: +- nptl: Add test for callee-saved register restore in pthread_exit +- getrlimit64: fix for 32-bit configurations with default version >= 2.2 +- elf: Add linux-4.15 VDSO hash for RISC-V +- elf: Add RISC-V dynamic relocations to elf.h +- powerpc: Fix error message during relocation overflow +- prlimit: Replace old_rlimit RLIM64_INFINITY with RLIM_INFINITY (swbz#22678) + +* Fri Jan 05 2018 Florian Weimer - 2.26.9000-35 +- Remove sln (#1531546) +- Remove Sun RPC interfaces (#1531540) +- Rebuild with newer GCC to fix pthread_exit stack unwinding issue (#1529549) +- Auto-sync with upstream branch master, + commit f1a844ac6389ea4e111afc019323ca982b5b027d: +- CVE-2017-16997: elf: Check for empty tokens before DST expansion (#1526866) +- i386: In makecontext, align the stack before calling exit (swbz#22667) +- x86, armhfp: sync sys/ptrace.h with Linux 4.15 (swbz#22433) +- elf: check for rpath emptiness before making a copy of it +- elf: remove redundant is_path argument +- elf: remove redundant code from is_dst +- elf: remove redundant code from _dl_dst_substitute +- scandir: fix wrong assumption about errno (swbz#17804) +- Deprecate external use of libio.h and _G_config.h + +* Fri Dec 22 2017 Florian Weimer - 2.26.9000-34 +- Auto-sync with upstream branch master, + commit bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f: +- copy_file_range: New function to copy file data +- nptl: Consolidate pthread_{timed,try}join{_np} +- nptl: Implement pthread_self in libc.so (swbz#22635) +- math: Provide a C++ version of iseqsig (swbz#22377) +- elf: remove redundant __libc_enable_secure check from fillin_rpath +- math: Avoid signed shift overflow in pow (swbz#21309) +- x86: Add feature_1 to tcbhead_t (swbz#22563) +- x86: Update cancel_jmp_buf to match __jmp_buf_tag (swbz#22563) +- ld.so: Examine GLRO to detect inactive loader (swbz#20204) +- nscd: Fix nscd readlink argument aliasing (swbz#22446) +- elf: do not substitute dst in $LD_LIBRARY_PATH twice (swbz#22627) +- ldconfig: set LC_COLLATE to C (swbz#22505) +- math: New generic sincosf +- powerpc: st{r,p}cpy optimization for aligned strings +- CVE-2017-1000409: Count in expanded path in _dl_init_path (#1524867) +- CVE-2017-1000408: Compute correct array size in _dl_init_paths (#1524867) +- x86-64: Remove sysdeps/x86_64/fpu/s_cosf.S +- aarch64: Improve strcmp unaligned performance + +* Wed Dec 13 2017 Florian Weimer - 2.26.9000-33 +- Remove power6 platform directory (#1522675) + +* Wed Dec 13 2017 Florian Weimer - 2.26.9000-32 +- Obsolete the libcrypt-nss subpackage (#1525396) +- armhfp: Disable -fstack-clash-protection due to GCC bug (#1522678) +- ppc64: Disable power6 multilib due to GCC bug (#1522675) +- Auto-sync with upstream branch master, + commit 243b63337c2c02f30ec3a988ecc44bc0f6ffa0ad: +- libio: Free backup area when it not required (swbz#22415) +- math: Fix nextafter and nexttoward declaration (swbz#22593) +- math: New generic cosf +- powerpc: POWER8 memcpy optimization for cached memory +- x86-64: Add sinf with FMA +- x86-64: Remove sysdeps/x86_64/fpu/s_sinf.S +- math: Fix ctanh (0 + i NaN), ctanh (0 + i Inf) (swbz#22568) +- lt_LT locale: Base collation on copy "iso14651_t1" (swbz#22524) +- math: Add _Float32 function aliases +- math: Make cacosh (0 + iNaN) return NaN + i pi/2 (swbz#22561) +- hsb_DE locale: Base collation on copy "iso14651_t1" (swbz#22515) + +* Wed Dec 06 2017 Florian Weimer - 2.26.9000-31 +- Add elision tunables. Drop related configure flag. (#1383986) +- Auto-sync with upstream branch master, + commit 37ac8e635a29810318f6d79902102e2e96b2b5bf: +- Linux: Implement interfaces for memory protection keys +- math: Add _Float64, _Float32x function aliases +- math: Use sign as double for reduced case in sinf +- math: fix sinf(NAN) +- math: s_sinf.c: Replace floor with simple casts +- et_EE locale: Base collation on iso14651_t1 (swbz#22517) +- tr_TR locale: Base collation on iso14651_t1 (swbz#22527) +- hr_HR locale: Avoid single code points for digraphs in LC_TIME (swbz#10580) +- S390: Fix backtrace in vdso functions + +* Mon Dec 04 2017 Florian Weimer - 2.26.9000-30 +- Add build dependency on bison +- Auto-sync with upstream branch master, + commit 7863a7118112fe502e8020a0db0fa74fef281f29: +- math: New generic sinf (swbz#5997) +- is_IS locale: Base collation on iso14651_t1 (swbz#22519) +- intl: Improve reproducibility by using bison (swbz#22432) +- sr_RS, bs_BA locales: make collation rules the same as for hr_HR (wbz#22534) +- hr_HR locale: various updates (swbz#10580) +- x86: Make a space in jmpbuf for shadow stack pointer +- CVE-2017-17426: malloc: Fix integer overflow in tcache (swbz#22375) +- locale: make forward accent sorting the default in collating (swbz#17750) + +* Wed Nov 29 2017 Florian Weimer - 2.26.9000-29 +- Enable -fstack-clash-protection (#1512531) +- Auto-sync with upstream branch master, + commit a55430cb0e261834ce7a4e118dd9e0f2b7fb14bc: +- elf: Properly compute offsets of note descriptor and next note (swbz#22370) +- cs_CZ locale: Base collation on iso14651_t1 (swbz#22336) +- Implement the mlock2 function +- Add _Float64x function aliases +- elf: Consolidate link map sorting +- pl_PL locale: Base collation on iso14651_t1 (swbz#22469) +- nss: Export nscd hash function as __nss_hash (swbz#22459) + +* Thu Nov 23 2017 Florian Weimer - 2.26.9000-28 +- Auto-sync with upstream branch master, + commit cccb6d4e87053ed63c74aee063fa84eb63ebf7b8: +- sigwait can fail with EINTR (#1516394) +- Add memfd_create function +- resolv: Fix p_secstodate overflow handling (swbz#22463) +- resolv: Obsolete p_secstodate +- Avoid use of strlen in getlogin_r (swbz#22447) +- lv_LV locale: fix collation (swbz#15537) +- S390: Add cfi information for start routines in order to stop unwinding +- aarch64: Optimized memset for falkor + +* Sun Nov 19 2017 Florian Weimer - 2.26.9000-27 +- Auto-sync with upstream branch master, + commit f6e965ee94b37289f64ecd3253021541f7c214c3: +- powerpc: AT_HWCAP2 bit PPC_FEATURE2_HTM_NO_SUSPEND +- aarch64: Add HWCAP_DCPOP bit +- ttyname, ttyname_r: Don't bail prematurely (swbz#22145) +- signal: Optimize sigrelse implementation +- inet: Check length of ifname in if_nametoindex (swbz#22442) +- malloc: Account for all heaps in an arena in malloc_info (swbz#22439) +- malloc: Add missing arena lock in malloc_info (swbz#22408) +- malloc: Use __builtin_tgmath in tgmath.h with GCC 8 (swbz#21660) +- locale: Replaced unicode sequences in the ASCII printable range +- resolv: More precise checks in res_hnok, res_dnok (swbz#22409, swbz#22412) +- resolv: ns_name_pton should report trailing \ as error (swbz#22413) +- locale: mfe_MU, miq_NI, an_ES, kab_DZ, om_ET: Escape / in d_fmt (swbz#22403) + +* Tue Nov 07 2017 Florian Weimer - 2.26.9000-26 +- Auto-sync with upstream branch master, + commit 6b86036452b9ac47b4ee7789a50f2f37df7ecc4f: +- CVE-2017-15804: glob: Fix buffer overflow during GLOB_TILDE unescaping +- powerpc: Use latest string function optimization for internal function calls +- math: No _Float128 support for ppc64le -mlong-double-64 (swbz#22402) +- tpi_PG locale: Fix wrong d_fmt +- aarch64: Disable lazy symbol binding of TLSDESC +- tpi_PG locale: fix syntax error (swbz#22382) +- i586: Use conditional branches in strcpy.S (swbz#22353) +- ffsl, ffsll: Declare under __USE_MISC, not just __USE_GNU +- csb_PL locale: Fix abmon/mon for March (swbz#19485) +- locale: Various yesstr/nostr/yesexpr/noexpr fixes (swbz#15260, swbz#15261) +- localedef: Add --no-warnings/--warnings option +- powerpc: Replace lxvd2x/stxvd2x with lvx/stvx in P7's memcpy/memmove +- locale: Use ASCII as much as possible in LC_MESSAGES +- Add new locale yuw_PG (swbz#20952) +- malloc: Add single-threaded path to malloc/realloc/calloc/memalloc +- i386: Replace assembly versions of e_powf with generic e_powf.c +- i386: Replace assembly versions of e_log2f with generic e_log2f.c +- x86-64: Add powf with FMA +- x86-64: Add logf with FMA +- i386: Replace assembly versions of e_logf with generic e_logf.c +- i386: Replace assembly versions of e_exp2f with generic e_exp2f.c +- x86-64: Add exp2f with FMA +- i386: Replace assembly versions of e_expf with generic e_expf.c + +* Sat Oct 21 2017 Florian Weimer - 2.26.9000-25 +- Auto-sync with upstream branch master, + commit 797ba44ba27521261f94cc521f1c2ca74f650147: +- math: Add bits/floatn.h defines for more _FloatN / _FloatNx types +- posix: Fix improper assert in Linux posix_spawn (swbz#22273) +- x86-64: Use fxsave/xsave/xsavec in _dl_runtime_resolve (swbz#21265) +- CVE-2017-15670: glob: Fix one-byte overflow (#1504807) +- malloc: Add single-threaded path to _int_free +- locale: Add new locale kab_DZ (swbz#18812) +- locale: Add new locale shn_MM (swbz#13605) + +* Fri Oct 20 2017 Florian Weimer - 2.26.9000-24 +- Use make -O to serialize make output +- Auto-sync with upstream branch master, + commit 63b4baa44e8d22501c433c4093aa3310f91b6aa2: +- sysconf: Fix missing definition of UIO_MAXIOV on Linux (#1504165) +- Install correct bits/long-double.h for MIPS64 (swbz#22322) +- malloc: Fix deadlock in _int_free consistency check +- x86-64: Don't set GLRO(dl_platform) to NULL (swbz#22299) +- math: Add _Float128 function aliases +- locale: Add new locale mjw_IN (swbz#13994) +- aarch64: Rewrite elf_machine_load_address using _DYNAMIC symbol +- powerpc: fix check-before-set in SET_RESTORE_ROUND +- locale: Use U+202F as thousands separators in pl_PL locale (swbz#16777) +- math: Use __f128 to define FLT128_* constants in include/float.h for old GCC +- malloc: Improve malloc initialization sequence (swbz#22159) +- malloc: Use relaxed atomics for malloc have_fastchunks +- locale: New locale ca_ES@valencia (swbz#2522) +- math: Let signbit use the builtin in C++ mode with gcc < 6.x (swbz#22296) +- locale: Place monetary symbol in el_GR, el_CY after the amount (swbz#22019) + +* Tue Oct 17 2017 Florian Weimer - 2.26.9000-23 +- Switch to .9000 version numbers during development + +* Tue Oct 17 2017 Florian Weimer - 2.26.90-22 +- Auto-sync with upstream branch master, + commit c38a4bfd596db2be2b9c1f96715bdc833eab760a: +- malloc: Use compat_symbol_reference in libmcheck (swbz#22050) + +* Mon Oct 16 2017 Florian Weimer - 2.26.90-21 +- Auto-sync with upstream branch master, + commit 596f70134a8f11967c65c1d55a94a3a2718c731d: +- Silence -O3 -Wall warning in malloc/hooks.c with GCC 7 (swbz#22052) +- locale: No warning for non-symbolic character (swbz#22295) +- locale: Allow "" int_curr_Symbol (swbz#22294) +- locale: Fix localedef exit code (swbz#22292) +- nptl: Preserve error in setxid thread broadcast in coredumps (swbz#22153) +- powerpc: Avoid putting floating point values in memory (swbz#22189) +- powerpc: Fix the carry bit on mpn_[add|sub]_n on POWER7 (swbz#22142) +- Support profiling PIE (swbz#22284) + +* Wed Oct 11 2017 Florian Weimer - 2.26.90-20 +- Auto-sync with upstream branch master, + commit d8425e116cdd954fea0c04c0f406179b5daebbb3: +- nss_files performance issue in multi mode (swbz#22078) +- Ensure C99 and C11 interfaces are available for C++ (swbz#21326) + +* Mon Oct 09 2017 Florian Weimer - 2.26.90-19 +- Move /var/db/Makefile to nss_db (#1498900) +- Auto-sync with upstream branch master, + commit 645ac9aaf89e3311949828546df6334322f48933: +- openpty: use TIOCGPTPEER to open slave side fd + +* Fri Oct 06 2017 Carlos O'Donell - 2.26.90-18 +- Auto-sync with upstream master, + commit 1e26d35193efbb29239c710a4c46a64708643320. +- malloc: Fix tcache leak after thread destruction (swbz#22111) +- powerpc: Fix IFUNC for memrchr. +- aarch64: Optimized implementation of memmove for Qualcomm Falkor +- Always do locking when iterating over list of streams (swbz#15142) +- abort: Do not flush stdio streams (swbz#15436) + +* Wed Oct 04 2017 Florian Weimer - 2.26.90-17 +- Move nss_compat to the main glibc package (#1400538) +- Auto-sync with upstream master, + commit 11c4f5010c58029e73e656d5df4f8f42c9b8e877: +- crypt: Use NSPR header files in addition to NSS header files (#1489339) +- math: Fix yn(n,0) without SVID wrapper (swbz#22244) +- math: Fix log2(0) and log(10) in downward rounding (swbz#22243) +- math: Add C++ versions of iscanonical for ldbl-96, ldbl-128ibm (swbz#22235) +- powerpc: Optimize memrchr for power8 +- Hide various internal functions (swbz#18822) + +* Sat Sep 30 2017 Florian Weimer - 2.26.90-16 +- Auto-sync with upstream master, + commit 1e2bffd05c36a9be30d7092d6593a9e9aa009ada: +- Add IBM858 charset (#1416405) +- Update kernel version in syscall-names.list to 4.13 +- Add Linux 4.13 constants to bits/fcntl-linux.h +- Add fcntl sealing interfaces from Linux 3.17 to bits/fcntl-linux.h +- math: New generic powf, log2f, logf +- Fix nearbyint arithmetic moved before feholdexcept (swbz#22225) +- Mark __dso_handle as hidden (swbz#18822) +- Skip PT_DYNAMIC segment with p_filesz == 0 (swbz#22101) +- glob now matches dangling symbolic links (swbz#866, swbz#22183) +- nscd: Release read lock after resetting timeout (swbz#22161) +- Avoid __MATH_TG in C++ mode with -Os for fpclassify (swbz#22146) +- Fix dlclose/exit race (swbz#22180) +- x86: Add SSE4.1 trunc, truncf (swbz#20142) +- Fix atexit/exit race (swbz#14333) +- Use execveat syscall in fexecve (swbz#22134) +- Enable unwind info in libc-start.c and backtrace.c +- powerpc: Avoid misaligned stores in memset +- powerpc: build some IFUNC math functions for libc and libm (swbz#21745) +- Removed redundant data (LC_TIME and LC_MESSAGES) for niu_NZ (swbz#22023) +- Fix LC_TELEPHONE for az_AZ (swbz#22112) +- x86: Add MathVec_Prefer_No_AVX512 to cpu-features (swbz#21967) +- x86: Add x86_64 to x86-64 HWCAP (swbz#22093) +- Finish change from “Bengali†to “Bangla†(swbz#14925) +- posix: fix glob bugs with long login names (swbz#1062) +- posix: Fix getpwnam_r usage (swbz#1062) +- posix: accept inode 0 is a valid inode number (swbz#19971) +- Remove redundant LC_TIME data in om_KE (swbz#22100) +- Remove remaining _HAVE_STRING_ARCH_* definitions (swbz#18858) +- resolv: Fix memory leak with OOM during resolv.conf parsing (swbz#22095) +- Add miq_NI locale for Miskito (swbz#20498) +- Fix bits/math-finite.h exp10 condition (swbz#22082) + +* Mon Sep 04 2017 Florian Weimer - 2.26.90-15 +- Auto-sync with upstream master, + commit b38042f51430974642616a60afbbf96fd0b98659: +- Implement tmpfile with O_TMPFILE (swbz#21530) +- Obsolete pow10 functions +- math.h: Warn about an already-defined log macro + +* Fri Sep 01 2017 Florian Weimer - 2.26.90-14 +- Build glibc with -O2 (following the upstream default). +- Auto-sync with upstream master, + commit f4a6be2582b8dfe8adfa68da3dd8decf566b3983: +- malloc: Abort on heap corruption, without a backtrace (swbz#21754) +- getaddrinfo: Return EAI_NODATA for gethostbyname2_r with NO_DATA (swbz#21922) +- getaddrinfo: Fix error handling in gethosts (swbz#21915) (swbz#21922) +- Place $(elf-objpfx)sofini.os last (swbz#22051) +- Various locale fixes (swbz#15332, swbz#22044) + +* Wed Aug 30 2017 Florian Weimer - 2.26.90-13 +- Drop glibc-rh952799.patch, applied upstream (#952799, swbz#22025) +- Auto-sync with upstream master, + commit 5f9409b787c5758fc277f8d1baf7478b752b775d: +- Various locale fixes (swbz#22022, swbz#22038, swbz#21951, swbz#13805, + swbz#21971, swbz#21959) +- MIPS/o32: Fix internal_syscall5/6/7 (swbz#21956) +- AArch64: Fix procfs.h not to expose stdint.h types +- iconv_open: Fix heap corruption on gconv_init failure (swbz#22026) +- iconv: Mangle __btowc_fct even without __init_fct (swbz#22025) +- Fix bits/math-finite.h _MSUF_ expansion namespace (swbz#22028) +- Provide a C++ version of iszero that does not use __MATH_TG (swbz#21930) + +* Mon Aug 28 2017 Florian Weimer - 2.26.90-12 +- Auto-sync with upstream master, + commit 2dba5ce7b8115d6a2789bf279892263621088e74. + +* Fri Aug 25 2017 Florian Weimer - 2.26.90-11 +- Auto-sync with upstream master, + commit 3d7b66f66cb223e899a7ebc0f4c20f13e711c9e0: +- string/stratcliff.c: Replace int with size_t (swbz#21982) +- Fix tgmath.h handling of complex integers (swbz#21684) + +* Thu Aug 24 2017 Florian Weimer - 2.26.90-10 +- Use an architecture-independent system call list (#1484729) +- Drop glibc-fedora-include-bits-ldbl.patch (#1482105) + +* Tue Aug 22 2017 Florian Weimer - 2.26.90-9 +- Auto-sync with upstream master, + commit 80f91666fed71fa3dd5eb5618739147cc731bc89. + +* Mon Aug 21 2017 Florian Weimer - 2.26.90-8 +- Auto-sync with upstream master, + commit a8410a5fc9305c316633a5a3033f3927b759be35: +- Obsolete matherr, _LIB_VERSION, libieee.a. + +* Mon Aug 21 2017 Florian Weimer - 2.26.90-7 +- Auto-sync with upstream master, + commit 4504783c0f65b7074204c6126c6255ed89d6594e. + +* Mon Aug 21 2017 Florian Weimer - 2.26.90-6 +- Auto-sync with upstream master, + commit b5889d25e9bf944a89fdd7bcabf3b6c6f6bb6f7c: +- assert: Support types without operator== (int) (#1483005) + +* Mon Aug 21 2017 Florian Weimer - 2.26.90-5 +- Auto-sync with upstream master, + commit 2585d7b839559e665d5723734862fbe62264b25d: +- Do not use generic selection in C++ mode +- Do not use __builtin_types_compatible_p in C++ mode (#1481205) +- x86-64: Check FMA_Usable in ifunc-mathvec-avx2.h (swbz#21966) +- Various locale fixes (swbz#21750, swbz#21960, swbz#21959, swbz#19852) +- Fix sigval namespace (swbz#21944) +- x86-64: Optimize e_expf with FMA (swbz#21912) +- Adjust glibc-rh827510.patch. + +* Wed Aug 16 2017 Tomasz KÅ‚oczko - 2.26-4 +- Remove 'Buildroot' tag, 'Group' tag, and '%%clean' section, and don't + remove the buildroot in '%%install', all per Fedora Packaging Guidelines + (#1476839) + +* Wed Aug 16 2017 Florian Weimer - 2.26.90-3 +- Auto-sync with upstream master, + commit 403143e1df85dadd374f304bd891be0cd7573e3b: +- x86-64: Align L(SP_RANGE)/L(SP_INF_0) to 8 bytes (swbz#21955) +- powerpc: Add values from Linux 4.8 to +- S390: Add new s390 platform z14. +- Various locale fixes (swbz#14925, swbz#20008, swbz#20482, swbz#12349 + swbz#19982, swbz#20756, swbz#20756, swbz#21836, swbz#17563, swbz#16905, + swbz#21920, swbz#21854) +- NSS: Replace exported NSS lookup functions with stubs (swbz#21962) +- i386: Do not set internal_function +- assert: Suppress pedantic warning caused by statement expression (swbz#21242) +- powerpc: Restrict xssqrtqp operands to Vector Registers (swbz#21941) +- sys/ptrace.h: remove obsolete PTRACE_SEIZE_DEVEL constant (swbz#21928) +- Remove __qaddr_t, __long_double_t +- Fix uc_* namespace (swbz#21457) +- nss: Call __resolv_context_put before early return in get*_r (swbz#21932) +- aarch64: Optimized memcpy for Qualcomm Falkor processor +- manual: Document getcontext uc_stack value on Linux (swbz#759) +- i386: Add (swbz#21913) +- Don't use IFUNC resolver for longjmp or system in libpthread (swbz#21041) +- Fix XPG4.2 bits/sigaction.h namespace (swbz#21899) +- x86-64: Add FMA multiarch functions to libm +- i386: Support static PIE in start.S +- Compile tst-prelink.c without PIE (swbz#21815) +- x86-64: Use _dl_runtime_resolve_opt only with AVX512F (swbz#21871) +- x86: Remove __memset_zero_constant_len_parameter (swbz#21790) + +* Wed Aug 16 2017 Florian Weimer - 2.26-2 +- Disable multi-arch (IFUNC string functions) on i686 (#1471427) +- Remove nosegneg 32-bit Xen PV support libraries (#1482027) +- Adjust spec file to RPM changes + +* Thu Aug 03 2017 Carlos O'Donell - 2.26-1 +- Update to released glibc 2.26. +- Auto-sync with upstream master, + commit 2aad4b04ad7b17a2e6b0e66d2cb4bc559376617b. +- getaddrinfo: Release resolver context on error in gethosts (swbz#21885) + +* Wed Aug 02 2017 Fedora Release Engineering - 2.25.90-30.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Sat Jul 29 2017 Florian Weimer - 2.25.90-30 +- Auto-sync with upstream master, + commit 5920a4a624b1f4db310d1c44997b640e2a4653e5: +- mutex: Fix robust mutex lock acquire (swbz#21778) + +* Fri Jul 28 2017 Florian Weimer - 2.25.90-29 +- Auto-sync with upstream master, + commit d95fcb2df478efbf4f8537ba898374043ac4561f: +- rwlock: Fix explicit hand-over (swbz#21298) +- tunables: Use direct syscall for access (swbz#21744) +- Avoid accessing corrupted stack from __stack_chk_fail (swbz#21752) +- Remove extra semicolons in struct pthread_mutex (swbz#21804) +- grp: Fix cast-after-dereference (another big-endian group merge issue) +- S390: fix sys/ptrace.h to make it includible again after asm/ptrace.h +- Don't add stack_chk_fail_local.o to libc.a (swbz#21740) +- i386: Test memmove_chk and memset_chk only in libc.so (swbz#21741) +- Add new locales az_IR, mai_NP (swbz#14172) +- Various locale improvements + +* Thu Jul 27 2017 Carlos O'Donell - 2.25.90-28 +- Adjust to new rpm debuginfo generation (#1475009). + +* Wed Jul 26 2017 Fedora Release Engineering - 2.25.90-27.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Florian Weimer - 2.25.90-27 +- Auto-sync with upstream master, + commit 00d7a3777369bac3d8d44152dde2bb7381984ef6: +- aarch64: Fix out of bound array access in _dl_hwcap_string + +* Mon Jul 17 2017 Florian Weimer - 2.25.90-26 +- Drop glibc-rh1467518.patch in favor of upstream patch (#1467518) +- Auto-sync with upstream master, + commit 91ac3a7d8474480685632cd25f844d3154c69fdf: +- Fix pointer alignment in NSS group merge result construction (#1471985) +- Various locale fixes + +* Fri Jul 14 2017 Carlos O'Donell - 2.25.90-25 +- armv7hl: Drop 32-bit ARM build fix, already in upstream master. +- s390x: Apply glibc fix again, removing PTRACE_GETREGS etc. (#1469536). +- Auto-sync with upstream master, + commit de895ddcd7fc45caeeeb0ae312311b8bd31d82c5: +- Added Fiji Hindi language locale for Fiji (swbz#21694). +- Added yesstr/nostr for nds_DE and nds_NL (swbz#21756). +- Added yesstr and nostr for Tigrinya (swbz#21759). +- Fix LC_MESSAGES and LC_ADDRESS for anp_IN (swbz#21760). +- Added yesstr/nostr and fix yesexpr for pap_AW and pap_CW (swbz#21757). +- Added Tongan language locale for Tonga (swbz#21728). +- [ARM] Fix ld.so crash when built using Binutils 2.29. +- Added yesstr and nostr for aa_ET (swbz#21768). +- New locale for bi_VU (swbz#21767). +- Disable single thread optimization for open_memstream + +* Wed Jul 12 2017 Carlos O'Donell - 2.25.90-24 +- Fix IFUNC crash in early startup for ppc64le static binaries (#1467518). +- Enable building with BIND_NOW on ppc64le (#1467518). +- Fix 32-bit ARM builds in presence of new binutils. + +* Wed Jul 12 2017 Florian Weimer - 2.25.90-23 +- malloc: Tell GCC optimizers about MAX_FAST_SIZE in _int_malloc (#1470060) +- Auto-sync with upstream master, + commit 30200427a99e5ddac9bad08599418d44d54aa9aa: +- Add per-thread cache to malloc +- Add Samoan language locale for Samoa +- Add Awajún / Aguaruna locale for Peru +- CVE-2010-3192: Avoid backtrace from __stack_chk_fail (swbz#12189) +- Add preadv2, writev2 RWF_NOWAIT flag (swbz#21738) +- Fix abday strings for ar_JO/ar_LB/ar_SY locales (swbz#21749) +- Fix abday strings for ar_SA locale (swbz#21748, swbz#19066) +- Set data_fmt for da_DK locale (swbz#17297) +- Add yesstr and nostr for the zh_HK locale (swbz#21733) +- Fix abday strings for the ksIN@devanagari locale (swbz#21743) +- Do not include _dl_resolv_conflicts in libc.a (swbz#21742) +- Test __memmove_chk, __memset_chk only in libc.so (swbz#21741) +- Add iI and eE to yesexpr and noexpr respectively for ts_ZA locale +- Add yesstr/nostr for kw_GB locale (swbz#21734) +- Add yesstr and nostr for the ts_ZA locale (swbz#21727) +- Fix LC_NAME for hi_IN locale (swbz#21729) +- Add yesstr and nostr for the xh_ZA locale (swbz#21724) +- Add yesstr and nostr for the zh_CN locale (swbz#21723) +- Fix full weekday names for the ks_IN@devanagari locale (swbz#21721) +- Various fixes to Arabic locales after CLDR import + +* Tue Jul 11 2017 Florian Weimer - 2.25.90-22 +- Reinstantiate stack_t cleanup (#1468904) +- s390x: Restore PTRACE_GETREGS etc. to get GCC to build (#1469536) + +* Sun Jul 9 2017 Florian Weimer - 2.25.90-21 +- Back out stack_t cleanup (#1468904) + +* Thu Jul 06 2017 Florian Weimer - 2.25.90-20 +- Auto-sync with upstream master, + commit 031e519c95c069abe4e4c7c59e2b4b67efccdee5: +- x86-64: Align the stack in __tls_get_addr (#1440287) +- Add Tok-Pisin (tpi_PG) locale. +- Add missing yesstr/nostr for Pashto locale (swbz#21711) +- Add missing yesstr/nostr for Breton locale (swbz#21706) +- Single threaded stdio optimization +- sysconf: Use conservative default for _SC_NPROCESSORS_ONLN (swbz#21542) + +* Tue Jul 04 2017 Florian Weimer - 2.25.90-19 +- Auto-sync with upstream master, + commit 4446a885f3aeb3a33b95c72bae1f115bed77f0cb. + +* Tue Jul 04 2017 Florian Weimer - 2.25.90-18 +- Auto-sync with upstream master, + commit 89f6307c5d270ed4f11cee373031fa9f2222f2b9. + +* Tue Jul 4 2017 Florian Weimer - 2.25.90-17 +- Disable building with BIND_NOW on ppc64le (#1467518) + +* Mon Jul 03 2017 Florian Weimer - 2.25.90-16 +- Auto-sync with upstream master, + commit e237357a5a0559dee92261f1914d1fa2cd43a1a8: +- Support an arbitrary number of search domains in the stub resolver (#168253) +- Detect and apply /etc/resolv.conf changes in libresolv (#1374239) +- Increase malloc alignment on i386 to 16 (swbz#21120) +- Make RES_ROTATE start with a random name server (swbz#19570) +- Fix tgmath.h totalorder, totalordermag return type (swbz#21687) +- Miscellaneous sys/ucontext.h namespace fixes (swbz#21457) +- Rename struct ucontext tag (swbz#21457) +- Call exit system call directly in clone (swbz#21512) +- powerpc64le: Enable float128 +- getaddrinfo: Merge IPv6 addresses and IPv4 addresses (swbz#21295) +- Avoid .symver on common symbols (swbz#21666) +- inet_pton: Reject IPv6 addresses with many leading zeros (swbz#16637) + +* Fri Jun 23 2017 Florian Weimer - 2.25.90-15 +- Auto-sync with upstream master, + commit 3ec7c02cc3e922b9364dc8cfd1d4546671b91003, fixing: +- memcmp-avx2-movbe.S incorrect results for lengths 2/3 (#1464403) + +* Fri Jun 23 2017 Florian Weimer - 2.25.90-14 +- Auto-sync with upstream master, + commit 12f50337ae80672c393c2317d471d097ad92c492, changing: +- localedata: fur_IT: Fix spelling of Wednesday (Miercus) +- Update to Unicode 10.0.0 +- inet: __inet6_scopeid_pton should accept node-local addresses (swbz#21657) + +* Fri Jun 23 2017 Florian Weimer - 2.25.90-13 +- Reenable valgrind on aarch64 + +* Thu Jun 22 2017 Florian Weimer - 2.25.90-12 +- Log auxiliary vector during build + +* Thu Jun 22 2017 Florian Weimer - 2.25.90-11 +- Auto-sync with upstream master, + commit 0a47d031e44f15236bcef8aeba80e737bd013c6f. + +* Thu Jun 22 2017 Florian Weimer - 2.25.90-10 +- Disable valgrind on aarch64 + +* Wed Jun 21 2017 Florian Weimer - 2.25.90-9 +- Drop historic aarch64 TLS patches +- Drop workaround for GCC PR69537 +- Auto-sync with upstream master, + commit 9649350d2ee47fae00794d57e2526aa5d67d900e. + +* Wed Jun 21 2017 Florian Weimer - 2.25.90-8 +- Adjust build requirements for gcc, binutils, kernel-headers. +- Auto-sync with upstream master, + commit 43e0ac24c836eed627a75ca932eb7e64698407c6, changing: +- Remove + +* Mon Jun 19 2017 Florian Weimer - 2.25.90-7 +- Drop glibc-Disable-buf-NULL-in-login-tst-ptsname.c, applied upstream. +- Auto-sync with upstream master, + commit 37e9dc814636915afb88d0779e5e897e90e7b8c0, fixing: +- CVE-2017-1000366: Avoid large allocas in the dynamic linker (#1462820) +- wait3 namespace (swbz#21625) +- S390: Sync ptrace.h with kernel (swbz#21539) +- Another x86 sys/ucontext.h namespace issue (swbz#21457) +- siginterrupt namespace (swbz#21597) +- Signal stack namespace (swbz#21584) +- Define struct rusage in sys/wait.h when required (swbz#21575) +- S390: Fix build with gcc configured with --enable-default-pie (swbz#21537) +- Update timezone code from tzcode 2017b +- nptl: Invert the mmap/mprotect logic on allocated stacks (swbz#18988) +- PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY +- Make copy of from GCC (swbz#21573) +- localedata: ce_RU: update weekdays from CLDR (swbz#21207) +- localedata: Remove trailing spaces (swbz#20275) +- XPG4 bsd_signal namespace (swbz#21552) +- Correct collation rules for Malayalam (swbz#19922, swbz#19919) +- waitid namespace (swbz#21561) +- Condition signal.h inclusion in sys/wait.h (swbz#21560) +- ld.so: Consolidate 2 strtouls into _dl_strtoul (swbz#21528) +- tst-timezone race (swbz#14096) +- Define SIG_HOLD for XPG4 (swbz#21538) +- struct sigaltstack namespace (swbz#21517) +- sigevent namespace (swbz#21543) +- Add shim header for bits/syscall.h (swbz#21514) +- namespace issues in sys/ucontext.h (swbz#21457) +- posix: Implement preadv2 and pwritev2 +- Various float128 and tunables improvements + +* Tue Jun 06 2017 Stephen Gallagher - 2.25.90-6 +- Reduce libcrypt-nss dependency to 'Suggests:' + +* Wed May 31 2017 Arjun Shankar - 2.25.90-5 +- Auto-sync with upstream master, + commit cfa9bb61cd09c40def96f042a3123ec0093c4ad0. +- Fix sys/ucontext.h namespace from signal.h etc. inclusion (swbz#21457) +- Fix sigstack namespace (swbz#21511) + +* Wed May 31 2017 Arjun Shankar - 2.25.90-4 +- Disable the NULL buffer test in login/tst-ptsname.c. It leads to a build + failure during 'make check'. A permanent solution is being discussed + upstream. + +* Tue May 23 2017 Arjun Shankar - 2.25.90-3 +- Auto-sync with upstream master, + commit 231a59ce2c5719d2d77752c21092960e28837b4a. +- Add el_GR@euro support (swbz#20686) +- Set dl_platform and dl_hwcap from CPU features (swbz#21391) +- Use __glibc_reserved convention in mcontext, sigcontext (swbz#21457) +- Fix signal.h bsd_signal namespace (swbz#21445) +- Fix network headers stdint.h namespace (swbz#21455) +- resolv: Use RES_DFLRETRY consistently (swbz#21474) +- Condition some sys/ucontext.h contents on __USE_MISC (swbz#21457) +- Consolidate Linux read syscall (swbz#21428) +- fork: Remove bogus parent PID assertions (swbz#21386) +- Reduce value of LD_HWCAP_MASK for tst-env-setuid test case (swbz#21502) +- libio: Avoid dup already opened file descriptor (swbz#21393) + +* Mon May 01 2017 Carlos O'Donell - 2.25.90-2 +- Auto-sync with upstream master, + commit 25e39b4229fb365a605dc4c8f5d6426a77bc08a6. +- logbl for POWER7 return incorrect results (swbz#21280) +- sys/socket.h uio.h namespace (swbz#21426) +- Support POSIX_SPAWN_SETSID (swbz#21340) +- Document how to provide a malloc replacement (swbz#20424) +- Verify that all internal sockets opened with SOCK_CLOEXEC (swbz#15722) +- Use AVX2 memcpy/memset on Skylake server (swbz#21396) +- unwind-dw2-fde deadlock when using AddressSanitizer (swbz#21357) +- resolv: Reduce advertised EDNS0 buffer size to guard against + fragmentation attacks (swbz#21361) +- mmap64 silently truncates large offset values (swbz#21270) +- _dl_map_segments does not test for __mprotect failures consistently + (swbz#20831) + +* Thu Mar 02 2017 Florian Weimer - 2.25.90-1 +- Switch back to upstream master branch. +- Drop Unicode 9 patch, merged upstream. +- Auto-sync with upstream master, + commit a10e9c4e53fc652b79abf838f7f837589d2c84db, fixing: +- Build all DSOs with BIND_NOW (#1406731) + +* Wed Mar 1 2017 Jakub Hrozek - 2.25-3 +- NSS: Prefer sss service for passwd, group databases (#1427646) + +* Tue Feb 28 2017 Florian Weimer - 2.25-2 +- Auto-sync with upstream release/2.25/master, + commit 93cf93e06ce123439e41d3d62790601c313134cb, fixing: +- sunrpc: Improvements for UDP client timeout handling (#1346406) +- sunrpc: Avoid use-after-free read access in clntudp_call (swbz#21115) +- Fix getting tunable values on big-endian (swbz#21109) + +* Wed Feb 08 2017 Carlos O'Donell - 2.25-1 +- Update to final released glibc 2.25. + +* Wed Feb 08 2017 Carlos O'Donell - 2.24.90-31 +- Fix builds with GCC 7.0. + +* Wed Feb 01 2017 Carlos O'Donell - 2.24.90-30 +- Optimize IBM z System builds for zEC12. + +* Wed Jan 25 2017 Florian Weimer - 2.24.90-29 +- Use vpath in crypt-glibc/Makefile to obtain the test input file. +- Auto-sync with upstream master, + commit 5653ab12b4ae15b32d41de7c56b2a4626cd0437a, fixing: +- ARM fpu_control.h for assemblers requiring VFP insn names (swbz#21047) +- FAIL in test string/tst-xbzero-opt (swbz#21006) +- Make soft-float powerpc swapcontext restore the signal mask (swbz#21045) +- Clear list of acquired robust mutexes in the child after fork (swbz#19402) + +* Thu Jan 12 2017 Carlos O'Donell - 2.24.90-28 +- Auto-sync with upstream master, + commit 468e525c81a4af10f2e613289b6ff7c950773a9e: +- Drop rwlock related patches applied upstream. +- Fix i686 memchr for large input sizes (swbz#21014) +- Fix x86 strncat for large input sizes (swbz#19390) +- powerpc: Fix write-after-destroy in lock elision (swbz#20822) +- New pthread rwlock that is more scalable. +- Fix testsuite build for GCC 7 -Wformat-truncation. + +* Mon Jan 02 2017 Florian Weimer - 2.24.90-27 +- Auto-sync with upstream master, + commit 73dfd088936b9237599e4ab737c7ae2ea7d710e1: +- Enable tunables. +- Drop condvar-related patches applied upstream. +- Update DNS RR type definitions (swbz#20593) +- CVE-2015-5180: resolv: Fix crash with internal QTYPE (#1249603) +- sunrpc: Always obtain AF_INET addresses from NSS (swbz#20964) + +* Mon Dec 26 2016 Florian Weimer - 2.24.90-26 +- Auto-sync with upstream master, + commit cecbc7967f0bcac718b6f8f8942b58403c0e917c +- Enable stack protector for most of glibc (#1406731) + +* Fri Dec 23 2016 Carlos O'Donell - 2.24.90-25 +- Auto-sync with upstream master, + commit 81e0662e5f2c342ffa413826b7b100d56677b613, fixing: +- Shared object unload assert when calling dlclose (#1398370, swbz#11941) +- Fix nss_nisplus build with mainline GCC (swbz#20978) +- Add Intel TSX blacklist for silicon with known errata. +- Add fmax, fmin, fmaxf, fminf microbenchmarks. +- Robust mutexes: Fix lost wake-up (swbz#20973). +- Add fmaxmag, fminmag, roundeven, roundevenf, roundevenl functions. + +* Sun Dec 18 2016 Florian Weimer - 2.24.90-24 +- Auto-sync with upstream master, + commit e077349ce589466eecd47213db4fae6b80ec18c4, fixing: +- Warn about assignment in assertions (#1105335) +- powerpc64/power7 memchr for large input sizes (swbz#20971) +- fmax, fmin sNaN handling (swbz#20947) + +* Mon Dec 12 2016 Florian Weimer - 2.24.90-23 +- Auto-sync with upstream master, + commit 92dcaa3e2f7bf0f7f1c04cd2fb6a317df1a4e225, fixing: +- Add getrandom, getentropy (#1172273) +- Add additional compiler barriers to backtrace tests (swbz#20956) + +* Fri Dec 09 2016 Florian Weimer - 2.24.90-22 +- Auto-sync with upstream master, + commit 0abbe7cd700951082b314182a0958d65238297ef, changing: +- IN6_IS_ADDR_ does not require enabling non-standard extensions (#1138893) +- Install libm.a as linker script (swbz#20539) +- Fix writes past the allocated array bounds in execvpe (swbz#20847) +- Fix hypot sNaN handling (swbz#20940) +- Fix x86_64/x86 powl handling of sNaN arguments (swbz#20916) +- Fix sysdeps/ieee754 pow handling of sNaN arguments (swbz#20916) +- Fix pow (qNaN, 0) result with -lieee (swbz#20919) +- Fix --enable-nss-crypt failure of tst-linkall-static (swbz#20918) + +* Fri Dec 02 2016 Florian Weimer - 2.24.90-21 +- Auto-sync with upstream master, + commit 01b23a30b42a90b1ebd882a0d81110a1542e504a, fixing: +- aarch64: Incorrect dynamic TLS resolution (#1400347) + +* Wed Nov 30 2016 Florian Weimer - 2.24.90-20 +- Auto-sync with upstream master, + commit 9e78f6f6e7134a5f299cc8de77370218f8019237, fixing: +- stdio buffering with certain network file systems (#1400144) +- libpthread initialization breaks ld.so exceptions (#1393909) +- x86_64: Use of PLT and GOT in static archives (swbz#20750) +- localedata, iconvdata: 0x80->Euro sign mapping for GBK (swbz#20864) +- math: x86_64 -mfpmath=387 float_t, double_t (swbz#20787) + +* Wed Nov 23 2016 Florian Weimer - 2.24.90-19 +- Auto-sync with upstream master, + commit 7a5e3d9d633c828d84a9535f26b202a6179978e7: +- Fix default float_t definition (swbz#20855) +- Fix writes past the allocated array bounds in execvpe (swbz#20847) + +* Tue Nov 22 2016 Florian Weimer - 2.24.90-18 +- Auto-sync with upstream master, + commit 5ee1a4443a3eb0868cef1fe506ae6fb6af33d4ad. + +* Wed Nov 16 2016 Carlos O'Donell - 2.24.90-17 +* Add new scalable implementation of POSIX read-write locks. + +* Wed Nov 16 2016 Florian Weimer - 2.24.90-16 +- Do not try to link libcrypt statically during tests + +* Wed Nov 16 2016 Florian Weimer - 2.24.90-15 +- Auto-sync with upstream master, + commit 530862a63e0929128dc98fbbd463b120934434fb, fixing: +- Fix rpcgen buffer overrun (swbz#20790) +- Fix ppc64 build failure to swbz#20729 fix attempt + +* Wed Nov 2 2016 Florian Weimer - 2.24.90-14 +- Drop glibc-swbz20019.patch, applied upstream. +- dlerror returns NULL after dlsym (RTLD_NEXT) lookup failure (#1333945) + (fixed by dropping the revert) +- Auto-sync with upstream master, + commit 9032070deaa03431921315f973c548c2c403fecc, fixing: +- Correct clog10 documentation (swbz#19673) +- Fix building with -Os (swbz#20729) +- Properly initialize glob structure with GLOB_BRACE|GLOB_DOOFFS (swbz#20707) +- powerpc: Fix TOC stub on powerpc64 clone (swbz#20728) +- math: Make strtod raise "inexact" exceptions (swbz#19380) +- malloc: Remove malloc_get_state, malloc_set_state (swbz#19473) + +* Sat Oct 22 2016 Florian Weimer - 2.24.90-13 +- Auto-sync with upstream master, + commit e37208ce86916af9510ffb9ce7b3c187986f07de, changing: +- Restore compatbility with extern "C" wrappers + +* Fri Oct 21 2016 Florian Weimer - 2.24.90-12 +- Auto-sync with upstream master, + commit b3918c44db615637b26d919ce599cd86592316b3, fixing: +- math: Turn iszero into a function template (#1387415) +- ARM: Use VSQRT instruction (swbz#20660) +- math: Stop powerpc copysignl raising "invalid" for sNaN (swbz#20718) +- x86: Fix FMA and AVX2 detection (swbz#20689) +- x86: Avoid assertion failure on older Intel CPus (swbz#20647) + +* Mon Oct 17 2016 Carlos O'Donell - 2.24.90-11 +- Add prototype support for detecting invalid IFUNC calls (swbz#20019). +- New POSIX thread condition variable implementation (swbz#13165). + +* Fri Oct 07 2016 Florian Weimer - 2.24.90-10 +- Auto-sync with upstream master, + commit 5140d036f9c16585448b5908c3a219bd96842161, fixing: +- resolv: Remove RES_USEBSTRING and its implementation (swbz#20629) +- Refactor ifunc resolvers due to false debuginfo (swbz#20478) + +* Tue Oct 04 2016 Florian Weimer - 2.24.90-9 +- Auto-sync with upstream master, + commit ff88ee7edfaa439e23c42fccaf3a36cd5f041894, fixing: +- LONG_WIDTH is incorrectly set to the 64 on 32-bit platforms (#1381582) +- libio: Multiple fixes for open_{w}memstream (swbz#18241, swbz#20181) +- Simplify and test _dl_addr_inside_object (swbz#20292) + +* Thu Sep 22 2016 Florian Weimer - 2.24.90-8 +- Add support for MIPS (#1377795) +- Drop glibc-rh1315476-1.patch (sln pre-processor cleanup), it was + applied upstream. +- Auto-sync with upstream master, + commit 17af5da98cd2c9ec958421ae2108f877e0945451, fixing the following bugs: +- Fix non-LE TLS in static programs (swbz#19826) +- resolv: Remove unsupported hook functions from the API (swbz#20016) +- Remove RR type classification macros (swbz#20592) +- Remove obsolete DNSSEC support (swbz#20591) +- manual: Clarify the documentation of strverscmp (swbz#20524) + +* Tue Sep 20 2016 Carlos O'Donell - 2.24.90-7 +- Auto-sync with upstream master. + +* Thu Sep 01 2016 Florian Weimer - 2.24.90-6 +- Auto-sync with upstream master, + commit 4d728087ef8cc826b05bd21d0c74d4eca9b1a27d, fixing: +- Base on Linux headers (#1360480) +- Simplify static malloc interposition (swbz#20432) + +* Fri Aug 26 2016 Florian Weimer - 2.24.90-5 +- Auto-sync with upstream master, + commit 7e625f7e85b4e88f10dbde35a0641742af581806, fixing: +- lt_LT locale: use hyphens in d_fmt (swbz#20497) +- nptl test time reductions (swbz#19946) + +* Sun Aug 21 2016 Florian Weimer - 2.24.90-4 +- Auto-sync with upstream master, + commit 66abf9bfbe24ac1e7207d26ccad725ed938dc52c, fixing: +- argp: Do not override GCC keywords with macros (#1366830) + +* Wed Aug 17 2016 Florian Weimer - 2.24.90-3 +- Auto-sync with upstream master, + commit d9067fca40b8aac156d73cfa44d6875813555a6c, with these changes: +- Avoid duplicating object files already in libc.a (#1352625) +- CVE-2016-6323: Backtraces can hang on ARM EABI (32-bit) (swbz#20435) +- et_EE: locale has wrong {p,n}_cs_precedes value (swbz#20459 + +* Thu Aug 11 2016 Florian Weimer - 2.24.90-2 +- Auto-sync with upstream master, + commit f79211792127f38d5954419bb3784c8eb7f5e4e5 + +* Mon Aug 08 2016 Carlos O'Donell - 2.24.90-1 +- Set version to 2.24.90 to match upstream development. + +* Mon Aug 08 2016 Carlos O'Donell - 2.23.90-31 +- Auto-sync with upstream master. + +* Thu Jul 21 2016 Florian Weimer - 2.23.90-30 +- Drop sendmsg/recvmsg compatibility patch (#1344830) +- glibc-devel depends on libgcc%%{_isa} (#1289356) +- Drop Requires(pre) on libgcc +- Introduce libcrypt and libcrypt-nss (#1324623) +- Do not try to install mtrace when bootstrapping + +* Wed Jul 20 2016 Florian Weimer - 2.23.90-29 +- Move NSS modules to subpackages (#1338889) + +* Wed Jul 13 2016 Florian Weimer - 2.23.90-28 +- Auto-sync with upstream master, commit + f531f93056b34800383c5154280e7ba5112563c7. +- Add de_LI.UTF-8 locale. +- Make ldconfig and sln the same binary. (#1315476) + +* Fri Jul 08 2016 Mike FABIAN - 2.23.90-27 +- Unicode 9.0.0 updates (ctype, charmap, transliteration) (#1351108) + +* Tue Jul 05 2016 Florian Weimer - 2.23.90-26 +- Auto-sync with upstream master, up to commit + 30e4cc5413f72c2c728a544389da0c48500d9904, fixing these bug: +- strcasecmp failure on ppc64le (#nscd breaks initgroups with nis (initgroups are empty) (#1294574) + +* Fri Jun 24 2016 Carlos O'Donell - 2.23.90-25 +- Properly handle more invalid --install-langs arguments (#1349906). + +* Tue Jun 21 2016 Florian Weimer - 2.23.90-24 +- Auto-sync with upstream master, commit + a3b473373ee43a292f5ec68a7fda6b9cfb26a9b0, fixing these bugs: +- Unnecessary mmap fallback in malloc (#1348620) +- pwritev system call passes incorrect offset to kernel (#1346070) + +* Sat Jun 18 2016 Carlos O'Donell - 2.23.90-23 +- Use scriptlet expansion in all-langpacks posttrans script to expand + _install_langes macro. + +* Mon Jun 13 2016 Florian Weimer - 2.23.90-22 +- Remove glibc-fedora-uname-getrlimit.patch. This patch was + introduced to fix bug rhbz#579086 (Preloading a replacement uname + is causing environment to be cleaned if libpthread is loaded). + UTS namespaces should now offer a cleaner way yo do this. +- Drop sendmmsg/recvmmsg compat symbols on 32-bit architectures (#1344830) +* Sat Jun 11 2016 Florian Weimer - 2.23.90-21 +- First phase of sendmsg/recvmsg/sendmmsg/recvmmsg ABI revert: + GLIBC_2.24 compatibility symbols (#1344830) +- Auto-sync with upstream master + (commit 31d0a4fa646db8b8c97ce24e0ec0a7b73de4fca1), + fixing the following bugs: +- Add eo locale +- Crash in the nss_db NSS service module during iteration (#1344480) + +* Thu Jun 09 2016 Florian Weimer - 2.23.90-20 +- Auto-sync with upstream master, fixing this bug: +- Emacs crashes on startup (#1342976) + +* Wed Jun 01 2016 Florian Weimer - 2.23.90-19 +- Auto-sync with upstream master. +- Adjust glibc-rh1315108.patch accordingly. +- Fix fork redirection in libpthread (#1326903) +- CVE-2016-4429: stack overflow in Sun RPC clntudp_call (#1337140) +- Do not disable assertions in release builds (#1338887) + +* Wed May 11 2016 Carlos O'Donell - 2.23.90-18 +- Move support for building GCC 2.96 into compat-gcc-296. + +* Wed May 11 2016 Florian Weimer - 2.23.90-17 +- Temporily revert dlsym (RTLD_NEXT)/dlerror change, to unbreak + ASAN until it is fixed (#1335011) + +* Mon May 9 2016 Florian Weimer - 2.23.90-16 +- Drop the “fix†for fork/vfork NULL symbols in libpthread. It does + not work because ld.so apparently supports some variant of direct + binding. + +* Mon May 09 2016 Florian Weimer - 2.23.90-15 +- Auto-sync with upstream master. +- Drop glibc-nsswitch-Add-group-merging-support.patch, applied upstream. +- Drop glibc-rh1252570.patch, alternative fixes applied upstream. +- Adjust glibc-rh1315108.patch to minor upstream change. +- Update SUPPORTED file. +- Experimental fix for NULL fork/vfork symbols in libpthread (#1326903) + +* Tue May 03 2016 Carlos O'Donell - 2.23.90-14 +- Require libselinux for nscd in non-bootstrap configuration. + +* Fri Apr 29 2016 Carlos O'Donell - 2.23.90-13 +- Auto-sync with upstream master. + +* Thu Apr 28 2016 Carlos O'Donell - 2.23.90-12 +- Move spec file system information logging to the build stage. + +* Thu Apr 14 2016 Florian Weimer - 2.23.90-11 +- Auto-sync with upstream master. +- Unbreak pread/pread64 on armhfp (#1327277) + +* Thu Apr 14 2016 Florian Weimer - 2.23.90-10 +- Auto-sync with upstream master. + +* Thu Apr 14 2016 Florian Weimer - 2.23.90-9 +- Auto-sync with upstream master. Removes type union wait. +- Update SUPPORTED locales file. + +* Fri Apr 08 2016 Florian Weimer - 2.23.90-8 +- Auto-sync with upstream master. + +* Tue Mar 29 2016 Florian Weimer - 2.23.90-7 +- Auto-sync with upstream master. +- Adjust glibc-rh1252570.patch to partial upstream fix. +- Drop glibc-fix-an_ES.patch, now included upstream. + +* Wed Mar 16 2016 Carlos O'Donell - 2.23.90-6 +- Use 'an' as language abbreviation for an_ES. + +* Mon Mar 07 2016 Carlos O'Donell - 2.23.90-5 +- Auto-sync with upstream master. + +* Sun Mar 6 2016 Florian Weimer - 2.23.90-4 +- Remove extend_alloca (#1315108) + +* Mon Feb 29 2016 Carlos O'Donell - 2.23.90-3 +- Enhance support for upgrading from a non-language-pack system. + +* Fri Feb 26 2016 Mike FABIAN - 2.23.90-2 +- Create new language packages for all supported languages. + Locales, translations, and locale sources are split into + distinct sub-packages. A meta-package is created for users + to install all languages. Transparent installation support + is provided via dnf langpacks. + +* Fri Feb 26 2016 Carlos O'Donell - 2.23.90-1 +- Upstream development version is now 2.23.90. + +* Thu Feb 25 2016 Carlos O'Donell - 2.22.90-38 +- Auto-sync with upstream master. + +* Fri Feb 19 2016 Florian Weimer - 2.22.90-37 +- Remove stray newline from Serbian locales (#1114591). + +* Tue Feb 16 2016 CArlos O'Donell - 2.22.90-36 +- Fix CVE-2015-7547: getaddrinfo() stack-based buffer overflow (#1308943). + +* Mon Feb 15 2016 Florian Weimer - 2.22.90-35 +- Revert may_alias attribute for struct sockaddr (#1306511). +- Revert upstream commit 2212c1420c92a33b0e0bd9a34938c9814a56c0f7 (#1252570). + +* Sat Feb 13 2016 Florian Weimer - 2.22.90-34 +- Auto-sync with upstream master. +- Support aliasing with struct sockaddr pointers (#1306511). + +* Tue Feb 09 2016 Carlos O'Donell - 2.22.90-33 +- Use --with-cpu=power8 for ppc64le default runtime (#1227361). + +* Tue Feb 02 2016 Florian Weimer - 2.22.90-32 +- Auto-sync with upstream master. +- Add glibc-isinf-cxx11.patch to improve C++11 compatibility. + +* Thu Jan 28 2016 Florian Weimer - 2.22.90-31 +- Add workaround for GCC PR69537. + +* Thu Jan 28 2016 Florian Weimer - 2.22.90-30 +- Auto-sync with upstream master. + +* Wed Jan 13 2016 Carlos O'Donell - 2.22.90-29 +- New pthread_barrier algorithm with improved standards compliance. + +* Wed Jan 13 2016 Carlos O'Donell - 2.22.90-28 +- Add group merging support for distributed management (#1146822). + +* Tue Jan 12 2016 Carlos O'Donell - 2.22.90-27 +- Remove 32-bit POWER support. +- Add 64-bit POWER7 BE and 64-bit POWER8 BE optimized libraries. + +* Mon Dec 21 2015 Florian Weimer - 2.22.90-26 +- Auto-sync with upstream master. + +* Wed Dec 16 2015 Florian Weimer - 2.22.90-25 +- Auto-sync with upstream master. +- Includes fix for malloc assertion failure in get_free_list. (#1281714) +- Drop Unicode 8.0 patches (now merged upstream). + +* Sat Dec 5 2015 Florian Weimer - 2.22.90-24 +- Put libmvec_nonshared.a into the -devel package. (#1288738) + +* Sat Dec 05 2015 Florian Weimer - 2.22.90-23 +- Auto-sync with upstream master. + +* Thu Nov 26 2015 Carlos O'Donell - 2.22.90-22 +- The generic hidden directive support is already used for + preinit/init/fini-array symbols so we drop the Fedora-specific + patch that does the same thing. + Reported by Dmitry V. Levin + +* Thu Nov 26 2015 DJ Delorie - 2.22.90-22 +- Require glibc-static for C++ tests. +- Require gcc-c++, libstdc++-static, and glibc-static only when needed. +- Fix --without docs to not leave info files. + +* Fri Nov 20 2015 Florian Weimer - 2.22.90-21 +- Auto-sync with upstream master. + +* Wed Nov 18 2015 Florian Weimer - 2.22.90-20 +- Auto-sync with upstream master. + +* Wed Nov 18 2015 Florian Weimer - 2.22.90-19 +- Disable -Werror on s390 (#1283184). + +* Mon Nov 16 2015 Florian Weimer - 2.22.90-18 +- Auto-sync with upstream master. + +* Mon Nov 16 2015 Florian Weimer - 2.22.90-17 +- Revert temporary armhfp build fix. + +* Mon Nov 9 2015 Florian Weimer - 2.22.90-16 +- Apply temporary fix for armhfp build issue. + +* Mon Nov 09 2015 Florian Weimer - 2.22.90-15 +- Auto-sync with upstream master. + +* Tue Nov 3 2015 Florian Weimer - 2.22.90-14 +- Log uname, cpuinfo, meminfo during build (#1276636) + +* Fri Oct 30 2015 Florian Weimer - 2.22.90-13 +- Auto-sync with upstream master. + +* Fri Oct 30 2015 Florian Weimer - 2.22.90-12 +- Revert to upstream implementation of condition variables (#1229659) + +* Wed Oct 28 2015 Florian Weimer - 2.22.90-11 +- Disable valgrind test on ppc64p7, too. + +* Mon Oct 26 2015 Carlos O'Donell - 2.22.90-10 +- Disable valgrind test for ppc64. + +* Wed Oct 21 2015 Carlos O'Donell - 2.22.90-9 +- Sync with upstream master. +- Update new condvar implementation. + +* Fri Oct 9 2015 Carlos O'Donell - 2.22.90-8 +- Remove libbsd.a (#1193168). + +* Wed Sep 16 2015 Mike FABIAN - 2.22.90-7 +- Add the C.UTF-8 locale (#902094). + +* Wed Sep 16 2015 Carlos O'Donell - 2.22.90-6 +- Fix GCC 5 and -Werror related build failures. +- Fix --install-langs bug which causes SIGABRT (#1262040). + +* Fri Aug 28 2015 Carlos O'Donell - 2.22.90-5 +- Auto-sync with upstream master. + +* Thu Aug 27 2015 Carlos O'Donell - 2.22.90-4 +- Build require gcc-c++ for the C++ tests. +- Support --without testsuite option to disable testing after build. +- Support --without benchtests option to disable microbenchmarks. +- Update --with bootstrap to disable benchtests, valgrind, documentation, + selinux, and nss-crypt during bootstrap. +- Support --without werror to disable building with -Werror. +- Support --without docs to disable build requirement on texinfo. +- Support --without valgrind to disable testing with valgrind. +- Remove c_stubs add-on and enable fuller support for static binaries. +- Remove librtkaio support (#1227855). + +* Sun Aug 16 2015 Siddhesh Poyarekar - 2.22.90-3 +- Auto-sync with upstream master. + +* Fri Aug 14 2015 Siddhesh Poyarekar - 2.22.90-2 +- Remove initgroups from the default nsswitch.conf (#751450). + +* Fri Aug 14 2015 Siddhesh Poyarekar - 2.22.90-1 +- Sync with upstream master. + +* Tue Jul 28 2015 Siddhesh Poyarekar - 2.21.90-20 +- Sync with upstream master. + +* Thu Jul 23 2015 Mike FABIAN - 2.21.90-19 +- some more additions to the translit_neutral file by Marko Myllynen + +* Tue Jul 14 2015 Mike FABIAN - 2.21.90-18 +- Unicode 8.0.0 updates, including the transliteration files (#1238412). + +* Sun Jun 21 2015 Carlos O'Donell - 2.21.90-17 +- Remove all linuxthreads handling from glibc spec file. + +* Wed Jun 17 2015 Carlos O'Donell - 2.21.90-16 +- Move split out architecture-dependent header files into devel package + and keep generic variant in headers package, thus keeping headers package + content and file list identical across multilib rpms. + +* Wed Jun 17 2015 Fedora Release Engineering - 2.21.90-15.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 3 2015 Carlos O'Donell - 2.21.90-15 +- Remove patch to increase DTV surplus which is no longer needed after + upstream commit f8aeae347377f3dfa8cbadde057adf1827fb1d44. + +* Sat May 30 2015 Siddhesh Poyarekar - 2.21.90-14 +- Fix build failure on aarch64 (#1226459). + +* Mon May 18 2015 Siddhesh Poyarekar - 2.21.90-13 +- Sync with upstream master. +- Install new condvar implementation. + +* Fri May 08 2015 Siddhesh Poyarekar - 2.21.90-12 +- Add benchmark comparison scripts. + +* Thu May 07 2015 Siddhesh Poyarekar - 2.21.90-11 +- Auto-sync with upstream master. +- Revert arena threshold fix to work around #1209451. + +* Tue Apr 07 2015 Siddhesh Poyarekar - 2.21.90-10 +- Revert last auto-sync (#1209451). + +* Mon Apr 06 2015 Siddhesh Poyarekar - 2.21.90-9 +- Auto-sync with upstream master. + +* Tue Mar 24 2015 Siddhesh Poyarekar - 2.21.90-8 +- Auto-sync with upstream master. + +* Tue Mar 17 2015 Carlos O'Donell - 2.21.90-7 +- Use rpm.expand in scripts to reduce set of required RPM features. + +* Thu Mar 12 2015 Siddhesh Poyarekar - 2.21.90-6 +- Auto-sync with upstream master. + +* Tue Mar 3 2015 Mike Fabian - 2.21.90-5 +- Support installing only those locales specified by the RPM macro + %%_install_langs (#156477). + +* Mon Feb 23 2015 Siddhesh Poyarekar - 2.21.90-4 +- Auto-sync with upstream master. + +* Sat Feb 21 2015 Till Maas - 2.21.90-3.1 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Thu Feb 12 2015 Carlos O'Donell - 2.21.90-3 +- Fix missing clock_* IFUNCs in librtkaio. + +* Thu Feb 12 2015 Carlos O'Donell - 2.21.90-2 +- Auto-sync with upstream master. + +* Wed Feb 11 2015 Carlos O'Donell - 2.21.90-1 +- Add back x86 vDSO support. +- Fix rtkaio build to reference clock_* functions from libc. + +* Wed Jan 21 2015 Siddhesh Poyarekar - 2.20.90-20 +- Sync with upstream master. +- Disable werror on s390x. +- Revert x86 vDSO support since it breaks i686 rtkaio build. + +* Tue Jan 20 2015 Peter Robinson 2.20.90-19 +- Drop large ancient ChangeLogs (rhbz #1169546) + +* Mon Jan 12 2015 Siddhesh Poyarekar - 2.20.90-18 +- Pass address of main_arena.mutex to mutex_lock/unlock. + +* Thu Jan 08 2015 Siddhesh Poyarekar - 2.20.90-17 +- Define a __tls_get_addr macro to avoid a conflicting declaration. + +* Wed Jan 07 2015 Siddhesh Poyarekar - 2.20.90-16 +- Disable -Werror for s390 as well. + +* Wed Jan 07 2015 Siddhesh Poyarekar - 2.20.90-14 +- Sync with upstream master. +- Disable -Werror on powerpc and armv7hl. +- Temporarily disable valgrind test on ppc64. + +* Sun Dec 28 2014 Dan Horák +- valgrind available only on selected arches (missing on s390) + +* Wed Dec 10 2014 Kyle McMartin +- aarch64: Drop strchrnul.S revert, apply fix from Richard Earnshaw. + +* Fri Dec 05 2014 Carlos O'Donell - 2.20.90-13 +- Fix permission of debuginfo source files to allow multiarch + debuginfo packages to be installed and upgraded. + +* Fri Dec 05 2014 Siddhesh Poyarekar - 2.20.90-12 +- Remove LIB_LANG since we don't install locales in /usr/lib/locale anymore. +- Don't own any directories in /usr/share/locale (#1167445). +- Use the %%find_lang macro to get the *.mo files (#1167445). +- Add %%lang tags to language locale files in /usr/share/i18n/locale (#1169044). + +* Wed Dec 03 2014 Kyle McMartin - 2.20.90-11 +- aarch64: revert optimized strchrnul.S implementation (rhbz#1167501) + until it can be debugged. + +* Fri Nov 28 2014 Carlos O'Donell - 2.20.90-10 +- Auto-sync with upstream master. + +* Wed Nov 19 2014 Carlos O'Donell - 2.20.90-9 +- Sync with upstream master. + +* Wed Nov 05 2014 Siddhesh Poyarekar - 2.20.90-8 +- Make getconf return only /usr/bin (#1138835). +- Sync with upstream master. + +* Tue Nov 04 2014 Arjun Shankar - 2.20.90-7 +- Add patch that modifies several tests to use test-skeleton.c. + The patch is accepted but not yet committed upstream. + https://sourceware.org/ml/libc-alpha/2014-10/msg00744.html + +* Tue Sep 30 2014 Siddhesh Poyarekar - 2.20.90-6 +- Sync with upstream master. +- Disable more Intel TSX usage in rwlocks (#1146967). +- Enable lock elision again on s390 and s390x. +- Enable Systemtap SDT probes for all architectures (#985109). + +* Fri Sep 26 2014 Carlos O'Donell - 2.20.90-5 +- Disable lock elision support for Intel hardware until microcode + updates can be done in early bootup (#1146967). +- Fix building test tst-strtod-round for ARM. + +* Tue Sep 23 2014 Siddhesh Poyarekar - 2.20.90-4 +- Sync with upstream master. +- Don't own the common debuginfo directories (#1144853). +- Run valgrind in the %%check section to ensure that it does not break. + +* Tue Sep 16 2014 Siddhesh Poyarekar - 2.20.90-3 +- Sync with upstream master. +- Revert patch for #737223. + +* Mon Sep 08 2014 Siddhesh Poyarekar - 2.20.90-2 +- Build build-locale-archive statically again. + +* Mon Sep 08 2014 Siddhesh Poyarekar - 2.20.90-1 +- Sync with upstream master. + +* Thu Sep 4 2014 Carlos O'Donell - 2.19.90-36 +- Allow up to 32 dlopened modules to use static TLS (#1124987). +- Run glibc tests in %%check section of RPM spec file. +- Do not run tests with `-k` and fail if any test fails to build. + +* Tue Aug 26 2014 Siddhesh Poyarekar - 2.19.90-35 +- Sync with upstream master. +- Use INTERNAL_SYSCALL in TLS_INIT_TP (#1133134). +- Remove gconv loadable module transliteration support (CVE-2014-5119, #1119128). + +* Fri Aug 22 2014 Dennis Gilmore - 2.19.90-34 +- add back sss to nsswitch.conf we have added workarounds in the tools + +* Thu Aug 21 2014 Kevin Fenzi - 2.19.90-33.1 +- Rebuild for rpm bug 1131960 + +* Tue Aug 19 2014 Dennis Gilmore - 2.19.90-33 +- remove sss from default nsswitch.conf it causes issues with live image composing + +* Wed Aug 13 2014 Siddhesh Poyarekar - 2.19.90-32 +- Auto-sync with upstream master. +- Revert to only defining __extern_always_inline for g++-4.3+. +- Fix build failure in compat-gcc-32 (#186410). + +* Mon Jul 28 2014 Siddhesh Poyarekar - 2.19.90-31 +- Auto-sync with upstream master. + +* Wed Jul 23 2014 Siddhesh Poyarekar - 2.19.90-30 +- Undo last master sync to fix up rawhide. + +* Tue Jul 15 2014 Siddhesh Poyarekar - 2.19.90-29 +- Auto-sync with upstream master. + +* Sat Jul 12 2014 Tom Callaway - 2.19.90-28 +- fix license handling + +* Mon Jul 07 2014 Siddhesh Poyarekar - 2.19.90-27 +- Auto-sync with upstream master. + +* Fri Jul 04 2014 Siddhesh Poyarekar - 2.19.90-26 +- Sync with upstream roland/nptl branch. +- Improve testsuite failure outputs in build.log + +* Thu Jul 03 2014 Siddhesh Poyarekar - 2.19.90-25 +- Sync with upstream roland/nptl branch. + +* Wed Jul 02 2014 Siddhesh Poyarekar - 2.19.90-24 +- Sync with upstream master. + +* Tue Jun 24 2014 Siddhesh Poyarekar - 2.19.90-23 +- Sync with upstream master. +- Add fix to unbreak i386 ABI breakage due to a change in scalbn. + +* Fri Jun 20 2014 Kyle McMartin - 2.19.90-22 +- AArch64: Save & restore NZCV (flags) upon entry to _dl_tlsdesc_dynamic + in order to work around GCC reordering compares across the TLS + descriptor sequence (GCC PR61545.) Committing a (temporary) fix here + allows us to avoid rebuilding the world with gcc 4.9.0-11.fc21. + +* Mon Jun 16 2014 Kyle McMartin - 2.19.90-21 +- Auto-sync with upstream master. + +* Thu Jun 12 2014 Siddhesh Poyarekar - 2.19.90-20 +- Auto-sync with upstream master. + +* Sat Jun 07 2014 Fedora Release Engineering - 2.19.90-19.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Jun 03 2014 Siddhesh Poyarekar - 2.19.90-19 +- Sync with upstream master. + +* Mon May 26 2014 Siddhesh Poyarekar - 2.19.90-18 +- Sync with upstream master. +- Adjust rtkaio patches to build with upstream master. + +* Wed May 21 2014 Kyle McMartin - 2.19.90-17 +- Backport some upstream-wards patches to fix TLS issues on AArch64. + +* Wed May 21 2014 Kyle McMartin - 2.19.90-16 +- AArch64: Fix handling of nocancel syscall failures (#1098327) + +* Thu May 15 2014 Siddhesh Poyarekar - 2.19.90-15 +- Sync with upstream master. + +* Wed May 14 2014 Carlos O'Donell - 2.19.90-14 +- Add support for displaying all test results in build logs. + +* Wed May 14 2014 Carlos O'Donell - 2.19.90-13 +- Add initial support for ppc64le. + +* Tue Apr 29 2014 Siddhesh Poyarekar - 2.19.90-12 +- Auto-sync with upstream master. +- Remove ports addon. + +* Fri Apr 18 2014 Siddhesh Poyarekar - 2.19.90-11 +- Sync with upstream master. + +* Thu Apr 10 2014 Siddhesh Poyarekar - 2.19.90-10 +- Sync with upstream master. + +* Thu Apr 03 2014 Siddhesh Poyarekar - 2.19.90-9 +- Sync with upstream master. + +* Wed Mar 26 2014 Siddhesh Poyarekar - 2.19.90-8 +- Sync with upstream master. + +* Wed Mar 19 2014 Siddhesh Poyarekar - 2.19.90-7 +- Sync with upstream master. +- Fix offset computation for append+ mode on switching from read (#1078355). + +* Wed Mar 12 2014 Carlos O'Donell - 2.19.90-6 +- Sync with upstream master. +- Use cleaner upstream solution for -ftree-loop-distribute-patterns (#911307). + +* Tue Mar 04 2014 Siddhesh Poyarekar - 2.19.90-5 +- Sync with upstream master. + +* Thu Feb 27 2014 Siddhesh Poyarekar - 2.19.90-4 +- Use nscd service files from glibc sources. +- Make nscd service forking in systemd service file. + +* Tue Feb 25 2014 Siddhesh Poyarekar - 2.19.90-3 +- Sync with upstream master. +- Separate ftell from fseek logic and avoid modifying FILE data (#1069559). + +* Mon Feb 24 2014 Carlos O'Donell - 2.19.90-2 +- Fix build-locale-archive failure to open default template. + +* Tue Feb 18 2014 Siddhesh Poyarekar - 2.19.90-1 +- Sync with upstream master. + +* Tue Feb 04 2014 Siddhesh Poyarekar - 2.18.90-27 +- Sync with upstream master. + +* Wed Jan 29 2014 Siddhesh Poyarekar - 2.18.90-26 +- Modify regular expressions to include powerpcle stubs-*.h (#1058258). + +* Wed Jan 29 2014 Siddhesh Poyarekar - 2.18.90-25 +- Sync with upstream master. + +* Sat Jan 25 2014 Ville Skyttä - 2.18.90-24 +- Own the %%{_prefix}/lib/locale dir. + +* Thu Jan 23 2014 Siddhesh Poyarekar - 2.18.90-23 +- Sync with upstream master. + +* Thu Jan 16 2014 Siddhesh Poyarekar - 2.18.90-22 +- Back out ftell test case (#1052846). + +* Tue Jan 14 2014 Siddhesh Poyarekar - 2.18.90-21 +- Sync with upstream master. +- Fix infinite loop in ftell when writing wide char data (#1052846). + +* Tue Jan 7 2014 Siddhesh Poyarekar - 2.18.90-20 +- Sync with upstream master. +- Enable systemtap probes on Power and S/390. + +* Fri Dec 27 2013 Siddhesh Poyarekar - 2.18.90-19 +- Sync with upstream master. + +* Fri Dec 20 2013 Siddhesh Poyarekar - 2.18.90-18 +- Sync with upstream master. + +* Wed Dec 4 2013 Siddhesh Poyarekar - 2.18.90-17 +- Sync with upstream master. + - Fix shm_open validation (#1037787); + +* Thu Nov 28 2013 Siddhesh Poyarekar - 2.18.90-16 +- Sync with upstream master. + +* Wed Nov 20 2013 Siddhesh Poyarekar - 2.18.90-15 +- Sync with upstream master. + +* Fri Nov 8 2013 Carlos O'Donell - 2.18.90-14 +- Enhance NSCD's SELinux support to use dynamic permission names (#1025126). + +* Mon Oct 28 2013 Siddhesh Poyarekar - 2.18.90-13 +- Sync with upstream master. + - Skip over unimplemented timezone format specifier in strptime (#947722). + +* Mon Oct 21 2013 Siddhesh Poyarekar - 2.18.90-12 +- Allow fill_archive to be called with NULL fname. +- Sync with upstream master. + +* Tue Oct 15 2013 Siddhesh Poyarekar - 2.18.90-11 +- Sync with upstream master. + +* Thu Oct 3 2013 Carlos O'Donell - 2.18.90-10 +- Allow applications to use pthread_atfork without explicitly + requiring libpthread.so. (#1013801) +- Support `--list-archive FILE' in localedef utility. + +* Thu Oct 3 2013 Siddhesh Poyarekar - 2.18.90-9 +- Define swap_endianness_p in build-locale-archive. + +* Wed Oct 2 2013 Carlos O'Donell - 2.18.90-8 +- Allow ldconfig cached objects previously marked as hard or soft + ABI to now become unmarked without raising an error. This works + around a binutils bug that caused objects to become unmarked. + (#1009145) + +* Tue Oct 1 2013 Siddhesh Poyarekar - 2.18.90-7 +- Fix check for PI mutex on non-x86 systems (#1007590). +- Resync with upstream master. + +* Tue Sep 24 2013 Carlos O'Donell - 2.18.90-6 +- Avoid the use of __block which is a reserved keyword for clang++ + (#1009623). + +* Mon Sep 23 2013 Siddhesh Poyarekar - 2.18.90-5 +- Resync with upstream master. + +* Sun Sep 22 2013 Carlos O'Donell - 2.18.90-4 +- Fix CVE-2013-4788: Static applications now support pointer mangling. + Existing static applications must be recompiled (#985625). + +* Wed Sep 18 2013 Patsy Franklin - 2.18.90-3 +- Fix conditional requiring specific binutils for s390/s390x. + +* Mon Sep 16 2013 Siddhesh Poyarekar - 2.18.90-2 +- Resync with upstream master. +- Fix CVE-2013-4332 (#1008299). + +* Thu Sep 5 2013 Siddhesh Poyarekar - 2.18.90-1 +- Resync with upstream master. +- Drop patch for #800224. + +* Thu Aug 29 2013 Carlos O'Donell - 2.18-6 +- Fix Power build (#997531). + +* Wed Aug 28 2013 Carlos O'Donell - 2.18-5 +- Fix indirect function support to avoid calling optimized routines + for the wrong hardware (#985342). + +* Mon Aug 26 2013 Siddhesh Poyarekar - 2.18-4 +- Initialize res_hconf in nscd. (#1000924). + +* Tue Aug 20 2013 Siddhesh Poyarekar - 2.18-3 +- Remove non-ELF support in rtkaio. +- Avoid inlining of cleanup function for kaio_suspend. +- Expand sizes of some types in strcoll (#855399, CVE-2012-4424). +- Fix tst-aiod2 and tst-aiod3 test failures (#970865). + +* Mon Aug 19 2013 Siddhesh Poyarekar - 2.18-2 +- Fix buffer overflow in readdir_r (#995841, CVE-2013-4237). +- Remove releng tarball. + +* Fri Aug 16 2013 Siddhesh Poyarekar - 2.18-1 +- Upstream release 2.18. +- Pull in systemd during build and use the tmpfilesdir macro. + +* Wed Aug 14 2013 Carlos O'Donell - 2.17.90-14 +- Update spec file to use rpm prefix everywhere. + +* Tue Aug 13 2013 Carlos O'Donell - 2.17.90-13 +- Revert `Move to /usr' transition. + +* Tue Aug 13 2013 Carlos O'Donell - 2.17.90-12 +- Complete `Move to /usr' transition. All relevant files are now + installed into `/usr'. + +* Wed Aug 07 2013 Karsten Hopp 2.17.90-11 +- rebuild with the latest rpm to fix missing ld64.so provides on PPC + +* Mon Jul 29 2013 Carlos O'Donell - 2.17.90-10 +- Fix missing libbsd.a in debuginfo packages. + +* Mon Jul 29 2013 Siddhesh Poyarekar - 2.17.90-9 +- Fix strcoll flaws (#855399, CVE-2012-4412, CVE-2012-4424). + +* Mon Jul 29 2013 Siddhesh Poyarekar - 2.17.90-8 +- Resync with upstream master. +- Disable pt_chown (CVE-2013-2207). + +* Thu Jul 25 2013 Carlos O'Donell - 2.17.90-7 +- Correctly name the 240-bit slow path sytemtap probe slowpow_p10 for slowpow. + +* Wed Jul 24 2013 Carlos O'Donell - 2.17.90-6 +- Add build requirement on static libstdc++ library to fix testsuite failures + for static C++ tests. + +* Fri Jul 12 2013 Siddhesh Poyarekar - 2.17.90-5 +- Enable lock elision support (#982363). +- Depend on systemd instead of systemd-units (#983760). + +* Tue Jul 9 2013 Siddhesh Poyarekar - 2.17.90-4 +- Resync with upstream master. + +* Thu Jun 20 2013 Siddhesh Poyarekar - 2.17.90-3 +- Resync with upstream master. + +* Tue Jun 11 2013 Remi Collet - 2.17.90-2 +- rebuild for new GD 2.1.0 + +* Tue Jun 4 2013 Siddhesh Poyarekar - 2.17.90-1 +- Resync with upstream master. + +* Tue May 14 2013 Siddhesh Poyarekar - 2.17-9 +- Avoid crashing in LD_DEBUG when program name is unavailable (#961238). + +* Sun May 5 2013 Patsy Franklin - 2.17-8 +- Fix _nl_find_msg malloc failure case, and callers. (#959034). + +* Tue Apr 23 2013 Patsy Franklin - 2.17-7 +- Test init_fct for NULL, not result->__init_fct, after demangling (#952799). + +* Tue Apr 23 2013 Patsy Franklin - 2.17-6 +- Increase limits on xdr name and record requests (#892777). +- Consistently MANGLE/DEMANGLE init_fct, end_fct and btow_fct (#952799). + +* Thu Mar 28 2013 Siddhesh Poyarekar - 2.17-5 +- Don't add input group during initgroups_dyn in hesiod (#921760). + +* Sun Mar 17 2013 Carlos O'Donell - 2.17-4 +- Fixed i386 glibc builds (#917161). +- Fixed multibyte character processing crash in regexp (#905877, CVE-2013-0242) + +* Wed Feb 27 2013 Carlos O'Donell - 2.17-3 +- Renamed release engineering directory to `releng' (#903754). +- Fix building with gcc 4.8.0 (#911307). + +* Thu Feb 7 2013 Carlos O'Donell - 2.17-2 +- Fix ownership of /usr/lib[64]/audit (#894307). +- Support unmarked ARM objects in ld.so.cache and aux cache (#905184). + +* Tue Jan 1 2013 Jeff Law - 2.17-1 +- Resync with official glibc-2.17 release +* Fri Dec 21 2012 Jeff Law - 2.16.90-40 +- Resync with master + +* Wed Dec 19 2012 Jeff Law - 2.16.90-39 +- Add rtld-debugger-interface.txt as documentation. (#872242) + +* Fri Dec 7 2012 Jeff Law - 2.16.90-38 +- Resync with master +- Drop patch for 731228 that is no longer needed. + +* Thu Dec 6 2012 Jeff Law - 2.16.90-37 +- Resync with master +- Patch for 697421 has been submitted upstream. +- Drop local patch for 691912 that is no longer needed. + +* Mon Dec 3 2012 Jeff Law - 2.16.90-36 +- Resync with master +- Drop local patch for 657588 that is no longer needed. +- Drop local patch for 740682 that is no longer needed. +- Drop local patch for 770439 that is no longer needed. +- Drop local patch for 789209 that is no longer needed. +- Drop local patch for nss-files-overflow that seems + useless. +- Drop localedata-locales-fixes as they were rejected + upstream. +- Drop test-debug-gnuc-hack.patch that seems useless now. +- Repack patchlist. + +* Fri Nov 30 2012 Jeff Law - 2.16.90-35 +- Resync with master (#882137). +- Remove local patch for strict-aliasing warnings that + is no longer needed. +- Remove local patch for 730856 that is no longer needed. +- Repack patchlist. + +* Thu Nov 29 2012 Jeff Law - 2.16.90-34 +- Remove local patch which "temporarily" re-added currences + obsoleted by the Euro. +- Remove hunks from strict-aliasing patch that are no longer + needed. + +* Thu Nov 29 2012 Jeff Law - 2.16.90-33 +- Resync with master. +- Drop local patch for 788989. +- Repack patchlist. + +* Wed Nov 28 2012 Jeff Law - 2.16.90-32 +- Resync with master. +- Drop local patch for 878913. +- Drop local patch for 880666. +- Drop local patch for 767693. +- Repack patchlist. + +* Tue Nov 27 2012 Siddhesh Poyarekar - 2.16.90-31 +- Ensure that hashtable size is greater than 3 (#878913). +- fwrite returns 0 on EOF (#880666). + +* Mon Nov 26 2012 Jeff Law - 2.16.90-30 +- Resync with upstream sources +- Drop local patch for getconf. +- Repack patchlist. + +* Fri Nov 16 2012 Jeff Law - 2.16.90-29 +- Rsync with upstream sources +- Drop local patches for 803286, 791161, 790292, 790298 + +* Wed Nov 7 2012 Jeff Law - 2.16.90-28 +- Resync with upstream sources (#873397) + +* Mon Nov 5 2012 Jeff Law - 2.16.90-27 +- Resync with upstream sources. +- Don't use distinct patches for 770869, 787201 and 688948 + as they all modify stuff under fedora/ +- Repack patchlist + +* Thu Nov 1 2012 Jeff Law - 2.16.90-26 +- Resync with upstream sources (#872336) + +* Mon Oct 22 2012 Jeff Law - 2.16.90-25 +- Rsync with upstream sources +- Drop 864820 patch as now that it's upstream. +- Add sss to /etc/nsswitch.conf (#867473) + +* Thu Oct 11 2012 Jeff Law - 2.16.90-24 +- Rsync with upstream sources +- Drop local 552960-2 patch now that it's upstream. +- Drop local 858274 patch now that the root problem is fixed upstream. +- Repack patchlist. + +* Wed Oct 10 2012 Siddhesh Poyarekar - 2.16.90-23 +- Fix Marathi names for Wednesday, September and October (#rh864820). + +* Fri Oct 5 2012 Jeff Law - 2.16.90-22 +- Resync with upstream sources +- Drop local 552960 patch now that it's upstream +- Drop local stap patch now obsolete +- Drop local s390 patch which avoided problems with old assemblers +- Drop old fortify source patch to deal with old compilers + +* Thu Oct 4 2012 Siddhesh Poyarekar - 2.16.90-21 +- Take mutex in cleanup only if it is not already taken. + +* Tue Oct 2 2012 Jeff Law - 2.16.90-20 +- Resync with upstream sources. +- Repack patchlist. + +* Mon Oct 1 2012 Jeff Law - 2.16.90-19 +- Resync with upstream sources to pick up fma fixes + +* Fri Sep 28 2012 Jeff Law - 2.16.90-18 +- Resync with upstream sources. +- Drop fedora-cdefs-gnuc.patch, it's not needed anymore. +- Drop fedora-gai-rfc1918.patch, it's upstream now. +- Drop fedora-localedata-no_NO.patch, it was supposed to be + temporary -- that was back in 2003. This should have been + sorted out long ago. We'll just have to deal with the + fallout. +- Drop fedora-vfprintf-sw6530.patch, it's upstream now. +- Drop rh769421.patch; Siddhesh has fixed this properly with 552960. + +* Fri Sep 28 2012 Siddhesh Poyarekar - 2.16.90-17 +- Release mutex before going back to wait for PI mutexes (#552960). + +* Tue Sep 25 2012 Jeff Law - 2.16.90-16 +- Resync with upstream sources. + +* Fri Sep 21 2012 Jeff Law - 2.16.90-15 +- Remove most of fedora-nscd patch as we no longer use the + old init files, but systemd instead. +- Remove path-to-vi patch. With the usr-move changes that + patch is totally unnecessary. +- Remove i686-nopl patch. Gas was changed back in 2011 to + avoid nopl. +- Move gai-rfc1918 patch to submitted upstream status + +* Fri Sep 21 2012 Jeff Law - 2.16.90-14 +- Revert patch for 816647, it's blatently broken. + +* Fri Sep 21 2012 Siddhesh Poyarekar - 2.16.90-13 +- Bring back byteswap-16.h (#859268). + +* Thu Sep 20 2012 Jeff Law - 2.16.90-12 +- Revert recent upstream strstr changes (#858274) +- Demangle function pointers before testing them (#816647) +- Remove handling of /etc/localtime and /var/spool/postfix/etc/localtime + as systemd will be handling them from now on (#858735). + +* Fri Sep 14 2012 Jeff Law - 2.16.90-11 +- Resync with upstream sources (#857236). + +* Sat Sep 8 2012 Peter Robinson - 2.16.90-10 +- Enable ports to fix FTBFS on ARM + +* Wed Sep 5 2012 Jeff Law - 2.16.90-9 +- Resync with upstream sources. + +* Tue Sep 4 2012 Jeff Law - 2.16.90-8 +- Incorporate ppc64p7 arch changes (#854250) + +* Thu Aug 30 2012 Jeff Law - 2.16.90-7 +- Resync with upstream sources. + +* Wed Aug 22 2012 Jeff Law - 2.16.90-6 +- Resync with upstream sources. + +* Tue Aug 21 2012 Jeff Law - 2.16.90-5 +- Replace manual systemd scriptlets with macroized scriptlets (#850129) + +* Mon Aug 20 2012 Jeff Law - 2.16.90-4 +- Move /etc/localtime into glibc-common package since glibc-common + owns the scriptlets which update it. + +* Mon Aug 20 2012 Jeff Law - 2.16.90-3 +- Remove obsolete patches from glibc-fedora.patch. Explode + remaining patches into distinct patchfiles. Thanks to + Dmitry V. Levin for identifying them! + Drop ia64 specific patches and specfile fragments + +* Wed Aug 15 2012 Jeff Law - 2.16.90-2 +- Fix integer overflow leading to buffer overflow in strto* (#847718) + +* Mon Aug 13 2012 Jeff Law - 2.16.90-1 +- Resync with upstream sources, drop obsolete patches. +- Drop glibc-ports bits as they're part of the master + sources now. + +* Mon Aug 13 2012 Jeff Law - 2.16-9 +- Replace patch for 179072 with official version from upstream. + +* Fri Aug 10 2012 Jeff Law - 2.16-8 +- Replace patch for 789238 with official version from upstream. + +* Wed Jul 25 2012 Jeff Law - 2.16-7 +- Pack IPv4 servers at the start of nsaddr_list and + only track the number of IPV4 servers in EXT(statp->nscounti (#808147) +- Mark set*uid, set*gid as __wur (warn unused result) (#845960) + +* Wed Jul 25 2012 Jeff Law - 2.16-6 +- Revert patch for BZ696143, it made it impossible to use IPV6 + addresses explicitly in getaddrinfo, which in turn broke + ssh, apache and other code. (#808147) +- Avoid another unbound alloca in vfprintf (#841318) +- Remove /etc/localtime.tzupdate in lua scriptlets +- Revert back to using posix.symlink as posix.link with a 3rd + argument isn't supported in the lua version embedded in rpm. +- Revert recent changes to res_send (804630, 835090). +- Fix memcpy args in res_send (#841787). + +* Thu Jul 19 2012 Fedora Release Engineering - 2.16-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jul 5 2012 Jeff Law - 2.16-2 +- Use posix.link rather than posix.symlink in scriptlet to + update /etc/localtime (#837344). + +* Mon Jul 2 2012 Jeff Law - 2.16-1 +- Resync with upstream glibc-2.16 release. + +* Fri Jun 22 2012 Jeff Law - 2.15.90-16 +- Resync with upstream sources, drop obsolete patch. + +* Thu Jun 21 2012 Jeff Law - 2.15.90-15 +- Resync with upstream sources (#834447). +- Fix use-after-free in dcigettext.c (#816647). + +* Fri Jun 15 2012 Jeff Law - 2.15.90-14 +- Resync with master. + +* Thu Jun 14 2012 Jeff Law - 2.15.90-13 +- Delay setting DECIDED field in locale file structure until + we have read the file's data (#827510). + +* Mon Jun 11 2012 Dennis Gilmore - 2.15.90-12 +- actually apply the arm linker hack + +* Mon Jun 11 2012 Dennis Gilmore - 2.15.90-11 +- only deal with the arm linker compat hack on armhfp arches +- armsfp arches do not have a linker change +- Backward compat hack for armhf binaries. + +* Thu Jun 7 2012 Jeff Law - 2.15.90-10 +- Fix parsing of /etc/sysconfig/clock when ZONE has spaces. (#828291) + +* Tue Jun 5 2012 Jeff Law - 2.15.90-9 +- Resync with upstream sources, drop unnecessary patches. +- Fix DoS in RPC implementation (#767693) +- Remove deprecated alpha support. +- Remove redundant hunk from patch. (#823905) + +* Fri Jun 1 2012 Patsy Franklin - 2.15.90-8 +- Fix iconv() segfault when the invalid multibyte character 0xffff is input + when converting from IBM930 (#823905) + +* Fri Jun 1 2012 Jeff Law - 2.15.90-7 +- Resync with upstream sources. (#827040) + +* Thu May 31 2012 Patsy Franklin - 2.15.90-6 +- Fix fnmatch() when '*' wildcard is applied on a file name containing + multibyte chars. (#819430) + +* Wed May 30 2012 Jeff Law - 2.15.90-5 +- Resync with upstream sources, drop unnecessary patches. + +* Tue May 29 2012 Jeff Law - 2.15.90-4 +- Build info files in the source dir, then move to objdir + to avoid multilib conflicts (#825061) + +* Fri May 25 2012 Jeff Law - 2.15.90-3 +- Work around RPM dropping the contents of /etc/localtime + when it turns into a symlink with %post common script (#825159). + +* Wed May 23 2012 Jeff Law - 2.15.90-2 +- Fix option rotate when one IPV6 server is enabled (#804630) +- Reenable slow/uberslow path taps slowpow/slowexp. + +* Wed May 23 2012 Jeff Law - 2.15.90-1 +- Resync with upstream sources, drop unnecessary patches. + +* Tue May 22 2012 Patsy Franklin - 2.15-41 +- Fix tzdata trigger (#822200) +- Make the symlink relative rather than linking into the buildroot (#822200). +- Changed /etc/localtime to a symlink. 8222000 (#822200) + +* Tue May 15 2012 Jeff Law - 2.15-40 +- Update to upstream patch for 806070 (#806070) + +* Mon May 14 2012 Jeff Law - 2.15-39 +- Update upstream patch for AVX testing (#801650) + +* Fri May 11 2012 Jeff Law - 2.15-38 +- Upstream patch to fix AVX testing (#801650) + +* Thu May 10 2012 Jeff Law - 2.15-37 +- Try again to fix AVX testing (#801650) + +* Mon May 7 2012 Jeff Law - 2.15-36 +- Improve fortification disabled warning. +- Change location of dynamic linker for armhf. + +* Mon Apr 30 2012 Jeff Law - 2.15-35 +- Implement context routines for ARM (#817276) + +* Fri Apr 13 2012 Jeff Law - 2.15-34 +- Issue a warning if FORTIFY_CHECKING is requested, but disabled. + +* Thu Apr 12 2012 Jeff Law - 2.15-33 +- Fix another unbound alloca in nscd groups (#788989) + +* Tue Apr 3 2012 Jeff Law - 2.15-32 +- Fix first day of week for lv_LV (#682500) + +* Mon Apr 2 2012 Jeff Law - 2.15-31 +- When retrying after main arena failure, always retry in a + different arena. (#789238) + +* Tue Mar 27 2012 Jeff Law - 2.15-30 +- Avoid unbound alloca usage in *-crypt routines (#804792) +- Fix data race in nscd (#806070) + +* Fri Mar 23 2012 Jeff Law - 2.15-29 +- Fix typo in __nss_getent (#806403). + +* Wed Mar 14 2012 Jeff Law - 2.15-28 +- Add doi_IN, sat_IN and mni_IN to SUPPORTED locals (#803286) +- Add stap probes in slowpow and slowexp. + +* Fri Mar 09 2012 Jeff Law - 2.15-27 +- Fix AVX checks (#801650) + +* Wed Feb 29 2012 Jeff Law - 2.15-26 +- Set errno properly in vfprintf (#794797) +- Don't kill application when LD_PROFILE is set. (#800224) + +* Wed Feb 29 2012 Jeff Law - 2.15-25 +- Fix out of bounds memory access in resolver (#798471) +- Always mark vDSO as used (#758888) + +* Fri Feb 24 2012 Jeff Law - 2.15-24 +- Fix bogus underflow (#760935) +- Correctly handle dns request where large numbers of A and AAA records + are returned (#795498) +- Fix nscd crash when group has many members (#788989) + +* Mon Feb 20 2012 Jeff Law - 2.15-23 +- Avoid "nargs" integer overflow which could be used to bypass FORTIFY_SOURCE (#794797) + +* Mon Feb 20 2012 Jeff Law - 2.15-22 +- Fix main arena locking in malloc/calloc retry path (#789238) + +* Fri Feb 17 2012 Jeff Law - 2.15-21 +- Correctly identify all 127.x.y.z addresses (#739743) +- Don't assign native result if result has no associated interface (#739743) + +* Fri Feb 17 2012 Jeff Law - 2.15-20 +- Ignore link-local IPV6 addresses for AI_ADDRCONFIG (#697149) + +* Fri Feb 17 2012 Jeff Law - 2.15-19 +- Fix reply buffer mismanagement in resolver (#730856) + +* Thu Feb 16 2012 Jeff Law - 2.15-18 +- Revert 552960/769421 changes again, still causing problems. +- Add doi_IN (#791161) +- Add sat_IN (#790292) +- Add mni_IN (#790298) + +* Thu Feb 9 2012 Jeff Law - 2.15-17 +- Fix lost wakeups in pthread_cond_*. (#552960, #769421) +- Clarify info page for snprintf (#564528) +- Fix first_weekday and first_workday for ru_UA (#624296) + +* Tue Feb 7 2012 Jeff Law - 2.15-16 +- Fix currency_symbol for uk_UA (#789209) +- Fix weekday names in Kashmiri locale (#770439) + +* Tue Feb 7 2012 Jeff Law - 2.15-15 +- Remove change for 787662, correct fix is in gcc. + +* Mon Feb 6 2012 Jeff Law - 2.15-13 +- More accurately detect if we're in a chroot (#688948) + +* Fri Feb 3 2012 Jeff Law - 2.15-12 +- Add fedfs to /etc/rpc (#691912) +- Run nscd in the foreground w/ syslogging, fix systemd config (#770869) +- Avoid mapping past end of shared object (#741105) +- Turn off -mno-minimal-toc on PPC (#787201) +- Remove hunk from glibc-rh657588.patch that didn't belong + +* Wed Feb 1 2012 Jeff Law - 2.15-8 +- Prevent erroneous inline optimization of initfini.s on PowerPC64 (#783979) +- Use upstream variant of fix for 740506. +- Fix month abbreviations for zh_CN (#657588) + +* Sun Jan 29 2012 Jeff Law - 2.15-7 +- Sort objects before relocations (sw#13618) +- Fix bogus sort code that was copied from dl-deps.c. + +* Thu Jan 26 2012 Jeff Law - 2.15-6 +- First argument to settimeofday can be null (#740682) +- Add aliases for ISO-10646-UCS-2 (#697421) + +* Tue Jan 24 2012 Jeff Law - 2.15-4 +- Update ports from master. +- Fix first workday/weekday for it_IT (#622499) +- Fix type to uint16_t based on upstream comments (729661) +- Do not cache negative results in nscd if these are transient (#784402) + +* Mon Jan 23 2012 Jeff Law - 2.15-3 +- Fix cycle detection (#729661) +- Fix first workday/weekday for it_IT (#446078) +- Fix first workday/weekday for ca_ES (#454629) + +* Fri Jan 13 2012 Fedora Release Engineering - 2.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Sun Jan 1 2012 Jeff Law - 2.15-1.fc17 +- Update from master (a316c1f) + +* Thu Dec 22 2011 Jeff Law - 2.14.90-26.fc17 +- Update from master (16c6f99) +- Fix typo in recent tzfile change (#769476) +- Make MALLOC_ARENA_MAX and MALLOC_ARENA_TEST match documentation (#740506) +- Revert "fix" to pthread_cond_wait (#769421) +- Extract patch for 730856 from fedora-patch into a distinct patchfile + +* Mon Dec 19 2011 Jeff Law - 2.14.90-25.fc17 +- Update from master (a4647e7). + +* Sun Dec 18 2011 Jeff Law - 2.14.90-24.fc16.3 +- Check values from TZ file header (#767696) +- Handle EAGAIN from FUTEX_WAIT_REQUEUE_PI (#552960) +- Add {dist}.# +- Correct return value from pthread_create when stack alloction fails. + (#767746) + +* Wed Dec 7 2011 Jeff Law - 2.14.90-23 +- Fix a wrong constant in powerpc hypot implementation (#750811) + #13534 in python bug database + #13472 in glibc bug database +- Truncate time values in Linux futimes when falling back to utime + +* Mon Dec 5 2011 Jeff Law - 2.14.90-22 +- Mark fortified __FD_ELT as extension (#761021) +- Fix typo in manual (#708455) + +* Wed Nov 30 2011 Jeff Law - 2.14.90-21 +- Don't fail in makedb if SELinux is disabled (#750858) +- Fix access after end of search string in regex matcher (#757887) + +* Mon Nov 28 2011 Jeff Law - 2.14.90-20 +- Drop lock before calling malloc_printerr (#757881) + +* Fri Nov 18 2011 Jeff Law - 2.14.90-19 +- Check malloc arena atomically (BZ#13071) +- Don't call reused_arena when _int_new_arena failed (#753601) + +* Wed Nov 16 2011 Jeff Law - 2.14.90-18 +- Fix grouping and reuse other locales in various locales (BZ#13147) + +* Tue Nov 15 2011 Jeff Law - 2.14.90-17 +- Revert bogus commits/rebasing of Nov 14, Nov 11 and Nov 8. Sources + should be equivalent to Fedora 16's initial release. + +* Wed Oct 26 2011 Fedora Release Engineering - 2.14.90-15 +- Rebuilt for glibc bug#747377 + +* Wed Oct 19 2011 Jim Meyering - 2.14.90-14 +- Revert the upstream patch that added the leaf attribute, since it + caused gcc -O2 to move code past thread primitives and sometimes + even out of critical sections. See http://bugzilla.redhat.com/747377 + +* Wed Oct 19 2011 Andreas Schwab - 2.14.90-13 +- Update from master + - Fix linkage conflict with feraiseexcept (#746753) + - More libm optimisations + +* Mon Oct 17 2011 Andreas Schwab - 2.14.90-12 +- Update from master + - Correctly handle missing initgroups database (#745675) + - Optimize many libm functions + - Optimize access to isXYZ and toXYZ tables + - Optimized memcmp and wmemcmp for x86-64 and x86-32 + - Add parameter annotation to modf (BZ#13268) + - Support optimized isXXX functions in C++ code + - Check for zero size in memrchr for x86_64 (#745739) + - Optimized memchr, memrchr, rawmemchr for x86-32 + +* Tue Oct 11 2011 Andreas Schwab - 2.14.90-11 +- Update from master + - Clean up locarchive mmap reservation code + - Fix netname2host (BZ#13179) + - Fix remainder (NaN, 0) (BZ#6779, BZ#6783) + - S/390: Fix longlong.h inline asms for zarch + - Improve 64 bit memchr, memrchr, rawmemchr with SSE2 + - Update translations + - Implement caching of netgroups in nscd + - Handle OOM in NSS + - Don't call ifunc functions in trace mode +- Convert tzdata-update to lua (#729796) +- Horrible workaround for horribly broken software (#737223) + +* Wed Sep 28 2011 Andreas Schwab - 2.14.90-10 +- Update from master + - Correctly reparse group line after enlarging the buffer (#739360) + - Fix parse error in bits/mathinline.h with --std=c99 (#740235) +- Update nscd service file (#740284) +- Drop nscd init file (#740196) + +* Fri Sep 16 2011 Andreas Schwab - 2.14.90-9 +- Update from master + - Define IP_MULTICAST_ALL (BZ#13192) + - Add fmax and fmin inlines for x86-64 + - Avoid race between {,__de}allocate_stack and __reclaim_stacks + during fork (#737387) + - Optimized lrint and llrint for x86-64 + - Also relocate in dependency order when doing symbol dependency + testing (#737459) + - Optimize logb code for 64-bit machines + - Fix jn precision (BZ#11589) + - Fix boundary conditions in scanf (BZ#13138) + - Don't lock string streams in stream cleanup code (BZ#12847) + - Define ELFOSABI_GNU + - Fix lround loss of precision + - Add range checking for FD_SET, FD_CLR, and FD_ISSET +- Make sure AVC thread has capabilities + +* Thu Sep 8 2011 Andreas Schwab - 2.14.90-8 +- Update from master + - Use O_CLOEXEC when loading objects and cache in ld.so (BZ#13068) + - Fix memory leak in case of failed dlopen (BZ#13123) + - Optimizations for POWER + - Prefer real syscalls instead of vsyscalls on x86-64 outside libc.so + - Add Atom-optimized strchr and strrchr for x86-64 + - Try shell in posix_spawn* only in compat mode (BZ#13134) + - Fix glob.h header by removing gcc 1.x support (BZ#13150) + - Optimized strchr and strrchr with SSE2 on x86-32 + - Add optimized x86 wcscmp + - Fixes and optimizations for 32-bit sparc fabs + - Fix nptl semaphore cleanup invocation + - Sanitize HWCAP_SPARC_* defines/usage, and add new entries + +* Thu Sep 1 2011 Andreas Schwab - 2.14.90-7 +- Update from master + - Relocate objects in dependency order (#733462) +- Avoid assertion failure when first DNS answer was empty (#730856) +- Don't treat tls_offset == 1 as forced dynamic (#731228) + +* Wed Aug 24 2011 Andreas Schwab - 2.14.90-6 +- Update from master + - Correct cycle detection during dependency sorting + - Use ifuncs for time and gettimeofday on x86-64 + - Fix fopen (non-existing-file, "re") errno + - Fix CFI info in x86-64 trampolines for non-AVX code + - Build libresolv with SSP flags + - Avoid executable stack in makedb (#731063) + - Align x86 TCB to 64 bytes (cache line size), important for Atom + +* Mon Aug 15 2011 Andreas Schwab - 2.14.90-5 +- Update from master + - Implement LD_DEBUG=scopes + - Locale-independent parsing in libintl (#726536) + - Fix stack alignment on x86_64 (#728762) + - Implement scandirat function + +* Tue Aug 9 2011 Andreas Schwab - 2.14.90-4 +- Update from master + - Properly tokenize nameserver line for servers with IPv6 address + - Fix encoding name for IDN in getaddrinfo (#725755) + - Fix inline strncat/strncmp on x86 + - Define SEEK_DATA and SEEK_HOLE + - Define AF_NFC and PF_NFC + - Update ptrace constants + - Add read barriers in cancellation initialization + - Add read barrier protecting DES initialization + - Fix overflow bug in optimized strncat for x86-64 + - Check for overflows in expressions (BZ#12852) + - Fix check for AVX enablement (#720176, BZ#13007) + - Force La_x86_64_ymm to be 16-byte aligned + - Add const attr to gnu_dev_{major,minor,makedev} +- Filter out GLIBC_PRIVATE symbols again + +* Wed Jul 20 2011 Andreas Schwab - 2.14.90-3 +- Update from master + - S/390: Don't use r11 in INTERNAL_VSYSCALL_NCS macro + - Avoid warning in nscd config file parsing code + - Improve 64 bit strcat functions with SSE2/SSSE3 + - Fix alloca accounting in strxfrm + - Avoid possible crashes in anormal nscd exits + - Updated Swedish and Dutch translations + +* Thu Jul 14 2011 Andreas Schwab - 2.14.90-2 +- Update from master + - Generalize framework to register monitoring of files in nscd + - Handle ext4 in {,f}pathconf + - Handle Lustre filesystem (BZ#12868) + - Handle W; without long options in getopt (BZ#12922) + - Change error code for underflows in strtod (BZ#9696) + - Fix handling of chained netgroups + - Optimize long-word additions in SHA implementation + - Handle nscd negtimeout==0 + - nss_compat: query NIS domain only when needed + - Fix robust mutex handling after fork + - Make sure RES_USE_INET6 is always restored +- Add systemd configuration for nscd +- Be more careful running build-locale-archive + +* Thu Jun 30 2011 Andreas Schwab - 2.14.90-1 +- Update from master + - Fix quoting in some installed shell scripts (BZ#12935) + - Fix missing .ctors/.dtors lead word in soinit + - Improved st{r,p}{,n}cpy for SSE2 and SSSE3 on x86 + - Avoid __check_pf calls in getaddrinfo unless really needed + (BZ#12907) + - Rate limit expensive _SC_NPROCESSORS_ONLN computation + - Add initgroups lookup support to getent + - Reenable nss_db with a completely new implementation + - Rewrite makedb to avoid using db library + - Add pldd program +- Obsolete nss_db +- Don't build tzdata-update and build-locale-archive statically + +* Tue Jun 28 2011 Andreas Schwab - 2.14-4 +- Update from 2.14 branch + - Fix crash in GB18030 encoder (#712901) +- Fix more bugs in GB18030 charmap +- Don't use gethostbyaddr to determine canonical name + +* Tue Jun 21 2011 Andreas Schwab - 2.14-3 +- Update from 2.14 branch + - Fix typo in recent resolver change which causes segvs (#710279) + - Fix memory leak in getaddrinfo (#712178) + - Fix for C++ (BZ#12841) + - Assume Intel Core i3/i5/i7 processor if AVX is available +- Filter results from gethostbyname4_r according to request flags + (#711827) +- Repair GB18030 charmap (#712901) +- Revert "Use .machine to prevent AS from complaining about z9-109 + instructions in iconv modules" (#711330) + +* Fri Jun 3 2011 Andreas Schwab - 2.14-2 +- Revert "Handle DNS server failures in case of AF_UNSPEC lookups + correctly" (#710279) + +* Tue May 31 2011 Andreas Schwab - 2.14-1 +- Update to 2.14 release + - Handle DNS server failures in case of AF_UNSPEC lookups correctly + (BZ#12684) + - Prevent loader from loading itself + - Restore _res correctly (BZ#12350) + - Interpret numeric values in shadow file as signed (BZ#11099) + - Recognize use-vc option in resolv.conf (BZ#11558) + - Mark malloc hook variables as deprecated + - Declare malloc hook variables as volatile (BZ#11781) + - Don't document si_code used for raise (BZ#11799) + - Fix unnecessary overallocation due to incomplete character (BZ#12811) + - Handle failure of _nl_explode_name in all cases + - Add support for time syscall in vDSO (BZ#12813) + - Add sendmmsg and setns syscalls + - Use getcpu definition from vDSO on x86-64 (BZ#12813) +- Don't free non-malloced memory and fix memory leak (#709267) + +* Fri May 27 2011 Andreas Schwab - 2.13.90-14 +- Update from master + - Fix conversion to ISO-2022-JP-2 with ISO-8859-7 designation + (BZ#12814) + - Undo accidental change in x86-64 user.h + - Update Japanese translation + - Define RLIMIT_RTTIME (BZ#12795) + - Update longlong.h from GCC + - Add a few more alloca size checks (BZ#12671) + - Fix flags parameter value passed to pltenter and pltexit + - Define CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM + - Always fill output buffer in XPG strerror function (BZ#12782) + - Nicer output for negative error numbers in strerror_r + - Fix CP1258 conversion (BZ#12777) + - Fix handling of LC_CTYPE in locale name handling (BZ#12788) + - Set stream errors in more cases (BZ#12792) + - Don't unconditionally use alloca in gaih_inet (BZ#11869) + - Update documentation in regex.h (BZ#11857) + - Prevent Altivec and VSX insns on PowerPC64 when no FPRs or VRs are + available + - Fix typo in x86-64 powl (BZ#12775) +- Avoid overriding CFLAGS (#703880) + +* Wed May 18 2011 Andreas Schwab - 2.13.90-13 +- Update from master + - Update GB18030 to 2005 version (BZ#11837) + - Update RE_SYNTAX*_AWK constants in regex.h + - Handle long variable names in putenv (BZ#11892) + - Fix test for error_one_per_line mode in error (BZ#12766) + - Cleanup x86-64 sys/user.h (BZ#11820) + - Several locale data updates (BZ#11987, BZ#9732, BZ#9730, BZ#4357, + BZ#12582) + - Avoid potential deadlock in mtrace (BZ#6420) + - Fix a few problems in fopen and freopen + - Provide more helpful error message in getopt (BZ#7101) + - Make stack canary value harder to read through read overflow (BZ#10149) + - Use mmap for allocation of buffers used for __abort_msg (BZ#11901) + - Fix handling of static TLS in dlopen'ed objects (BZ#12453) + - Fix initialization of optimization values for AIO (BZ#12083) + - Fix handling of conversion problem in CP932 module (BZ#12601) + - Fix potential problem with out-of-scope buffer (BZ#12626) + - Handle recursive calls in backtrace better (BZ#12432) + - Fix handling of incomplete character storage in state + - Fix file descriptor position after fclose (BZ#12724) +- Reinstall NIS RPC headers + +* Fri May 13 2011 Andreas Schwab - 2.13.90-12 +- Update from master + - Fix resizing table for unique symbols when adding symbol for copy + relocation (BZ#12511) + - Fix sched_setscheduler call in spawn implementation (BZ#12052) + - Report write error in addmnt even for cached streams (BZ#12625) + - Translate kernel error into what pthread_create should return + (BZ#386) + - More configurability for secondary group lookup (BZ#11257) + - Several locale data updates (BZ#11258, BZ#11487, BZ#11532, + BZ#11578, BZ#11653, BZ#11668, BZ#11945, BZ#11947, BZ#12158, + BZ#12200, BZ#12178, BZ#12178, BZ#12346, BZ#12449, BZ#12545, + BZ#12551, BZ#12611, BZ#12660, BZ#12681, BZ#12541, BZ#12711, + BZ#12738) + - Fix Linux getcwd for long paths (BZ#12713) + - static tls memory leak on TLS_DTV_AT_TP archs + - Actually undefine ARG_MAX from + - Backport BIND code to query name as TLD (BZ#12734) + - Allow $ORIGIN to reference trusted directoreis in SUID binaries + (BZ #12393) + - Add missing {__BEGIN,__END}_DECLS to sys/sysmacros.h + - Report if no record is found by initgroups in nss_files +- Never leave $ORIGIN unexpanded +- Revert "Ignore origin of privileged program" +- Reexport RPC interface + +* Thu May 5 2011 Andreas Schwab - 2.13.90-11 +- Update from master + - Don't use removed rpc headers +- Install rpc/netdb.h again + +* Wed May 4 2011 Andreas Schwab - 2.13.90-10 +- Update from master + - ldconfig: don't crash on empty path in config file (#699784) + - getaddrinfo(AF_INET6) does not return scope_id info provided by + NSS modules (BZ#12714) + - Fix pathconf(_PC_BUF_SIZE) (BZ#12723) + - Fix getnameinfo flags parameter type (BZ#12717) + - Add finer grained control for initgroups lookups to NSS + - Use all possible bytes from fopen mode string (BZ#12685, #698025) + - Define initgroups callback for nss_files + - elf.h: Define R_ARM_IRELATIVE reloc type + - Fix static linking with checking x86/x86-64 memcpy (BZ#12653) + - Fix POWER4/POWER7 optimized strncmp to not read past differing bytes + - Fix FPU context handling in getcontext on x86-64 (BZ#12420) + - Skip extra zeroes when searching auxv on s390 + - Obsolete RPC implementation in libc + - Fix memory leak in TLS of loaded objects (BZ#12650) + - Don't leave empty element in rpath when skipping an element + - Make ppc sync_file_range cancelable + - Maintain stack alignment in ____longjmp_chk on x86_64 + +* Thu Apr 7 2011 Andreas Schwab - 2.13.90-9 +- Update from master + - Fix typo in cache information table for x86-{32,64} + - Define CLOCK_BOOTTIME, O_PATH, AT_EMPTY_PATH + - Work around old buggy program which cannot cope with memcpy + semantics (BZ#12518) + - Fix visibility of declarations of wcpcpy and wcpncpy (BZ#12631) + - Add clock_adjtime, name_to_handle_at, open_by_handle_at, syncfs + syscalls + - Really implement fallocate{,64} and sync_file_range as + cancellation points +- Enable systemtap support (#690281) + +* Thu Mar 24 2011 Andreas Schwab - 2.13.90-8 +- Update from master + - Fix infinite loop (#690323) + +* Mon Mar 21 2011 Andreas Schwab - 2.13.90-7 +- Update from master + - Handle page boundaries in x86 SSE4.2 strncmp (BZ#12597) + - Implement x86 cpuid handling of leaf4 for cache information (BZ#12587) + - Check size of pattern in wide character representation in fnmatch + (BZ #12583) + - Remove __restrict quals from wmemcmp prototype + - Fix copy relocations handling of unique objects (BZ#12510) +- ldd: never run file directly +- Ignore rpath elements containing non-isolated use of $ORIGIN when + privileged +- Don't leave empty element in rpath when skipping the first element +- Revert "Don't crash when dependencies are missing" (#688990) + +* Mon Mar 7 2011 Andreas Schwab - 2.13.90-6 +- Update from master + - Fix loading first object along a path when tracing + - Enable SSE2 memset for AMD'supcoming Orochi processor + - Don't read past end of buffer in fmemopen +- Revert broken changes (#682307) + +* Wed Mar 2 2011 Andreas Schwab - 2.13.90-5 +- Update from master + - Fix memory leak in dlopen with RTLD_NOLOAD (BZ#12509) + - Don't crash when dependencies are missing (BZ#12454) + - Fix allocation when handling positional parameters in printf + (BZ#12445) + - Fix two printf handler issues +- Fix false assertion (BZ#12454, #673014) + +* Mon Feb 14 2011 Andreas Schwab - 2.13.90-4 +- Update from master + - Update sysdeps/unix/sysv/linux/sparc/bits/socket.h + - Synchronize generic bits/sched.h cpu_set_t with Linux implementation + - Schedule nscd cache pruning more accurately from re-added values + - Fix passing symbol value to pltexit callbacks when ld.so auditing + - Fix range error handling in sgetspent +- Revert "Fix ordering of DSO constructors and destructors" (#673014) +- Create debuginfo-common on biarch archs +- Reinstall assembler workaround. +- Replace setuid by file capabilities (#646469) + +* Tue Jan 25 2011 Andreas Schwab - 2.13.90-1 +- Update from master + - Fix ordering of DSO constructors and destructors (BZ#11724) +- Remove no longer needed assembler workaround + +* Tue Jan 18 2011 Andreas Schwab - 2.13-1 +- Update to 2.13 release + - Define AT_NO_AUTOMOUNT + - Define MADV_HUGEPAGE and MADV_NOHUGEPAGE + - Add definitions for new socket protocols + - Signal temporary host lookup errors in nscd as such to the + requester (BZ#6812) + - Change setgroups to affect all the threads in the process + (BZ#10563) + - FIx handling of unterminated [ expression in fnmatch (BZ#12378) + - Relax requirement on close in child created by posix_spawn + - Fix handling of missing syscall in Linux mkdirat (BZ#12397) + - Handle long lines in host lookups in the right place (BZ#10484) + - Fix assertion when handling DSTs during auditing + - Fix alignment in x86 destructor calls + - Fix grouping when rounding increases number of integer digits + (BZ#12394) + - Update Japanese translations + - Fix infloop on persistent failing calloc in regex (BZ#12348) + - Use prlimit64 for 32-bit [gs]etrlimit64 implementation (BZ#12201) + - Change XPG-compliant strerror_r function to return error code + (BZ#12204) + - Always allow overwriting printf modifiers etc. + - Make PowerPC64 default to nonexecutable stack + +* Tue Dec 14 2010 Andreas Schwab - 2.12.90-21 +- Revert bogus change + +* Mon Dec 13 2010 Andreas Schwab - 2.12.90-20 +- Update from master + - Declare wcpcpy and wcpncpy only under _GNU_SOURCE + - Fix use of restrict in wchar.h and string.h + - Fix race in qsort_r initialization (BZ#11655) + - Don't ignore zero TTL in DNS answers + - Allow aux_cache_file open()ing to fail silently even in the chroot + mode (BZ#11149) + - Fix multiple nss_compat initgroups() bugs (BZ#10085) + - Define MAP_HUGETLB and SWAP_FLAG_DISCARD +- Remove .UTF-8 suffix from locale names when it is the only supported + codeset (#657556) +- Don't ignore $ORIGIN in libraries + +* Fri Nov 12 2010 Andreas Schwab - 2.12.90-19 +- Update from master + - Fix memory leak in fnmatch + - Support Intel processor model 6 and model 0x2c + - Fix comparison in sqrtl for IBM long double + - Fix one exit path in x86-64 SSE4.2 str{,n}casecmp (BZ#12205, #651638) + - Fix warnings in __bswap_16 (BZ#12194) + - Use IFUNC on x86-64 memset + - Power7-optimized mempcpy + - Handle uneven cache size in 32bit SSE2 memset (BZ#12191) + - Verify in ttyname that the symlink is valid (BZ#12167) + - Update Danish translations + - Fix concurrency problem between dl_open and dl_iterate_phdr + - Fix x86-64 strchr propagation of search byte into all bytes of SSE + register (BZ#12159) + - Fix perturbing in malloc on free (BZ#12140) + - PPC/A2 optimized memcpy function + - Add C99 FP_FAST_FMA{,F,L} macros to +- Check that the running kernel is new enough (#649589) + +* Fri Oct 22 2010 Andreas Schwab - 2.12.90-18 +- Require suid bit on audit objects in privileged programs (CVE-2010-3856) + +* Tue Oct 19 2010 Andreas Schwab - 2.12.90-17 +- Update from master + - Fix some fma issues, implement fmal (BZ#3268, #43358) + - Expect PLT call to _Unwind_Find_FDE on s390*-linux +- Never expand $ORIGIN in privileged programs (#643306, CVE-2010-3847) + +* Thu Oct 14 2010 Andreas Schwab - 2.12.90-16 +- Update from master + - Implement accurate fma (BZ#3268, #43358) + - Fix alignment of AVX save area on x86-64 (BZ#12113) + - Fix regex memory leaks (BZ#12078) + - Improve output of psiginfo (BZ#12107, BZ#12108) + - Don't return NULL address in getifaddrs (BZ#12093) + - Fix strstr and memmem algorithm (BZ#12092, #641124) +- Don't discard result of decoding ACE if AI_CANONIDN (#636642) +- Remove /etc/gai.conf from glibc-common and mark it %%ghost in glibc +- Require exact glibc version in nscd + +* Mon Oct 4 2010 Andreas Schwab - 2.12.90-15 +- Update from master + - Handle large requests in debugging hooks for malloc (BZ#12005) + - Fix handling of remaining bytes in buffer for strncmp and + strncasecmp (BZ#12077) + - Handle cgroup and btrfs filesystems in statvfs + - S/390: Fix highgprs check in startup code (BZ#12067) + - Properly convert f_fsid in statvfs (BZ#11611) + +* Tue Sep 28 2010 Andreas Schwab - 2.12.90-14 +- Don't try to write to _rtld_global_ro after performing relro + protection (#638091) + +* Mon Sep 27 2010 Andreas Schwab - 2.12.90-13 +- Update from master + - Add two forgotten licence exceptions + - getdents64 fallback d_type support + - Move freeres function from ld.so to libc.so + - Undo feature selection for ftruncate (BZ#12037) + - Fix namespace pollution in pthread_cleanup_push + - Fix limit detection in x86-64 SSE2 strncasecmp (#632560) + - Add support for fanotify_mark on sparc32 and s390 + - Fix register conflict in s390 ____longjmp_chk (#629970) + - Don't try to free rpath strings allocated during startup (#629976) + - Actually make it possible to user the default name server +- Fix memory leak on init/fini dependency list (#632936) +- Fix handling of collating symbols in regexps (BZ#11561) +- Don't parse %%s format argument as multibyte string (BZ#6530) +- Fix overflow in nss files parser +- Fix spurious nop at start of __strspn_ia32 + +* Wed Sep 15 2010 Dennis Gilmore - 2.12.90-12 +- dont build sparcv9v and sparc64v anymore + +* Mon Sep 13 2010 Andreas Schwab - 2.12.90-11 +- Update from master + - Fix _FORITY_SOURCE version of longjmp for Linux/x86-64 (BZ#11968) +- Work around shortest-stem feature in make 3.82+ + +* Mon Sep 6 2010 Andreas Schwab - 2.12.90-10 +- Update from master + - Remove invalid iconv aliases (BZ#11979) + - Update x86-64 mpn routines from GMP 5.0.1 + - Fix array overflow in floating point parser (BZ#7066) + - Support fanotify_mark syscall on powerpc32 + - Unroll x86-64 strlen + - Unroll 32bit SSE strlen and handle slow bsf + - Missing server address again leads to localhost being used (BZ#10851) +- Revert last change +- Remove or don't install unpackaged files for auxarches + +* Sat Sep 04 2010 Dennis Gilmore - 2.12.90-9 +- disable unpackaged file check on auxarches + +* Mon Aug 23 2010 Andreas Schwab - 2.12.90-8 +- Update from master + - Fix static strspn on x86 (#624852) + - Various POWER7 optimized string functions + - Fix x86 pthread_cond_signal() FUTEX_WAKE_OP fallback + - Add optimized strncasecmp versions for x86-64 + - PowerPC64 ABI fixes + - Properly quote output of locale (BZ#11904) + - f_flags in statfs implementation + - Add support for fanotify_init and fanotify_mask syscalls + - Add support for prlimit and prlimit64 + - Fix IPTOS_CLASS definition (BZ#11903) + - Avoid too much stack use in fnmatch (BZ#11883) + - x86: Add support for frame pointer less mcount +- Disable asynchronous-unwind-tables during configure run + +* Mon Aug 2 2010 Andreas Schwab - 2.12.90-7 +- Update from master + - Add optimized x86-64 implementation of strnlen and strcaecmp + - Document M_PERTURB + - Fix vDSO synthetic hwcap handling so they are not masked out from + ld.so.cache matching + - POWER6/7 optimizations for copysign +- Build with ports addon on alpha and armv5tel +- Add conflict with kernel < 2.6.32 (#619538) +- Switch to xz compressed tar files +- build-locale-archive: process only directories matching *_* + +* Wed Jul 21 2010 Andreas Schwab - 2.12.90-6 +- Bump minimum kernel version to 2.6.32 + +* Mon Jul 12 2010 Andreas Schwab - 2.12.90-5 +- Update from master + - Don't pass NULL occation to dl_signal_cerror + - Implement _PC_PIPE_BUF. +- Add glibc-ports tarball + +* Fri Jul 2 2010 Andreas Schwab - 2.12.90-4 +- Update from master + - Work around kernel rejecting valid absolute timestamps + - Improve 64bit memcpy/memmove for Atom, Core 2 and Core i7 + - Fix error handling in Linux getlogin* +- Workaround assembler bug sneaking in nopl (#579838) +- Fix scope handling during dl_close +- Fix setxid race handling exiting threads + +* Tue Jun 15 2010 Andreas Schwab - 2.12.90-3 +- Update from master + - Power7 string compare optimizations + - Properly resize buffer in NIS initgroups + - Define F_SETPIPE_SZ and F_GETPIPE_SZ + - Fix more C++ incompatibility problems in headers +- Properly set __libc_multiple_libcs +- Don't assume AT_PAGESIZE is always available (#597578) +- Don't call uname or getrlimit in libpthread init function (#579086) +- Mark /etc/rpc as %%config (#587050) + +* Mon May 31 2010 Andreas Schwab - 2.12.90-2 +- Update from master + - Small fix to POWER7 32-bit memcpy + - Correct x86 CPU family and model check (BZ#11640, #596554) + - Fix iov size in SH register_dump + - Don't crash on unresolved weak symbol reference + - Implement recvmmsg also as socketcall + - sunrpc: Fix spurious fall-through + - Make compatible with C++ (#593762) +- Fix users and groups creation in nscd %%post script + +* Wed May 19 2010 Andreas Schwab - 2.12.90-1 +- Update from master + - POWER7 optimized memset + - Fix typo in es_CR locale + - Enable IDN support in getent + - Fix race in free sanity check + - Fix lookup of collation sequence value during regexp matching + - Fix name of tt_RU.UTF-8@iqtelif locale (#589138) + - Handle too-small buffers in Linux getlogin_r (BZ#11571, #589946) + +* Tue May 4 2010 Roland McGrath - 2.12-1 +- Update to 2.12 release. + - Fix ldconfig chroot handling. + - Don't deadlock in __dl_iterate_phdr while (un)loading objects. + - Fix handling of newline in addmntent. + - Fix AIO when thread creation failed. + +* Fri Apr 16 2010 Andreas Schwab - 2.11.90-20 +- Update from master + - Fix bugs in x86-32 strcmp-sse4.S and strcmp-ssse3.S + - Add x86-32 FMA support + - Don't crash in trace mode when dependencies are missing + - x86-64 SSE4 optimized memcmp + - Fix makecontext on s390/s390x + +* Tue Apr 13 2010 Andreas Schwab - 2.11.90-19 +- Avoid multiarch memcmp in tzdata-update (#581677) + +* Mon Apr 12 2010 Andreas Schwab - 2.11.90-18 +- Update from master + - Implement interfaces to set and get names of threads (BZ#11390) + - Locale data updates (BZ#10824, BZ#10936, BZ#11470, BZ#11471) + - Print reload count in nscd statistics (BZ#10915) + - Fix reading loginuid file in getlogin{,_r} + - Fix fallocate error return on i386 + - Fix cproj implmentation (BZ#10401) + - Fix getopt handing (BZ#11039, BZ#11040, BZ#11041) + - Implement new mode for NIS passwd.adjunct.byname table (BZ#11134) + - Obey LD_HWCAP_MASK in ld.so.cache lookups + +* Tue Apr 6 2010 Andreas Schwab - 2.11.90-17 +- Update from master + - Locale data updates (BZ#11007, BZ#11258, BZ#11272, BZ#10554) + - Handle DNS timeouts in old-style lookup code (BZ#11010) + - Fix aux cache handling in ldconfig with chroot (BZ#11149) + - Fix printing error messages in getopt (BZ#11043) + - Declare iruserok and iruserok_af (BZ#11070) + - Fix option aliasing in argp (BZ#11254) + - Handle POSIX-compliant errno value of unlink in remove (BZ#11276) + - Fix definition and testing of S_ISSOCK (BZ#11279) + - Fix retrieving of kernel header version (BZ#11287) + - Fix concurrent handling of __cpu_features (BZ#11292) + - Handle unnecessary padding in getdents64 (BZ#11333) + - Fix changes to interface list during getifaddrs calls (BZ#11387) + - Missing memory barrier in DES initialization (BZ#11449) + - Fix spurious UNAVAIL status is getaddrinfo + - Add support for new clocks (BZ#11389) + - Fix Linux getlogin{_r,} implementation + - Fix missing zero-termination in cuserid (BZ#11397) + - Fix glob with empty pattern + - Fix handling of STB_GNU_UNIQUE in LD_TRACE_PRELINKING + - Unify wint_t handling in wchar.h and wctype.h (BZ#11410) + - Implement handling of libc ABI in ELF header + - Don't underestimate length of DST substitution in rpath + - Power7-optimized 64-bit and 32-bit memcpy +- Assign global scope to RFC 1918 addresses (#577626) + +* Thu Mar 18 2010 Andreas Schwab - 2.11.90-16 +- Fix SSSE3 memcmp (#574210) + +* Tue Mar 9 2010 Andreas Schwab - 2.11.90-15 +- Update from master + - sparc64: Fix handling of R_SPARC_TLS_LE_* relocations (#571551) + - Handle ext4 and logfs in statvfs functions + - Fix setxid race with thread creation + - Pass -mtune=i686 to assembler when compiling for i686 + - Fix R_X86_64_PC32 overflow detection + - Fix msgrcv on sparc64 + - Fix unwind info in x86 strcmp-sse4.S (BZ#11332) + - sparc: Add multiarch support for memset/bzero/memcpy +- Remove directories owned by filesystem (#569414) +- Add %%ghost /etc/gai.conf to glibc-common (#567748) + +* Tue Feb 23 2010 Andreas Schwab - 2.11.90-14 +- Update from master + - Sparc updates +- Fix SSSE3 memcpy (#556584) + +* Mon Feb 22 2010 Andreas Schwab - 2.11.90-13 +- Update from master + - Use CPUID_OFFSET instead of FEATURE_OFFSET + - Add 32bit memcmp/strcmp/strncmp optimized for SSSE3/SSS4.2 + - Fix file descriotor leak in nftw with FTW_CHDIR (BZ#11271) + - Add Sparc STT_GNU_IFUNC support + - Add power7-optimized classification functions +- Reapply "Optimize 32bit memset/memcpy with SSE2/SSSE3." +- Use unsigned comparison in sse memcpy/memset + +* Mon Feb 8 2010 Andreas Schwab - 2.11.90-12 +- Update from master + - Update constants in for current kernels (#11235) + - Fix endless loop with invalid /etc/shells file (#11242) + - Fix sorting of malayalam letter 'na' (#10414) + - Add kok_IN locale + - Use common collation data in as_IN locale + - Avoid alloca in setenv for long strings +- Use shared mapping to reserve memory when creating locale archive (#10855) +- Fix fstat on Linux/sparc64 (#11155) + +* Mon Feb 1 2010 Andreas Schwab - 2.11.90-11 +- Update from master + - Fix error checking in iconv (#558053) + - Don't map U00DF to U1E9E in toupper table + - _nl_load_locale() incorrectly handles mmap() failures (BZ#11200) + - Fix various issues in regex matcher (BZ#11183, BZ#11184, BZ#11185, + BZ#11186, BZ#11187, BZ#11188, BZ#11189, BZ#11190, BZ#11191, + BZ#11192, BZ#11193) + +* Tue Jan 19 2010 Andreas Schwab - 2.11.90-10 +- Update from master + - Fix ____longjmp_chk for s390/s390x + - Remove duplicate definitions of O_DSYNC and O_RSYNC for Linux/sparc + - Ignore negative dynamic entry types (#546890) + - Fix pthread_cond_*wait with requeue-PI on i386 (#548989) + - Fix _XOPEN_SOURCE_EXTENDED handling +- Revert "Optimize 32bit memset/memcpy with SSE2/SSSE3." + +* Fri Jan 15 2010 Andreas Schwab - 2.11.90-9 +- Update from master. + - Define IPTOS_CLASS_* macros according to RFC 2474 (BZ#11027) + - Always use IPv4 sockets for IPv4 addresses (BZ#11141) + - regcomp.c: do not ignore memory allocation failure (BZ#11127) + - Fix malloc_info without prior allocations (BZ#11126) + - Optimize 32bit memset/memcpy with SSE2/SSSE3 + - Relax feature tests in headers + +* Tue Jan 12 2010 Andreas Schwab - 2.11.90-8 +- Update from master. + - More POSIX conformance fixes. + +* Mon Jan 11 2010 Andreas Schwab - 2.11.90-7 +- Fix build failure. + +* Mon Jan 11 2010 Andreas Schwab - 2.11.90-6 +- Update from master. + - POSIX conformance fixes (BZ#11125). + +* Mon Jan 4 2010 Andreas Schwab - 2.11.90-5 +- Update from master. + - Additional setcontext(), etc. conformance tests (BZ#11115). + - Handle AT_FDCWD in futimens (BZ#10992). + - Update poll.h header for POSIX 2008 (BZ#11093). + - Avoid ELF lookup race. + +* Mon Dec 14 2009 Andreas Schwab - 2.11.90-4 +- Update from master. + - Add Requeue-PI support for x86 arch. + - Redefine O_SYNC and O_DSYNC to match 2.6.33+ kernels. + - Fix a few error cases in *name4_r lookup handling (BZ#11000). + - Fix kernel version check in recent ptsname change (BZ#11046). + - Add more warnings to exec functions (BZ#11056). + - Add recvmmsg interface. + - Define SCHED_IDLE and SCHED_RESET_ON_FORK for Linux. + +* Mon Nov 30 2009 Andreas Schwab - 2.11.90-3 +- Update from master. + - Fix infloop in __pthread_disable_asynccancel on x86_64 (#537690). + - Prevent unintended file desriptor leak in grantpt (#530558). + - Fix startup to security-relevant statically linked binaries (#528631). +- Re-install CFI in x86/x86_64 clone (#491542). + +* Tue Nov 24 2009 Andreas Schwab - 2.11.90-2 +- Update from master. + - Define week, first_weekday, and first_workday for en_DK locale (#525126). + - Use struct timespec for timestamps in struct stat also if + __USE_XOPEN2K8 (#539870). + - Fix week information for nl_NL locale (#499748). + - Update ntp_gettime for Linux (#479558). + - Fix getwc* and putwc* on non-wide streams (BZ#10958). + - Avoid warnings in CPU_* macros when using const bitsets (BZ#10918). + - Handle LC_GLOBAL_LOCALE in duplocale (BZ#10969). + - Fix _NC_LOCALE_NAME definition (BZ#10968). + - Add missing Linux MADV_* definitions (BZ#10972). + - Add support for new Linux error ERFKILL (BZ#10939). +- Enable multi-arch support on ppc and ppc64. + +* Thu Nov 12 2009 Andreas Schwab - 2.11.90-1 +- Update from master. + +* Thu Nov 5 2009 Andreas Schwab - 2.11-2 +- Fix readahead on powerpc32. +- Fix R_PPC64_{JMP_IREL,IRELATIVE} handling. +- Fix preadv, pwritev and fallocate for -D_FILE_OFFSET_BITS=64 (#533063). + +* Mon Nov 2 2009 Andreas Schwab - 2.11-1 +- Update to 2.11 release. +- Disable multi-arch support on PowerPC again since binutils is too old. +- Fix crash in tzdata-update due to use of multi-arch symbol (#532128). + +* Fri Oct 30 2009 Andreas Schwab - 2.10.90-27 +- Update from master. + - Fix races in setXid implementation (BZ#3270). + - Implement IFUNC for PPC and enable multi-arch support. + - Implement mkstemps/mkstemps64 and mkostemps/mkostemps64 (BZ#10349). + - Fix IA-64 and S390 sigevent definitions (BZ#10446). + - Fix memory leak in NIS grp database handling (BZ#10713). + - Print timestamp in nscd debug messages (BZ#10742). + - Fix mixing IPv4 and IPv6 name server in resolv.conf. + - Fix range checks in coshl. + - Implement SSE4.2 optimized strchr and strrchr. + - Handle IFUNC symbols in dlsym (#529965). + - Misc fixes (BZ#10312, BZ#10315, BZ#10319, BZ#10391, BZ#10425, + BZ#10540, BZ#10553, BZ#10564, BZ#10609, BZ#10692, BZ#10780, + BZ#10717, BZ#10784, BZ#10789, BZ#10847 +- No longer build with -fno-var-tracking-assignments. + +* Mon Oct 19 2009 Andreas Schwab - 2.10.90-26 +- Update from master. + - Add ____longjmp_chk for sparc. +- Avoid installing the same libraries twice. + +* Mon Oct 12 2009 Andreas Schwab - 2.10.90-25 +- Update from master + - Fix descriptor leak when calling dlopen with RTLD_NOLOAD (#527409). + - Fix week-1stday in C locale. + - Check for integer overflows in formatting functions. + - Fix locale program error handling (#525363). + +* Mon Sep 28 2009 Andreas Schwab - 2.10.90-24 +- Update from master. + - Fix missing reloc dependency (#517001). + +* Mon Sep 21 2009 Andreas Schwab - 2.10.90-23 +- Update from master. + +* Mon Sep 14 2009 Andreas Schwab - 2.10.90-22 +- Update from master. + - Fix endless loop in localedef. + - Fix __longjmp_chk on s390/s390x. +- Fix exit codes in nscd start script (#521848). +- Build with -fno-var-tracking-assignments for now (#523172). + +* Mon Sep 7 2009 Andreas Schwab - 2.10.90-21 +- Update from master. + - Fix strstr/strcasestr on i386 (#519226). + +* Thu Sep 3 2009 Andreas Schwab - 2.10.90-20 +- Update from master. + - Fix strstr/strcasestr/fma/fmaf on x86_64 (#519226). + - Fix lookup of group names in hesiod initgroups (#520472). + +* Wed Sep 2 2009 Andreas Schwab - 2.10.90-19 +- Update from master. + - Fix x86_64 bits/mathinline.h for -m32 compilation. + +* Tue Sep 1 2009 Andreas Schwab - 2.10.90-18 +- Update from master. + - fix parse error in (#520209). + +* Thu Aug 27 2009 Roland McGrath - 2.10.90-17 +- Update from master. + +* Wed Aug 26 2009 Andreas Schwab - 2.10.90-16 +- Update from master. + - handle AVX saving on x86-64 in interrupted symbol lookups (#519081). + +* Mon Aug 24 2009 Andreas Schwab - 2.10.90-15 +- Update from master. + - fix fortify failure with longjmp from alternate stack (#512103). +- Add conflict with prelink (#509655). + +* Mon Aug 17 2009 Andreas Schwab - 2.10.90-14 +- Update from master. + - fix pthread_cond_signal (#516469) + +* Mon Aug 10 2009 Andreas Schwab - 2.10.90-13 +- Update from master. + - fix rehashing of unique symbols (#515677) +- Fix spurious messages with --excludedocs (#515948) + +* Mon Aug 3 2009 Andreas Schwab - 2.10.90-12 +- Update from master. + - fix fortify failure with longjmp from alternate stack (#512103) + +* Thu Jul 30 2009 Andreas Schwab - 2.10.90-11 +- Update from master. +- Don't package debuginfo files in glibc-devel. + +* Tue Jul 28 2009 Andreas Schwab - 2.10.90-10 +- Update from master. + * fix memory ordering in pthread_mutex_unlock (BZ#10418) + * implement RES_USE_DNSSEC option in resolver (#205842) + * fix hang in ldd -r (#513945) + +* Mon Jul 27 2009 Andreas Schwab - 2.10.90-9 +- Update from master. + +* Fri Jul 24 2009 Fedora Release Engineering - 2.10.90-8.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Jul 24 2009 Jakub Jelinek - 2.10.90-7.1 +- Fix up pthread_cond_timedwait on x86_64 with old kernels. + +* Thu Jul 23 2009 Andreas Schwab - 2.10.90-7 +- Update from master. +- Build with -DNDEBUG unless using a prerelease. + +* Thu Jul 23 2009 Andreas Schwab - 2.10.90-6 +- Rebuilt with binutils-2.19.51.0.14-29.fc12 to fix static binaries + +* Wed Jul 22 2009 Andreas Schwab - 2.10.90-5 +- Update from master. +- Undefine __i686 on x86 to fix build. + +* Mon Jul 20 2009 Andreas Schwab - 2.10.90-4 +- Update from master. +- Don't build separate i686 package. + +* Wed Jul 8 2009 Andreas Schwab 2.10.90-3 +- Reenable setuid on pt_chown. + +* Thu Jul 2 2009 Andreas Schwab 2.10.90-2 +- Update from master. + +* Fri Jun 26 2009 Andreas Schwab 2.10.90-1 +- Update from master. +- Enable multi-arch support on x86/x86-64. +- Add requires glibc-headers to glibc-devel (#476295). +- Implement second fallback mode for DNS requests (#505105). +- Don't generate invalid POSIX TZ string for Asia/Dhaka timezone (#506941). +- Allow backtrace through __longjmp_chk on powerpc. + +* Fri May 22 2009 Jakub Jelinek 2.10.1-2 +- fix accept4 on architectures other than i?86/x86_64 +- robustify nscd client code during server GC +- fix up nscd segfaults during daemon shutdown +- fix memchr on ia64 (BZ#10162) +- replace the Sun RPC license with the BSD license, with the explicit + permission of Sun Microsystems +- fix up powerpc long double errno reporting + +* Sun May 10 2009 Jakub Jelinek 2.10.1-1 +- fix up getsgent_r and getsgnam_r exports on i?86 and ppc + +* Sat May 9 2009 Jakub Jelinek 2.10-2 +- update from trunk + - glibc 2.10 release + - fix memchr on x86_64 (#499689) + +* Mon Apr 27 2009 Jakub Jelinek 2.9.90-22 +- update from trunk + - further localedef fixes +- fix build-locale-archive + +* Fri Apr 24 2009 Jakub Jelinek 2.9.90-21 +- update from trunk + - fix localedef + - fix SHIFT_JIS iconv EILSEQ handling (#497267) + - misc fixes (BZ#10093, BZ#10100) + +* Fri Apr 24 2009 Jakub Jelinek 2.9.90-20 +- update from trunk + - fix p{read,write}v{,64} (#497429, #497434) + - fix strfmon (#496386) + +* Thu Apr 16 2009 Jakub Jelinek 2.9.90-19 +- update from trunk + - fix dlopen from statically linked binaries (#495830) + +* Thu Apr 16 2009 Jakub Jelinek 2.9.90-18 +- update from trunk + - fix fallocate + +* Wed Apr 15 2009 Jakub Jelinek 2.9.90-17 +- update from trunk + - if threads have very small stack sizes, use much smaller buffer + in __get_nprocs when called from within malloc (#494631) + +* Tue Apr 14 2009 Jakub Jelinek 2.9.90-16 +- update from trunk + +* Thu Apr 9 2009 Jakub Jelinek 2.9.90-15 +- rebuilt with fixed gcc to avoid miscompilation of i586 memmove +- reenable experimental malloc again + +* Wed Apr 8 2009 Jakub Jelinek 2.9.90-14 +- update from trunk +- temporarily disable experimental malloc + +* Tue Apr 7 2009 Jakub Jelinek 2.9.90-13 +- update from trunk + - fix strverscmp (#494457) +- configure with --enable-nss-crypt + +* Wed Apr 1 2009 Jakub Jelinek 2.9.90-12 +- update from trunk +- configure with --enable-experimental-malloc + +* Fri Mar 20 2009 Jakub Jelinek 2.9.90-11 +- update from trunk + - POSIX 2008 prototype adjustments for scandir{,64}, alphasort{,64} and + versionsort{,64} + - fix libthread_db (#491197) + +* Tue Mar 10 2009 Jakub Jelinek 2.9.90-10 +- update from trunk + - fix atexit/__cxa_atexit + +* Mon Mar 9 2009 Jakub Jelinek 2.9.90-9 +- update from trunk + - POSIX 2008 support: -D_XOPEN_SOURCE=700 and -D_POSIX_C_SOURCE=200809L +- move libnldbl_nonshared.a on ppc*/s390*/sparc* back to glibc-devel + +* Fri Feb 27 2009 Roland McGrath - 2.9.90-8.1 +- fix libthread_db (#487212) + +* Tue Feb 24 2009 Fedora Release Engineering - 2.9.90-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 18 2009 Jakub Jelinek 2.9.90-7 +- update from trunk +- adjust for i586 + i686 from i386 + i686 build +- split static libraries into glibc-static subpackage +- ld -r the whole libpthread.a together to avoid endless issues with + -static ... -lpthread +- require 2.6.18 and later kernel + +* Wed Feb 4 2009 Jakub Jelinek 2.9.90-3 +- update from trunk + - ISO C++ compliant strchr etc. with GCC 4.4+ + - AT_RANDOM support + +* Thu Jan 8 2009 Jakub Jelinek 2.9.90-2 +- update from trunk + +* Fri Jan 2 2009 Jakub Jelinek 2.9.90-1 +- update from trunk (#478314) + +* Mon Dec 8 2008 Jakub Jelinek 2.9-3 +- temporarily disable _nss_dns_gethostbyname4_r (#459756) +- NIS hostname lookup fixes (#473073, #474800, BZ#7058) +- fix unsetenv (#472941) + +* Thu Nov 13 2008 Jakub Jelinek 2.9-2 +- glibc 2.9 release +- fix CPU_ALLOC_SIZE on 32-bit arches (BZ#7029) + +* Wed Nov 12 2008 Jakub Jelinek 2.8.90-17 +- update from trunk + - don't abort on broken DNS replies (#469299, BZ#7009) + - misc fixes (BZ#6966, BZ#7008, BZ#6955, BZ#6843) + +* Fri Oct 31 2008 Jakub Jelinek 2.8.90-16 +- update from trunk + - further resolver fixes + - another dynamic TLS handling fix (#469263) + - misc fixes (BZ#6867, BZ#6875, BZ#6919, BZ#6920, BZ#6942, BZ#6947, + BZ#6968, BZ#6974, BZ#6980, BZ#6995) +- rebuild with newer rpm to avoid stripping + shared libraries when they shouldn't be (#468129) + +* Tue Oct 28 2008 Jakub Jelinek 2.8.90-15 +- update from trunk + - __libc_res_nquery fixes (#466786) + +* Sun Oct 19 2008 Jakub Jelinek 2.8.90-14 +- update from trunk + - fix dynamic TLS handling (#467309) + - fix sys/signalfd.h for C++ (#467172) + - fix sprof (#458861) + - fix _mcount and socket syscalls on s390x (#464146) + - try harder to allocate memory in valloc and pvalloc (#461481) +- fix power6 32-bit libs (#467311) + +* Fri Oct 10 2008 Dennis Gilmore 2.8.90-13 +- apply sparcv9v memset patch from jakub and davem + +* Fri Aug 29 2008 Jakub Jelinek 2.8.90-12 +- update from trunk + - revert origin changes (#457849) + - use MAP_STACK for thread stacks + - misc fixes (BZ#6845, BZ#6544, BZ#6634, BZ#6589, BZ#6790, BZ#6791, + BZ#6824) + - power7 bits (BZ#6817) + - fix expm1 on i?86/x86_64 (#43354, BZ#5794) + +* Sat Aug 2 2008 Jakub Jelinek 2.8.90-11 +- update from trunk + - fix non-absolute $ORIGIN handling (#457560) + - exported some further libresolv APIs (#453325) + - misc fixes + +* Tue Jul 29 2008 Jakub Jelinek 2.8.90-10 +- update from trunk + - resolver fixes + - misc fixes (BZ#6771, BZ#6763, BZ#6698, BZ#6712) + - s390{,x} utmp/utmpx bi-arch support (BZ#6724) + - popen "e" flag +- fr_FR locale changes reenabled + +* Wed Jul 16 2008 Jakub Jelinek 2.8.90-9 +- update from trunk + - fix unbuffered vfprintf if writing to the stream fails (#455360) + - remove useless "malloc: using debugging hooks" message (#455355) + - nscd fixes + - fix resolver alignment issues (#454500) + - fix setvbuf (BZ#6719) + +* Thu Jul 3 2008 Jakub Jelinek 2.8.90-8 +- update from trunk + - watch even resolv.conf in nscd using inotify + - some nscd fixes + +* Fri Jun 13 2008 Jakub Jelinek 2.8.90-7 +- update from trunk + - avoid *lround* on ppc* clobbering cr3/cr4 registers (#450790) + - further nscd fixes (#450704) + - use inotify in nscd to watch files + +* Thu Jun 12 2008 Jakub Jelinek 2.8.90-6 +- update from trunk + - nscd fixes (#450704) + - fix getservbyport (#449358) + - fix regexp.h (#446406) + - avoid crashing on T_DNAME in DNS responses (#450766) + +* Sun May 25 2008 Jakub Jelinek 2.8.90-5 +- update from trunk + +* Tue May 20 2008 Jakub Jelinek 2.8.90-4 +- further getaddrinfo and nscd fixes + +* Sun May 18 2008 Jakub Jelinek 2.8.90-3 +- getaddrinfo and nscd fixes +- reenable assertion checking in rawhide + +* Fri May 16 2008 Jakub Jelinek 2.8.90-2 +- fix getaddrinfo (#446801, #446808) + +* Thu May 15 2008 Jakub Jelinek 2.8.90-1 +- update to trunk + - O(n) memmem/strstr/strcasestr + - i386/x86_64 TLS descriptors support + - concurrent IPv4 and IPv6 DNS lookups by getaddrinfo + +* Mon May 5 2008 Jakub Jelinek 2.8-3 +- don't run telinit u in %%post if both /dev/initctl and + /sbin/initctl exist (#444978) +- workaround GCC ppc64 miscompilation of c{log{,10},acosh,atan}l + (#444996) + +* Wed Apr 30 2008 Jakub Jelinek 2.8-2 +- fix nscd races during GC (BZ#5381) +- rebuilt with fixed GCC to fix regex miscompilation on power6 +- SPARC fixes + +* Sat Apr 12 2008 Jakub Jelinek 2.8-1 +- 2.8 release + +* Fri Apr 11 2008 Jakub Jelinek 2.7.90-16 +- update to trunk + - misc fixes (BZ#4997, BZ#5741) + - make sure all users of __libc_setlocale_lock know it is + now a rwlock + - fix ppc/ppc64 compatibility _sys_errlist and _sys_siglist + symbols + +* Thu Apr 10 2008 Jakub Jelinek 2.7.90-15 +- update to trunk + - misc fixes (BZ#4314, BZ#4407, BZ#5209, BZ#5436, BZ#5768, BZ#5998, + BZ#6024) +- restart sshd in %%post when upstart is used - it doesn't have + /dev/initctl (#441763) +- disable assert checking again + +* Tue Apr 8 2008 Jakub Jelinek 2.7.90-14 +- update to trunk + - misc fixes (BZ#5443, BZ#5475, BZ#5478, BZ#5939, BZ#5979, BZ#5995, + BZ#6004, BZ#6007, BZ#6020, BZ#6021, BZ#6042) + - change mtrace to keep perl 5.10 quiet (#441082) + - don't share conversion state between mbtowc and wctomb (#438687) + - if st_blksize is too large and malloc fails, retry with smaller + buffer in opendir (#430768) + - correct *printf overflow test (#358111) + +* Fri Mar 28 2008 Jakub Jelinek 2.7.90-13 +- update to trunk + - don't define ARG_MAX in , as it is no longer + constant - use sysconf (_SC_ARG_MAX) to get the current + argument size limit + - fix build on sparc64 +- only service sshd condrestart if /etc/rc.d/init.d/sshd exists + (#428859) + +* Wed Mar 26 2008 Jakub Jelinek 2.7.90-12 +- update to trunk + - new CLONE_* flags in (#438542) + - nis+ errno clobbering fix (#437945) + - fix adjtime (#437974) + +* Fri Mar 14 2008 Jakub Jelinek 2.7.90-11 +- update to trunk +- remove , define _XOPEN_STREAMS -1 (#436349) + +* Wed Mar 5 2008 Jakub Jelinek 2.7.90-8 +- update to trunk + - {,v}{as,d}printf and obstack_{,v}printf fortification (#435905) + - fix getnameinfo/gethostbyaddr (#428067, BZ#5790) + - fix yp_order (#435519, BZ#5854) + - misc fixes (BZ#5779, BZ#5736, BZ#5627, BZ#5818, BZ#5012) +- merge review cleanup (Tom Callaway, #225806) + +* Sat Feb 16 2008 Jakub Jelinek 2.7.90-7 +- update to trunk + - make NI_MAXHOST and NI_MAXSERV available even in BSDish + namespaces (BZ#5737) + - timerfd_* syscalls + +* Fri Feb 1 2008 Jakub Jelinek 2.7.90-6 +- fix build + +* Thu Jan 31 2008 Jakub Jelinek 2.7.90-5 +- update to trunk +- rebuild with gcc 4.3 + +* Fri Jan 11 2008 Jakub Jelinek 2.7.90-4 +- update to trunk + - misc fixes (BZ#5541, BZ#5545, BZ#5553, BZ#5112, BZ#5520) + - getaddrinfo fixes + - signalize EOVERFLOW from sem_post instead of overflowing + the counter + - fix i?86 makecontext + - fix iconv for iso-2022-jp//translit (#397021) + +* Thu Jan 3 2008 Jakub Jelinek 2.7.90-3 +- update to trunk + - fix recognition of interface family (#425768) + - add __THROW to __ctype_{b,tolower,toupper}_loc prototypes + +* Thu Dec 27 2007 Jakub Jelinek 2.7.90-2 +- update to trunk + - nsswitch fix (#425768) +- temporarily enable assert checking + +* Wed Dec 12 2007 Jakub Jelinek 2.7.90-1 +- update to trunk + - fix __USE_STRING_INLINES on i?86 (#408731, #371711) + - fix *scanf (#388751) + +* Wed Oct 17 2007 Jakub Jelinek 2.7-1 +- glibc 2.7 release +- fix tzfile.c for times after last transition (#333561) +- fix sem_post@GLIBC_2.0 on i?86 +- appease valgrind in libpthread.so initialization +- misc fixes (BZ#3425, BZ#5184, BZ#5186) + +* Mon Oct 15 2007 Jakub Jelinek 2.6.90-21 +- fix getgr{name,gid}{,_r} with nscd + +* Sun Oct 14 2007 Jakub Jelinek 2.6.90-20 +- install (#330031) +- disable -D_FORTIFY_SOURCE{,=2} support (with a warning) for + GCC 3.4.x and earlier(#327641) +- pl_PL locale changes (BZ#4098, #242296) +- misc fixes (BZ#1140, BZ#3195, BZ#3242, BZ#4359) + +* Thu Oct 11 2007 Jakub Jelinek 2.6.90-19 +- fix +- simple preprocessor in localedef, fix de_DE collation with it + +* Wed Oct 10 2007 Jakub Jelinek 2.6.90-18 +- add signalfd, eventfd, eventfd_read, eventfd_write +- qsort speedups +- workaround for cpuid bugs (#324081) +- make sure gettext's conversion_lock is initialized even if + program isn't linked against libpthread.so.0, only dlopens it (#321761) +- misc fixes (BZ#5112, BZ#5113, BZ#5104, BZ#5063, BZ#5010, BZ#4407, + BZ#3924, BZ#5103, BZ#2633, BZ#181, BZ#73, #321901) + +* Wed Oct 3 2007 Jakub Jelinek 2.6.90-17 +- fix {,v}swprintf with -D_FORTIFY_SOURCE=1 -mlong-double-64 on ppc*/s390*/sparc* +- strcoll fixes +- misc fixes (BZ#645, BZ#5071) +- locale fixes (BZ#4941, #299321, #203364, #196711, #236212) + +* Sat Sep 29 2007 Jakub Jelinek 2.6.90-16 +- misc fixes (BZ#4963, BZ#4972, BZ#5028, BZ#5043, BZ#5058) +- improve -D_FORTIFY_SOURCE{,=2} diagnostic through warning/error + attributes +- fix wcscpy, wcpcpy, fgetws, fgetws_unlocked, swprintf and vswprintf + fortification inlines +- fix a scalability issue with lazy binding in heavily multithreaded + programs + +* Thu Sep 20 2007 Jakub Jelinek 2.6.90-15 +- $5$ (SHA-256) and $6$ (SHA-512) support in crypt + (#228697, #249477, #173834) + +* Tue Sep 18 2007 Jakub Jelinek 2.6.90-14 +- -D_FORTIFY_SOURCE{,=2} support for C++ +- fortification of fread{,_unlocked} +- support *scanf m allocation modifier (%%ms, %%mls, %%mc, ...) +- in -std=c99 or -D_XOPEN_SOURCE=600 mode don't recognize + %%as, %%aS and %%a[ as a GNU extension for *scanf +- fix splice, vmsplice, tee return value, make them cancellation + points +- mq_open checking +- use inline function rather than function-like macro + for open{,at}{,64} checking +- IFA_F_OPTIMISTIC handling in getaddrinfo (#259681) +- fix an ABBA deadlock in ld.so (#284171) +- remove sparc{32,64} unwind info from _start and clone + +* Mon Aug 27 2007 Jakub Jelinek 2.6.90-13 +- fix personality on x86_64/ppc/ppc64 (#256281) + +* Sat Aug 25 2007 Jakub Jelinek 2.6.90-12 +- readd x86_64 gettimeofday stuff, initialize it earlier +- nis_list fix (#254115) +- workaround for bugs in ia64 silly /emul/ia32-linux hack (#253961) +- misc fixes (BZ#3924, BZ#4566, BZ#4582, BZ#4588, BZ#4726, BZ#4946, + BZ#4905, BZ#4814, BZ#4925, BZ#4936, BZ#4896, BZ#4937, BZ#3842, + BZ#4554, BZ#4557, BZ#4938) + +* Fri Aug 17 2007 Jakub Jelinek 2.6.90-11 +- remove __strtold_internal and __wcstold_internal from ppc*/s390*/sparc* + *-ldbl.h headers +- temporarily backout x86_64 gettimeofday.S changes (#252453) +- some further sparc, sparc64 and alpha fixes + +* Wed Aug 15 2007 Jakub Jelinek 2.6.90-10 +- don't open /etc/ld.so.{cache,preload} with O_NOATIME (#252146) +- s390{,x}, alpha and sparc fixes +- sparcv9 is no longer an aux arch, as we expect + to not build sparc.rpm glibc any longer, only sparcv9.rpm, + sparc64.rpm and new two aux arches sparcv9v.rpm and sparc64v.rpm + +* Tue Aug 14 2007 Jakub Jelinek 2.6.90-9 +- private futex even for mutexes and condvars +- some further O_CLOEXEC changes +- use vDSO on x86_64 if available +- ia64 build fixes (#251983) + +* Fri Aug 10 2007 Roland McGrath 2.6.90-8 +- update to trunk + - fix missing strtold_l export on ppc64 + +* Thu Aug 9 2007 Roland McGrath 2.6.90-6 +- update to trunk + - fix local PLT regressions +- spec file revamp for new find-debuginfo.sh + +* Sun Aug 5 2007 Jakub Jelinek 2.6.90-4 +- fix librt.so and librtkaio.so on ppc32, so that it is not using + bss PLT + +* Sat Aug 4 2007 Jakub Jelinek 2.6.90-3 +- fix open{,at}{,64} macro for -pedantic (#250897) +- add transliteration for l with stroke (#250492) +- fix strtod ("-0", NULL) +- update License tag + +* Wed Aug 1 2007 Jakub Jelinek 2.6.90-2 +- make aux-cache purely optional performance optimization in ldconfig, + don't issue any errors if it can't be created (#250430) +- remove override_headers hack, BuildRequire >= 2.6.22 kernel-headers + and rely on its content + +* Tue Jul 31 2007 Jakub Jelinek 2.6.90-1 +- update to trunk + - private futex optimizations + - open{,at}{,64} argument checking +- ldconfig speedups + +* Sun Jul 8 2007 Jakub Jelinek 2.6-4 +- filter pseudo-files from debuginfo source lists (#245714) +- fix sscanf when errno is EINTR before the call (BZ#4745) +- save/restore errno around reading /etc/default/nss (BZ#4702) +- fix LD_HWCAP_MASK handling +- disable workaround for #210748, instead backport + ld.so locking fixes from the trunk (#235026) +- new x86_64 memcpy +- don't write uninitialized padding bytes to nscd socket +- fix dl{,v}sym, dl_iterate_phdr and dlopen if some library is + mapped into ld.so's inter-segment hole on x86_64 (#245035, #244545) +- fix LD_AUDIT=a:b program (#180432) +- don't crash on pseudo-zero long double values passed to + *printf on i?86/x86_64/ia64 (BZ#4586) +- fix *printf %%La and strtold with some hexadecimal floating point + constants on ppc/ppc64 +- fix nextafterl on ppc/ppc64 +- fix sem_timedwait on i?86 and x86_64 + +* Thu May 24 2007 Jakub Jelinek 2.6-3 +- don't use %%config(missingok) for locale-archive.tmpl, + instead of removing it altogether truncate it to zero + size (#240697) +- add a workaround for #210748 + +* Mon May 21 2007 Jakub Jelinek 2.6-2 +- restore malloc_set_state backwards compatibility (#239344) +- fix epoll_pwait (BZ#4525) +- fix printf with unknown format spec or positional arguments + and large width and/or precision (BZ#4514) +- robust mutexes fix (BZ#4512) + +* Tue May 15 2007 Roland McGrath 2.6-1 +- glibc 2.6 release + +* Fri May 11 2007 Jakub Jelinek 2.5.90-24 +- utimensat, futimens and lutimes support + +* Thu May 10 2007 Jakub Jelinek 2.5.90-23 +- use madvise MADV_DONTNEED in malloc +- fix ia64 feraiseexcept +- fix s390{,x} feholdexcept (BZ#3427) +- ppc fenv fixes +- make fdatasync a cancellation point (BZ#4465) +- fix *printf for huge precisions with wide char code and multi-byte + strings +- fix dladdr (#232224, BZ#4131) + +* Fri May 4 2007 Jakub Jelinek 2.5.90-22 +- add transliteration for (BZ#3213) +- fix *scanf with %%f on hexadecimal floats without exponent (BZ#4342) +- fix *printf with very large precisions for %%s (#238406, BZ#4438) +- fix inet_ntop size checking for AF_INET (BZ#4439) +- for *printf %%e avoid 1.000e-00, for exponent 0 always use + sign (#238431) +- fix a regression introduced in #223467 changes +- gethostby*_r alignment fixes (BZ#4381) +- fix ifaddrs error handling + +* Mon Apr 16 2007 Jakub Jelinek 2.5.90-21 +- don't include individual locale files in glibc-common, + rather include prepared locale-archive template and let + build-locale-archive create locale-archive from the template + and any user supplied /usr/lib/locale/*_* directories, + then unlink the locale-archive template - this should save + > 80MB of glibc-common occupied disk space +- fix _XOPEN_VERSION (BZ#4364) +- fix printf with %%g and values tiny bit smaller than 1.e-4 (#235864, + BZ#4362) +- fix NIS+ __nisfind_server (#235229) + +* Sat Mar 31 2007 Jakub Jelinek 2.5.90-20 +- assorted NIS+ speedups (#223467) +- fix HAVE_LIBCAP configure detection (#178934) +- remove %%{_prefix}/sbin/rpcinfo from glibc-common (#228894) +- nexttoward*/nextafter* fixes (BZ#3306) +- feholdexcept/feupdateenv fixes (BZ#3427) +- speed up fnmatch with two or more * in the pattern + +* Sat Mar 17 2007 Jakub Jelinek 2.5.90-19 +- fix power6 libm compat symbols on ppc32 (#232633) +- fix child refcntr in NPTL fork (#230198) +- fix ifaddrs with many net devices on > 4KB page size arches (#230151) +- fix pthread_mutex_timedlock on x86_64 (#228103) +- various fixes (BZ#3919, BZ#4101, BZ#4130, BZ#4181, BZ#4069, BZ#3458) + +* Wed Feb 21 2007 Jakub Jelinek 2.5.90-18 +- fix nftw with FTW_CHDIR on / (BZ#4076) +- nscd fixes (BZ#4074) +- fix fmod{,f,l} on i?86 (BZ#3325) +- support localized digits for fp values in *scanf (BZ#2211) +- namespaces fixes (BZ#2633) +- fix euidaccess (BZ#3842) +- glob fixes (BZ#3996) +- assorted locale data fixes (BZ#1430, BZ#672, BZ#58, BZ#3156, + BZ#2692, BZ#2648, BZ#3363, BZ#3334, BZ#3326, BZ#3322, BZ#3995, + BZ#3885, BZ#3884, BZ#3851) + +* Sun Feb 11 2007 Jakub Jelinek 2.5.90-17 +- RFC2671 support in resolver (#205842) +- fix strptime (BZ#3944) +- fix regcomp with REG_NEWLINE (BZ#3957) +- fix pthread_mutex_timedlock on x86_64 (#228103) + +* Fri Feb 2 2007 Jakub Jelinek 2.5.90-16 +- add strerror_l +- fix application crashes when doing NSS lookups through nscd + mmapped databases and nscd decides to start garbage collection + during the lookups (#219145, #225315) +- fix %%0lld printing of 0LL on 32-bit architectures (BZ#3902) +- ignore errors from install-info in glibc-devel scriptlets + (#223691) + +* Wed Jan 17 2007 Jakub Jelinek 2.5.90-15 +- fix NIS getservbyname when proto is NULL +- fix nss_compat +group handling (#220658) +- cache services in nscd +- fix double free in fts_close (#222089) +- fix vfork+execvp memory leak (#221187) +- soft-fp fixes (BZ#2749) +- further strtod fixes (BZ#3855) +- make sure pthread_kill doesn't return EINVAL even if + the target thread exits in between pthread_kill ESRCH check + and the actual tgkill syscall (#220420) +- fix ABBA deadlock possibility in ld.so scope locking code + +* Tue Dec 19 2006 Jakub Jelinek 2.5.90-14 +- fix {j,m}rand48{,_r} on 64-bit arches (BZ#3747) +- handle power6x AT_PLATFORM (#216970) +- fix a race condition in getXXbyYY_r (#219145) +- fix tst-pselect testcase + +* Thu Dec 14 2006 Jakub Jelinek 2.5.90-13 +- fix setcontext on ppc32 (#219107) +- fix wide stdio after setvbuf (#217064, BZ#2337) +- handle relatime mount option in statvfs +- revert i?86/x86_64 clone CFI temporarily + +* Sun Dec 10 2006 Jakub Jelinek 2.5.90-12 +- fix hasmntopt (#218802) +- fix setusershell and getusershell (#218782) +- strtod fixes (BZ#3664, BZ#3673, BZ#3674) +- fix memusage with realloc (x, 0) + +* Tue Dec 5 2006 Jakub Jelinek 2.5.90-11 +- allow suid apps to setenv NIS_PATH and influence through that + nis_list and nis_lookup (#209155) +- fix ttyname and ttyname_r with invalid file descriptor (#218276) +- cs_CZ LC_TIME fixes (#218438) +- fix build with 2.6.19+ headers (#217723) + +* Fri Dec 1 2006 Jakub Jelinek 2.5.90-10 +- fix x86-64 restore_rt unwind info + +* Thu Nov 30 2006 Jakub Jelinek 2.5.90-9 +- fix last svc_run change (#217850) +- on ppc64 build __libc_start_main without unwind info, + as it breaks MD_FROB_UPDATE_CONTEXT (#217729, #217775; in the + future that could be fixable just by providing .cfi_undefined r2 + in __libc_start_main instead) +- add unwind info for x86-64 restore_rt signal return landing pad + (#217087) +- add power6x subdir to /%%{_lib}/ and /%%{_lib}/rtkaio/, + link all libs from ../power6/* into them + +* Tue Nov 28 2006 Jakub Jelinek 2.5.90-8 +- fix svc_run (#216834, BZ#3559) +- add -fasynchronous-unwind-tables to CFLAGS (#216518) +- make sure there is consistent timestamp for /etc/ld.so.conf, + /etc/localtime and /etc/rpc between multilib glibc rpms + +* Mon Nov 20 2006 Jakub Jelinek 2.5.90-7 +- handle IPv6 addresses in /etc/hosts that are mappable to + IPv4 addresses in IPv4 host lookups (#215283) +- fix :include: /etc/alias handling (#215572) +- handle new tzdata format to cope with year > 2037 transitions + on 64-bit architectures + +* Fri Nov 10 2006 Jakub Jelinek 2.5.90-6 +- fix strxfrm fix +- fix i?86 floor and ceil inlines (BZ#3451) + +* Thu Nov 9 2006 Jakub Jelinek 2.5.90-5 +- fix sysconf (_SC_LEVEL{2,3}_CACHE_SIZE) on Intel Core Duo + CPUs +- fix libthread_db.so on TLS_DTV_AT_TP architectures +- fix --inhibit-rpath (#214569) +- fix _r_debug content when prelinked ld.so executes + a program as its argument +- fix strxfrm +- powerpc-cpu add-on updates + +* Fri Nov 3 2006 Jakub Jelinek 2.5.90-4 +- fix atexit backwards compatibility (#213388) +- add mai_IN locale (#213415) +- remove bogus %%{_libdir}/librt.so.1 symlink (#213555) +- fix memusage (#213656) +- change libc.info category (#209493) + +* Sun Oct 29 2006 Jakub Jelinek 2.5.90-3 +- fix suid/sgid binaries on i?86/x86_64 (#212723) + +* Fri Oct 27 2006 Jakub Jelinek 2.5.90-2 +- fix ia64 build +- don't call _dl_close outside of dl_load_lock critical section + if dlopen failed (BZ#3426) +- add rtld scope locking (#211133) + +* Wed Oct 25 2006 Jakub Jelinek 2.5.90-1 +- fix i?86 6 argument syscalls (e.g. splice) +- fix rtld minimal realloc (BZ#3352) +- fix RFC3484 getaddrinfo sorting according to rules 4 and 7 (BZ#3369) +- fix xdrmem_setpos (#211452) +- bump __GLIBC_MINOR__ +- increase PTHREAD_STACK_MIN on ppc{,64} to 128K to allow + 64K pagesize kernels (#209877) +- speed up initgroups on NIS+ (#208203) + +* Mon Oct 2 2006 Jakub Jelinek 2.5-2 +- fix nscd database growing (#207928) +- bypass prelinking when LD_DYNAMIC_WEAK=1 is in the environment + +* Fri Sep 29 2006 Jakub Jelinek 2.5-1 +- glibc 2.5 release + +* Wed Sep 27 2006 Jakub Jelinek 2.4.90-36 +- rebuilt with gcc-4.1.1-26 to fix unwind info + +* Mon Sep 25 2006 Jakub Jelinek 2.4.90-35 +- fix glob with large number of matches (BZ#3253) +- fix fchownat on kernels that don't support that syscall (BZ#3252) +- fix lrintl on s390{,64} + +* Sat Sep 23 2006 Jakub Jelinek 2.4.90-34 +- fix ppc{32,64} longjmp (BZ#3225) +- fix user visible spelling errors (BZ#3137) +- fix l{,l}rint{,f,l} around zero (BZ#2592) +- avoid stack trampoline in s390{,x} makecontext + +* Tue Sep 19 2006 Jakub Jelinek 2.4.90-33 +- fix dlclose (#206639) +- don't load platform optimized libraries if kernel doesn't set + AT_PLATFORM +- fix ppc{32,64} libSegFault.so +- use -mtune=generic even for glibc-devel.i386 (#206437) +- fix /%%{_lib}/librt.so.1 symlink + +* Fri Sep 15 2006 Jakub Jelinek 2.4.90-32 +- on ppc* use just AT_PLATFORM and altivec AT_HWCAP bit for library selection +- fix lrintl and lroundl on ppc{,64} +- use hidden visibility on fstatat{,64} and mknodat in libc_nonshared.a + +* Sun Sep 10 2006 Jakub Jelinek 2.4.90-31 +- fix pthread_cond_{,timed}wait cancellation (BZ#3123) +- fix lrint on ppc32 (BZ#3155) +- fix malloc allocating more than half of address space (BZ#2775) +- fix mktime on 32-bit arches a few years after 2038 (BZ#2821) + +* Thu Sep 7 2006 Jakub Jelinek 2.4.90-30 +- add librtkaio, to use it add /%%{lib}/rtkaio to your + LD_LIBRARY_PATH or /etc/ld.so.conf +- fix or_IN February name (#204730) +- fix pthread_create called from cancellation handlers (BZ#3124) +- fix regex case insensitive searches with characters where upper + and lower case multibyte representations have different length + (e.g. I and dotless i, #202991) + +* Tue Sep 5 2006 Jakub Jelinek 2.4.90-29 +- randomize resolver query ids before use instead after use (#205113) +- fix resolver symver checking with DT_GNU_HASH (#204909) +- put .hash section in glibc libraries at the end of RO segment + when .gnu.hash is present + +* Thu Aug 31 2006 Jakub Jelinek 2.4.90-28 +- another malloc doubly linked list corruption problem fix (#204653) + +* Thu Aug 31 2006 Jakub Jelinek 2.4.90-27 +- allow $LIB and $PLATFORM in dlopen parameters even in suid/sgid (#204399) +- handle $LIB/$PLATFORM in LD_LIBRARY_PATH +- fix splice prototype (#204530) + +* Mon Aug 28 2006 Jakub Jelinek 2.4.90-26 +- real fix for the doubly linked list corruption problem +- try harder in realloc to allocate memory (BZ#2684) +- fix getnameinfo error reporting (#204122) +- make localedef more robust on invalid input (#203728) + +* Fri Aug 25 2006 Jakub Jelinek 2.4.90-25 +- temporarily back out code to limit number of unsorted block + sort iterations (#203735, #204027) +- handle PLT symbols in dladdr properly (BZ#2683) +- avoid malloc infinite looping for allocations larger than + the system can allocate (#203915) + +* Tue Aug 22 2006 Jakub Jelinek 2.4.90-23 +- malloc fixes, especially for 32-bit arches (#202309) +- further *_IN locale fixes (#200230) +- fix get{serv,rpc}ent{,_r} if NIS map is empty (#203237) +- fix /usr/bin/iconv (#203400) + +* Fri Aug 18 2006 Jakub Jelinek 2.4.90-22 +- rebuilt with latest binutils to pick up 64K -z commonpagesize + on ppc/ppc64 (#203001) + +* Tue Aug 15 2006 Jakub Jelinek 2.4.90-21 +- if some test gets stuck, kill the tee process after make check + finishes +- build with -mtune=generic on i686 and x86_64 + +* Tue Aug 15 2006 Jakub Jelinek 2.4.90-20 +- PTHREAD_PRIO_PROTECT support +- fix errno if nice() fails (#201826) + +* Thu Aug 10 2006 Jakub Jelinek 2.4.90-19 +- adaptive malloc brk/mmap threshold +- fix fchownat to use kernel syscall (if available) on many arches (#201870) +- only define O_DIRECT with -D_GNU_SOURCE on ia64 to match all + other arches (#201748) + +* Mon Aug 7 2006 Jakub Jelinek 2.4.90-18 +- NIS+ fixes +- fix memusage and xtrace scripts (#200736) +- redirect /sbin/service sshd condrestart std{out,err} to /dev/null + when executed from glibc_post_upgrade + +* Wed Aug 2 2006 Jakub Jelinek 2.4.90-17 +- typo fix for the dladdr patch +- build i?86 glibc with -mno-tls-direct-seg-refs (#200469) + +* Wed Aug 2 2006 Jakub Jelinek 2.4.90-16 +- fix dladdr on binaries/libraries with only DT_GNU_HASH and no + DT_HASH (#200635) +- fix early timeout of initgroups data in nscd (#173019) +- add am/pm display to es_PE and es_NI locales (#167101) +- fix nss_compat failures when nis/nis+ unavailable (#192072) + +* Mon Jul 31 2006 Roland McGrath 2.4.90-15 +- fix missing destructor calls in dlclose (#197932) +- enable transliteration support in all locales (#196713) +- disallow RTLD_GLOBAL flag for dlmopen in secondary namespaces (#197462) +- PI mutex support + +* Mon Jul 10 2006 Jakub Jelinek 2.4.90-13 +- DT_GNU_HASH support + +* Fri Jun 30 2006 Jakub Jelinek 2.4.90-12 +- buildrequire gettext +- enable fstatat64/newfstatat syscalls even on ppc*/s390*/ia64 (#196494) +- fix out of memory behavior in gettext (#194321) +- fix regex on multi-byte non-UTF-8 charsets (#193873) +- minor NIS+ fixes (#190803) +- don't use cancellable calls in posix_spawn* and only set{u,g}id + current thread if requested (#193631) + +* Wed May 31 2006 Jakub Jelinek 2.4.90-11 +- don't exit from nscd -i before the database is + actually invalidated, add locking to prune_cache (#191464) +- build glibc-devel.i386 static libraries with + -mno-tls-direct-seg-refs -DNO_TLS_DIRECT_SEG_REFS +- RFC3542 support (advanced API for IPv6; #191001, BZ##2693) + +* Wed May 24 2006 Jakub Jelinek 2.4.90-10 +- on i686 make glibc owner of /lib/i686 directory (#192597) +- search parent NIS+ domains (#190803) + +* Sun May 21 2006 Jakub Jelinek 2.4.90-9 +- update from CVS + - big NIS+ changes + +* Fri May 19 2006 Jakub Jelinek 2.4.90-8 +- update from CVS + - fix nss_compat when SETENT_BATCH_READ=TRUE is in /etc/default/nss + - fix RFC3484 precedence table for site-local and ULA addresses (#188364) + - fix a sunrpc memory leak + +* Thu May 11 2006 Jakub Jelinek 2.4.90-7 +- update from CVS + - fix tcgetattr (#177965) + - fix (#191264) + +* Fri May 5 2006 Jakub Jelinek 2.4.90-6 +- update from CVS +- rebuilt using fixed rpm + +* Fri May 5 2006 Jakub Jelinek 2.4.90-5 +- update from CVS + - some NIS+ fixes + - allow overriding rfc3484 address sorting tables for getaddrinfo + through /etc/gai.conf (sample config file included in %%doc directory) + +* Mon May 1 2006 Jakub Jelinek 2.4.90-4 +- update from CVS + - SETENT_BATCH_READ /etc/default/nss option for speeding up + some usages of NIS+ (#188246) + - move debug state change notification (#179208) + - fix ldd script if one of the dynamic linkers is not installed (#190259) + +* Thu Apr 27 2006 Jakub Jelinek 2.4.90-3 +- update from CVS + - fix a typo in nscd.conf (#190085) + - fix handling of SIGHUP in nscd when some caches are disabled (#189978) + - make nscd paranoia mode working with non-root server-user (#189779) + +* Wed Apr 26 2006 Jakub Jelinek 2.4.90-2 +- update from CVS + - fix getaddrinfo (#190002) + - add auto-propagate nscd.conf options (#177154) + - fix nscd auditing (#169148) + +* Tue Apr 25 2006 Jakub Jelinek 2.4.90-1 +- update from CVS + +* Mon Apr 24 2006 Jakub Jelinek 2.4-6 +- update from CVS + - NIS+ fixes + - don't segfault on too large argp key values (#189545) + - getaddrinfo fixes for RFC3484 (#188364) + +* Tue Mar 28 2006 Jakub Jelinek 2.4-5 +- update from CVS + - pshared robust mutex support + - fix btowc and bwtoc in C++ (#186410) + - fix NIS+ (#186592) + - don't declare __wcsto*l_internal for non-GCC or if not -O1+ (#185667) +- don't mention nscd failures on 2.0 kernels (#185335) + +* Tue Mar 7 2006 Roland McGrath 2.4-4 +- back up %%{ix86} gdb conflicts to < 6.3.0.0-1.111 + +* Tue Mar 7 2006 Jakub Jelinek 2.4-3 +- really fix rintl on ppc64 + +* Tue Mar 7 2006 Jakub Jelinek 2.4-2 +- accurate unwind info for lowlevellock.h stubs on %%{ix86} +- fix ppc/ppc64 ceill, floorl, rintl, roundl and truncl (BZ#2423) + +* Mon Mar 6 2006 Jakub Jelinek 2.4-1 +- update from CVS + - glibc 2.4 release + +* Mon Mar 6 2006 Jakub Jelinek 2.3.91-2 +- update from CVS + - fix sYSMALLOc for MALLOC_ALIGNMENT > 2 * SIZE_SZ (#183895) + - revert ppc32 malloc alignment patch, it breaks malloc_set_state + and needs some further thoughts and time (#183894) +- provide accurate unwind info for lowlevellock.h stubs on x86_64 + +* Thu Mar 2 2006 Jakub Jelinek 2.3.91-1 +- update from CVS + - fixes for various arches +- ensure malloc returns pointers aligned to at least + MIN (2 * sizeof (size_t), __alignof__ (long double)) + (only on ppc32 this has not been the case lately with addition + of 128-bit long double, #182742) + +* Wed Mar 1 2006 Jakub Jelinek 2.3.90-39 +- update from CVS + +* Fri Feb 17 2006 Jakub Jelinek 2.3.90-38 +- update from CVS + - robust mutexes rewrite + +* Mon Feb 13 2006 Jakub Jelinek 2.3.90-37 +- update from CVS + - *at fixes + - unshare syscall wrapper + +* Sat Feb 4 2006 Jakub Jelinek 2.3.90-36 +- update from CVS + - fix frequency setting for ITIMER_PROF (#179938, BZ#2268) + - fix powerpc inline fegetround () + - fix nptl_db (#179946) + +* Fri Feb 3 2006 Jakub Jelinek 2.3.90-35 +- update from CVS + - handle futimesat (fd, NULL, tvp) as futimes (fd, tvp) +- fix q{e,f,g}cvt{,_r} for -mlong-double-64 + +* Thu Feb 2 2006 Jakub Jelinek 2.3.90-34 +- fix with C++ and -mlong-double-64 (#179742) +- add nexttowardl redirect for -mlong-double-64 + +* Thu Feb 2 2006 Jakub Jelinek 2.3.90-33 +- update from CVS + - long double support fixes + +* Wed Feb 1 2006 Jakub Jelinek 2.3.90-32 +- update from CVS + - 128-bit long double fixes for ppc{,64}, s390{,x} and sparc{,v9}, + alpha 128-bit long double support +- add inotify syscall numbers to the override headers + (#179366) + +* Mon Jan 30 2006 Jakub Jelinek 2.3.90-31 +- update from CVS + - 128-bit long double on ppc, ppc64, s390, s390x and sparc{,v9} +- add some new syscall numbers to the override + headers + +* Mon Jan 9 2006 Jakub Jelinek 2.3.90-30 +- update from CVS + - initializer fixes for -std=c{8,9}9 on 32-bit + arches +- avoid writable .rodata (#177121) + +* Fri Jan 6 2006 Jakub Jelinek 2.3.90-29 +- update from CVS + - make pthread_mutex_t an unnamed union again, as it affects + libstdc++ ABI mangling + +* Fri Jan 6 2006 Jakub Jelinek 2.3.90-28 +- update from CVS + - make aio_suspend interruptible by signals (#171968) + +* Fri Jan 6 2006 Jakub Jelinek 2.3.90-27 +- only rely on d_type in 32-bit getdents on s390 for 2.6.11+ + +* Wed Jan 4 2006 Jakub Jelinek 2.3.90-26 +- update from CVS + - for newly linked lio_listio* callers, send per request + notifications (#170116) + - fixup nscd -S option removal changes (#176860) + - remove nonnull attribute from ctermid (#176753) + - fix PTHREAD_*_INITIALIZER{,_NP} on 64-bit arches + - SPARC NPTL support for pre-v9 CPUs +- drop support for 2.4.xx and < 2.6.9 kernels + +* Mon Jan 2 2006 Jakub Jelinek 2.3.90-25 +- update from CVS + - s390{,x} and sparc{,64} pointer mangling fixes +- install a sanitized LinuxThreads + +* Mon Jan 2 2006 Jakub Jelinek 2.3.90-24 +- update from CVS + - nscd audit changes (#174422) + - ppc{32,64} vDSO support and ppc32 hp-timing + +* Tue Dec 27 2005 Jakub Jelinek 2.3.90-23 +- update from CVS + - robust mutexes +- fix transliteration segfaults (#176573, #176583) +- ignore prelink temporaries in ldconfig (#176570) + +* Wed Dec 21 2005 Jakub Jelinek 2.3.90-22 +- update from CVS + - minor fts fixes +- revert broken _Pragma () workaround +- fix ldconfig on bi-arch architectures (#176316) + +* Tue Dec 20 2005 Jakub Jelinek 2.3.90-21 +- update from CVS + - fix pointer (de)mangling in gconv_cache.c + +* Tue Dec 20 2005 Jakub Jelinek 2.3.90-20 +- update from CVS + - time ((void *) 1) should segfault, not return -EFAULT (#174856, BZ#1952) + - fix errlist generation +- update ulps for GCC 4.1 on IA-64 + +* Mon Dec 19 2005 Jakub Jelinek 2.3.90-19 +- update from CVS + - sysdeps/generic reorg + - setjmp/longjmp jump pointer mangling +- rebuilt with GCC 4.1-RH prerelease, worked around broken _Pragma () + handling in it +- remove glibc-profile subpackage +- use non-PLT calls for malloc/free/realloc/memalign invocations in + mtrace and mcheck hooks (#175261) +- setjmp/longjmp jump pointer mangling on ppc{,64}/ia64/s390{,x} + +* Sat Nov 19 2005 Jakub Jelinek 2.3.90-18 +- update from CVS + - change for broken apps that #define const /**/, + handle non-GCC compilers + - fix ppc{32,64} strncmp (BZ#1877, #173643, IT#83510) + - provide shmatt_t typedef in ia64 2.3.90-17 +- update from CVS + - fix in C++ + - {fstat,fchown,rename,unlink}at fixes + - epoll_wait is now a cancellation point + +* Tue Nov 15 2005 Jakub Jelinek 2.3.90-16 +- update from CVS +- make sure waitid syscall is used on ppc*/s390* + +* Thu Oct 20 2005 Jakub Jelinek 2.3.90-15 +- update from CVS + - be permissive in %%n check because of kernel bug #165351 (#171240) + - don't misalign stack in pthread_once on x86_64 (#170786, IT#81521) + - many locale fixes + +* Mon Oct 10 2005 Jakub Jelinek 2.3.90-14 +- update from CVS + - fix malloc bug after fork introduced in the last update + - fix getent hosts IP for IPv4 IPs (#169831) + +* Mon Oct 3 2005 Jakub Jelinek 2.3.90-13 +- update from CVS + - fix setuid etc. hangs if some thread exits during the call (#167766) + - fix innetgr memory leak (#169051) + - support > 2GB nscd log files (#168851) + - too many other changes to list here +- include errno in nscd message if audit_open failed (#169148) + +* Mon Sep 12 2005 Jakub Jelinek 2.3.90-12 +- update from CVS + - netgrp handling fixes (#167728) + - fix memory leak in setlocale (BZ#1318) + - fix hwcaps computation + - several regex portability improvements (#167019) + - hypotf fix + - fix *printf return code if underlying write fails (BZ#1146) + - PPC64 dl{,v}sym fixes for new ABI .opd symbols +- fix calloc with MALLOC_PERTURB_ in environment on 64-bit architectures + (#166719) +- source /etc/sysconfig/nscd (if it exists) in /etc/rc.d/init.d/nscd + (#167083) +- add %%triggerin for tzdata to glibc-common, so that tzdata updates + update /etc/localtime and /var/spool/postfix/etc/localtime if they + exist (#167787) + +* Mon Aug 29 2005 Jakub Jelinek 2.3.90-11 +- FUTEX_WAKE_OP support to speed up pthread_cond_signal + +* Wed Aug 24 2005 Jakub Jelinek 2.3.90-10 +- update from CVS + - fix growing of nscd persistent database (BZ#1204) + - fix _FORTIFY_SOURCE mbstowcs and wcstombs if destination size + is known at compile time, but length argument is not + +* Mon Aug 22 2005 Jakub Jelinek 2.3.90-9 +- update from CVS + - fix resolving over TCP (#161181, #165802) + - on ia64 don't abort on unhandled math function exception codes + (#165693) + +* Mon Aug 8 2005 Jakub Jelinek 2.3.90-8 +- update from CVS + - nscd persistent database verifier (#164001) + - cleanup _FORTIFY_SOURCE bits/*.h headers (#165000) + - handle EINTR in sigwait properly +- make sure poor man's stack guard randomization keeps first + byte 0 even on big-endian 32-bit arches +- fix {elf,nptl}/tst-stackguard1 +- obsolete linuxthreads-devel in glibc-devel + +* Fri Jul 29 2005 Jakub Jelinek 2.3.90-7 +- update from CVS +- do some poor man's stack guard randomization even without + the costly --enable-stackguard-randomization +- rebuilt with new GCC to make it use -msecure-plt on PPC32 + +* Mon Jul 25 2005 Jakub Jelinek 2.3.90-6 +- update from CVS + - fix execvp if PATH is not in environment and the call is going + to fail (BZ#1125) + - another bits/wchar2.h fix (#163990) + +* Fri Jul 22 2005 Jakub Jelinek 2.3.90-5 +- update from CVS + - fix stubs.h generation +- don't use _G_va_list in bits/wchar2.h + +* Fri Jul 22 2005 Jakub Jelinek 2.3.90-4 +- update from CVS + - make sure bits/wchar2.h header is installed + - fix __getgroups_chk return type + +* Thu Jul 21 2005 Jakub Jelinek 2.3.90-3 +- update from CVS + - make sure nscd cmsg buffers aren't misaligned, handle EINTR from + poll when contacting nscd more gracefully + - remove malloc attribute from posix_memalign + - correctly size nscd buffer for grpcache key (#163538) + - fix atan2f + - fix error memory leaks + - some more _FORTIFY_SOURCE protection + +* Fri Jul 8 2005 Jakub Jelinek 2.3.90-2 +- update from CVS + - ia64 stack protector support + - handle DNS referral results as server errors (#162625) + - ctan{,h}{,f,l} fixes (#160759) + - pass argc, argv and envp also to executable's *ni_array + functions (BZ#974) + - add ellipsis to clone prototype (#161593) + - fix glibc-profile (#162601) + - nss_compat fixes +- use sysdeps/generic version of in installed + headers instead of NPTL version (#162634) + +* Mon Jun 27 2005 Jakub Jelinek 2.3.90-1 +- update from CVS + - stack protector support + - fix xdr_{,u_}{longlong_t,hyper} on 64-bit arches (#161583) +- enable @GLIBC_2.4 symbols +- remove linuxthreads + +* Mon Jun 20 2005 Jakub Jelinek 2.3.5-11 +- update from CVS + - PPC32 -msecure-plt support + - support classes keyword in /etc/hesiod.conf (#150350) + - add RLIMIT_NICE and RLIMIT_RTPRIO to (#157049) + - decrease number of .plt relocations in libc.so + - use -laudit in nscd (#159217) + - handle big amounts of networking interfaces in getifaddrs/if_nameindex + (#159399) + - fix pa_IN locale's am_pm (#158715, BZ#622) + - fix debugging of PIEs + +* Mon May 30 2005 Jakub Jelinek 2.3.5-10 +- fix LD_ASSUME_KERNEL (since 2.3.5-8 GLRO(dl_osversion) + has been always overwritten with the version of currently + running kernel) +- remove linuxthreads man pages other than those covered in + 3p section, as 3p man pages are far better quality and describe + POSIX behaviour that NPTL implements (#159084) + +* Tue May 24 2005 Jakub Jelinek 2.3.5-9 +- update from CVS + - increase bindresvport's LOWPORT to 512, apparently some + broken daemons don't think 0 .. 511 ports are reserved + +* Mon May 23 2005 Jakub Jelinek 2.3.5-8 +- update from CVS + - fix kernel version check in ld.so +- fix sendfile{,64} prototypes (BZ#961) +- try more ports in bindresvport if all 600..1023 are + used, don't use priviledged ports when talking to portmap + (#141773) + +* Fri May 20 2005 Jakub Jelinek 2.3.5-7 +- update from CVS + - make regexec thread safe (BZ#934) +- fix statically linked programs on i?86, x86_64, s390* and + sparc* (#158027) +- fix IBM939 iconv module (BZ#955) + +* Wed May 4 2005 Jakub Jelinek 2.3.5-6 +- update from CVS + - fix cancellation on i?86 + - add call frame information to i?86 assembly + +* Tue May 3 2005 Jakub Jelinek 2.3.5-5 +- update from CVS + - add some more UTF-8 locales (#156115) +- clean up /lib64/tls instead of /lib/tls on x86-64, s390x and + ppc64 in glibc_post_upgrade (#156656) +- fix posix_fallocate{,64} (#156289) + +* Thu Apr 28 2005 Jakub Jelinek 2.3.5-4 +- update from CVS + - fix nscd cache pruning (#150748) + +* Wed Apr 27 2005 Jakub Jelinek 2.3.5-3 +- update from CVS + - fix linuxthreads clocks +- put xen libs into the glibc-2*.i686 package instead of a separate one +- fix librt.so symlink in linuxthreads-devel +- do not include linuxthreads-devel on %%{auxarches}, + just on the base architectures + +* Wed Apr 27 2005 Jakub Jelinek 2.3.5-2 +- update from CVS + - with MALLOC_CHECK_=N N>0 (#153003) + - fix recursive dlclose (#154641) + - handle %%z in strptime (#154804) + - automatically append /%%{_lib}/obsolete/linuxthreads/ + to standard library search path if LD_ASSUME_KERNEL=N N <= 2.4.19 + or for glibc 2.0 binaries (or broken ones that don't use errno/h_errno + properly). Warning: all those will stop working when LinuxThreads + is finally nuked, which is not very far away + - remove nonnull attribute from acct prototype (BZ#877) + - kernel CPU clocks support + - fix *scanf in locales with multi-byte decimal point + +* Wed Apr 27 2005 Roland McGrath +- glibc-xen subpackage for i686 + +* Fri Apr 15 2005 Roland McGrath 2.3.5-1 +- update from CVS + - fix execvp regression (BZ#851) + - ia64 libm updates + - sparc updates + - fix initstate{,_r}/strfry (#154504) + - grok PT_NOTE in vDSO for kernel version and extra hwcap dirs, + support "hwcap" keyword in ld.so.conf files + +* Tue Apr 5 2005 Jakub Jelinek 2.3.4-21 +- update from CVS + - fix xdr_rmtcall_args on 64-bit arches (#151686) +- fix and with -std=c89 -fexceptions (#153774) + +* Mon Apr 4 2005 Jakub Jelinek 2.3.4-20 +- move LinuxThreads libraries to /%%{_lib}/obsolete/linuxthreads/ + and NPTL libraries to /%%{_lib}. To run a program against LinuxThreads, + LD_ASSUME_KERNEL=2.4.xx LD_LIBRARY_PATH=/%%{_lib}/obsolete/linuxthreads/ + is now needed +- bzip2 ChangeLog* files instead of gzipping them + +* Sat Apr 2 2005 Jakub Jelinek 2.3.4-19 +- update from CVS + - fix nextafterl and several other libm routines on ia64 + - fix initgroups (BZ#661) +- kill nptl-devel subpackage, add linuxthreads-devel, + compile and link by default against NPTL and only with + -I/usr/include/linuxthreads -L/usr/%%{_lib}/linuxthreads + against LinuxThreads +- package /usr/lib/debug/%%{_lib}/tls/i{5,6}86 symlinks in + i386 glibc-debuginfo +- limit number of ChangeLog* files in glibc-common %%doc + to last 2.5 years of changes only to save space + +* Fri Mar 25 2005 Jakub Jelinek 2.3.4-18 +- fix build on 64-bit arches with new GCC + +* Thu Mar 24 2005 Jakub Jelinek 2.3.4-17 +- update from CVS + - fix LD_AUDIT in LinuxThreads ld.so + - fix calloc with M_PERTURB + - fix error handling in pthread_create with PTHREAD_EXPLICIT_SCHED + on ppc*/ia64/alpha/mips (BZ#801) + - fix a typo in WINDOWS-31J charmap (#151739) + - fix NIS ypprot_err (#151469) + +* Sun Mar 20 2005 Jakub Jelinek 2.3.4-16 +- fix pread with -D_FILE_OFFSET_BITS=64 (#151573) + +* Sat Mar 19 2005 Jakub Jelinek 2.3.4-15 +- update from CVS + - better fix for the dlclose bug (#145810, #150414) + - fix regex crash on case insensitive search in zh_CN locale + (#151215) + - fix malloc_trim (BZ#779) + - with -D_FORTIFY_SOURCE=*, avoid defining read and a bunch of others + as function-like macros, there are too many broken programs + out there +- add %%dir %%{_prefix}/%%{_lib}/gconv to glibc's file list (#151372) + +* Sun Mar 6 2005 Roland McGrath 2.3.4-14 +- fix bits/socket2.h macro typos + +* Sat Mar 5 2005 Jakub Jelinek 2.3.4-12 +- fix tst-chk{2,3} +- fix up AS_NEEDED directive in /usr/%%{_lib}/libc.so +- BuildReq binutils >= 2.15.94.0.2-1 for AS_NEEDED, in + glibc-devel Conflict with binutils < 2.15.94.0.2-1 + +* Thu Mar 3 2005 Jakub Jelinek 2.3.4-11 +- update from CVS + - fix execvp (#149290) + - fix dlclose (#145810) + - clear padding in gconv-modules.cache (#146614, BZ#776) +- rebuilt with GCC4 +- changed __GLIBC_MINOR__ for now back to 3 +- back out the newly added GLIBC_2.4 *_chk routines, instead + do the checking in macros + +* Sat Feb 12 2005 Jakub Jelinek 2.3.4-10 +- hopefully fix interaction with prelink (#147655) + +* Fri Feb 11 2005 Jakub Jelinek 2.3.4-9 +- update from CVS + - bi-arch (BZ#715) + +* Fri Feb 11 2005 Jakub Jelinek 2.3.4-8 +- update from CVS + - bi-arch (BZ#632) + - fix libdl on s390 and maybe other platforms + - fix initstate{,_r} (BZ#710) + - fix generation (BZ#157) +- define CMSPAR in bits/termios.h (#147533) + +* Tue Feb 8 2005 Jakub Jelinek 2.3.4-7 +- update from CVS + - fix TLS handling in linuxthreads + +* Tue Feb 8 2005 Jakub Jelinek 2.3.4-6 +- update from CVS + - ld.so auditing + - fix segfault if chrooted app attempts to dlopen a library + and no standard library directory exists at all (#147067, #144303) + - fix initgroups when nscd is running, but has group caching disabled + (#146588) + - fix pthread_key_{create,destroy} in LinuxThreads when pthread_create + has not been called yet (#146710) + - fix ppc64 swapcontext and setcontext (#146736, BZ#700) + - service nscd cosmetic fixes (#146776) + - fix IA-32 and x86-64 stack alignment in DSO constructors (#145689) + - fix zdump -v segfaults on x86-64 (#146210) + - avoid calling sigaction (SIGPIPE, ...) inside syslog (#146021, IT#56686) + - fix errno values for futimes (BZ#633) + - unconditionally include in malloc.h (BZ#650) + - change regex \B handling to match old GNU regex as well as perl/grep's dfa + (from empty string inside of word to empty string not at a word boundary, + BZ#693) + - slightly optimize i686 TLS accesses, use direct TLS %%gs access in sem_* + and allow building -mno-tls-direct-seg-refs glibc that is free of direct TLS + %%gs access with negative offsets + - fix addseverity + - fix fmemopen + - fix rewinddir + - increase svc{tcp,unix}_create listen backlog + +* Thu Jan 6 2005 Jakub Jelinek 2.3.4-5 +- update from CVS + - add some warn_unused_result marking + - make ftruncate available even for just -D_POSIX_C_SOURCE=200112L + (BZ#640) + +* Thu Jan 6 2005 Jakub Jelinek 2.3.4-4 +- update from CVS + - fix IA-32 stack alignment for LinuxThreads thread functions + and functions passed to clone(2) directly + - fix ecvt{,_r} on denormals (#143279) + - fix __tls_get_addr typo + - fix rounding in IA-64 alarm (#143710) + - don't reinitialize __environ in __libc_start_main, so that + effects of setenv/putenv done in DSO initializers are preserved + (#144037, IT#57403) + - fix fmemopen + - fix vDSO l_map_end and l_text_end values + - IA64 libm update (#142494) +- fix ppc rint/ceil etc. (BZ#602) + +* Tue Dec 21 2004 Jakub Jelinek 2.3.4-3 +- rebuilt + +* Mon Dec 20 2004 Jakub Jelinek 2.3.4-2 +- work around rpm bug some more, this time by copying + iconvconfig to iconvconfig.%%{_target_cpu}. + +* Mon Dec 20 2004 Jakub Jelinek 2.3.4-1 +- update from CVS + - glibc 2.3.4 release + - add -o and --nostdlib options to iconvconfig +- if /sbin/ldconfig doesn't exist when running + glibc_post_upgrade.%%{_target_cpu}, just don't attempt to run it. + This can happen during first install of bi-arch glibc and the + other arch glibc's %%post wil run /sbin/ldconfig (#143326) +- use -o and --nostdlib options to create all needed + gconv-modules.cache files on bi-arch setups + +* Sun Dec 19 2004 Jakub Jelinek 2.3.3-99 +- rebuilt + +* Sat Dec 18 2004 Jakub Jelinek 2.3.3-98 +- add .%%{_target_cpu} to glibc_post_upgrade, only run telinit u + if /sbin/init is the same ELF class and machine as + glibc_post_upgrade.%%{_target_cpu} and similarly with + condrestarting sshd (#143046) + +* Fri Dec 17 2004 Jakub Jelinek 2.3.3-97 +- update from CVS + - fix ppc64 getcontext and swapcontext (BZ#610) + - sparc/sparc64 fixes + +* Wed Dec 15 2004 Jakub Jelinek 2.3.3-96 +- update from CVS + - fix i686 __USE_STRING_INLINES strncat + - make sure ppc/ppc64 maintain correct stack alignment + across clone + +* Wed Dec 15 2004 Jakub Jelinek 2.3.3-95 +- export nis_domain_of_r from libnsl.so again which was + unintentionally lost + +* Wed Dec 15 2004 Jakub Jelinek 2.3.3-93 +- update from CVS + - ppc/ppc64 clone without CLONE_THREAD getpid () adjustement + - fix MALLOC_CHECK_={1,2,3} for non-contiguous main arena + (BZ#457) + - fix sysconf (_POSIX_V6_*) for other ABI environments in + bi-arch setups +- s390/s390x clone without CLONE_THREAD getpid () adjustement + +* Tue Dec 14 2004 Jakub Jelinek 2.3.3-92 +- update from CVS +- fix %%{_prefix}/libexec/getconf filenames generation + +* Tue Dec 14 2004 Jakub Jelinek 2.3.3-91 +- update from CVS + - double buffer size in getXXbyYY or getXXent on ERANGE + instead of adding BUFLEN (#142617) + - avoid busy loop in malloc if another thread is doing fork + (#142214) + - some more realloc corruption checks + - fix getconf _POSIX_V6_WIDTH_RESTRICTED_ENVS output, + tweak %%{_prefix}/libexec/getconf/ filenames + +* Fri Dec 10 2004 Jakub Jelinek 2.3.3-90 +- update from CVS + - regex speedups + - use | cat in ldd if running under bash3+ to allow running + it on binaries that are not through SELinux allowed to access + console or tty +- add __NR_waitid defines for alpha and ia64 + +* Wed Dec 8 2004 Jakub Jelinek 2.3.3-89 +- update from CVS + - fix clone2 on ia64 + - avoid tst-timer5 failing with linuxthreads implementation +- if __libc_enable_secure, disallow mode != normal +- change ldd script to imply -r when -u is used, properly + propagate return value and handle suid binaries + +* Tue Dec 7 2004 Jakub Jelinek 2.3.3-88 +- update from CVS + - disregard LD_SHOW_AUXV and LD_DYNAMIC_WEAK if __libc_enable_secure + - disregard LD_DEBUG if __libc_enable_secure in normal mode + if /suid-debug doesn't exist + - fix fseekpos after ungetc + - avoid reading bytes before start of buffers in regex's + check_dst_limits_calc_pos_1 (#142060) + - make getpid () working with clone/clone2 without CLONE_THREAD + (so far on i386/x86_64/ia64 only) +- move %%{_prefix}/libexec/getconf/* to glibc from glibc-common +- make %%{_prefix}/libexec/getconf directory owned by glibc package + +* Fri Dec 3 2004 Jakub Jelinek 2.3.3-87 +- update from CVS + - build libpthread_nonshared.a objects with -fPIC on s390/s390x + - fix mktime with < 0 or > 59 tm_sec on entry + - remove nonnull attribute for realpath + - add $(make-target-directory) for errlist-compat.c rule + (hopefully fix #141404) +- add testcase for ungetc bug +- define _POSIX_{,THREAD_}CPUTIME to 0 on all Linux arches + +* Tue Nov 30 2004 Jakub Jelinek 2.3.3-86 +- update from CVS + - some posix_opt.h fixes +- fix strtold use of unitialized memory (#141000) +- some more bugfixes for bugs detected by valgrind +- rebuilt with GCC >= 3.4.3-5 to avoid packed stack layout + on s390{,x} (#139678) + +* Fri Nov 26 2004 Jakub Jelinek 2.3.3-85 +- update from CVS + - support -v specification in getconf + - fix sysconf (_SC_LFS64_CFLAGS) etc. + - avoid thread stack aliasing issues on EM64T (#140803) +- move %%{_prefix}/include/nptl headers from nptl-devel + to glibc-headers, so that even NPTL specific programs + can be built bi-arch without problems + +* Wed Nov 24 2004 Jakub Jelinek 2.3.3-84 +- update from CVS + - fix memory leak in getaddrinfo if using nscd (#139559) + - handle large lines in /etc/hosts and /etc/networks + (#140378) + - add nonnull attributes to selected dirent.h and dlfcn.h + functions + +* Sun Nov 21 2004 Jakub Jelinek 2.3.3-83 +- update from CVS + - add deprecated and/or nonnull attribute to some signal.h + functions + - speed up tzset () by only using stat instead of open/fstat + when calling tzset for the second and following time if + /etc/localtime has not changed +- fix tgamma (BZ #552) + +* Sat Nov 20 2004 Jakub Jelinek 2.3.3-82 +- update from CVS + - some malloc () checking + - libpthread.a object dependency cleanups (#115157) + - fix for -std=c89 -pedantic-errors (#140132) + +* Fri Nov 19 2004 Jakub Jelinek 2.3.3-81 +- don't use chunksize in <= 2 * SIZE_SZ free () checks + +* Fri Nov 19 2004 Jakub Jelinek 2.3.3-80 +- update from CVS + - with -D_FORTIFY_SOURCE=2, prevent missing %%N$ formats + - for -D_FORTIFY_SOURCE=2 and %%n in writable format string, + issue special error message instead of using the buffer overflow + detected one + - speedup regex searching with REG_NOSUB, add RE_NO_SUB, + speedup searching with nested subexps (BZ #544) + - block SIGCANCEL in NPTL timer_* helper thread +- further free () checking + +* Tue Nov 16 2004 Jakub Jelinek 2.3.3-79 +- update from CVS +- fix free () checking +- move /etc/default/nss into glibc-common (hopefully fix #132392) + +* Mon Nov 15 2004 Jakub Jelinek 2.3.3-78 +- update from CVS + - fix LD_DEBUG=statistics + - issue error message before aborting in __chk_fail () +- some more free () checking + +* Fri Nov 12 2004 Jakub Jelinek 2.3.3-77 +- update from CVS + - speedup regex on palindromes (BZ #429) + - fix NPTL set{,e,re,res}[ug]id, so that even if making process + less priviledged all threads change their credentials successfully + +* Wed Nov 10 2004 Jakub Jelinek 2.3.3-76 +- update from CVS + - fix regcomp crash (#138439) + - fix ftell{,o,o64} (#137885) + - robustification of nscd to cope with corrupt databases (#137140) + - fix NPTL with pthread_exit immediately after pthread_create (BZ #530) + - some regex optimizations + +* Tue Nov 2 2004 Jakub Jelinek 2.3.3-75 +- update from CVS + - mktime cleanups (BZ #487, #473) + - unique comments in free(3) check error messages +- adjust some x86_64 headers for -m32 (#129712) +- object size checking support even with GCC-3.4.2-RH >= 3.4.2-8 + +* Wed Oct 27 2004 Jakub Jelinek 2.3.3-74 +- fix header +- fix globfree (#137176) +- fix exiting if there are dlmopened libraries in namespaces + other than main one not closed yet +- export again _res_opcodes and __p_{class,type}_syms from + libresolv.so that were lost in -69 + +* Thu Oct 21 2004 Jakub Jelinek 2.3.3-73 +- remove setaltroot and key{_add,_request,ctl} also from Versions +- back out _sys_errlist changes + +* Thu Oct 21 2004 Jakub Jelinek 2.3.3-72 +- back out setaltroot and key{_add,_request,ctl} addition +- fix severe x86-64 symbol versioning regressions that breaks + e.g. java binaries + +* Wed Oct 20 2004 Jakub Jelinek 2.3.3-71 +- update from CVS + - fix minor catchsegv temp file handling vulnerability + (CAN-2004-0968, #136319) + - add 4 new errno codes + - setaltroot, key{_add,_request,ctl} syscalls on some arches + - export _dl_debug_state@GLIBC_PRIVATE from ld.so again for + gdb purpose + - use inet_pton to decide what is address and what is hostname + in getent (#135422) + - change dladdr/dladdr1, so that dli_saddr is the same kind + of value as dlsym/dlvsym return (makes difference on ia64/hppa only) + - fix catchsegv script so that it works with both 32-bit and 64-bit + programs on multi-arch platforms + +* Tue Oct 19 2004 Jakub Jelinek 2.3.3-70 +- update from CVS +- require newer selinux-policy (#135978) +- add %%dir for /var/run/nscd and /var/db/nscd and %%ghost + files in it +- conflict with gcc4 4.0.0-0.6 and earlier (needs __builtin_object_size) + +* Mon Oct 18 2004 Jakub Jelinek 2.3.3-69 +- update from CVS + - object size checking support (-D_FORTIFY_SOURCE={1,2}) + +* Thu Oct 14 2004 Jakub Jelinek 2.3.3-68 +- update from CVS + - support for namespaces in the dynamic linker + - fix dlclose (BZ #77) + - libSegFault.so uses now backtrace() to work on IA-64, x86-64 + and s390 (#130254) + +* Tue Oct 12 2004 Jakub Jelinek 2.3.3-67 +- update from CVS + - use non-blocking sockets in resolver (#135234) + - reset pd->res options on thread exit, so that threads + reusing cached stacks get resolver state properly initialized + (BZ #434) + +* Wed Oct 6 2004 Jakub Jelinek 2.3.3-66 +- update from CVS +- avoid using perl in the spec file, buildrequire sed >= 3.95 + (#127671) +- export TIMEOUTFACTOR=16 +- fix _JMPBUF_CFA_UNWINDS_ADJ on s390{,x} + +* Tue Oct 5 2004 Jakub Jelinek 2.3.3-65 +- update from CVS + - define _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION + to -1 in LinuxThreads + - define _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME to 0 + on i?86/ia64 and make sure sysconf (_SC_{,THREAD_}CPUTIME) + returns correct value +- if _POSIX_CLOCK_SELECTION == -1 in nscd, still try + sysconf (_SC_CLOCK_SELECTION) and if it returns true, + dlopen libpthread.so and dlsym pthread_condattr_setclock +- build nscd with -z relro and -z now + +* Mon Oct 4 2004 Jakub Jelinek 2.3.3-64 +- update from CVS + - stop using __builtin_expect in assert and assert_perror + (#127606) + - try to avoid too much VA fragmentation with malloc + on flexmap layout (#118574) + - nscd robustification + - change valloc to use debugging hooks (#134385) +- make glibc_post_upgrade more verbose on errors (Fergal Daly, + #125700) + +* Fri Oct 1 2004 Jakub Jelinek 2.3.3-63 +- update from CVS + - fix __nscd_getgrouplist + - fix a typo in x86_64 pthread_mutex_timedwait fix + +* Fri Oct 1 2004 Jakub Jelinek 2.3.3-62 +- update from CVS + - fix NPTL pthread_mutex_timedwait on i386/x86_64 (BZ #417) + +* Thu Sep 30 2004 Jakub Jelinek 2.3.3-61 +- update from CVS + - some nscd fixes (#134193) + - cache initgroups in nscd (#132850) + - reread /etc/localtime in tzset () even if just mtime changed + (#133481) + - fix glob (#126460) + - another get_myaddress fix + +* Wed Sep 29 2004 Jakub Jelinek 2.3.3-60 +- update from CVS + - fix get_myaddress (#133982) + - remove nonnull attribute from second utime argument (#133866) + - handle SIGSETXID the same way as SIGCANCEL in + sigaction/pthread_kill/sigwait/sigwaitinfo etc. + - add __extension__ to long long types in NPTL + +* Mon Sep 27 2004 Jakub Jelinek 2.3.3-59 +- update from CVS + - fix BZ #151, #362, #381, #407 + - fdim fix for +inf/+inf (BZ #376) + +* Sun Sep 26 2004 Jakub Jelinek 2.3.3-58 +- update from CVS + - vasprintf fix (BZ #346) + - gettext locking (BZ #322) +- change linuxthreads useldt.h inclusion login again, the last + one failed all linuxthreads FLOATING_STACKS tests + +* Sat Sep 25 2004 Jakub Jelinek 2.3.3-57 +- update from CVS + - fix setuid in LD_ASSUME_KERNEL=2.2.5 libc (#133558) + - fix nis locking (#132204) + - RTLD_DEEPBIND support + - fix pthread_create bugs (BZ #401, #405) + +* Wed Sep 22 2004 Roland McGrath 2.3.3-56 +- migrated CVS to fedora-branch in sources.redhat.com glibc repository + - source tarballs renamed + - redhat/ moved to fedora/, some old cruft removed +- update from trunk + - some __nonnull annotations + +* Wed Sep 22 2004 Jakub Jelinek 2.3.3-55 +- update from CVS + - set{re,e,res}[ug]id now affect the whole process in NPTL + - return EAGAIN instead of ENOMEM when not enough memory + in pthread_create + +* Fri Sep 17 2004 Jakub Jelinek 2.3.3-54 +- update from CVS + - nscd getaddrinfo caching + +* Tue Sep 14 2004 Jakub Jelinek 2.3.3-53 +- restore temporarily old definition of __P()/__PMT() + for third party apps + +* Tue Sep 14 2004 Jakub Jelinek 2.3.3-52 +- update from CVS + - nscd bi-arch fix + - remove all uses of __P()/__PMT() from glibc headers +- update and reenable nscd SELinux patch +- remove libnss1* and libnss*.so.1 compatibility NSS modules + on IA-32, SPARC and Alpha + +* Fri Sep 10 2004 Jakub Jelinek 2.3.3-51 +- update from CVS + - disable one of the malloc double free checks for non-contiguous + arenas where it doesn't have to be true even for non-broken + apps + +* Thu Sep 9 2004 Jakub Jelinek 2.3.3-50 +- update from CVS + - pwd/grp/host loops with nscd speed up by sharing the + nscd cache r/o with applications + - inexpensive double free check in free(3) + - make NPTL pthread.h initializers usable even from C++ + (BZ #375) +- use atomic instructions even in i386 nscd on i486+ CPUs + (conditionally) + +* Fri Sep 3 2004 Jakub Jelinek 2.3.3-49 +- update from CVS +- fix linuxthreads tst-cancel{[45],-static} + +* Fri Sep 3 2004 Jakub Jelinek 2.3.3-48 +- update from CVS + - fix pthread_cond_destroy (BZ #342) + - fix fnmatch without FNM_NOESCAPE (BZ #361) + - fix ppc32 setcontext (BZ #357) +- add NPTL support for i386 glibc (only if run on i486 or higher CPU) +- add __NR_waitid defines for i386, x86_64 and sparc* + +* Tue Aug 31 2004 Jakub Jelinek 2.3.3-47 +- update from CVS + - persistent nscd caching + - ppc64 32-bit atomicity fix + - fix x86-64 nptl-devel headers for -m32 compilation +- %%ghost /etc/ld.so.cache (#130597) +- edit /etc/ld.so.conf in glibc_post_upgrade if + include ld.so.conf.d/*.conf line is missing (#120588) +- ugly hacks for the IA-64 /emul braindamage (#124996, #128267) + +* Sat Aug 21 2004 Jakub Jelinek 2.3.3-46 +- update from CVS + +* Thu Aug 19 2004 Jakub Jelinek 2.3.3-45 +- update from CVS + - fix nss_compat's initgroups handling (#130363) + - fix getaddrinfo ai_canonname setting + +* Thu Aug 19 2004 Jakub Jelinek 2.3.3-44 +- update from CVS + - add ip6-dotint resolv.conf option, make + no-ip6-dotint the default +- BuildPrereq libselinux-devel (#129946) +- on ppc64, build without dot symbols + +* Thu Aug 12 2004 Jakub Jelinek 2.3.3-43 +- update from CVS + - remove debugging printout (#129747) + - make usable in C++ (IT#45148) +- update RLIMIT_* constants in , make + POSIX compliant (#129740) + +* Wed Aug 11 2004 Jakub Jelinek 2.3.3-42 +- fix last tzset () fixes, disable rereading of /etc/localtime + every time for now +- really enable SELinux support for NSCD + +* Wed Aug 11 2004 Jakub Jelinek 2.3.3-41 +- update from CVS + - fread_unlocked/fwrite_unlocked macro fixes (BZ #309, #316) + - tzset () fixes (BZ #154) +- speed up pthread_rwlock_unlock on arches other than i386 and + x86_64 (#129455) +- fix compilation with -ansi (resp. -std=c89 or -std=c99) and + -D_XOPEN_SOURCE=[56]00 but no -D_POSIX_SOURCE* or -D_POSIX_C_SOURCE* + (BZ #284) +- add SELinux support for NSCD + +* Fri Aug 6 2004 Jakub Jelinek 2.3.3-40 +- update from CVS + - change res_init to force all threads to re-initialize + resolver before they use it next time (#125712) + - various getaddrinfo and related fixes (BZ #295, #296) + - fix IBM{932,943} iconv modules (#128674) + - some nscd fixes (e.g. BZ #292) + - RFC 3678 support (Multicast Source Filters) +- handle /lib/i686/librtkaio-* in i386 glibc_post_upgrade + the same as /lib/i686/librt-* + +* Fri Jul 23 2004 Jakub Jelinek 2.3.3-39 +- update from CVS + - conformance related changes in headers +- remove -finline-limit=2000 for GCC 3.4.x+ + +* Thu Jul 22 2004 Jakub Jelinek 2.3.3-38 +- update from CVS + - fix res_init leaks + - fix newlocale races + - fix ppc64 setjmp +- fix strtold (BZ #274) + +* Fri Jul 16 2004 Jakub Jelinek 2.3.3-37 +- update from CVS + - allow pthread_cancel in DSO destructors run at exit time +- fix pow{f,,l} on IA-32 and powl on x86-64 +- allow PIEs on IA-32 to have main in a shared library they depend on + +* Mon Jul 5 2004 Jakub Jelinek 2.3.3-36 +- s390* .plt slot reduction +- fix pthread_rwlock_timedrdlock on x86_64 + +* Wed Jun 30 2004 Jakub Jelinek 2.3.3-35 +- tweak spec file for the libpthread-0.61.so -> libpthread-2.3.3.so + NPTL changes + +* Wed Jun 30 2004 Jakub Jelinek 2.3.3-34 +- update from CVS + - if_nameindex using preferably netlink + - printf_parsemb initialization fix + - NPTL version is now the same as glibc version + +* Mon Jun 28 2004 Jakub Jelinek 2.3.3-33 +- update from CVS + - reread resolv.conf for nscd --invalidate=hosts + - fix F_GETLK/F_SETLK/F_SETLKW constants on x86_64 for + -m32 -D_FILE_OFFSET_BITS=64 compilations + - avoid calling non-existing fcntl64 syscall on ppc64 + +* Mon Jun 14 2004 Jakub Jelinek 2.3.3-32 +- update from CVS + - FUTEX_CMP_REQUEUE support (fix pthread_cond_* deadlocks) + - fix backtrace in statically linked programs +- rebuilt with GCC 3.4, adjusted ulps and i386 + +* Fri May 28 2004 Jakub Jelinek 2.3.3-31 +- update from CVS +- and changes for GCC 3.{2,4,5}+ +- make c_stubs buildable even with GCC 3.2.x (#123042) + +* Fri May 21 2004 Jakub Jelinek 2.3.3-30 +- fix pthread_cond_wait on architectures other than IA-32 and + x86_64 + +* Thu May 20 2004 Jakub Jelinek 2.3.3-29 +- use lib64 instead of lib on ia64 if %%{_lib} is defined to lib64 + +* Wed May 19 2004 Jakub Jelinek 2.3.3-28 +- update from CVS + - FUTEX_REQUEUE fixes (#115349) + - SPARC GCC 3.4 build fix + - fix handling of undefined TLS symbols on IA32 (RELA only), + SPARC and SH + - regex translate fix + - speed up sprintf + - x86_64 makecontext alignment fix + - make POSIX sigpause the default sigpause, unless BSD sigpause + requested + +* Tue May 11 2004 Jakub Jelinek 2.3.3-27 +- remove /lib64/tls/librtkaio-2.3.[23].so in glibc_post_upgrade + on x86-64, s390x and ppc64 instead of /lib/tls/librtkaio-2.3.[23].so +- build mq_{send,receive} with -fexceptions + +* Fri May 7 2004 Jakub Jelinek 2.3.3-26 +- update from CVS + - fix + - fix memory leaks in nis, getifaddrs, etc. caused by incorrect + use of realloc +- remove /lib/{tls,i686}/librtkaio-2.3.[23].so in glibc_post_upgrade + and rerun ldconfig if needed, otherwise after glibc upgrade librt.so.1 + might be a stale symlink + +* Wed May 5 2004 Jakub Jelinek 2.3.3-25 +- update from CVS +- disable FUTEX_REQUEUE (work around #115349) +- mq for sparc/sparc64/ia64 + +* Tue May 4 2004 Jakub Jelinek 2.3.3-24 +- update from CVS + - define S_ISSOCK in -D_XOPEN_SOURCE=600 and S_I[FS]SOCK + plus F_[SG]ETOWN also in -D_XOPEN_SOURCE=500 (both + included already in XNS5) + - reorder dlopen checks, so that dlopening ET_REL objects + complains about != ET_DYN != ET_EXEC, not about phentsize + (#121606) + - fix strpbrk macro for GCC 3.4+ (BZ #130) + - fix (BZ #140) + - sched_[gs]etaffinity documentation fix (BZ #131) + - fix sparc64 build (BZ #139) + - change linuxthreads back to use non-cancellable writes + to manager pipes etc. + - fix sem_timedwait return value in linuxthreads (BZ #133) + - ia64 unnecessary PLT relocs removal + +* Thu Apr 22 2004 Jakub Jelinek 2.3.3-23 +- update from CVS + - fix *scanf + - fix shm_unlink, sem_unlink and mq_unlink errno values + - avoid memory leaks in error + - execstack fixes on s390 + +* Mon Apr 19 2004 Jakub Jelinek 2.3.3-22 +- update from CVS + - mq and timer fixes +- rebuilt with binutils >= 2.15.90.0.3-2 to fix IA-64 statically + linked binaries +- fix linuxthreads librt.so on s390{,x}, so it is no longer DT_TEXTREL + +* Sat Apr 17 2004 Jakub Jelinek 2.3.3-21 +- disable rtkaio +- update from CVS + - POSIX message passing support + - fixed SIGEV_THREAD support for POSIX timers + - fix free on non-malloced memory in syslog + - fix ffsl on some 64-bit arches + - fix sched_setaffinity on x86-64, ia64 + - fix ppc64 umount + - NETID_AUTHORITATIVE, SERVICES_AUTHORITATIVE support + - various NIS speedups + - fix fwrite with > 2GB sizes on 64-bit arches + - fix pthread_getattr_np guardsize reporting in NPTL +- report PLT relocations in ld.so and libc.so during the build + +* Thu Mar 25 2004 Jakub Jelinek 2.3.3-20 +- update from CVS + - change NPTL PTHREAD_MUTEX_ADAPTIVE_NP mutexes to spin on SMP + - strtol speed optimization + - don't try to use certainly unimplemented syscalls on ppc64 +- kill -debug subpackage, move the libs to glibc-debuginfo{,-common} + into /usr/lib/debug/usr/%%{_lib}/ directory +- fix c_stubs with gcc 3.4 +- move all the up to 3 builds into %%build scriptlet and + leave only installation in the %%install scriptlet + +* Mon Mar 22 2004 Jakub Jelinek 2.3.3-19 +- update from CVS + - affinity API changes + +* Thu Mar 18 2004 Jakub Jelinek 2.3.3-18 +- update from CVS + - fix ia64 iopl (#118591) + - add support for /etc/ld.so.conf.d/*.conf + - fix x86-64 LD_DEBUG=statistics +- fix hwcap handling when using ld.so.cache (#118518) + +* Mon Mar 15 2004 Jakub Jelinek 2.3.3-17 +- update from CVS + - implement non-_l function on top of _l functions + +* Thu Mar 11 2004 Jakub Jelinek 2.3.3-16 +- update from CVS +- fix s390{,x} TLS handling + +* Wed Mar 10 2004 Jakub Jelinek 2.3.3-15 +- update from CVS + - special section for compatibility code + - make getpid () work even in vfork () child +- configure with --enable-bind-now to avoid lazy binding in ld.so + and libc.so + +* Fri Mar 5 2004 Jakub Jelinek 2.3.3-14 +- update from CVS + - fix iconv -c (#117021) + - fix PIEs on sparc/sparc64 + - fix posix_fadvise on 64-bit architectures +- add locale-archive as %%ghost file (#117014) + +* Mon Mar 1 2004 Jakub Jelinek 2.3.3-13 +- update from CVS + +* Fri Feb 27 2004 Jakub Jelinek 2.3.3-12 +- update from CVS + +* Fri Feb 27 2004 Jakub Jelinek 2.3.3-11 +- update from CVS + - fix ld.so when vDSO is randomized + +* Fri Feb 20 2004 Jakub Jelinek 2.3.3-10 +- update from CVS + +* Fri Feb 20 2004 Jakub Jelinek 2.3.3-9 +- update from CVS + +* Tue Feb 10 2004 Jakub Jelinek 2.3.3-8 +- update from CVS + +* Tue Jan 27 2004 Jakub Jelinek 2.3.3-7 +- update from CVS + - dl_iterate_phdr extension to signal number of added/removed + libraries +- fix PT_GNU_RELRO support on ppc* with prelinking + +* Fri Jan 23 2004 Jakub Jelinek 2.3.3-6 +- rebuilt with fixed GCC on IA-64 + +* Thu Jan 22 2004 Jakub Jelinek 2.3.3-5 +- fix PT_GNU_RELRO support + +* Wed Jan 21 2004 Jakub Jelinek 2.3.3-4 +- update from CVS + - some further regex speedups + - fix re.translate handling in regex (#112869) + - change regfree to match old regex behaviour (what is freed + and clearing of freed pointers) + - fix accesses to unitialized memory in regex (#113507, #113425, + #113421) + - PT_GNU_RELRO support + +* Tue Dec 30 2003 Jakub Jelinek 2.3.3-3 +- update from CVS + - fix pmap_set fd and memory leak (#112726) +- fix backreference handling in regex +- rebuilt under glibc without the above bug to fix + libc.so linker script (#112738) + +* Mon Dec 29 2003 Jakub Jelinek 2.3.3-2 +- update from CVS + - faster getpid () in NPTL builds + - fix to make pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, ) + really disable cancellation (#112512) + - more regex fixes and speedups + - fix nextafter*/nexttoward* + - handle 6th syscall(3) argument on AMD64 + - handle memalign/posix_memalign in mtrace + - fix linuxthreads memory leak (#112208) + - remove throw () from cancellation points in linuxthreads (#112602) + - fix NPTL unregister_atfork + - fix unwinding through alternate signal stacks + +* Mon Dec 1 2003 Jakub Jelinek 2.3.3-1 +- update from CVS + - 2.3.3 release + - lots of regex fixes and speedups (#110401) + - fix atan2 + - fix pshared condvars in NPTL + - fix pthread_attr_destroy for attributes created with + pthread_attr_init@GLIBC_2.0 +- for the time being, include both nb_NO* and no_NO* as locales + so that the distribution can catch up with the no_NO->nb_NO + transition +- add BuildPrereq texinfo (#110252) + +* Tue Nov 18 2003 Jakub Jelinek 2.3.2-102 +- update from CVS + - fix getifaddrs (CAN-2003-0859) + - fix ftw fd leak + - fix linuxthreads sigaction (#108634) + - fix glibc 2.0 stdio compatibility + - fix uselocale (LC_GLOBAL_LOCALE) + - speed up stdio locking in non-threaded programs on IA-32 + - try to maintain correct order of cleanups between those + registered with __attribute__((cleanup)) + and with LinuxThreads style pthread_cleanup_push/pop (#108631) + - fix segfault in regex (#109606) + - fix RE_ICASE multi-byte handling in regex + - fix pthread_exit in libpthread.a (#109790) + - FTW_ACTIONRETVAL support + - lots of regex fixes and speedups + - fix ceill/floorl on AMD64 + +* Mon Oct 27 2003 Jakub Jelinek 2.3.2-101 +- update from CVS + - fix ld.so --verify (and ldd) + +* Mon Oct 27 2003 Jakub Jelinek 2.3.2-100 +- update from CVS + - fix sprof (#103727) + - avoid infinite loops in {,f}statvfs{,64} with hosed mounts file + - prevent dlopening of executables + - fix glob with GLOB_BRACE and without GLOB_NOESCAPE + - fix locale printing of word values on 64-bit big-endian arches + (#107846) + - fix getnameinfo and getaddrinfo with reverse IPv6 lookups + (#101261) + +* Wed Oct 22 2003 Jakub Jelinek 2.3.2-99 +- update from CVS + - dl_iterate_phdr in libc.a on arches other than IA-64 + - LD_DEBUG=statistics prints number of relative relocations + - fix hwcap computation +- NPTL is now part of upstream glibc CVS +- include {st,xh,zu}_ZA{,.UTF-8} locales + +* Sat Oct 4 2003 Jakub Jelinek 2.3.2-98 +- update from CVS + - fix close, pause and fsync (#105348) + - fix pthread_once on IA-32 +- implement backtrace () on IA-64, handle -fomit-frame-pointer + in AMD64 backtrace () (#90402) + +* Tue Sep 30 2003 Jakub Jelinek 2.3.2-97 +- update from CVS + - fix with C++ or -ansi or -pedantic C + - fix mknod/ustat return value when given bogus device number (#105768) + +* Fri Sep 26 2003 Jakub Jelinek 2.3.2-96 +- rebuilt + +* Fri Sep 26 2003 Jakub Jelinek 2.3.2-95 +- fix IA-64 getcontext + +* Thu Sep 25 2003 Jakub Jelinek 2.3.2-94 +- update from CVS +- fix syslog with non-C non-en_* locales (#61296, #104979) +- filter GLIBC_PRIVATE symbols from glibc provides +- fix NIS+ + +* Thu Sep 25 2003 Jakub Jelinek 2.3.2-93 +- update from CVS +- assume 2.4.21 kernel features on RHEL/ppc*, so that + {make,set,get,swap}context works +- backout execstack support for RHEL +- build rtkaio on amd64 too + +* Wed Sep 24 2003 Jakub Jelinek 2.3.2-92 +- update from CVS + - execstack/noexecstack support + - build nscd as PIE +- move __libc_stack_end back to @GLIBC_2.1 +- build against elfutils >= 0.86 to fix stripping on s390x + +* Mon Sep 22 2003 Jakub Jelinek 2.3.2-91 +- rebuilt + +* Mon Sep 22 2003 Jakub Jelinek 2.3.2-90 +- update from CVS + - NPTL locking change (#102682) +- don't jump around lock on amd64 + +* Thu Sep 18 2003 Jakub Jelinek 2.3.2-89 +- fix open_memstream/syslog (#104661) + +* Thu Sep 18 2003 Jakub Jelinek 2.3.2-88 +- update from CVS + - retrieve affinity in pthread_getattr_np + - fix pthread_attr_[gs]etaffinity_np + - handle hex and octal in wordexp + +* Wed Sep 17 2003 Jakub Jelinek 2.3.2-87 +- update from CVS + - truncate instead of round in utimes when utimes syscall is not available + - don't align stack in every glibc function unnecessarily on IA-32 + - make sure threads have their stack 16 byte aligned on IA-32 + - move sched_[sg]etaffinity to GLIBC_2.3.3 symbol version (#103231) + - fix pthread_getattr_np for the initial thread (#102683) + - avoid linuxthreads signal race (#104368) +- ensure all gzip invocations are done with -n option + +* Fri Sep 12 2003 Jakub Jelinek 2.3.2-86 +- update from CVS +- avoid linking in libgcc_eh.a unnecessarily +- change ssize_t back to long int on s390 -m31, unless + gcc 2.95.x is used + +* Wed Sep 10 2003 Jakub Jelinek 2.3.2-85 +- update from CVS + - fix IA-64 memccpy (#104114) + +* Tue Sep 9 2003 Jakub Jelinek 2.3.2-84 +- update from CVS + - undo broken amd64 signal context changes + +* Tue Sep 9 2003 Jakub Jelinek 2.3.2-83 +- update from CVS +- change *nlink_t, *ssize_t and *intptr_t types on s390 -m31 to + {unsigned,} int +- change *u_quad_t, *quad_t, *qaddr_t, *dev_t, *ino64_t, *loff_t, + *off64_t, *rlim64_t, *blkcnt64_t, *fsblkcnt64_t, *fsfilcnt64_t + on 64-bit arches from {unsigned,} long long int {,*} to + {unsigned,} long int {,*} to restore binary compatibility + for C++ functions using these types as arguments + +* Sun Sep 7 2003 Jakub Jelinek 2.3.2-82 +- rebuilt + +* Sat Sep 6 2003 Jakub Jelinek 2.3.2-81 +- update from CVS + - fix tc[gs]etattr/cf[gs]et[io]speed on ppc (#102732) + - libio fixes + +* Thu Sep 4 2003 Jakub Jelinek 2.3.2-80 +- update from CVS + - fix IA-64 cancellation when mixing __attribute__((cleanup ())) + and old-style pthread_cleanup_push cleanups + +* Tue Sep 2 2003 Jakub Jelinek 2.3.2-79 +- updated from CVS + - lots of cancellation fixes + - fix posix_fadvise* on ppc32 + - TLS layout fix + - optimize stdio cleanups (#103354) + - sparcv9 NPTL + - include sigset, sighold, sigrelse, sigpause and sigignore prototypes + in signal.h even if -D_XOPEN_SOURCE_EXTENDED (#103269) + - fix svc_getreqset on 64-bit big-endian arches + - return ENOSYS in linuxthreads pthread_barrierattr_setpshared for + PTHREAD_PROCESS_SHARED + - add pthread_cond_timedwait stubs to libc.so (#102709) +- split glibc-devel into glibc-devel and glibc-headers to ensure + amd64 /usr/include always wins on amd64/i386 bi-arch installs +- increase PTHREAD_STACK_MIN on alpha, ia64 and sparc* +- get rid of __syscall_* prototypes and stubs in sysdeps/unix/sysv/linux +- run make check also with linuxthreads (on IA-32 non-FLOATING_STACKS) + ld.so and NPTL (on IA-32 also FLOATING_STACKS linuxthreads) libraries + and tests + +* Mon Aug 25 2003 Jakub Jelinek 2.3.2-78 +- include dl-osinfo.h only in glibc-debuginfo-2*.rpm, not + in glibc-debuginfo-common* + +* Mon Aug 25 2003 Jakub Jelinek 2.3.2-77 +- update from CVS + - fix glibc 2.0 libio compatibility (#101385) + - fix ldconfig with /usr/lib/lib*.so symlinks (#102853) + - fix assert.h (#102916, #103017) + - make ld.so.cache identical between IA-32 and AMD64 (#102887) + - fix static linking of large IA-64 binaries (#102586) +- avoid using floating point regs in lazy binding code on ppc64 (#102763) + +* Fri Aug 22 2003 Roland McGrath 2.3.2-76 +- add td_thr_tls_get_addr changes missed in initial nptl_db rewrite + +* Sun Aug 17 2003 Roland McGrath 2.3.2-74 +- nptl_db rewrite not yet in CVS + +* Thu Aug 14 2003 Jakub Jelinek 2.3.2-72 +- update from CVS + - fix rtkaio aio_fsync{,64} + - update rtkaio for !BROKEN_THREAD_SIGNALS + - fix assert macro when used on pointers + +* Wed Aug 13 2003 Jakub Jelinek 2.3.2-71 +- update from CVS + +* Tue Aug 12 2003 Jakub Jelinek 2.3.2-70 +- update from CVS +- disable CLONE_STOPPED for now until it is resolved +- strip crt files +- fix libio on arches with no < GLIBC_2.2 support (#102102, #102105) +- fix glibc-debuginfo to include all nptl and nptl_db sources + +* Thu Aug 7 2003 Jakub Jelinek 2.3.2-69 +- update from CVS + - fix pthread_create@GLIBC_2.0 (#101767) +- __ASSUME_CLONE_STOPPED on all arches but s390* in RHEL + +* Sun Aug 3 2003 Jakub Jelinek 2.3.2-68 +- update from CVS + - only use CLONE_STOPPED if kernel supports it, fix setting of thread + explicit scheduling (#101457) + +* Fri Aug 1 2003 Jakub Jelinek 2.3.2-67 +- update from CVS + - fix utimes and futimes if kernel doesn't support utimes syscall + - fix s390 ssize_t type + - fix dlerror when called before any dlopen/dlsym + - update IA-64 bits/sigcontext.h (#101344) + - various warning fixes + - fix pthread.h comment typos (#101363) + +* Wed Jul 30 2003 Jakub Jelinek 2.3.2-66 +- update from CVS +- fix dlopen of libraries using TLS IE/LE models + +* Tue Jul 29 2003 Jakub Jelinek 2.3.2-65 +- update from CVS + - fix timer_create + - use __extension__ before long long typedefs in (#100718) + +* Mon Jul 28 2003 Jakub Jelinek 2.3.2-64 +- update from CVS + - fix wcpncpy (#99462) + - export _res@GLIBC_2.0 even from NPTL libc.so (__res_state () + unlike __errno_location () or __h_errno_location () was introduced + in glibc 2.2) + - fix zic bug on 64-bit platforms + - some TLS handling fixes + - make ldconfig look into alternate ABI dirs by default (#99402) +- move %%{_datadir}/zoneinfo to tzdata package, so that it can be + errataed separately from glibc +- new add-on - rtkaio +- prereq libgcc, as glibc now relies on libgcc_s.so.1 for pthread_cancel + +* Tue Jul 15 2003 Jakub Jelinek 2.3.2-63 +- fix thread cancellation on ppc64 + +* Sat Jul 12 2003 Jakub Jelinek 2.3.2-62 +- update from CVS + - fix thread cancellation on ppc32, s390 and s390x + +* Thu Jul 10 2003 Jakub Jelinek 2.3.2-61 +- update from CVS + - build libc_nonshared.a with -fPIC instead of -fpic +- fix ppc64 PIE support +- add cfi directives to NPTL sysdep-cancel.h on ppc/ppc64/s390/s390x + +* Tue Jul 8 2003 Jakub Jelinek 2.3.2-60 +- update from CVS + +* Thu Jul 3 2003 Jakub Jelinek 2.3.2-59 +- update from CVS +- on IA-64 use different symbols for cancellation portion of syscall + handlers to make gdb happier + +* Thu Jun 26 2003 Jakub Jelinek 2.3.2-58 +- update from CVS + - nss_compat supporting LDAP etc. + +* Tue Jun 24 2003 Jakub Jelinek 2.3.2-57 +- update from CVS + +* Thu Jun 19 2003 Jakub Jelinek 2.3.2-56 +- fix condvars and semaphores in ppc* NPTL +- fix test-skeleton.c reporting of timed-out tests (#91269) +- increase timeouts for tests during make check + +* Wed Jun 18 2003 Jakub Jelinek 2.3.2-55 +- make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64 + on bi-ABI architectures (#97557) +- disable FUTEX_REQUEUE on ppc* temporarily + +* Wed Jun 18 2003 Jakub Jelinek 2.3.2-54 +- update from CVS +- fix glibc_post_upgrade on ppc + +* Tue Jun 17 2003 Jakub Jelinek 2.3.2-53 +- update from CVS +- fix localedef (#90659) +- tweak linuxthreads for librt cancellation + +* Mon Jun 16 2003 Jakub Jelinek 2.3.2-52 +- update from CVS + +* Thu Jun 12 2003 Jakub Jelinek 2.3.2-51 +- update from CVS +- fix (#97169) + +* Wed Jun 11 2003 Jakub Jelinek 2.3.2-50 +- update from CVS + +* Tue Jun 10 2003 Jakub Jelinek 2.3.2-49 +- update from CVS + - fix pthread_cond_signal on IA-32 (#92080, #92253) + - fix setegid (#91567) +- don't prelink -R libc.so on any architecture, it prohibits + address randomization + +* Thu Jun 5 2003 Jakub Jelinek 2.3.2-48 +- update from CVS + - fix IA-64 NPTL build + +* Thu Jun 5 2003 Jakub Jelinek 2.3.2-47 +- update from CVS +- PT_GNU_STACK segment in binaries/executables and .note.GNU-stack + section in *.[oa] + +* Sun Jun 1 2003 Jakub Jelinek 2.3.2-46 +- update from CVS +- enable NPTL on AMD64 +- avoid using trampolines in localedef + +* Thu May 29 2003 Jakub Jelinek 2.3.2-45 +- enable NPTL on IA-64 + +* Thu May 29 2003 Jakub Jelinek 2.3.2-44 +- update from CVS +- enable NPTL on s390 and s390x +- make __init_array_start etc. symbols in elf-init.oS hidden undefined + +* Thu May 29 2003 Jakub Jelinek 2.3.2-43 +- update from CVS + +* Fri May 23 2003 Jakub Jelinek 2.3.2-42 +- update from CVS + +* Tue May 20 2003 Jakub Jelinek 2.3.2-41 +- update from CVS +- use NPTL libs if uname -r contains nptl substring or is >= 2.5.69 + or set_tid_address syscall is available instead of checking + AT_SYSINFO dynamic tag + +* Thu May 15 2003 Jakub Jelinek 2.3.2-40 +- update from CVS + +* Wed May 14 2003 Jakub Jelinek 2.3.2-39 +- update from CVS + - fix for prelinking of libraries with no dependencies + +* Tue May 13 2003 Jakub Jelinek 2.3.2-38 +- update from CVS +- enable NPTL on ppc and ppc64 + +* Tue May 6 2003 Matt Wilson 2.3.2-37 +- rebuild + +* Sun May 4 2003 Jakub Jelinek 2.3.2-36 +- update from CVS + +* Sat May 3 2003 Jakub Jelinek 2.3.2-35 +- update from CVS + - make -jN build fixes + +* Fri May 2 2003 Jakub Jelinek 2.3.2-34 +- update from CVS +- avoid using trampolines in iconvconfig for now + +* Sat Apr 26 2003 Jakub Jelinek 2.3.2-33 +- update from CVS + +* Fri Apr 25 2003 Jakub Jelinek 2.3.2-32 +- update from CVS +- more ppc TLS fixes + +* Wed Apr 23 2003 Jakub Jelinek 2.3.2-31 +- update from CVS + - nscd fixes + - fix Bahrain spelling (#56298) + - fix Ukrainian collation (#83973) + - accept trailing spaces in /etc/ld.so.conf (#86032) + - perror fix (#85994) + - fix localedef (#88978) + - fix getifaddrs (#89026) + - fix strxfrm (#88409) +- fix ppc TLS +- fix getaddrinfo (#89448) +- don't print warning about errno, h_errno or _res if + LD_ASSUME_KERNEL=2.4.1 or earlier + +* Tue Apr 15 2003 Jakub Jelinek 2.3.2-30 +- update from CVS +- fix prelink on ppc32 +- add TLS support on ppc32 and ppc64 +- make sure on -m64 arches all helper binaries are built with this + option + +* Mon Apr 14 2003 Jakub Jelinek 2.3.2-29 +- update from CVS + - fix strxfrm (#88409) +- use -m64 -mno-minimal-toc on ppc64 +- conflict with kernels < 2.4.20 on ppc64 and < 2.4.0 on x86_64 +- link glibc_post_upgrade against newly built libc.a + +* Sun Apr 13 2003 Jakub Jelinek 2.3.2-28 +- update from CVS + - fix NPTL pthread_detach and already terminated, but not yet + joined thread (#88219) + - fix bug-regex4 testcase (#88118) + - reenable prelink support broken in 2.3.2-13 + - fix register_printf_function (#88052) + - fix double free with fopen using ccs= (#88056) + - fix potential access below $esp in {set,swap}context (#88093) + - fix buffer underrun in gencat -H (#88099) + - avoid using unitialized variable in tst-tgmath (#88101) + - fix gammal (#88104) + - fix iconv -c + - fix xdr_string (PR libc/4999) + - fix /usr/lib/nptl/librt.so symlink + - avoid running NPTL cleanups twice in some cases + - unblock __pthread_signal_cancel in linuxthreads, so that + linuxthreads threaded programs work correctly if spawned + from NPTL threaded programs + - fix sysconf _SC_{NPROCESSORS_{CONF,ONLN},{,AV}PHYS_PAGES} +- remove /lib/i686 directory before running ldconfig in glibc post + during i686 -> i386 glibc "upgrades" (#88456) + +* Wed Apr 2 2003 Jakub Jelinek 2.3.2-22 +- update from CVS + - add pthread_atfork to libpthread.a + +* Tue Apr 1 2003 Jakub Jelinek 2.3.2-21 +- update from CVS +- make sure linuxthreads pthread_mutex_lock etc. is not a cancellation + point + +* Sat Mar 29 2003 Jakub Jelinek 2.3.2-20 +- update from CVS +- if kernel >= 2.4.1 doesn't support NPTL, fall back to + /lib/i686 libs on i686, not stright to /lib + +* Fri Mar 28 2003 Jakub Jelinek 2.3.2-19 +- update from CVS + - timers fixes + +* Thu Mar 27 2003 Jakub Jelinek 2.3.2-18 +- update from CVS +- fix NPTL pthread_cond_timedwait +- fix sysconf (_SC_MONOTONIC_CLOCK) +- use /%%{_lib}/tls instead of /lib/tls on x86-64 +- add /%%{_lib}/tls/librt*so* and /%%{_lib}/i686/librt*so* +- display content of .out files for all make check failures + +* Wed Mar 26 2003 Jakub Jelinek 2.3.2-17 +- update from CVS + - kernel POSIX timers support + +* Sat Mar 22 2003 Jakub Jelinek 2.3.2-16 +- update from CVS + - export __fork from glibc again +- fix glibc-compat build in NPTL +- fix c_stubs +- fix some more atomic.h problems +- don't check abi in glibc-compat libs + +* Fri Mar 21 2003 Jakub Jelinek 2.3.2-15 +- update from CVS +- build glibc-compat (for glibc 2.0 compatibility) and c_stubs add-ons +- condrestart sshd in glibc_post_upgrade so that the user can + log in remotely and handle the rest (#86339) +- fix a typo in glibc_post_upgrade on sparc + +* Tue Mar 18 2003 Jakub Jelinek 2.3.2-14 +- update from CVS +- change i686/athlon libc.so.6 base to 0x00e80000 + +* Mon Mar 17 2003 Jakub Jelinek 2.3.2-13 +- update from CVS + - hopefully last fix for condvar problems + +* Fri Mar 14 2003 Jakub Jelinek 2.3.2-12 +- fix bits/syscall.h creation on x86-64 + +* Thu Mar 13 2003 Jakub Jelinek 2.3.2-11 +- update from CVS + +* Wed Mar 12 2003 Jakub Jelinek 2.3.2-10 +- update from CVS + +* Tue Mar 11 2003 Jakub Jelinek 2.3.2-9 +- update from CVS +- fix glibc-debug description (#85111) +- make librt.so a symlink again, not linker script + +* Tue Mar 4 2003 Jakub Jelinek 2.3.2-8 +- update from CVS +- remove the workarounds for broken software accessing GLIBC_PRIVATE + symbols + +* Mon Mar 3 2003 Jakub Jelinek 2.3.2-7 +- update from CVS + +* Sun Mar 2 2003 Jakub Jelinek 2.3.2-6 +- fix TLS IE/LE model handling in dlopened libraries + on TCB_AT_TP arches + +* Tue Feb 25 2003 Jakub Jelinek 2.3.2-5 +- update from CVS + +* Tue Feb 25 2003 Jakub Jelinek 2.3.2-4 +- update from CVS + +* Mon Feb 24 2003 Jakub Jelinek 2.3.2-3 +- update from CVS +- only warn about errno, h_errno or _res for binaries, never + libraries +- rebuilt with gcc-3.2.2-4 to use direct %%gs TLS access insn sequences + +* Sun Feb 23 2003 Jakub Jelinek 2.3.2-2 +- update from CVS + +* Sat Feb 22 2003 Jakub Jelinek 2.3.2-1 +- update from CVS + +* Thu Feb 20 2003 Jakub Jelinek 2.3.1-51 +- update from CVS + +* Wed Feb 19 2003 Jakub Jelinek 2.3.1-50 +- update from CVS + +* Wed Feb 19 2003 Jakub Jelinek 2.3.1-49 +- update from CVS +- remove nisplus and nis from the default nsswitch.conf (#67401, #9952) + +* Tue Feb 18 2003 Jakub Jelinek 2.3.1-48 +- update from CVS + +* Sat Feb 15 2003 Jakub Jelinek 2.3.1-47 +- update from CVS + +* Fri Feb 14 2003 Jakub Jelinek 2.3.1-46 +- update from CVS + - pthread_cond* NPTL fixes, new NPTL testcases + +* Thu Feb 13 2003 Jakub Jelinek 2.3.1-45 +- update from CVS +- include also linuxthreads FLOATING_STACKS libs on i686 and athlon: + LD_ASSUME_KERNEL=2.2.5 to LD_ASSUME_KERNEL=2.4.0 is non-FLOATING_STACKS lt, + LD_ASSUME_KERNEL=2.4.1 to LD_ASSUME_KERNEL=2.4.19 is FLOATING_STACKS lt, + later is NPTL +- enable TLS on alpha/alphaev6 +- add BuildPreReq: /usr/bin/readlink + +* Tue Feb 11 2003 Jakub Jelinek 2.3.1-44 +- update from CVS + - pthread_once fix + +* Mon Feb 10 2003 Jakub Jelinek 2.3.1-43 +- update from CVS +- vfork fix on s390 +- rebuilt with binutils 2.13.90.0.18-5 so that accesses to errno + don't bind locally (#83325) + +* Thu Feb 06 2003 Jakub Jelinek 2.3.1-42 +- update from CVS +- fix pthread_create after vfork+exec in linuxthreads + +* Wed Feb 05 2003 Jakub Jelinek 2.3.1-41 +- update from CVS + +* Thu Jan 30 2003 Jakub Jelinek 2.3.1-40 +- update from CVS + +* Wed Jan 29 2003 Jakub Jelinek 2.3.1-39 +- update from CVS +- enable TLS on s390{,x} and sparc{,v9} + +* Fri Jan 17 2003 Jakub Jelinek 2.3.1-38 +- update from CVS +- initialize __environ in glibc_post_upgrade to empty array, + so that it is not NULL +- compat symlink for s390x /lib/ld64.so.1 +- enable glibc-profile on x86-64 +- only include libNoVersion.so on IA-32, Alpha and Sparc 32-bit + +* Thu Jan 16 2003 Jakub Jelinek 2.3.1-37 +- update from CVS + - nscd fixes, *scanf fix +- fix %%nptlarches noarch build (#81909) +- IA-64 TLS fixes + +* Tue Jan 14 2003 Jakub Jelinek 2.3.1-36 +- update from CVS +- rework -debuginfo subpackage, add -debuginfo-common + subpackage on IA-32, Alpha and Sparc (ie. auxiliary arches) +- fix vfork in libc.a on PPC32, Alpha, Sparc +- fix libio locks in linuxthreads libc.so if libpthread.so + is dlopened later (#81374) + +* Mon Jan 13 2003 Jakub Jelinek 2.3.1-35 +- update from CVS + - dlclose bugfixes +- fix NPTL libpthread.a +- fix glibc_post_upgrade on several arches + +* Sat Jan 11 2003 Jakub Jelinek 2.3.1-34 +- update from CVS +- TLS support on IA-64 + +* Wed Jan 8 2003 Jakub Jelinek 2.3.1-33 +- fix vfork in linuxthreads (#81377, #81363) + +* Tue Jan 7 2003 Jakub Jelinek 2.3.1-32 +- update from CVS +- don't use TLS libs if kernel doesn't set AT_SYSINFO + (#80921, #81212) +- add ntp_adjtime on alpha (#79996) +- fix nptl_db (#81116) + +* Sun Jan 5 2003 Jakub Jelinek 2.3.1-31 +- update from CVS +- support all architectures again + +* Fri Jan 3 2003 Jakub Jelinek 2.3.1-30 +- fix condvar compatibility wrappers +- add ugly hack to use non-TLS libs if a binary is seen + to have errno, h_errno or _res symbols in .dynsym + +* Fri Jan 3 2003 Jakub Jelinek 2.3.1-29 +- update from CVS + - fixes for new condvar + +* Thu Jan 2 2003 Jakub Jelinek 2.3.1-28 +- new NPTL condvar implementation plus related linuxthreads + symbol versioning updates + +* Thu Jan 2 2003 Jakub Jelinek 2.3.1-27 +- update from CVS +- fix #include with -D_BSD_SOURCE or without + feature set macros +- make *sigaction, sigwait and raise the same between + -lpthread -lc and -lc -lpthread in linuxthreads builds + +* Tue Dec 31 2002 Jakub Jelinek 2.3.1-26 +- fix dlclose + +* Sun Dec 29 2002 Jakub Jelinek 2.3.1-25 +- enable sysenter by default for now +- fix endless loop in ldconfig + +* Sat Dec 28 2002 Jakub Jelinek 2.3.1-24 +- update from CVS + +* Fri Dec 27 2002 Jakub Jelinek 2.3.1-23 +- update from CVS + - fix ptmalloc_init after clearenv (#80370) + +* Sun Dec 22 2002 Jakub Jelinek 2.3.1-22 +- update from CVS +- add IA-64 back +- move TLS libraries from /lib/i686 to /lib/tls + +* Thu Dec 19 2002 Jakub Jelinek 2.3.1-21 +- system(3) fix for linuxthreads +- don't segfault in pthread_attr_init from libc.so +- add cancellation tests from nptl to linuxthreads + +* Wed Dec 18 2002 Jakub Jelinek 2.3.1-20 +- fix up lists of exported symbols + their versions + from the libraries + +* Wed Dec 18 2002 Jakub Jelinek 2.3.1-19 +- fix --with-tls --enable-kernel=2.2.5 libc on IA-32 + +* Wed Dec 18 2002 Jakub Jelinek 2.3.1-18 +- update from CVS + - fix NPTL hanging mozilla + - initialize malloc in mALLOPt (fixes problems with squid, #79957) + - make linuxthreads work with dl_dynamic_weak 0 + - clear dl_dynamic_weak everywhere + +* Tue Dec 17 2002 Jakub Jelinek 2.3.1-17 +- update from CVS + - NPTL socket fixes, flockfile/ftrylockfile/funlockfile fix + - kill -debug sub-package, rename -debug-static to -debug + - clear dl_dynamic_weak for NPTL + +* Mon Dec 16 2002 Jakub Jelinek 2.3.1-16 +- fix and for C++ +- automatically generate NPTL libpthread wrappers + +* Mon Dec 16 2002 Jakub Jelinek 2.3.1-15 +- update from CVS + - all functions which need cancellation should now be cancellable + both in libpthread.so and libc.so + - removed @@GLIBC_2.3.2 cancellation wrappers + +* Fri Dec 13 2002 Jakub Jelinek 2.3.1-14 +- update from CVS + - replace __libc_lock_needed@GOTOFF(%%ebx) with + %%gs:offsetof(tcbhead_t, multiple_threads) + - start of new NPTL cancellation wrappers + +* Thu Dec 12 2002 Jakub Jelinek 2.3.1-13 +- update from CVS +- use inline locks in malloc + +* Tue Dec 10 2002 Jakub Jelinek 2.3.1-12 +- update from CVS + - support LD_ASSUME_KERNEL=2.2.5 in statically linked programs + +* Mon Dec 9 2002 Jakub Jelinek 2.3.1-11 +- update from CVS +- rebuilt with gcc-3.2.1-2 + +* Fri Dec 6 2002 Jakub Jelinek 2.3.1-10 +- update from CVS +- non-nptl --with-tls --without-__thread FLOATING_STACKS libpthread + should work now +- faster libc locking when using nptl +- add OUTPUT_FORMAT to linker scripts +- fix x86_64 sendfile (#79111) + +* Wed Dec 4 2002 Jakub Jelinek 2.3.1-9 +- update from CVS + - RUSCII support (#78906) +- for nptl builds add BuildRequires +- fix byteswap.h for non-gcc (#77689) +- add nptl-devel package + +* Tue Dec 3 2002 Jakub Jelinek 2.3.1-8 +- update from CVS + - make --enable-kernel=2.2.5 --with-tls --without-__thread + ld.so load nptl and other --with-__thread libs +- disable nptl by default for now + +* Wed Nov 27 2002 Jakub Jelinek 2.3.1-7 +- update from CVS +- restructured redhat/Makefile and spec, so that src.rpm contains + glibc-.tar.bz2, glibc-redhat-.tar.bz2 and glibc-redhat.patch +- added nptl + +* Fri Nov 8 2002 Jakub Jelinek 2.3.1-6 +- update from CVS + - even more regex fixes +- run sed testsuite to check glibc regex + +* Thu Oct 24 2002 Jakub Jelinek 2.3.1-5 +- fix LD_DEBUG=statistics and LD_TRACE_PRELINKING in programs + using libpthread.so. + +* Thu Oct 24 2002 Jakub Jelinek 2.3.1-4 +- update from CVS + - fixed %%a and %%A in *printf (#75821) + - fix re_comp memory leaking (#76594) + +* Tue Oct 22 2002 Jakub Jelinek 2.3.1-3 +- update from CVS + - some more regex fixes +- fix libpthread.a (#76484) +- fix locale-archive enlarging + +* Fri Oct 18 2002 Jakub Jelinek 2.3.1-2 +- update from CVS + - don't need to use 128K of stacks for DNS lookups + - regex fixes + - updated timezone data e.g. for this year's Brasil DST + changes + - expand ${LIB} in RPATH/RUNPATH/dlopen filenames + +* Fri Oct 11 2002 Jakub Jelinek 2.3.1-1 +- update to 2.3.1 final + - support really low thread stack sizes (#74073) +- tzdata update + +* Wed Oct 9 2002 Jakub Jelinek 2.3-2 +- update from CVS + - handle low stack limits + - move s390x into */lib64 + +* Thu Oct 3 2002 Jakub Jelinek 2.3-1 +- update to 2.3 final + - fix freopen on libstdc++ <= 2.96 stdin/stdout/stderr (#74800) + +* Sun Sep 29 2002 Jakub Jelinek 2.2.94-3 +- don't prelink -r libc.so on ppc/x86-64/sparc*, it doesn't + speed things up, because they are neither REL arches, nor + ELF_MACHINE_REL_RELATIVE +- fix sparc64 build + +* Sun Sep 29 2002 Jakub Jelinek 2.2.94-2 +- update from CVS + +* Sat Sep 28 2002 Jakub Jelinek 2.2.94-1 +- update from CVS +- prelink on ppc and x86-64 too +- don't remove ppc memset +- instead of listing on which arches to remove glibc-compat + list where it should stay + +* Fri Sep 6 2002 Jakub Jelinek 2.2.93-5 +- fix wcsmbs functions with invalid character sets (or malloc + failures) +- make sure __ctype_b etc. compat vars are updated even if + they are copy relocs in the main program + +* Thu Sep 5 2002 Jakub Jelinek 2.2.93-4 +- fix /lib/libnss1_dns.so.1 (missing __set_h_errno definition + leading to unresolved __set_h_errno symbol) + +* Wed Sep 4 2002 Jakub Jelinek 2.2.93-3 +- security fix - increase dns-network.c MAXPACKET to at least + 65536 to avoid buffer overrun. Likewise glibc-compat + dns-{host,network}.c. + +* Tue Sep 3 2002 Jakub Jelinek 2.2.93-2 +- temporarily add back __ctype_b, __ctype_tolower and __ctype_toupper to + libc.a and export them as @@GLIBC_2.0 symbols, not @GLIBC_2.0 + from libc.so - we have still lots of .a libraries referencing + __ctype_{b,tolower,toupper} out there... + +* Tue Sep 3 2002 Jakub Jelinek 2.2.93-1 +- update from CVS + - 2.2.93 release + - use double instead of single indirection in isXXX macros + - per-locale wcsmbs conversion state + +* Sat Aug 31 2002 Jakub Jelinek 2.2.92-2 +- update from CVS + - fix newlocale/duplocale/uselocale +- disable profile on x86_64 for now + +* Sat Aug 31 2002 Jakub Jelinek 2.2.92-1 +- update from CVS + - 2.2.92 release + - fix gettext after uselocale + - fix locales in statically linked threaded programs + - fix NSS + +* Thu Aug 29 2002 Jakub Jelinek 2.2.91-1 +- update from CVS + - 2.2.91 release + - fix fd leaks in locale-archive reader (#72043) +- handle EROFS in build-locale-archive gracefully (#71665) + +* Wed Aug 28 2002 Jakub Jelinek 2.2.90-27 +- update from CVS + - fix re_match (#72312) +- support more than 1024 threads + +* Fri Aug 23 2002 Jakub Jelinek 2.2.90-26 +- update from CVS + - fix i386 build + +* Thu Aug 22 2002 Jakub Jelinek 2.2.90-25 +- update from CVS + - fix locale-archive loading hang on some (non-primary) locales + (#72122, #71878) + - fix umount problems with locale-archives when /usr is a separate + partition (#72043) +- add LICENSES file + +* Fri Aug 16 2002 Jakub Jelinek 2.2.90-24 +- update from CVS + - only mmap up to 2MB of locale-archive on 32-bit machines + initially + - fix fseek past end + fread segfault with mmaped stdio +- include which is mistakenly not included + in glibc-devel on IA-32 + +* Fri Aug 16 2002 Jakub Jelinek 2.2.90-23 +- don't return normalized locale name in setlocale when using + locale-archive + +* Thu Aug 15 2002 Jakub Jelinek 2.2.90-22 +- update from CVS + - optimize for primary system locale +- localedef fixes (#71552, #67705) + +* Wed Aug 14 2002 Jakub Jelinek 2.2.90-21 +- fix path to locale-archive in libc reader +- build locale archive at glibc-common %%post time +- export __strtold_internal and __wcstold_internal on Alpha again +- workaround some localedata problems + +* Tue Aug 13 2002 Jakub Jelinek 2.2.90-20 +- update from CVS +- patch out set_thread_area for now + +* Fri Aug 9 2002 Jakub Jelinek 2.2.90-19 +- update from CVS +- GB18030 patch from Yu Shao +- applied Debian patch for getaddrinfo IPv4 vs. IPv6 +- fix regcomp (#71039) + +* Sun Aug 4 2002 Jakub Jelinek 2.2.90-18 +- update from CVS +- use /usr/sbin/prelink, not prelink (#70376) + +* Thu Jul 25 2002 Jakub Jelinek 2.2.90-17 +- update from CVS + +* Thu Jul 25 2002 Jakub Jelinek 2.2.90-16 +- update from CVS + - ungetc fix (#69586) + - fseek errno fix (#69589) + - change *etrlimit prototypes for C++ (#68588) +- use --without-tls instead of --disable-tls + +* Thu Jul 11 2002 Jakub Jelinek 2.2.90-15 +- set nscd user's shell to /sbin/nologin (#68369) +- fix glibc-compat buffer overflows (security) +- buildrequire prelink, don't build glibc's own copy of it (#67567) +- update from CVS + - regex fix (#67734) + - fix unused warnings (#67706) + - fix freopen with mmap stdio (#67552) + - fix realloc (#68499) + +* Tue Jun 25 2002 Bill Nottingham 2.2.90-14 +- update from CVS + - fix argp on long words + - update atime in libio + +* Sat Jun 22 2002 Jakub Jelinek 2.2.90-13 +- update from CVS + - a thread race fix + - fix readdir on invalid dirp + +* Wed Jun 19 2002 Jakub Jelinek 2.2.90-12 +- update from CVS + - don't use __thread in headers +- fix system(3) in threaded apps +- update prelink, so that it is possible to prelink -u libc.so.6.1 + on Alpha + +* Fri Jun 7 2002 Jakub Jelinek 2.2.90-11 +- update from CVS + - fix __moddi3 (#65612, #65695) + - fix ether_line (#64427) +- fix setvbuf with mmap stdio (#65864) +- --disable-tls for now, waiting for kernel +- avoid duplication of __divtf3 etc. on IA-64 +- make sure get*ent_r and _IO_wfile_jumps are exported (#62278) + +* Tue May 21 2002 Jakub Jelinek 2.2.90-10 +- update from CVS + - fix Alpha pthread bug with gcc 3.1 + +* Fri Apr 19 2002 Jakub Jelinek 2.2.5-35 +- fix nice + +* Mon Apr 15 2002 Jakub Jelinek 2.2.5-34 +- add relocation dependencies even for weak symbols (#63422) +- stricter check_fds check for suid/sgid binaries +- run make check at %%install time + +* Sat Apr 13 2002 Jakub Jelinek 2.2.5-33 +- handle Dec 31 1969 in mktime for timezones west of GMT (#63369) +- back out do-lookup.h change (#63261, #63305) +- use "memory" clobber instead all the fancy stuff in i386/i686/bits/string.h + since lots of compilers break on it +- fix sparc build with gcc 3.1 +- fix spec file for athlon + +* Tue Apr 9 2002 Jakub Jelinek 2.2.5-32 +- fix debugging of threaded apps (#62804) +- fix DST for Estonia (#61494) +- document that pthread_mutexattr_?etkind_np are deprecated + and pthread_mutexattr_?ettype should be used instead in man + pages (#61485) +- fix libSegFault.so undefined externals + +* Fri Apr 5 2002 Jakub Jelinek 2.2.5-31 +- temporarily disable prelinking ld.so, as some statically linked + binaries linked against debugging versions of old glibcs die on it + (#62352) +- fix for -std=c99 (#62516) +- fix ether_ntohost segfault (#62397) +- remove in glibc_post_upgrade on i386 all /lib/i686/libc-*.so, + /lib/i686/libm-*.so and /lib/i686/libpthread-*.so, not just current + version (#61633) +- prelink -r on alpha too + +* Thu Mar 28 2002 Jakub Jelinek 2.2.5-30 +- update GB18030 iconv module (Yu Shao) + +* Tue Mar 26 2002 Jakub Jelinek 2.2.5-29 +- features.h fix + +* Tue Mar 26 2002 Jakub Jelinek 2.2.5-28 +- update from CVS + - fix nscd with huge groups + - fix nis to not close fds it shouldn't +- rebuilt against newer glibc-kernheaders to use the correct + PATH_MAX +- handle .athlon.rpm glibc the same way as .i686.rpm +- add a couple of .ISO-8859-15 locales (#61908) +- readd temporarily currencies which were superceeded by Euro + into the list of accepted currencies by localedef to make + standard conformance testsuites happy +- temporarily moved __libc_waitpid back to make Sun JDK happy +- use old malloc code +- prelink i686/athlon ld.so and prelink -r i686/athlon libc.so + +* Thu Mar 14 2002 Jakub Jelinek 2.2.5-27 +- update from CVS + - fix DST handling for southern hemisphere (#60747) + - fix daylight setting for tzset (#59951) + - fix ftime (#60350) + - fix nice return value + - fix a malloc segfault +- temporarily moved __libc_wait, __libc_fork and __libc_stack_end + back to what they used to be exported at +- censorship (#60758) + +* Thu Feb 28 2002 Jakub Jelinek 2.2.5-26 +- update from CVS +- use __attribute__((visibility(...))) if supported, use _rtld_local + for ld.so only objects +- provide libc's own __{,u}{div,mod}di3 + +* Wed Feb 27 2002 Jakub Jelinek 2.2.5-25 +- switch back to 2.2.5, mmap stdio needs work + +* Mon Feb 25 2002 Jakub Jelinek 2.2.90-8 +- fix two other mmap stdio bugs (#60228) + +* Thu Feb 21 2002 Jakub Jelinek 2.2.90-7 +- fix yet another mmap stdio bug (#60145) + +* Tue Feb 19 2002 Jakub Jelinek 2.2.90-6 +- fix mmap stdio bug (seen on ld as File truncated error, #60043) +- apply Andreas Schwab's fix for pthread sigwait +- remove /lib/i686/ libraries in glibc_post_upgrade when + performing i386 glibc install + +* Thu Feb 14 2002 Jakub Jelinek 2.2.90-5 +- update to CVS +- added glibc-utils subpackage +- disable autoreq in glibc-debug +- readd %%lang() to locale files + +* Thu Feb 7 2002 Jakub Jelinek 2.2.90-4 +- update to CVS +- move glibc private symbols to GLIBC_PRIVATE symbol version + +* Wed Jan 9 2002 Jakub Jelinek 2.2.90-3 +- fix a sqrt bug on alpha which caused SHN_UNDEF $__full_ieee754_sqrt..ng + symbol in libm + +* Tue Jan 8 2002 Jakub Jelinek 2.2.90-2 +- add debug-static package + +* Mon Dec 31 2001 Jakub Jelinek 2.2.90-1 +- update from CVS +- remove -D__USE_STRING_INLINES +- add debug subpackage to trim glibc and glibc-devel size + +* Wed Oct 3 2001 Jakub Jelinek 2.2.4-19 +- fix strsep + +* Fri Sep 28 2001 Jakub Jelinek 2.2.4-18 +- fix a ld.so bug with duplicate searchlists in l_scope +- fix erfcl(-inf) +- turn /usr/lib/librt.so into linker script + +* Wed Sep 26 2001 Jakub Jelinek 2.2.4-17 +- fix a ld.so lookup bug after lots of dlopen calls +- fix CMSG_DATA for non-gcc non-ISOC99 compilers (#53984) +- prelinking support for Sparc64 + +* Fri Sep 21 2001 Jakub Jelinek 2.2.4-16 +- update from CVS to fix DT_SYMBOLIC +- prelinking support for Alpha and Sparc + +* Tue Sep 18 2001 Jakub Jelinek 2.2.4-15 +- update from CVS + - linuxthreads now retries if -1/EINTR is returned from + reading or writing to thread manager pipe (#43742) +- use DT_FILTER in librt.so (#53394) + - update glibc prelink patch so that it handles filters +- fix timer_* with SIGEV_NONE (#53494) +- make glibc_post_upgrade work on PPC (patch from Franz Sirl) + +* Mon Sep 10 2001 Jakub Jelinek 2.2.4-14 +- fix build on sparc32 +- 2.2.4-13 build for some reason missed some locales + on alpha/ia64 + +* Mon Sep 3 2001 Jakub Jelinek 2.2.4-13 +- fix iconvconfig + +* Mon Sep 3 2001 Jakub Jelinek 2.2.4-12 +- add fam to /etc/rpc (#52863) +- fix for C++ (#52960) +- fix perror + +* Mon Aug 27 2001 Jakub Jelinek 2.2.4-11 +- fix strnlen(x, -1) + +* Mon Aug 27 2001 Jakub Jelinek 2.2.4-10 +- doh, should only define __libc_rwlock_t + if __USE_UNIX98. + +* Mon Aug 27 2001 Jakub Jelinek 2.2.4-9 +- fix bits/libc-lock.h so that gcc can compile +- fix s390 build + +* Fri Aug 24 2001 Jakub Jelinek 2.2.4-8 +- kill stale library symlinks in ldconfig (#52350) +- fix inttypes.h for G++ < 3.0 +- use DT_REL*COUNT + +* Wed Aug 22 2001 Jakub Jelinek 2.2.4-7 +- fix strnlen on IA-64 (#50077) + +* Thu Aug 16 2001 Jakub Jelinek 2.2.4-6 +- glibc 2.2.4 final +- fix -lpthread -static (#51672) + +* Fri Aug 10 2001 Jakub Jelinek 2.2.4-5 +- doh, include libio/tst-swscanf.c + +* Fri Aug 10 2001 Jakub Jelinek 2.2.4-4 +- don't crash on catclose(-1) +- fix wscanf %%[] handling +- fix return value from swprintf +- handle year + %%U/%%W week + week day in strptime + +* Thu Aug 9 2001 Jakub Jelinek 2.2.4-3 +- update from CVS to + - fix strcoll (#50548) + - fix seekdir (#51132) + - fix memusage (#50606) +- don't make gconv-modules.cache %%config file, just don't verify + its content. + +* Mon Aug 6 2001 Jakub Jelinek +- fix strtod and *scanf (#50723, #50724) + +* Sat Aug 4 2001 Jakub Jelinek +- update from CVS + - fix iconv cache handling +- glibc should not own %%{_infodir}, %%{_mandir} nor %%{_mandir}/man3 (#50673) +- add gconv-modules.cache as emtpy config file (#50699) +- only run iconvconfig if /usr is mounted read-write (#50667) + +* Wed Jul 25 2001 Jakub Jelinek +- move iconvconfig from glibc-common into glibc subpackage, + call it from glibc_post_upgrade instead of common's post. + +* Tue Jul 24 2001 Jakub Jelinek +- turn off debugging printouts in iconvconfig + +* Tue Jul 24 2001 Jakub Jelinek +- update from CVS + - fix IA-32 makecontext + - make fflush(0) thread-safe (#46446) + +* Mon Jul 23 2001 Jakub Jelinek +- adjust prelinking DT_* and SHT_* values in elf.h +- update from CVS + - iconv cache + - make iconv work in SUID/SGID programs (#34611) + +* Fri Jul 20 2001 Jakub Jelinek +- update from CVS + - kill non-pic code in libm.so + - fix getdate + - fix some locales (#49402) +- rebuilt with binutils-2.11.90.0.8-5 to place .interp section + properly in libBrokenLocale.so, libNoVersion.so and libanl.so +- add floating stacks on IA-64, Alpha, Sparc (#49308) + +* Mon Jul 16 2001 Jakub Jelinek +- make /lib/i686 directory owned by glibc*.i686.rpm + +* Mon Jul 9 2001 Jakub Jelinek +- remove rquota.[hx] headers which are now provided by quota (#47141) +- add prelinking patch + +* Thu Jul 5 2001 Jakub Jelinek +- require sh-utils for nscd + +* Mon Jun 25 2001 Jakub Jelinek +- update from CVS (#43681, #43350, #44663, #45685) +- fix ro_RO bug (#44644) + +* Wed Jun 6 2001 Jakub Jelinek +- fix a bunch of math bugs (#43210, #43345, #43346, #43347, #43348, #43355) +- make rpc headers -ansi compilable (#42390) +- remove alphaev6 optimized memcpy, since there are still far too many + broken apps which call memcpy where they should call memmove +- update from CVS to (among other things): + - fix tanhl bug (#43352) + +* Tue May 22 2001 Jakub Jelinek +- fix #include with -D_XOPEN_SOURCE=500 on ia64 (#35968) +- fix a dlclose reldeps handling bug +- some more profiling fixes +- fix tgmath.h + +* Thu May 17 2001 Jakub Jelinek +- make ldconfig more quiet +- fix LD_PROFILE on i686 (#41030) + +* Wed May 16 2001 Jakub Jelinek +- fix the hardlink program, so that it really catches all files with + identical content +- add a s390x clone fix + +* Wed May 16 2001 Jakub Jelinek +- fix rpc for non-threaded apps using svc_fdset and similar variables (#40409) +- fix nss compatibility DSO versions for alphaev6 +- add a hardlink program instead of the shell 3x for plus cmp -s/link + which takes a lot of time during build +- rework BuildPreReq and Conflicts with gcc, so that + it applies only where it has to + +* Fri May 11 2001 Jakub Jelinek +- fix locale name of ja_JP in UTF-8 (#39783) +- fix re_search_2 (#40244) +- fix memusage script (#39138, #39823) +- fix dlsym(RTLD_NEXT, ) from main program (#39803) +- fix xtrace script (#39609) +- make glibc conflict with glibc-devel 2.2.2 and below (to make sure + libc_nonshared.a has atexit) +- fix getconf LFS_CFLAGS on 64bitters +- recompile with gcc-2.96-84 or above to fix binary compatibility problem + with __frame_state_for function (#37933) + +* Fri Apr 27 2001 Jakub Jelinek +- glibc 2.2.3 release + - fix strcoll (#36539) +- add BuildPreReqs (#36378) + +* Wed Apr 25 2001 Jakub Jelinek +- update from CVS + +* Fri Apr 20 2001 Jakub Jelinek +- update from CVS + - fix sparc64, ia64 + - fix some locale syntax errors (#35982) + +* Wed Apr 18 2001 Jakub Jelinek +- update from CVS + +* Wed Apr 11 2001 Jakub Jelinek +- update from CVS + +* Fri Apr 6 2001 Jakub Jelinek +- support even 2.4.0 kernels on ia64, sparc64 and s390x +- include UTF-8 locales +- make gconv-modules %%config(noreplace) + +* Fri Mar 23 2001 Jakub Jelinek +- back out sunrpc changes + +* Wed Mar 21 2001 Jakub Jelinek +- update from CVS + - fix ia64 build + - fix pthread_getattr_np + +* Fri Mar 16 2001 Jakub Jelinek +- update from CVS + - run atexit() registered functions at dlclose time if they are in shared + libraries (#28625) + - add pthread_getattr_np API to make JVM folks happy + +* Wed Mar 14 2001 Jakub Jelinek +- require 2.4.1 instead of 2.4.0 on platforms where it required 2.4 kernel +- fix ldd behaviour on unresolved symbols +- remove nonsensical ldconfig warning, update osversion for the most + recent library with the same soname in the same directory instead (#31703) +- apply selected patches from CVS +- s390x spec file changes from Florian La Roche + +* Wed Mar 7 2001 Jakub Jelinek +- fix gencat (#30894) +- fix ldconfig changes from yesterday, fix LD_ASSUME_KERNEL handling + +* Tue Mar 6 2001 Jakub Jelinek +- update from CVS +- make pthread_attr_setstacksize consistent before and after pthread manager + is started (#28194) +- pass back struct sigcontext from pthread signal wrapper (on ia32 only so + far, #28493) +- on i686 ship both --enable-kernel 2.2.5 and 2.4.0 libc/libm/libpthread, + make ld.so pick the right one + +* Sat Feb 17 2001 Preston Brown +- glib-common doesn't require glibc, until we can figure out how to get out of dependency hell. + +* Sat Feb 17 2001 Jakub Jelinek +- make glibc require particular version of glibc-common + and glibc-common prerequire glibc. + +* Fri Feb 16 2001 Jakub Jelinek +- glibc 2.2.2 release + - fix regex REG_ICASE bug seen in ksymoops + +* Sat Feb 10 2001 Jakub Jelinek +- fix regexec leaking memory (#26864) + +* Fri Feb 9 2001 Jakub Jelinek +- update from CVS + - fix ia64 build with gnupro + - make regex 64bit clean + - fix tgmath make check failures on alpha + +* Tue Feb 6 2001 Jakub Jelinek +- update again for ia64 DF_1_INITFIRST + +* Fri Feb 2 2001 Jakub Jelinek +- update from CVS + - fix getaddrinfo (#25437) + - support DF_1_INITFIRST (#25029) + +* Wed Jan 24 2001 Jakub Jelinek +- build all auxiliary arches with --enablekernel 2.4.0, those wanting + to run 2.2 kernels can downgrade to the base architecture glibc. + +* Sat Jan 20 2001 Jakub Jelinek +- remove %%lang() flags from %%{_prefix}/lib/locale files temporarily + +* Sun Jan 14 2001 Jakub Jelinek +- update to 2.2.1 final + - fix a pthread_kill_other_threads_np breakage (#23966) + - make static binaries using dlopen work on ia64 again +- fix a typo in glibc-common group + +* Wed Jan 10 2001 Bernhard Rosenkraenzer +- devel requires glibc = %%{version} +- noreplace /etc/nscd.conf + +* Wed Jan 10 2001 Jakub Jelinek +- some more security fixes: + - don't look up LD_PRELOAD libs in cache for SUID apps + (because that bypasses SUID bit checking on the library) + - place output files for profiling SUID apps into /var/profile, + use O_NOFOLLOW for them + - add checks for $MEMUSAGE_OUTPUT and $SEGFAULT_OUTPUT_NAME +- hardlink identical locale files together +- add %%lang() tags to locale stuff +- remove ko_KR.utf8 for now, it is provided by locale-utf8 package + +* Mon Jan 8 2001 Jakub Jelinek +- add glibc-common subpackage +- fix alphaev6 memcpy (#22494) +- fix sys/cdefs.h (#22908) +- don't define stdin/stdout/stderr as macros for -traditional (#22913) +- work around a bug in IBM JDK (#22932, #23012) +- fix pmap_unset when network is down (#23176) +- move nscd in rc.d before netfs on shutdown +- fix $RESOLV_HOST_CONF in SUID apps (#23562) + +* Fri Dec 15 2000 Jakub Jelinek +- fix ftw and nftw + +* Wed Dec 13 2000 Jakub Jelinek +- fix fcvt (#22184) +- ldd /lib/ld-linux.so.2 is not crashing any longer again (#22197) +- fix gencat + +* Mon Dec 11 2000 Jakub Jelinek +- fix alpha htonl and alphaev6 stpcpy + +* Sat Dec 9 2000 Jakub Jelinek +- update to CVS to: + - fix getnameinfo (#21934) + - don't stomp on memory in rpath handling (#21544) + - fix setlocale (#21507) +- fix libNoVersion.so.1 loading code (#21579) +- use auxarches define in spec file for auxiliary + architectures (#21219) +- remove /usr/share directory from filelist (#21218) + +* Sun Nov 19 2000 Jakub Jelinek +- update to CVS to fix getaddrinfo + +* Fri Nov 17 2000 Jakub Jelinek +- update to CVS to fix freopen +- remove all alpha workarounds, not needed anymore + +* Wed Nov 15 2000 Jakub Jelinek +- fix dladdr bug on alpha/sparc32/sparc64 +- fix Makefiles so that they run static tests properly + +* Tue Nov 14 2000 Jakub Jelinek +- update to CVS to fix ldconfig + +* Thu Nov 9 2000 Jakub Jelinek +- update to glibc 2.2 release + +* Mon Nov 6 2000 Jakub Jelinek +- update to CVS to: + - export __sysconf@@GLIBC_2.2 (#20417) + +* Fri Nov 3 2000 Jakub Jelinek +- merge to 2.1.97 + +* Mon Oct 30 2000 Jakub Jelinek +- update to CVS, including: + - fix WORD_BIT/LONG_BIT definition in limits.h (#19088) + - fix hesiod (#19375) + - set LC_MESSAGES in zic/zdump for proper error message output (#19495) + - fix LFS fcntl when used with non-LFS aware kernels (#19730) + +* Thu Oct 19 2000 Jakub Jelinek +- fix alpha semctl (#19199) +- update to CVS, including: + - fix glibc headers for Compaq non-gcc compilers + - fix locale alias handling code (#18832) + - fix rexec on little endian machines (#18886) +- started writing changelog again + +* Thu Aug 10 2000 Adrian Havill +- added ja ujis alias for backwards compatibility diff --git a/SOURCES/bench.mk b/SOURCES/bench.mk new file mode 100644 index 0000000..dfe46bd --- /dev/null +++ b/SOURCES/bench.mk @@ -0,0 +1,77 @@ +objpfx = $(prefix)/$(ver)/usr/libexec/glibc-benchtests/ + +bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 ffs ffsll \ + log log2 modf pow rint sin sincos sinh sqrt tan tanh + +bench-pthread := pthread_once + +bench := $(bench-math) $(bench-pthread) + +run-bench := $(prefix)/$(ver)/lib64/ld-linux-x86-64.so.2 --library-path $(prefix)/$(ver)/lib64 $${run} + +# String function benchmarks. +string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \ + mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \ + strcat strchr strchrnul strcmp strcpy strcspn strlen \ + strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \ + strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok +string-bench-all := $(string-bench) + +stdlib-bench := strtod + +benchset := $(string-bench-all) $(stdlib-bench) + +bench-malloc := malloc-thread + +binaries-bench := $(addprefix $(objpfx)bench-,$(bench)) +binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset)) +binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc)) + +DETAILED_OPT := + +ifdef DETAILED + DETAILED_OPT := -d +endif + +bench: bench-set bench-func bench-malloc + +bench-set: $(binaries-benchset) + for run in $^; do \ + outfile=$(prefix)/$$(basename $${run}.$(ver).out); \ + echo "Running $${run}"; \ + $(run-bench) > $${outfile}.tmp; \ + mv $${outfile}{.tmp,}; \ + done + +bench-malloc: $(binaries-bench-malloc) + run=$(objpfx)bench-malloc-thread; \ + outfile=$(prefix)/$$(basename $${run}.$(ver).out); \ + for thr in 1 8 16 32; do \ + echo "Running $${run} $${thr}"; \ + $(run-bench) $${thr} > $${outfile}.tmp; \ + mv $${outfile}{.tmp,}; \ + done + +# Build and execute the benchmark functions. This target generates JSON +# formatted bench.out. Each of the programs produce independent JSON output, +# so one could even execute them individually and process it using any JSON +# capable language or tool. +bench-func: $(binaries-bench) + { echo "{\"timing_type\": \"hp-timing\","; \ + echo " \"functions\": {"; \ + for run in $^; do \ + if ! [ "x$${run}" = "x$<" ]; then \ + echo ","; \ + fi; \ + echo "Running $${run}" >&2; \ + $(run-bench) $(DETAILED_OPT); \ + done; \ + echo; \ + echo " }"; \ + echo "}"; } > $(prefix)/bench.$(ver).out-tmp; \ + if [ -f $(prefix)/bench.$(ver).out ]; then \ + mv -f $(prefix)/bench.$(ver).out{,.old}; \ + fi; \ + mv -f $(prefix)/bench.$(ver).out{-tmp,} +# scripts/validate_benchout.py bench.out \ +# scripts/benchout.schema.json diff --git a/SOURCES/glibc-bench-compare b/SOURCES/glibc-bench-compare new file mode 100755 index 0000000..84e3aba --- /dev/null +++ b/SOURCES/glibc-bench-compare @@ -0,0 +1,153 @@ +#!/usr/bin/bash +# This script can be invoked as follows: +# +# glibc-bench-compare [options] [BUILD] +# +# Options may be one of the following: +# +# -t The BUILD arguments are task ids and not a version-release string +# -a ARCH Do comparison for ARCH architecture +# +# If any of the above options are given, both BUILD arguments must be given. +# Otherwise, if only one BUILD is specified, then it is compared against the +# installed glibc. + +# Silence the pushd/popd messages +pushd() { + command pushd "$@" > /dev/null 2>&1 +} + +popd() { + command popd "$@" > /dev/null 2>&1 +} + +# Clean up any downloaded files before we exit +trap "rm -rf /tmp/glibc-bench-compare.$BASHPID.*" EXIT + +task=0 +arch=$(uname -i) +options=0 +path=0 +installed= + +# Look for any commandline options +while getopts ":tpa:" opt; do + case $opt in + p) + path=1 + ;; + t) + task=1 + options=1 + echo "Not implemented." + exit 1 + ;; + a) + arch=$OPTARG + options=1 + ;; + *) + ;; + esac +done + +# Done, now shift all option arguments out. +shift $((OPTIND-1)) + +if [ $# -gt 2 ] || [ $# -eq 0 ] || [ $# -lt 2 -a $options -eq 1 ]; then + echo "Usage: $0 [OPTIONS] [new]" + echo + echo "OPTIONS:" + echo -e "\t-t\tCompare two brew tasks" + echo -e "\t-a ARCH\tGet rpms for the ARCH architecture" + echo -e "\t-p\tCompare built rpms in two paths." + echo -e "\t\tThis minimally needs glibc, glibc-common and glibc-benchtests" + exit 1 +fi + +if [ -z $2 ]; then + new="$1" + old=$(rpm --queryformat "%{VERSION}-%{RELEASE}\n" -q glibc | head -1) + installed=$old +else + new="$2" + old="$1" +fi + +decompress_rpms() { + # We were given a path to the rpms. Figure out the version-release and + # decompress the rpms. + if [ -n $1 ]; then + vr=$(rpm --queryformat="%{VERSION}-%{RELEASE}" -qp $1/glibc-2*.rpm | head -1) + mkdir $vr && pushd $vr + fi + + for r in $1*.rpm; do + ( rpm2cpio $r | cpio -di ) > /dev/null + done + + if [ -n $1 ]; then + popd + echo $vr + fi +} + +# Get rpms for a build and decompress them +get_build() { + echo "Processing build $1" + mkdir $1 && pushd $1 + brew buildinfo "glibc-$1" | + sed -n -e "s|/mnt/koji\(.\+$arch.\+\)|http://kojipkgs.fedoraproject.org\1|p" | + while read url; do + echo "Downloading $url" + wget -q $url + done + decompress_rpms + + echo "Removing rpms" + rm -f $1/*.rpm + + popd +} + +# Run benchmarks for a build +run_bench() { + if [ -z $1 ]; then + make DETAILED=1 ver=$installed prefix= -f /usr/libexec/glibc-benchtests/bench.mk bench + else + make DETAILED=1 ver=$1 prefix=$PWD -f $1/usr/libexec/glibc-benchtests/bench.mk bench + fi +} + +# Get absolute paths if needed, since we will change into the working directory +# next. +if [ $path -eq 1 ]; then + old_path=$(realpath $old)/ + new_path=$(realpath $new)/ +fi + +tmpdir=$(mktemp -p /tmp -d glibc-bench-compare.$$.XXXX) +pushd $tmpdir + +# Get both builds. +if [ $path -eq 0 ]; then + if [ -z $installed ]; then + get_build $old + fi + get_build $new +else + old=$(decompress_rpms $old_path) + new=$(decompress_rpms $new_path) +fi + +# make bench for each of those. +if [ -z $installed ]; then + run_bench $old +else + run_bench +fi +run_bench $new + +# Now run the comparison script. +$old/usr/libexec/glibc-benchtests/compare_bench.py $old/usr/libexec/glibc-benchtests/benchout.schema.json \ + bench.$old.out bench.$new.out diff --git a/SOURCES/glibc-c-utf8-locale-1.patch b/SOURCES/glibc-c-utf8-locale-1.patch new file mode 100644 index 0000000..3b80064 --- /dev/null +++ b/SOURCES/glibc-c-utf8-locale-1.patch @@ -0,0 +1,980 @@ +commit f5117c6504888fab5423282a4607c552b90fd3f9 +Author: Carlos O'Donell +Date: Thu Jul 29 22:45:39 2021 -0400 + + Add 'codepoint_collation' support for LC_COLLATE. + + Support a new directive 'codepoint_collation' in the LC_COLLATE + section of a locale source file. This new directive causes all + collation rules to be dropped and instead STRCMP (strcmp or + wcscmp) is used for collation of the input character set. This + is required to allow for a C.UTF-8 that contains zero collation + rules (minimal size) and sorts using code point sorting. + + To date the only implementation of a locale with zero collation + rules is the C/POSIX locale. The C/POSIX locale provides + identity tables for _NL_COLLATE_COLLSEQMB and + _NL_COLLATE_COLLSEQWC that map to ASCII even though it has zero + rules. This has lead to existing fnmatch, regexec, and regcomp + implementations that require these tables. It is not correct + to use these tables when nrules == 0, but the conservative fix + is to provide these tables when nrules == 0. This assures that + existing static applications using a new C.UTF-8 locale with + 'codepoint_collation' at least have functional range expressions + with ASCII e.g. [0-9] or [a-z]. Such static applications would + not have the fixes to fnmatch, regexec and regcomp that avoid + the use of the tables when nrules == 0. Future fixes to fnmatch, + regexec, and regcomp would allow range expressions to use the + full set of code points for such ranges. + + Tested on x86_64 and i686 without regression. + + Reviewed-by: Florian Weimer + +diff --git a/locale/C-collate-seq.c b/locale/C-collate-seq.c +new file mode 100644 +index 0000000000000000..4fb82cb8357936b6 +--- /dev/null ++++ b/locale/C-collate-seq.c +@@ -0,0 +1,100 @@ ++/* Copyright (C) 1995-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++static const char collseqmb[] = ++{ ++ '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', ++ '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', ++ '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', ++ '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', ++ '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', ++ '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', ++ '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', ++ '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', ++ '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', ++ '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', ++ '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', ++ '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', ++ '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', ++ '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', ++ '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', ++ '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', ++ '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', ++ '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', ++ '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', ++ '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', ++ '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7', ++ '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf', ++ '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', ++ '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf', ++ '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', ++ '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf', ++ '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7', ++ '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf', ++ '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', ++ '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', ++ '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', ++ '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff' ++}; ++ ++/* This table must be 256 bytes in size. We index bytes into the ++ table to find the collation sequence. */ ++_Static_assert (sizeof (collseqmb) == 256); ++ ++static const uint32_t collseqwc[] = ++{ ++ 8, 1, 8, 0x0, 0xff, ++ /* 1st-level table */ ++ 6 * sizeof (uint32_t), ++ /* 2nd-level table */ ++ 7 * sizeof (uint32_t), ++ /* 3rd-level table */ ++ L'\x00', L'\x01', L'\x02', L'\x03', L'\x04', L'\x05', L'\x06', L'\x07', ++ L'\x08', L'\x09', L'\x0a', L'\x0b', L'\x0c', L'\x0d', L'\x0e', L'\x0f', ++ L'\x10', L'\x11', L'\x12', L'\x13', L'\x14', L'\x15', L'\x16', L'\x17', ++ L'\x18', L'\x19', L'\x1a', L'\x1b', L'\x1c', L'\x1d', L'\x1e', L'\x1f', ++ L'\x20', L'\x21', L'\x22', L'\x23', L'\x24', L'\x25', L'\x26', L'\x27', ++ L'\x28', L'\x29', L'\x2a', L'\x2b', L'\x2c', L'\x2d', L'\x2e', L'\x2f', ++ L'\x30', L'\x31', L'\x32', L'\x33', L'\x34', L'\x35', L'\x36', L'\x37', ++ L'\x38', L'\x39', L'\x3a', L'\x3b', L'\x3c', L'\x3d', L'\x3e', L'\x3f', ++ L'\x40', L'\x41', L'\x42', L'\x43', L'\x44', L'\x45', L'\x46', L'\x47', ++ L'\x48', L'\x49', L'\x4a', L'\x4b', L'\x4c', L'\x4d', L'\x4e', L'\x4f', ++ L'\x50', L'\x51', L'\x52', L'\x53', L'\x54', L'\x55', L'\x56', L'\x57', ++ L'\x58', L'\x59', L'\x5a', L'\x5b', L'\x5c', L'\x5d', L'\x5e', L'\x5f', ++ L'\x60', L'\x61', L'\x62', L'\x63', L'\x64', L'\x65', L'\x66', L'\x67', ++ L'\x68', L'\x69', L'\x6a', L'\x6b', L'\x6c', L'\x6d', L'\x6e', L'\x6f', ++ L'\x70', L'\x71', L'\x72', L'\x73', L'\x74', L'\x75', L'\x76', L'\x77', ++ L'\x78', L'\x79', L'\x7a', L'\x7b', L'\x7c', L'\x7d', L'\x7e', L'\x7f', ++ L'\x80', L'\x81', L'\x82', L'\x83', L'\x84', L'\x85', L'\x86', L'\x87', ++ L'\x88', L'\x89', L'\x8a', L'\x8b', L'\x8c', L'\x8d', L'\x8e', L'\x8f', ++ L'\x90', L'\x91', L'\x92', L'\x93', L'\x94', L'\x95', L'\x96', L'\x97', ++ L'\x98', L'\x99', L'\x9a', L'\x9b', L'\x9c', L'\x9d', L'\x9e', L'\x9f', ++ L'\xa0', L'\xa1', L'\xa2', L'\xa3', L'\xa4', L'\xa5', L'\xa6', L'\xa7', ++ L'\xa8', L'\xa9', L'\xaa', L'\xab', L'\xac', L'\xad', L'\xae', L'\xaf', ++ L'\xb0', L'\xb1', L'\xb2', L'\xb3', L'\xb4', L'\xb5', L'\xb6', L'\xb7', ++ L'\xb8', L'\xb9', L'\xba', L'\xbb', L'\xbc', L'\xbd', L'\xbe', L'\xbf', ++ L'\xc0', L'\xc1', L'\xc2', L'\xc3', L'\xc4', L'\xc5', L'\xc6', L'\xc7', ++ L'\xc8', L'\xc9', L'\xca', L'\xcb', L'\xcc', L'\xcd', L'\xce', L'\xcf', ++ L'\xd0', L'\xd1', L'\xd2', L'\xd3', L'\xd4', L'\xd5', L'\xd6', L'\xd7', ++ L'\xd8', L'\xd9', L'\xda', L'\xdb', L'\xdc', L'\xdd', L'\xde', L'\xdf', ++ L'\xe0', L'\xe1', L'\xe2', L'\xe3', L'\xe4', L'\xe5', L'\xe6', L'\xe7', ++ L'\xe8', L'\xe9', L'\xea', L'\xeb', L'\xec', L'\xed', L'\xee', L'\xef', ++ L'\xf0', L'\xf1', L'\xf2', L'\xf3', L'\xf4', L'\xf5', L'\xf6', L'\xf7', ++ L'\xf8', L'\xf9', L'\xfa', L'\xfb', L'\xfc', L'\xfd', L'\xfe', L'\xff' ++}; +diff --git a/locale/C-collate.c b/locale/C-collate.c +index 76d9373683314943..120ce0a40aeb9a0f 100644 +--- a/locale/C-collate.c ++++ b/locale/C-collate.c +@@ -20,83 +20,7 @@ + #include + #include "localeinfo.h" + +-static const char collseqmb[] = +-{ +- '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', +- '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', +- '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', +- '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', +- '\x20', '\x21', '\x22', '\x23', '\x24', '\x25', '\x26', '\x27', +- '\x28', '\x29', '\x2a', '\x2b', '\x2c', '\x2d', '\x2e', '\x2f', +- '\x30', '\x31', '\x32', '\x33', '\x34', '\x35', '\x36', '\x37', +- '\x38', '\x39', '\x3a', '\x3b', '\x3c', '\x3d', '\x3e', '\x3f', +- '\x40', '\x41', '\x42', '\x43', '\x44', '\x45', '\x46', '\x47', +- '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', +- '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', +- '\x58', '\x59', '\x5a', '\x5b', '\x5c', '\x5d', '\x5e', '\x5f', +- '\x60', '\x61', '\x62', '\x63', '\x64', '\x65', '\x66', '\x67', +- '\x68', '\x69', '\x6a', '\x6b', '\x6c', '\x6d', '\x6e', '\x6f', +- '\x70', '\x71', '\x72', '\x73', '\x74', '\x75', '\x76', '\x77', +- '\x78', '\x79', '\x7a', '\x7b', '\x7c', '\x7d', '\x7e', '\x7f', +- '\x80', '\x81', '\x82', '\x83', '\x84', '\x85', '\x86', '\x87', +- '\x88', '\x89', '\x8a', '\x8b', '\x8c', '\x8d', '\x8e', '\x8f', +- '\x90', '\x91', '\x92', '\x93', '\x94', '\x95', '\x96', '\x97', +- '\x98', '\x99', '\x9a', '\x9b', '\x9c', '\x9d', '\x9e', '\x9f', +- '\xa0', '\xa1', '\xa2', '\xa3', '\xa4', '\xa5', '\xa6', '\xa7', +- '\xa8', '\xa9', '\xaa', '\xab', '\xac', '\xad', '\xae', '\xaf', +- '\xb0', '\xb1', '\xb2', '\xb3', '\xb4', '\xb5', '\xb6', '\xb7', +- '\xb8', '\xb9', '\xba', '\xbb', '\xbc', '\xbd', '\xbe', '\xbf', +- '\xc0', '\xc1', '\xc2', '\xc3', '\xc4', '\xc5', '\xc6', '\xc7', +- '\xc8', '\xc9', '\xca', '\xcb', '\xcc', '\xcd', '\xce', '\xcf', +- '\xd0', '\xd1', '\xd2', '\xd3', '\xd4', '\xd5', '\xd6', '\xd7', +- '\xd8', '\xd9', '\xda', '\xdb', '\xdc', '\xdd', '\xde', '\xdf', +- '\xe0', '\xe1', '\xe2', '\xe3', '\xe4', '\xe5', '\xe6', '\xe7', +- '\xe8', '\xe9', '\xea', '\xeb', '\xec', '\xed', '\xee', '\xef', +- '\xf0', '\xf1', '\xf2', '\xf3', '\xf4', '\xf5', '\xf6', '\xf7', +- '\xf8', '\xf9', '\xfa', '\xfb', '\xfc', '\xfd', '\xfe', '\xff' +-}; +- +-static const uint32_t collseqwc[] = +-{ +- 8, 1, 8, 0x0, 0xff, +- /* 1st-level table */ +- 6 * sizeof (uint32_t), +- /* 2nd-level table */ +- 7 * sizeof (uint32_t), +- /* 3rd-level table */ +- L'\x00', L'\x01', L'\x02', L'\x03', L'\x04', L'\x05', L'\x06', L'\x07', +- L'\x08', L'\x09', L'\x0a', L'\x0b', L'\x0c', L'\x0d', L'\x0e', L'\x0f', +- L'\x10', L'\x11', L'\x12', L'\x13', L'\x14', L'\x15', L'\x16', L'\x17', +- L'\x18', L'\x19', L'\x1a', L'\x1b', L'\x1c', L'\x1d', L'\x1e', L'\x1f', +- L'\x20', L'\x21', L'\x22', L'\x23', L'\x24', L'\x25', L'\x26', L'\x27', +- L'\x28', L'\x29', L'\x2a', L'\x2b', L'\x2c', L'\x2d', L'\x2e', L'\x2f', +- L'\x30', L'\x31', L'\x32', L'\x33', L'\x34', L'\x35', L'\x36', L'\x37', +- L'\x38', L'\x39', L'\x3a', L'\x3b', L'\x3c', L'\x3d', L'\x3e', L'\x3f', +- L'\x40', L'\x41', L'\x42', L'\x43', L'\x44', L'\x45', L'\x46', L'\x47', +- L'\x48', L'\x49', L'\x4a', L'\x4b', L'\x4c', L'\x4d', L'\x4e', L'\x4f', +- L'\x50', L'\x51', L'\x52', L'\x53', L'\x54', L'\x55', L'\x56', L'\x57', +- L'\x58', L'\x59', L'\x5a', L'\x5b', L'\x5c', L'\x5d', L'\x5e', L'\x5f', +- L'\x60', L'\x61', L'\x62', L'\x63', L'\x64', L'\x65', L'\x66', L'\x67', +- L'\x68', L'\x69', L'\x6a', L'\x6b', L'\x6c', L'\x6d', L'\x6e', L'\x6f', +- L'\x70', L'\x71', L'\x72', L'\x73', L'\x74', L'\x75', L'\x76', L'\x77', +- L'\x78', L'\x79', L'\x7a', L'\x7b', L'\x7c', L'\x7d', L'\x7e', L'\x7f', +- L'\x80', L'\x81', L'\x82', L'\x83', L'\x84', L'\x85', L'\x86', L'\x87', +- L'\x88', L'\x89', L'\x8a', L'\x8b', L'\x8c', L'\x8d', L'\x8e', L'\x8f', +- L'\x90', L'\x91', L'\x92', L'\x93', L'\x94', L'\x95', L'\x96', L'\x97', +- L'\x98', L'\x99', L'\x9a', L'\x9b', L'\x9c', L'\x9d', L'\x9e', L'\x9f', +- L'\xa0', L'\xa1', L'\xa2', L'\xa3', L'\xa4', L'\xa5', L'\xa6', L'\xa7', +- L'\xa8', L'\xa9', L'\xaa', L'\xab', L'\xac', L'\xad', L'\xae', L'\xaf', +- L'\xb0', L'\xb1', L'\xb2', L'\xb3', L'\xb4', L'\xb5', L'\xb6', L'\xb7', +- L'\xb8', L'\xb9', L'\xba', L'\xbb', L'\xbc', L'\xbd', L'\xbe', L'\xbf', +- L'\xc0', L'\xc1', L'\xc2', L'\xc3', L'\xc4', L'\xc5', L'\xc6', L'\xc7', +- L'\xc8', L'\xc9', L'\xca', L'\xcb', L'\xcc', L'\xcd', L'\xce', L'\xcf', +- L'\xd0', L'\xd1', L'\xd2', L'\xd3', L'\xd4', L'\xd5', L'\xd6', L'\xd7', +- L'\xd8', L'\xd9', L'\xda', L'\xdb', L'\xdc', L'\xdd', L'\xde', L'\xdf', +- L'\xe0', L'\xe1', L'\xe2', L'\xe3', L'\xe4', L'\xe5', L'\xe6', L'\xe7', +- L'\xe8', L'\xe9', L'\xea', L'\xeb', L'\xec', L'\xed', L'\xee', L'\xef', +- L'\xf0', L'\xf1', L'\xf2', L'\xf3', L'\xf4', L'\xf5', L'\xf6', L'\xf7', +- L'\xf8', L'\xf9', L'\xfa', L'\xfb', L'\xfc', L'\xfd', L'\xfe', L'\xff' +-}; ++#include "C-collate-seq.c" + + const struct __locale_data _nl_C_LC_COLLATE attribute_hidden = + { +diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c +index b6406b775d3a81ad..0f314e40c4305dea 100644 +--- a/locale/programs/ld-collate.c ++++ b/locale/programs/ld-collate.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include "localedef.h" + #include "charmap.h" +@@ -195,6 +196,9 @@ struct name_list + /* The real definition of the struct for the LC_COLLATE locale. */ + struct locale_collate_t + { ++ /* Does the locale use code points to compare the encoding? */ ++ bool codepoint_collation; ++ + int col_weight_max; + int cur_weight_max; + +@@ -1510,6 +1514,7 @@ collate_startup (struct linereader *ldfile, struct localedef_t *locale, + obstack_init (&collate->mempool); + + collate->col_weight_max = -1; ++ collate->codepoint_collation = false; + } + else + /* Reuse the copy_locale's data structures. */ +@@ -1568,6 +1573,10 @@ collate_finish (struct localedef_t *locale, const struct charmap_t *charmap) + return; + } + ++ /* No data required. */ ++ if (collate->codepoint_collation) ++ return; ++ + /* If this assertion is hit change the type in `element_t'. */ + assert (nrules <= sizeof (runp->used_in_level) * 8); + +@@ -2092,6 +2101,10 @@ add_to_tablewc (uint32_t ch, struct element_t *runp) + } + } + ++/* Include the C locale identity tables for _NL_COLLATE_COLLSEQMB and ++ _NL_COLLATE_COLLSEQWC. */ ++#include "C-collate-seq.c" ++ + void + collate_output (struct localedef_t *locale, const struct charmap_t *charmap, + const char *output_path) +@@ -2115,7 +2128,7 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, + add_locale_uint32 (&file, nrules); + + /* If we have no LC_COLLATE data emit only the number of rules as zero. */ +- if (collate == NULL) ++ if (collate == NULL || collate->codepoint_collation) + { + size_t idx; + for (idx = 1; idx < nelems; idx++) +@@ -2123,6 +2136,17 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap, + /* The words have to be handled specially. */ + if (idx == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_HASH_SIZEMB)) + add_locale_uint32 (&file, 0); ++ else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_CODESET) ++ && collate != NULL) ++ /* A valid LC_COLLATE must have a code set name. */ ++ add_locale_string (&file, charmap->code_set_name); ++ else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_COLLSEQMB) ++ && collate != NULL) ++ add_locale_raw_data (&file, collseqmb, sizeof (collseqmb)); ++ else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_COLLSEQWC) ++ && collate != NULL) ++ add_locale_uint32_array (&file, collseqwc, ++ array_length (collseqwc)); + else + add_locale_empty (&file); + } +@@ -2672,6 +2696,10 @@ collate_read (struct linereader *ldfile, struct localedef_t *result, + + switch (nowtok) + { ++ case tok_codepoint_collation: ++ collate->codepoint_collation = true; ++ break; ++ + case tok_copy: + /* Allow copying other locales. */ + now = lr_token (ldfile, charmap, result, NULL, verbose); +@@ -3742,9 +3770,11 @@ error while adding equivalent collating symbol")); + /* Next we assume `LC_COLLATE'. */ + if (!ignore_content) + { +- if (state == 0 && copy_locale == NULL) ++ if (state == 0 ++ && copy_locale == NULL ++ && !collate->codepoint_collation) + /* We must either see a copy statement or have +- ordering values. */ ++ ordering values, or codepoint_collation. */ + lr_error (ldfile, + _("%s: empty category description not allowed"), + "LC_COLLATE"); +diff --git a/locale/programs/locfile-kw.gperf b/locale/programs/locfile-kw.gperf +index bcded15ddb4c44bb..2e59eb9ac014134b 100644 +--- a/locale/programs/locfile-kw.gperf ++++ b/locale/programs/locfile-kw.gperf +@@ -54,6 +54,7 @@ translit_end, tok_translit_end, 0 + translit_ignore, tok_translit_ignore, 0 + default_missing, tok_default_missing, 0 + LC_COLLATE, tok_lc_collate, 0 ++codepoint_collation, tok_codepoint_collation, 0 + coll_weight_max, tok_coll_weight_max, 0 + section-symbol, tok_section_symbol, 0 + collating-element, tok_collating_element, 0 +diff --git a/locale/programs/locfile-kw.h b/locale/programs/locfile-kw.h +index bc1cb8f0845852ad..fe6335692bd422cd 100644 +--- a/locale/programs/locfile-kw.h ++++ b/locale/programs/locfile-kw.h +@@ -54,7 +54,7 @@ + #line 24 "locfile-kw.gperf" + struct keyword_t ; + +-#define TOTAL_KEYWORDS 178 ++#define TOTAL_KEYWORDS 179 + #define MIN_WORD_LENGTH 3 + #define MAX_WORD_LENGTH 22 + #define MIN_HASH_VALUE 3 +@@ -134,92 +134,92 @@ locfile_hash (register const char *str, register size_t len) + #line 31 "locfile-kw.gperf" + {"END", tok_end, 0}, + {""}, {""}, +-#line 70 "locfile-kw.gperf" ++#line 71 "locfile-kw.gperf" + {"IGNORE", tok_ignore, 0}, +-#line 129 "locfile-kw.gperf" ++#line 130 "locfile-kw.gperf" + {"LC_TIME", tok_lc_time, 0}, + #line 30 "locfile-kw.gperf" + {"LC_CTYPE", tok_lc_ctype, 0}, + {""}, +-#line 168 "locfile-kw.gperf" ++#line 169 "locfile-kw.gperf" + {"LC_ADDRESS", tok_lc_address, 0}, +-#line 153 "locfile-kw.gperf" ++#line 154 "locfile-kw.gperf" + {"LC_MESSAGES", tok_lc_messages, 0}, +-#line 161 "locfile-kw.gperf" ++#line 162 "locfile-kw.gperf" + {"LC_NAME", tok_lc_name, 0}, +-#line 158 "locfile-kw.gperf" ++#line 159 "locfile-kw.gperf" + {"LC_PAPER", tok_lc_paper, 0}, +-#line 186 "locfile-kw.gperf" ++#line 187 "locfile-kw.gperf" + {"LC_MEASUREMENT", tok_lc_measurement, 0}, + #line 56 "locfile-kw.gperf" + {"LC_COLLATE", tok_lc_collate, 0}, + {""}, +-#line 188 "locfile-kw.gperf" ++#line 189 "locfile-kw.gperf" + {"LC_IDENTIFICATION", tok_lc_identification, 0}, +-#line 201 "locfile-kw.gperf" ++#line 202 "locfile-kw.gperf" + {"revision", tok_revision, 0}, +-#line 69 "locfile-kw.gperf" ++#line 70 "locfile-kw.gperf" + {"UNDEFINED", tok_undefined, 0}, +-#line 125 "locfile-kw.gperf" ++#line 126 "locfile-kw.gperf" + {"LC_NUMERIC", tok_lc_numeric, 0}, +-#line 82 "locfile-kw.gperf" ++#line 83 "locfile-kw.gperf" + {"LC_MONETARY", tok_lc_monetary, 0}, +-#line 181 "locfile-kw.gperf" ++#line 182 "locfile-kw.gperf" + {"LC_TELEPHONE", tok_lc_telephone, 0}, + {""}, {""}, {""}, +-#line 75 "locfile-kw.gperf" ++#line 76 "locfile-kw.gperf" + {"define", tok_define, 0}, +-#line 154 "locfile-kw.gperf" ++#line 155 "locfile-kw.gperf" + {"yesexpr", tok_yesexpr, 0}, +-#line 141 "locfile-kw.gperf" ++#line 142 "locfile-kw.gperf" + {"era_year", tok_era_year, 0}, + {""}, + #line 54 "locfile-kw.gperf" + {"translit_ignore", tok_translit_ignore, 0}, +-#line 156 "locfile-kw.gperf" ++#line 157 "locfile-kw.gperf" + {"yesstr", tok_yesstr, 0}, + {""}, +-#line 89 "locfile-kw.gperf" ++#line 90 "locfile-kw.gperf" + {"negative_sign", tok_negative_sign, 0}, + {""}, +-#line 137 "locfile-kw.gperf" ++#line 138 "locfile-kw.gperf" + {"t_fmt", tok_t_fmt, 0}, +-#line 159 "locfile-kw.gperf" ++#line 160 "locfile-kw.gperf" + {"height", tok_height, 0}, + {""}, {""}, + #line 52 "locfile-kw.gperf" + {"translit_start", tok_translit_start, 0}, +-#line 136 "locfile-kw.gperf" ++#line 137 "locfile-kw.gperf" + {"d_fmt", tok_d_fmt, 0}, + {""}, + #line 53 "locfile-kw.gperf" + {"translit_end", tok_translit_end, 0}, +-#line 94 "locfile-kw.gperf" ++#line 95 "locfile-kw.gperf" + {"n_cs_precedes", tok_n_cs_precedes, 0}, +-#line 144 "locfile-kw.gperf" ++#line 145 "locfile-kw.gperf" + {"era_t_fmt", tok_era_t_fmt, 0}, + #line 39 "locfile-kw.gperf" + {"space", tok_space, 0}, +-#line 72 "locfile-kw.gperf" +- {"reorder-end", tok_reorder_end, 0}, + #line 73 "locfile-kw.gperf" ++ {"reorder-end", tok_reorder_end, 0}, ++#line 74 "locfile-kw.gperf" + {"reorder-sections-after", tok_reorder_sections_after, 0}, + {""}, +-#line 142 "locfile-kw.gperf" ++#line 143 "locfile-kw.gperf" + {"era_d_fmt", tok_era_d_fmt, 0}, +-#line 189 "locfile-kw.gperf" ++#line 190 "locfile-kw.gperf" + {"title", tok_title, 0}, + {""}, {""}, +-#line 149 "locfile-kw.gperf" ++#line 150 "locfile-kw.gperf" + {"timezone", tok_timezone, 0}, + {""}, +-#line 74 "locfile-kw.gperf" ++#line 75 "locfile-kw.gperf" + {"reorder-sections-end", tok_reorder_sections_end, 0}, + {""}, {""}, {""}, +-#line 95 "locfile-kw.gperf" ++#line 96 "locfile-kw.gperf" + {"n_sep_by_space", tok_n_sep_by_space, 0}, + {""}, {""}, +-#line 100 "locfile-kw.gperf" ++#line 101 "locfile-kw.gperf" + {"int_n_cs_precedes", tok_int_n_cs_precedes, 0}, + {""}, {""}, {""}, + #line 26 "locfile-kw.gperf" +@@ -233,147 +233,147 @@ locfile_hash (register const char *str, register size_t len) + {"print", tok_print, 0}, + #line 44 "locfile-kw.gperf" + {"xdigit", tok_xdigit, 0}, +-#line 110 "locfile-kw.gperf" ++#line 111 "locfile-kw.gperf" + {"duo_n_cs_precedes", tok_duo_n_cs_precedes, 0}, +-#line 127 "locfile-kw.gperf" ++#line 128 "locfile-kw.gperf" + {"thousands_sep", tok_thousands_sep, 0}, +-#line 197 "locfile-kw.gperf" ++#line 198 "locfile-kw.gperf" + {"territory", tok_territory, 0}, + #line 36 "locfile-kw.gperf" + {"digit", tok_digit, 0}, + {""}, {""}, +-#line 92 "locfile-kw.gperf" ++#line 93 "locfile-kw.gperf" + {"p_cs_precedes", tok_p_cs_precedes, 0}, + {""}, {""}, +-#line 62 "locfile-kw.gperf" ++#line 63 "locfile-kw.gperf" + {"script", tok_script, 0}, + #line 29 "locfile-kw.gperf" + {"include", tok_include, 0}, + {""}, +-#line 78 "locfile-kw.gperf" ++#line 79 "locfile-kw.gperf" + {"else", tok_else, 0}, +-#line 184 "locfile-kw.gperf" ++#line 185 "locfile-kw.gperf" + {"int_select", tok_int_select, 0}, + {""}, {""}, {""}, +-#line 132 "locfile-kw.gperf" ++#line 133 "locfile-kw.gperf" + {"week", tok_week, 0}, + #line 33 "locfile-kw.gperf" + {"upper", tok_upper, 0}, + {""}, {""}, +-#line 194 "locfile-kw.gperf" ++#line 195 "locfile-kw.gperf" + {"tel", tok_tel, 0}, +-#line 93 "locfile-kw.gperf" ++#line 94 "locfile-kw.gperf" + {"p_sep_by_space", tok_p_sep_by_space, 0}, +-#line 160 "locfile-kw.gperf" ++#line 161 "locfile-kw.gperf" + {"width", tok_width, 0}, + {""}, +-#line 98 "locfile-kw.gperf" ++#line 99 "locfile-kw.gperf" + {"int_p_cs_precedes", tok_int_p_cs_precedes, 0}, + {""}, {""}, + #line 41 "locfile-kw.gperf" + {"punct", tok_punct, 0}, + {""}, {""}, +-#line 101 "locfile-kw.gperf" ++#line 102 "locfile-kw.gperf" + {"int_n_sep_by_space", tok_int_n_sep_by_space, 0}, + {""}, {""}, {""}, +-#line 108 "locfile-kw.gperf" ++#line 109 "locfile-kw.gperf" + {"duo_p_cs_precedes", tok_duo_p_cs_precedes, 0}, + #line 48 "locfile-kw.gperf" + {"charconv", tok_charconv, 0}, + {""}, + #line 47 "locfile-kw.gperf" + {"class", tok_class, 0}, +-#line 114 "locfile-kw.gperf" +- {"duo_int_n_cs_precedes", tok_duo_int_n_cs_precedes, 0}, + #line 115 "locfile-kw.gperf" ++ {"duo_int_n_cs_precedes", tok_duo_int_n_cs_precedes, 0}, ++#line 116 "locfile-kw.gperf" + {"duo_int_n_sep_by_space", tok_duo_int_n_sep_by_space, 0}, +-#line 111 "locfile-kw.gperf" ++#line 112 "locfile-kw.gperf" + {"duo_n_sep_by_space", tok_duo_n_sep_by_space, 0}, +-#line 119 "locfile-kw.gperf" ++#line 120 "locfile-kw.gperf" + {"duo_int_n_sign_posn", tok_duo_int_n_sign_posn, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, +-#line 58 "locfile-kw.gperf" ++#line 59 "locfile-kw.gperf" + {"section-symbol", tok_section_symbol, 0}, +-#line 185 "locfile-kw.gperf" ++#line 186 "locfile-kw.gperf" + {"int_prefix", tok_int_prefix, 0}, + {""}, {""}, {""}, {""}, + #line 42 "locfile-kw.gperf" + {"graph", tok_graph, 0}, + {""}, {""}, +-#line 99 "locfile-kw.gperf" ++#line 100 "locfile-kw.gperf" + {"int_p_sep_by_space", tok_int_p_sep_by_space, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 112 "locfile-kw.gperf" +- {"duo_int_p_cs_precedes", tok_duo_int_p_cs_precedes, 0}, + #line 113 "locfile-kw.gperf" ++ {"duo_int_p_cs_precedes", tok_duo_int_p_cs_precedes, 0}, ++#line 114 "locfile-kw.gperf" + {"duo_int_p_sep_by_space", tok_duo_int_p_sep_by_space, 0}, +-#line 109 "locfile-kw.gperf" ++#line 110 "locfile-kw.gperf" + {"duo_p_sep_by_space", tok_duo_p_sep_by_space, 0}, +-#line 118 "locfile-kw.gperf" ++#line 119 "locfile-kw.gperf" + {"duo_int_p_sign_posn", tok_duo_int_p_sign_posn, 0}, +-#line 157 "locfile-kw.gperf" ++#line 158 "locfile-kw.gperf" + {"nostr", tok_nostr, 0}, + {""}, {""}, +-#line 140 "locfile-kw.gperf" ++#line 141 "locfile-kw.gperf" + {"era", tok_era, 0}, + {""}, +-#line 84 "locfile-kw.gperf" ++#line 85 "locfile-kw.gperf" + {"currency_symbol", tok_currency_symbol, 0}, + {""}, +-#line 167 "locfile-kw.gperf" ++#line 168 "locfile-kw.gperf" + {"name_ms", tok_name_ms, 0}, +-#line 165 "locfile-kw.gperf" +- {"name_mrs", tok_name_mrs, 0}, + #line 166 "locfile-kw.gperf" ++ {"name_mrs", tok_name_mrs, 0}, ++#line 167 "locfile-kw.gperf" + {"name_miss", tok_name_miss, 0}, +-#line 83 "locfile-kw.gperf" ++#line 84 "locfile-kw.gperf" + {"int_curr_symbol", tok_int_curr_symbol, 0}, +-#line 190 "locfile-kw.gperf" ++#line 191 "locfile-kw.gperf" + {"source", tok_source, 0}, +-#line 164 "locfile-kw.gperf" ++#line 165 "locfile-kw.gperf" + {"name_mr", tok_name_mr, 0}, +-#line 163 "locfile-kw.gperf" ++#line 164 "locfile-kw.gperf" + {"name_gen", tok_name_gen, 0}, +-#line 202 "locfile-kw.gperf" ++#line 203 "locfile-kw.gperf" + {"date", tok_date, 0}, + {""}, {""}, +-#line 191 "locfile-kw.gperf" ++#line 192 "locfile-kw.gperf" + {"address", tok_address, 0}, +-#line 162 "locfile-kw.gperf" ++#line 163 "locfile-kw.gperf" + {"name_fmt", tok_name_fmt, 0}, + #line 32 "locfile-kw.gperf" + {"copy", tok_copy, 0}, +-#line 103 "locfile-kw.gperf" ++#line 104 "locfile-kw.gperf" + {"int_n_sign_posn", tok_int_n_sign_posn, 0}, + {""}, {""}, +-#line 131 "locfile-kw.gperf" ++#line 132 "locfile-kw.gperf" + {"day", tok_day, 0}, +-#line 105 "locfile-kw.gperf" ++#line 106 "locfile-kw.gperf" + {"duo_currency_symbol", tok_duo_currency_symbol, 0}, + {""}, {""}, {""}, +-#line 150 "locfile-kw.gperf" ++#line 151 "locfile-kw.gperf" + {"date_fmt", tok_date_fmt, 0}, +-#line 64 "locfile-kw.gperf" ++#line 65 "locfile-kw.gperf" + {"order_end", tok_order_end, 0}, +-#line 117 "locfile-kw.gperf" ++#line 118 "locfile-kw.gperf" + {"duo_n_sign_posn", tok_duo_n_sign_posn, 0}, + {""}, +-#line 170 "locfile-kw.gperf" ++#line 171 "locfile-kw.gperf" + {"country_name", tok_country_name, 0}, +-#line 71 "locfile-kw.gperf" ++#line 72 "locfile-kw.gperf" + {"reorder-after", tok_reorder_after, 0}, + {""}, {""}, +-#line 155 "locfile-kw.gperf" ++#line 156 "locfile-kw.gperf" + {"noexpr", tok_noexpr, 0}, + #line 50 "locfile-kw.gperf" + {"tolower", tok_tolower, 0}, +-#line 198 "locfile-kw.gperf" ++#line 199 "locfile-kw.gperf" + {"audience", tok_audience, 0}, + {""}, {""}, {""}, + #line 49 "locfile-kw.gperf" + {"toupper", tok_toupper, 0}, +-#line 68 "locfile-kw.gperf" ++#line 69 "locfile-kw.gperf" + {"position", tok_position, 0}, + {""}, + #line 40 "locfile-kw.gperf" +@@ -381,196 +381,197 @@ locfile_hash (register const char *str, register size_t len) + {""}, + #line 27 "locfile-kw.gperf" + {"comment_char", tok_comment_char, 0}, +-#line 88 "locfile-kw.gperf" ++#line 89 "locfile-kw.gperf" + {"positive_sign", tok_positive_sign, 0}, + {""}, {""}, {""}, {""}, +-#line 61 "locfile-kw.gperf" ++#line 62 "locfile-kw.gperf" + {"symbol-equivalence", tok_symbol_equivalence, 0}, + {""}, +-#line 102 "locfile-kw.gperf" ++#line 103 "locfile-kw.gperf" + {"int_p_sign_posn", tok_int_p_sign_posn, 0}, +-#line 175 "locfile-kw.gperf" ++#line 176 "locfile-kw.gperf" + {"country_car", tok_country_car, 0}, + {""}, {""}, +-#line 104 "locfile-kw.gperf" ++#line 105 "locfile-kw.gperf" + {"duo_int_curr_symbol", tok_duo_int_curr_symbol, 0}, + {""}, {""}, +-#line 135 "locfile-kw.gperf" ++#line 136 "locfile-kw.gperf" + {"d_t_fmt", tok_d_t_fmt, 0}, + {""}, {""}, +-#line 116 "locfile-kw.gperf" ++#line 117 "locfile-kw.gperf" + {"duo_p_sign_posn", tok_duo_p_sign_posn, 0}, +-#line 187 "locfile-kw.gperf" ++#line 188 "locfile-kw.gperf" + {"measurement", tok_measurement, 0}, +-#line 176 "locfile-kw.gperf" ++#line 177 "locfile-kw.gperf" + {"country_isbn", tok_country_isbn, 0}, + #line 37 "locfile-kw.gperf" + {"outdigit", tok_outdigit, 0}, + {""}, {""}, +-#line 143 "locfile-kw.gperf" ++#line 144 "locfile-kw.gperf" + {"era_d_t_fmt", tok_era_d_t_fmt, 0}, + {""}, {""}, {""}, + #line 34 "locfile-kw.gperf" + {"lower", tok_lower, 0}, +-#line 183 "locfile-kw.gperf" ++#line 184 "locfile-kw.gperf" + {"tel_dom_fmt", tok_tel_dom_fmt, 0}, +-#line 171 "locfile-kw.gperf" ++#line 172 "locfile-kw.gperf" + {"country_post", tok_country_post, 0}, +-#line 148 "locfile-kw.gperf" ++#line 149 "locfile-kw.gperf" + {"cal_direction", tok_cal_direction, 0}, +- {""}, +-#line 139 "locfile-kw.gperf" ++#line 57 "locfile-kw.gperf" ++ {"codepoint_collation", tok_codepoint_collation, 0}, ++#line 140 "locfile-kw.gperf" + {"t_fmt_ampm", tok_t_fmt_ampm, 0}, +-#line 91 "locfile-kw.gperf" ++#line 92 "locfile-kw.gperf" + {"frac_digits", tok_frac_digits, 0}, + {""}, {""}, +-#line 177 "locfile-kw.gperf" ++#line 178 "locfile-kw.gperf" + {"lang_name", tok_lang_name, 0}, +-#line 90 "locfile-kw.gperf" ++#line 91 "locfile-kw.gperf" + {"int_frac_digits", tok_int_frac_digits, 0}, + {""}, +-#line 121 "locfile-kw.gperf" ++#line 122 "locfile-kw.gperf" + {"uno_valid_to", tok_uno_valid_to, 0}, +-#line 126 "locfile-kw.gperf" ++#line 127 "locfile-kw.gperf" + {"decimal_point", tok_decimal_point, 0}, + {""}, +-#line 133 "locfile-kw.gperf" ++#line 134 "locfile-kw.gperf" + {"abmon", tok_abmon, 0}, + {""}, {""}, {""}, {""}, +-#line 107 "locfile-kw.gperf" ++#line 108 "locfile-kw.gperf" + {"duo_frac_digits", tok_duo_frac_digits, 0}, +-#line 182 "locfile-kw.gperf" ++#line 183 "locfile-kw.gperf" + {"tel_int_fmt", tok_tel_int_fmt, 0}, +-#line 123 "locfile-kw.gperf" ++#line 124 "locfile-kw.gperf" + {"duo_valid_to", tok_duo_valid_to, 0}, +-#line 146 "locfile-kw.gperf" ++#line 147 "locfile-kw.gperf" + {"first_weekday", tok_first_weekday, 0}, + {""}, +-#line 130 "locfile-kw.gperf" ++#line 131 "locfile-kw.gperf" + {"abday", tok_abday, 0}, + {""}, +-#line 200 "locfile-kw.gperf" ++#line 201 "locfile-kw.gperf" + {"abbreviation", tok_abbreviation, 0}, +-#line 147 "locfile-kw.gperf" ++#line 148 "locfile-kw.gperf" + {"first_workday", tok_first_workday, 0}, + {""}, {""}, +-#line 97 "locfile-kw.gperf" ++#line 98 "locfile-kw.gperf" + {"n_sign_posn", tok_n_sign_posn, 0}, + {""}, {""}, {""}, +-#line 145 "locfile-kw.gperf" ++#line 146 "locfile-kw.gperf" + {"alt_digits", tok_alt_digits, 0}, + {""}, {""}, +-#line 128 "locfile-kw.gperf" ++#line 129 "locfile-kw.gperf" + {"grouping", tok_grouping, 0}, + {""}, + #line 45 "locfile-kw.gperf" + {"blank", tok_blank, 0}, + {""}, {""}, +-#line 196 "locfile-kw.gperf" ++#line 197 "locfile-kw.gperf" + {"language", tok_language, 0}, +-#line 120 "locfile-kw.gperf" ++#line 121 "locfile-kw.gperf" + {"uno_valid_from", tok_uno_valid_from, 0}, + {""}, +-#line 199 "locfile-kw.gperf" ++#line 200 "locfile-kw.gperf" + {"application", tok_application, 0}, + {""}, +-#line 80 "locfile-kw.gperf" ++#line 81 "locfile-kw.gperf" + {"elifndef", tok_elifndef, 0}, + {""}, {""}, {""}, {""}, {""}, +-#line 122 "locfile-kw.gperf" ++#line 123 "locfile-kw.gperf" + {"duo_valid_from", tok_duo_valid_from, 0}, +-#line 57 "locfile-kw.gperf" ++#line 58 "locfile-kw.gperf" + {"coll_weight_max", tok_coll_weight_max, 0}, + {""}, +-#line 79 "locfile-kw.gperf" ++#line 80 "locfile-kw.gperf" + {"elifdef", tok_elifdef, 0}, +-#line 67 "locfile-kw.gperf" ++#line 68 "locfile-kw.gperf" + {"backward", tok_backward, 0}, +-#line 106 "locfile-kw.gperf" ++#line 107 "locfile-kw.gperf" + {"duo_int_frac_digits", tok_duo_int_frac_digits, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, +-#line 96 "locfile-kw.gperf" ++#line 97 "locfile-kw.gperf" + {"p_sign_posn", tok_p_sign_posn, 0}, + {""}, +-#line 203 "locfile-kw.gperf" ++#line 204 "locfile-kw.gperf" + {"category", tok_category, 0}, + {""}, {""}, {""}, {""}, +-#line 134 "locfile-kw.gperf" ++#line 135 "locfile-kw.gperf" + {"mon", tok_mon, 0}, + {""}, +-#line 124 "locfile-kw.gperf" ++#line 125 "locfile-kw.gperf" + {"conversion_rate", tok_conversion_rate, 0}, + {""}, {""}, {""}, {""}, {""}, +-#line 63 "locfile-kw.gperf" ++#line 64 "locfile-kw.gperf" + {"order_start", tok_order_start, 0}, + {""}, {""}, {""}, {""}, {""}, +-#line 178 "locfile-kw.gperf" ++#line 179 "locfile-kw.gperf" + {"lang_ab", tok_lang_ab, 0}, +-#line 180 "locfile-kw.gperf" ++#line 181 "locfile-kw.gperf" + {"lang_lib", tok_lang_lib, 0}, + {""}, {""}, {""}, +-#line 192 "locfile-kw.gperf" ++#line 193 "locfile-kw.gperf" + {"contact", tok_contact, 0}, + {""}, {""}, {""}, +-#line 173 "locfile-kw.gperf" ++#line 174 "locfile-kw.gperf" + {"country_ab3", tok_country_ab3, 0}, + {""}, {""}, {""}, +-#line 193 "locfile-kw.gperf" ++#line 194 "locfile-kw.gperf" + {"email", tok_email, 0}, +-#line 172 "locfile-kw.gperf" ++#line 173 "locfile-kw.gperf" + {"country_ab2", tok_country_ab2, 0}, + {""}, {""}, {""}, + #line 55 "locfile-kw.gperf" + {"default_missing", tok_default_missing, 0}, + {""}, {""}, +-#line 195 "locfile-kw.gperf" ++#line 196 "locfile-kw.gperf" + {"fax", tok_fax, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 174 "locfile-kw.gperf" ++#line 175 "locfile-kw.gperf" + {"country_num", tok_country_num, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, + #line 51 "locfile-kw.gperf" + {"map", tok_map, 0}, +-#line 65 "locfile-kw.gperf" ++#line 66 "locfile-kw.gperf" + {"from", tok_from, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 86 "locfile-kw.gperf" ++#line 87 "locfile-kw.gperf" + {"mon_thousands_sep", tok_mon_thousands_sep, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, +-#line 81 "locfile-kw.gperf" ++#line 82 "locfile-kw.gperf" + {"endif", tok_endif, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 151 "locfile-kw.gperf" ++#line 152 "locfile-kw.gperf" + {"alt_mon", tok_alt_mon, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 76 "locfile-kw.gperf" ++#line 77 "locfile-kw.gperf" + {"undef", tok_undef, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 59 "locfile-kw.gperf" ++#line 60 "locfile-kw.gperf" + {"collating-element", tok_collating_element, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 152 "locfile-kw.gperf" ++#line 153 "locfile-kw.gperf" + {"ab_alt_mon", tok_ab_alt_mon, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 66 "locfile-kw.gperf" ++#line 67 "locfile-kw.gperf" + {"forward", tok_forward, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, +-#line 85 "locfile-kw.gperf" ++#line 86 "locfile-kw.gperf" + {"mon_decimal_point", tok_mon_decimal_point, 0}, + {""}, {""}, +-#line 169 "locfile-kw.gperf" ++#line 170 "locfile-kw.gperf" + {"postal_fmt", tok_postal_fmt, 0}, + {""}, {""}, {""}, {""}, {""}, +-#line 60 "locfile-kw.gperf" ++#line 61 "locfile-kw.gperf" + {"collating-symbol", tok_collating_symbol, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +@@ -583,15 +584,15 @@ locfile_hash (register const char *str, register size_t len) + #line 38 "locfile-kw.gperf" + {"alnum", tok_alnum, 0}, + {""}, +-#line 87 "locfile-kw.gperf" ++#line 88 "locfile-kw.gperf" + {"mon_grouping", tok_mon_grouping, 0}, + {""}, +-#line 179 "locfile-kw.gperf" ++#line 180 "locfile-kw.gperf" + {"lang_term", tok_lang_term, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, +-#line 77 "locfile-kw.gperf" ++#line 78 "locfile-kw.gperf" + {"ifdef", tok_ifdef, 0}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, +@@ -599,7 +600,7 @@ locfile_hash (register const char *str, register size_t len) + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, + {""}, {""}, {""}, {""}, +-#line 138 "locfile-kw.gperf" ++#line 139 "locfile-kw.gperf" + {"am_pm", tok_am_pm, 0} + }; + +diff --git a/locale/programs/locfile-token.h b/locale/programs/locfile-token.h +index 414ad3076223e971..f57d594e8d25c06f 100644 +--- a/locale/programs/locfile-token.h ++++ b/locale/programs/locfile-token.h +@@ -91,6 +91,7 @@ enum token_t + tok_translit_ignore, + tok_default_missing, + tok_lc_collate, ++ tok_codepoint_collation, + tok_coll_weight_max, + tok_section_symbol, + tok_collating_element, diff --git a/SOURCES/glibc-c-utf8-locale-2.patch b/SOURCES/glibc-c-utf8-locale-2.patch new file mode 100644 index 0000000..7064b8e --- /dev/null +++ b/SOURCES/glibc-c-utf8-locale-2.patch @@ -0,0 +1,1437 @@ +commit 466f2be6c08070e9113ae2fdc7acd5d8828cba50 +Author: Carlos O'Donell +Date: Wed Sep 1 15:19:19 2021 -0400 + + Add generic C.UTF-8 locale (Bug 17318) + + We add a new C.UTF-8 locale. This locale is not builtin to glibc, but + is provided as a distinct locale. The locale provides full support for + UTF-8 and this includes full code point sorting via STRCMP-based + collation (strcmp or wcscmp). + + The collation uses a new keyword 'codepoint_collation' which drops all + collation rules and generates an empty zero rules collation to enable + STRCMP usage in collation. This ensures that we get full code point + sorting for C.UTF-8 with a minimal 1406 bytes of overhead (LC_COLLATE + structure information and ASCII collating tables). + + The new locale is added to SUPPORTED. Minimal test data for specific + code points (minus those not supported by collate-test) is provided in + C.UTF-8.in, and this verifies code point sorting is working reasonably + across the range. The locale was tested manually with the full set of + code points without failure. + + The locale is harmonized with locales already shipping in various + downstream distributions. A new tst-iconv9 test is added which verifies + the C.UTF-8 locale is generally usable. + + Testing for fnmatch, regexec, and recomp is provided by extending + bug-regex1, bugregex19, bug-regex4, bug-regex6, transbug, tst-fnmatch, + tst-regcomp-truncated, and tst-regex to use C.UTF-8. + + Tested on x86_64 or i686 without regression. + + Reviewed-by: Florian Weimer + +diff --git a/iconv/Makefile b/iconv/Makefile +index 07d77c9ecaafba1f..9993f2d3f3cd7498 100644 +--- a/iconv/Makefile ++++ b/iconv/Makefile +@@ -43,8 +43,19 @@ CFLAGS-charmap.c += -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ + CFLAGS-linereader.c += -DNO_TRANSLITERATION + CFLAGS-simple-hash.c += -I../locale + +-tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5 tst-iconv6 \ +- tst-iconv7 tst-iconv8 tst-iconv-mt tst-iconv-opt ++tests = \ ++ tst-iconv1 \ ++ tst-iconv2 \ ++ tst-iconv3 \ ++ tst-iconv4 \ ++ tst-iconv5 \ ++ tst-iconv6 \ ++ tst-iconv7 \ ++ tst-iconv8 \ ++ tst-iconv9 \ ++ tst-iconv-mt \ ++ tst-iconv-opt \ ++ # tests + + others = iconv_prog iconvconfig + install-others-programs = $(inst_bindir)/iconv +@@ -83,10 +94,15 @@ endif + include ../Rules + + ifeq ($(run-built-tests),yes) +-LOCALES := en_US.UTF-8 ++# We have to generate locales (list sorted alphabetically) ++LOCALES := \ ++ C.UTF-8 \ ++ en_US.UTF-8 \ ++ # LOCALES + include ../gen-locales.mk + + $(objpfx)tst-iconv-opt.out: $(gen-locales) ++$(objpfx)tst-iconv9.out: $(gen-locales) + endif + + $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force) +diff --git a/iconv/tst-iconv9.c b/iconv/tst-iconv9.c +new file mode 100644 +index 0000000000000000..c46b1833d87b8e55 +--- /dev/null ++++ b/iconv/tst-iconv9.c +@@ -0,0 +1,87 @@ ++/* Verify that using C.UTF-8 works. ++ ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* This test does two things: ++ (1) Verify that we have likely included translit_combining in C.UTF-8. ++ (2) Verify default_missing is '?' as expected. */ ++ ++/* ISO-8859-1 encoding of "für". */ ++char iso88591_in[] = { 0x66, 0xfc, 0x72, 0x0 }; ++/* ASCII transliteration is "fur" with C.UTF-8 translit_combining. */ ++char ascii_exp[] = { 0x66, 0x75, 0x72, 0x0 }; ++ ++/* First 3-byte UTF-8 code point. */ ++char utf8_in[] = { 0xe0, 0xa0, 0x80, 0x0 }; ++/* There is no ASCII transliteration for SAMARITAN LETTER ALAF ++ so we get default_missing used which is '?'. */ ++char default_missing_exp[] = { 0x3f, 0x0 }; ++ ++static int ++do_test (void) ++{ ++ char ascii_out[5]; ++ iconv_t cd; ++ char *inbuf; ++ char *outbuf; ++ size_t inbytes; ++ size_t outbytes; ++ size_t n; ++ ++ /* The C.UTF-8 locale should include translit_combining, which provides ++ the transliteration for "LATIN SMALL LETTER U WITH DIAERESIS" which ++ is not provided by locale/C-translit.h.in. */ ++ xsetlocale (LC_ALL, "C.UTF-8"); ++ ++ /* From ISO-8859-1 to ASCII. */ ++ cd = iconv_open ("ASCII//TRANSLIT,IGNORE", "ISO-8859-1"); ++ TEST_VERIFY (cd != (iconv_t) -1); ++ inbuf = iso88591_in; ++ inbytes = 3; ++ outbuf = ascii_out; ++ outbytes = 3; ++ n = iconv (cd, &inbuf, &inbytes, &outbuf, &outbytes); ++ TEST_VERIFY (n != -1); ++ *outbuf = '\0'; ++ TEST_COMPARE_BLOB (ascii_out, 3, ascii_exp, 3); ++ TEST_VERIFY (iconv_close (cd) == 0); ++ ++ /* From UTF-8 to ASCII. */ ++ cd = iconv_open ("ASCII//TRANSLIT,IGNORE", "UTF-8"); ++ TEST_VERIFY (cd != (iconv_t) -1); ++ inbuf = utf8_in; ++ inbytes = 3; ++ outbuf = ascii_out; ++ outbytes = 3; ++ n = iconv (cd, &inbuf, &inbytes, &outbuf, &outbytes); ++ TEST_VERIFY (n != -1); ++ *outbuf = '\0'; ++ TEST_COMPARE_BLOB (ascii_out, 1, default_missing_exp, 1); ++ TEST_VERIFY (iconv_close (cd) == 0); ++ ++ return 0; ++} ++ ++#include +diff --git a/localedata/C.UTF-8.in b/localedata/C.UTF-8.in +new file mode 100644 +index 0000000000000000..c31dcc2aa045ee61 +--- /dev/null ++++ b/localedata/C.UTF-8.in +@@ -0,0 +1,157 @@ ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++ ; ++! ; ++" ; ++# ; ++$ ; ++% ; ++& ; ++' ; ++) ; ++* ; +++ ; ++, ; ++- ; ++. ; ++/ ; ++0 ; ++1 ; ++2 ; ++3 ; ++4 ; ++5 ; ++6 ; ++7 ; ++8 ; ++9 ; ++< ; ++= ; ++> ; ++? ; ++@ ; ++A ; ++B ; ++C ; ++D ; ++E ; ++F ; ++G ; ++H ; ++I ; ++J ; ++K ; ++L ; ++M ; ++N ; ++O ; ++P ; ++Q ; ++R ; ++S ; ++T ; ++U ; ++V ; ++W ; ++X ; ++Y ; ++Z ; ++[ ; ++\ ; ++] ; ++^ ; ++_ ; ++` ; ++a ; ++b ; ++c ; ++d ; ++e ; ++f ; ++g ; ++h ; ++i ; ++j ; ++k ; ++l ; ++m ; ++n ; ++o ; ++p ; ++q ; ++r ; ++s ; ++t ; ++u ; ++v ; ++w ; ++x ; ++y ; ++z ; ++{ ; ++| ; ++} ; ++~ ; ++ ; ++€ ; ++ÿ ; ++Ä€ ; ++à¿¿ ; ++က ; ++� ; ++ï¿¿ ; ++ð€€ ; ++🿿 ; ++ð €€ ; ++𯿿 ; ++ð°€€ ; ++ð¿¿¾ ; ++ñ€€€ ; ++ñ¿¿ ; ++ñ€€ ; ++ñŸ¿¿ ; ++ñ €€ ; ++ñ¯¿¿ ; ++ñ°€€ ; ++ñ¿¿¿ ; ++ò€€€ ; ++ò¿¿ ; ++ò€€ ; ++òŸ¿¿ ; ++ò €€ ; ++ò¯¿¿ ; ++ò°€€ ; ++ò¿¿¿ ; ++ó€€ ; ++ó¿Œ ; ++ó€Ž ; ++óŸ¿¿ ; ++ó € ; ++󯿿 ; ++ó°€ ; ++ó¿¿¿ ; ++ô€€ ; ++ô¿¿ ; +diff --git a/localedata/Makefile b/localedata/Makefile +index 0341528b0407ae3b..c9dd5a954e8194cc 100644 +--- a/localedata/Makefile ++++ b/localedata/Makefile +@@ -47,6 +47,7 @@ test-input := \ + bg_BG.UTF-8 \ + br_FR.UTF-8 \ + bs_BA.UTF-8 \ ++ C.UTF-8 \ + ckb_IQ.UTF-8 \ + cmn_TW.UTF-8 \ + crh_UA.UTF-8 \ +@@ -206,6 +207,7 @@ LOCALES := \ + bg_BG.UTF-8 \ + br_FR.UTF-8 \ + bs_BA.UTF-8 \ ++ C.UTF-8 \ + ckb_IQ.UTF-8 \ + cmn_TW.UTF-8 \ + crh_UA.UTF-8 \ +diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED +index 34f7a7c3fe2b6526..546ce6cea16a8fdb 100644 +--- a/localedata/SUPPORTED ++++ b/localedata/SUPPORTED +@@ -79,6 +79,7 @@ brx_IN/UTF-8 \ + bs_BA.UTF-8/UTF-8 \ + bs_BA/ISO-8859-2 \ + byn_ER/UTF-8 \ ++C.UTF-8/UTF-8 \ + ca_AD.UTF-8/UTF-8 \ + ca_AD/ISO-8859-15 \ + ca_ES.UTF-8/UTF-8 \ +diff --git a/localedata/locales/C b/localedata/locales/C +new file mode 100644 +index 0000000000000000..ca801c79cf7e953e +--- /dev/null ++++ b/localedata/locales/C +@@ -0,0 +1,194 @@ ++escape_char / ++comment_char % ++% Locale for C locale in UTF-8 ++ ++LC_IDENTIFICATION ++title "C locale" ++source "" ++address "" ++contact "" ++email "bug-glibc-locales@gnu.org" ++tel "" ++fax "" ++language "" ++territory "" ++revision "2.0" ++date "2020-06-28" ++category "i18n:2012";LC_IDENTIFICATION ++category "i18n:2012";LC_CTYPE ++category "i18n:2012";LC_COLLATE ++category "i18n:2012";LC_TIME ++category "i18n:2012";LC_NUMERIC ++category "i18n:2012";LC_MONETARY ++category "i18n:2012";LC_MESSAGES ++category "i18n:2012";LC_PAPER ++category "i18n:2012";LC_NAME ++category "i18n:2012";LC_ADDRESS ++category "i18n:2012";LC_TELEPHONE ++category "i18n:2012";LC_MEASUREMENT ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++% Include only the i18n character type classes without any of the ++% transliteration that i18n uses by default. ++copy "i18n_ctype" ++ ++% Include the neutral transliterations. The builtin C and ++% POSIX locales have +1600 transliterations that are built into ++% the locales, and these are a superset of those. ++translit_start ++include "translit_neutral";"" ++% We must use '?' for default_missing because the transliteration ++% framework includes it directly into the output and so it must ++% be compatible with ASCII if that is the target character set. ++default_missing ++translit_end ++ ++% Include the transliterations that can convert combined characters. ++% These are generally expected by users. ++translit_start ++include "translit_combining";"" ++translit_end ++ ++END LC_CTYPE ++ ++LC_COLLATE ++% The keyword 'codepoint_collation' in any part of any LC_COLLATE ++% immediately discards all collation information and causes the ++% locale to use strcmp/wcscmp for collation comparison. This is ++% exactly what is needed for C (ASCII) or C.UTF-8. ++codepoint_collation ++END LC_COLLATE ++ ++LC_MONETARY ++ ++% This is the 14652 i18n fdcc-set definition for the LC_MONETARY ++% category (except for the int_curr_symbol and currency_symbol, they are ++% empty in the 14652 i18n fdcc-set definition and also empty in ++% glibc/locale/C-monetary.c.). ++int_curr_symbol "" ++currency_symbol "" ++mon_decimal_point "." ++mon_thousands_sep "" ++mon_grouping -1 ++positive_sign "" ++negative_sign "-" ++int_frac_digits -1 ++frac_digits -1 ++p_cs_precedes -1 ++int_p_sep_by_space -1 ++p_sep_by_space -1 ++n_cs_precedes -1 ++int_n_sep_by_space -1 ++n_sep_by_space -1 ++p_sign_posn -1 ++n_sign_posn -1 ++% ++END LC_MONETARY ++ ++LC_NUMERIC ++% This is the POSIX Locale definition for ++% the LC_NUMERIC category. ++% ++decimal_point "." ++thousands_sep "" ++grouping -1 ++END LC_NUMERIC ++ ++LC_TIME ++% This is the POSIX Locale definition for the LC_TIME category with the ++% exception that time is per ISO 8601 and 24-hour. ++% ++% Abbreviated weekday names (%a) ++abday "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat" ++ ++% Full weekday names (%A) ++day "Sunday";"Monday";"Tuesday";"Wednesday";"Thursday";/ ++ "Friday";"Saturday" ++ ++% Abbreviated month names (%b) ++abmon "Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";/ ++ "Oct";"Nov";"Dec" ++ ++% Full month names (%B) ++mon "January";"February";"March";"April";"May";"June";"July";/ ++ "August";"September";"October";"November";"December" ++ ++% Week description, consists of three fields: ++% 1. Number of days in a week. ++% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday). ++% 3. The weekday number to be contained in the first week of the year. ++% ++% ISO 8601 conforming applications should use the values 7, 19971201 (a ++% Monday), and 4 (Thursday), respectively. ++week 7;19971201;4 ++first_weekday 1 ++first_workday 2 ++ ++% Appropriate date and time representation (%c) ++d_t_fmt "%a %b %e %H:%M:%S %Y" ++ ++% Appropriate date representation (%x) ++d_fmt "%m/%d/%y" ++ ++% Appropriate time representation (%X) ++t_fmt "%H:%M:%S" ++ ++% Appropriate AM/PM time representation (%r) ++t_fmt_ampm "%I:%M:%S %p" ++ ++% Equivalent of AM/PM (%p) ++am_pm "AM";"PM" ++ ++% Appropriate date representation (date(1)) ++date_fmt "%a %b %e %H:%M:%S %Z %Y" ++END LC_TIME ++ ++LC_MESSAGES ++% This is the POSIX Locale definition for ++% the LC_NUMERIC category. ++% ++yesexpr "^[yY]" ++noexpr "^[nN]" ++yesstr "Yes" ++nostr "No" ++END LC_MESSAGES ++ ++LC_PAPER ++% This is the ISO/IEC 14652 "i18n" definition for ++% the LC_PAPER category. ++% (A4 paper, this is also used in the built in C/POSIX ++% locale in glibc/locale/C-paper.c) ++height 297 ++width 210 ++END LC_PAPER ++ ++LC_NAME ++% This is the ISO/IEC 14652 "i18n" definition for ++% the LC_NAME category. ++% (also used in the built in C/POSIX locale in glibc/locale/C-name.c) ++name_fmt "%p%t%g%t%m%t%f" ++END LC_NAME ++ ++LC_ADDRESS ++% This is the ISO/IEC 14652 "i18n" definition for ++% the LC_ADDRESS category. ++% (also used in the built in C/POSIX locale in glibc/locale/C-address.c) ++postal_fmt "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++% This is the ISO/IEC 14652 "i18n" definition for ++% the LC_TELEPHONE category. ++% "+%c %a %l" ++tel_int_fmt "+%c %a %l" ++% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c) ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++% This is the ISO/IEC 14652 "i18n" definition for ++% the LC_MEASUREMENT category. ++% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c) ++%metric ++measurement 1 ++END LC_MEASUREMENT +diff --git a/posix/Makefile b/posix/Makefile +index 059efb3cd2706cbe..a5229777eeb0e067 100644 +--- a/posix/Makefile ++++ b/posix/Makefile +@@ -190,9 +190,19 @@ $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test + $(evaluate-test) + endif + +-LOCALES := cs_CZ.UTF-8 da_DK.ISO-8859-1 de_DE.ISO-8859-1 de_DE.UTF-8 \ +- en_US.UTF-8 es_US.ISO-8859-1 es_US.UTF-8 ja_JP.EUC-JP tr_TR.UTF-8 \ +- cs_CZ.ISO-8859-2 ++LOCALES := \ ++ cs_CZ.ISO-8859-2 \ ++ cs_CZ.UTF-8 \ ++ C.UTF-8 \ ++ da_DK.ISO-8859-1 \ ++ de_DE.ISO-8859-1 \ ++ de_DE.UTF-8 \ ++ en_US.UTF-8 \ ++ es_US.ISO-8859-1 \ ++ es_US.UTF-8 \ ++ ja_JP.EUC-JP \ ++ tr_TR.UTF-8 \ ++ # LOCALES + include ../gen-locales.mk + + $(objpfx)bug-regex1.out: $(gen-locales) +diff --git a/posix/bug-regex1.c b/posix/bug-regex1.c +index 38eb543951862492..7e9f4ec430a95631 100644 +--- a/posix/bug-regex1.c ++++ b/posix/bug-regex1.c +@@ -41,6 +41,26 @@ main (void) + puts (" -> OK"); + } + ++ puts ("in C.UTF-8 locale"); ++ setlocale (LC_ALL, "C.UTF-8"); ++ s = re_compile_pattern ("[an\371]*n", 7, ®ex); ++ if (s != NULL) ++ { ++ puts ("re_compile_pattern return non-NULL value"); ++ result = 1; ++ } ++ else ++ { ++ match = re_match (®ex, "an", 2, 0, ®s); ++ if (match != 2) ++ { ++ printf ("re_match returned %d, expected 2\n", match); ++ result = 1; ++ } ++ else ++ puts (" -> OK"); ++ } ++ + puts ("in de_DE.ISO-8859-1 locale"); + setlocale (LC_ALL, "de_DE.ISO-8859-1"); + s = re_compile_pattern ("[anù]*n", 7, ®ex); +diff --git a/posix/bug-regex19.c b/posix/bug-regex19.c +index b3fee0a7302c3263..e00ff60a14f994bf 100644 +--- a/posix/bug-regex19.c ++++ b/posix/bug-regex19.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #define BRE RE_SYNTAX_POSIX_BASIC + #define ERE RE_SYNTAX_POSIX_EXTENDED +@@ -407,8 +408,8 @@ do_mb_tests (const struct test_s *test) + return 0; + } + +-int +-main (void) ++static int ++do_test (void) + { + size_t i; + int ret = 0; +@@ -417,20 +418,17 @@ main (void) + + for (i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i) + { +- if (setlocale (LC_ALL, "de_DE.ISO-8859-1") == NULL) +- { +- puts ("setlocale de_DE.ISO-8859-1 failed"); +- ret = 1; +- } ++ xsetlocale (LC_ALL, "de_DE.ISO-8859-1"); + ret |= do_one_test (&tests[i], ""); +- if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) +- { +- puts ("setlocale de_DE.UTF-8 failed"); +- ret = 1; +- } ++ xsetlocale (LC_ALL, "de_DE.UTF-8"); ++ ret |= do_one_test (&tests[i], "UTF-8 "); ++ ret |= do_mb_tests (&tests[i]); ++ xsetlocale (LC_ALL, "C.UTF-8"); + ret |= do_one_test (&tests[i], "UTF-8 "); + ret |= do_mb_tests (&tests[i]); + } + + return ret; + } ++ ++#include +diff --git a/posix/bug-regex4.c b/posix/bug-regex4.c +index 8d5ae11567889301..6475833c525176b2 100644 +--- a/posix/bug-regex4.c ++++ b/posix/bug-regex4.c +@@ -32,8 +32,33 @@ main (void) + + memset (®ex, '\0', sizeof (regex)); + ++ printf ("INFO: Checking C.\n"); + setlocale (LC_ALL, "C"); + ++ s = re_compile_pattern ("ab[cde]", 7, ®ex); ++ if (s != NULL) ++ { ++ puts ("re_compile_pattern returned non-NULL value"); ++ result = 1; ++ } ++ else ++ { ++ match[0] = re_search_2 (®ex, "xyabez", 6, "", 0, 1, 5, NULL, 6); ++ match[1] = re_search_2 (®ex, NULL, 0, "abc", 3, 0, 3, NULL, 3); ++ match[2] = re_search_2 (®ex, "xya", 3, "bd", 2, 2, 3, NULL, 5); ++ if (match[0] != 2 || match[1] != 0 || match[2] != 2) ++ { ++ printf ("re_search_2 returned %d,%d,%d, expected 2,0,2\n", ++ match[0], match[1], match[2]); ++ result = 1; ++ } ++ else ++ puts (" -> OK"); ++ } ++ ++ printf ("INFO: Checking C.UTF-8.\n"); ++ setlocale (LC_ALL, "C.UTF-8"); ++ + s = re_compile_pattern ("ab[cde]", 7, ®ex); + if (s != NULL) + { +diff --git a/posix/bug-regex6.c b/posix/bug-regex6.c +index 2bdf2126a49ee99b..0929b69b83c91e5e 100644 +--- a/posix/bug-regex6.c ++++ b/posix/bug-regex6.c +@@ -30,7 +30,7 @@ main (int argc, char *argv[]) + regex_t re; + regmatch_t mat[10]; + int i, j, ret = 0; +- const char *locales[] = { "C", "de_DE.UTF-8" }; ++ const char *locales[] = { "C", "C.UTF-8", "de_DE.UTF-8" }; + const char *string = "http://www.regex.com/pattern/matching.html#intro"; + regmatch_t expect[10] = { + { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 }, +diff --git a/posix/transbug.c b/posix/transbug.c +index d0983b4d44d04fd2..b240177cf72326ff 100644 +--- a/posix/transbug.c ++++ b/posix/transbug.c +@@ -116,16 +116,32 @@ do_test (void) + static const char lower[] = "[[:lower:]]+"; + static const char upper[] = "[[:upper:]]+"; + struct re_registers regs[4]; ++ int result = 0; + ++#define CHECK(exp) \ ++ if (exp) { puts (#exp); result = 1; } ++ ++ printf ("INFO: Checking C.\n"); + setlocale (LC_ALL, "C"); + + (void) re_set_syntax (RE_SYNTAX_GNU_AWK); + +- int result; +-#define CHECK(exp) \ +- if (exp) { puts (#exp); result = 1; } ++ result |= run_test (lower, regs); ++ result |= run_test (upper, ®s[2]); ++ if (! result) ++ { ++ CHECK (regs[0].start[0] != regs[2].start[0]); ++ CHECK (regs[0].end[0] != regs[2].end[0]); ++ CHECK (regs[1].start[0] != regs[3].start[0]); ++ CHECK (regs[1].end[0] != regs[3].end[0]); ++ } ++ ++ printf ("INFO: Checking C.UTF-8.\n"); ++ setlocale (LC_ALL, "C.UTF-8"); ++ ++ (void) re_set_syntax (RE_SYNTAX_GNU_AWK); + +- result = run_test (lower, regs); ++ result |= run_test (lower, regs); + result |= run_test (upper, ®s[2]); + if (! result) + { +diff --git a/posix/tst-fnmatch.input b/posix/tst-fnmatch.input +index 67aac5aadafd8aeb..6ff5318032e0afb2 100644 +--- a/posix/tst-fnmatch.input ++++ b/posix/tst-fnmatch.input +@@ -472,6 +472,397 @@ C "\\" "[Z-\\]]" 0 + C "]" "[Z-\\]]" 0 + C "-" "[Z-\\]]" NOMATCH + ++# B.6 004(C) ++C.UTF-8 "!#%+,-./01234567889" "!#%+,-./01234567889" 0 ++C.UTF-8 ":;=@ABCDEFGHIJKLMNO" ":;=@ABCDEFGHIJKLMNO" 0 ++C.UTF-8 "PQRSTUVWXYZ]abcdefg" "PQRSTUVWXYZ]abcdefg" 0 ++C.UTF-8 "hijklmnopqrstuvwxyz" "hijklmnopqrstuvwxyz" 0 ++C.UTF-8 "^_{}~" "^_{}~" 0 ++ ++# B.6 005(C) ++C.UTF-8 "\"$&'()" "\\\"\\$\\&\\'\\(\\)" 0 ++C.UTF-8 "*?[\\`|" "\\*\\?\\[\\\\\\`\\|" 0 ++C.UTF-8 "<>" "\\<\\>" 0 ++ ++# B.6 006(C) ++C.UTF-8 "?*[" "[?*[][?*[][?*[]" 0 ++C.UTF-8 "a/b" "?/b" 0 ++ ++# B.6 007(C) ++C.UTF-8 "a/b" "a?b" 0 ++C.UTF-8 "a/b" "a/?" 0 ++C.UTF-8 "aa/b" "?/b" NOMATCH ++C.UTF-8 "aa/b" "a?b" NOMATCH ++C.UTF-8 "a/bb" "a/?" NOMATCH ++ ++# B.6 009(C) ++C.UTF-8 "abc" "[abc]" NOMATCH ++C.UTF-8 "x" "[abc]" NOMATCH ++C.UTF-8 "a" "[abc]" 0 ++C.UTF-8 "[" "[[abc]" 0 ++C.UTF-8 "a" "[][abc]" 0 ++C.UTF-8 "a]" "[]a]]" 0 ++ ++# B.6 010(C) ++C.UTF-8 "xyz" "[!abc]" NOMATCH ++C.UTF-8 "x" "[!abc]" 0 ++C.UTF-8 "a" "[!abc]" NOMATCH ++ ++# B.6 011(C) ++C.UTF-8 "]" "[][abc]" 0 ++C.UTF-8 "abc]" "[][abc]" NOMATCH ++C.UTF-8 "[]abc" "[][]abc" NOMATCH ++C.UTF-8 "]" "[!]]" NOMATCH ++C.UTF-8 "aa]" "[!]a]" NOMATCH ++C.UTF-8 "]" "[!a]" 0 ++C.UTF-8 "]]" "[!a]]" 0 ++ ++# B.6 012(C) ++C.UTF-8 "a" "[[.a.]]" 0 ++C.UTF-8 "-" "[[.-.]]" 0 ++C.UTF-8 "-" "[[.-.][.].]]" 0 ++C.UTF-8 "-" "[[.].][.-.]]" 0 ++C.UTF-8 "-" "[[.-.][=u=]]" 0 ++C.UTF-8 "-" "[[.-.][:alpha:]]" 0 ++C.UTF-8 "a" "[![.a.]]" NOMATCH ++ ++# B.6 013(C) ++C.UTF-8 "a" "[[.b.]]" NOMATCH ++C.UTF-8 "a" "[[.b.][.c.]]" NOMATCH ++C.UTF-8 "a" "[[.b.][=b=]]" NOMATCH ++ ++ ++# B.6 015(C) ++C.UTF-8 "a" "[[=a=]]" 0 ++C.UTF-8 "b" "[[=a=]b]" 0 ++C.UTF-8 "b" "[[=a=][=b=]]" 0 ++C.UTF-8 "a" "[[=a=][=b=]]" 0 ++C.UTF-8 "a" "[[=a=][.b.]]" 0 ++C.UTF-8 "a" "[[=a=][:digit:]]" 0 ++ ++# B.6 016(C) ++C.UTF-8 "=" "[[=a=]b]" NOMATCH ++C.UTF-8 "]" "[[=a=]b]" NOMATCH ++C.UTF-8 "a" "[[=b=][=c=]]" NOMATCH ++C.UTF-8 "a" "[[=b=][.].]]" NOMATCH ++C.UTF-8 "a" "[[=b=][:digit:]]" NOMATCH ++ ++# B.6 017(C) ++C.UTF-8 "a" "[[:alnum:]]" 0 ++C.UTF-8 "a" "[![:alnum:]]" NOMATCH ++C.UTF-8 "-" "[[:alnum:]]" NOMATCH ++C.UTF-8 "a]a" "[[:alnum:]]a" NOMATCH ++C.UTF-8 "-" "[[:alnum:]-]" 0 ++C.UTF-8 "aa" "[[:alnum:]]a" 0 ++C.UTF-8 "-" "[![:alnum:]]" 0 ++C.UTF-8 "]" "[!][:alnum:]]" NOMATCH ++C.UTF-8 "[" "[![:alnum:][]" NOMATCH ++C.UTF-8 "a" "[[:alnum:]]" 0 ++C.UTF-8 "b" "[[:alnum:]]" 0 ++C.UTF-8 "c" "[[:alnum:]]" 0 ++C.UTF-8 "d" "[[:alnum:]]" 0 ++C.UTF-8 "e" "[[:alnum:]]" 0 ++C.UTF-8 "f" "[[:alnum:]]" 0 ++C.UTF-8 "g" "[[:alnum:]]" 0 ++C.UTF-8 "h" "[[:alnum:]]" 0 ++C.UTF-8 "i" "[[:alnum:]]" 0 ++C.UTF-8 "j" "[[:alnum:]]" 0 ++C.UTF-8 "k" "[[:alnum:]]" 0 ++C.UTF-8 "l" "[[:alnum:]]" 0 ++C.UTF-8 "m" "[[:alnum:]]" 0 ++C.UTF-8 "n" "[[:alnum:]]" 0 ++C.UTF-8 "o" "[[:alnum:]]" 0 ++C.UTF-8 "p" "[[:alnum:]]" 0 ++C.UTF-8 "q" "[[:alnum:]]" 0 ++C.UTF-8 "r" "[[:alnum:]]" 0 ++C.UTF-8 "s" "[[:alnum:]]" 0 ++C.UTF-8 "t" "[[:alnum:]]" 0 ++C.UTF-8 "u" "[[:alnum:]]" 0 ++C.UTF-8 "v" "[[:alnum:]]" 0 ++C.UTF-8 "w" "[[:alnum:]]" 0 ++C.UTF-8 "x" "[[:alnum:]]" 0 ++C.UTF-8 "y" "[[:alnum:]]" 0 ++C.UTF-8 "z" "[[:alnum:]]" 0 ++C.UTF-8 "A" "[[:alnum:]]" 0 ++C.UTF-8 "B" "[[:alnum:]]" 0 ++C.UTF-8 "C" "[[:alnum:]]" 0 ++C.UTF-8 "D" "[[:alnum:]]" 0 ++C.UTF-8 "E" "[[:alnum:]]" 0 ++C.UTF-8 "F" "[[:alnum:]]" 0 ++C.UTF-8 "G" "[[:alnum:]]" 0 ++C.UTF-8 "H" "[[:alnum:]]" 0 ++C.UTF-8 "I" "[[:alnum:]]" 0 ++C.UTF-8 "J" "[[:alnum:]]" 0 ++C.UTF-8 "K" "[[:alnum:]]" 0 ++C.UTF-8 "L" "[[:alnum:]]" 0 ++C.UTF-8 "M" "[[:alnum:]]" 0 ++C.UTF-8 "N" "[[:alnum:]]" 0 ++C.UTF-8 "O" "[[:alnum:]]" 0 ++C.UTF-8 "P" "[[:alnum:]]" 0 ++C.UTF-8 "Q" "[[:alnum:]]" 0 ++C.UTF-8 "R" "[[:alnum:]]" 0 ++C.UTF-8 "S" "[[:alnum:]]" 0 ++C.UTF-8 "T" "[[:alnum:]]" 0 ++C.UTF-8 "U" "[[:alnum:]]" 0 ++C.UTF-8 "V" "[[:alnum:]]" 0 ++C.UTF-8 "W" "[[:alnum:]]" 0 ++C.UTF-8 "X" "[[:alnum:]]" 0 ++C.UTF-8 "Y" "[[:alnum:]]" 0 ++C.UTF-8 "Z" "[[:alnum:]]" 0 ++C.UTF-8 "0" "[[:alnum:]]" 0 ++C.UTF-8 "1" "[[:alnum:]]" 0 ++C.UTF-8 "2" "[[:alnum:]]" 0 ++C.UTF-8 "3" "[[:alnum:]]" 0 ++C.UTF-8 "4" "[[:alnum:]]" 0 ++C.UTF-8 "5" "[[:alnum:]]" 0 ++C.UTF-8 "6" "[[:alnum:]]" 0 ++C.UTF-8 "7" "[[:alnum:]]" 0 ++C.UTF-8 "8" "[[:alnum:]]" 0 ++C.UTF-8 "9" "[[:alnum:]]" 0 ++C.UTF-8 "!" "[[:alnum:]]" NOMATCH ++C.UTF-8 "#" "[[:alnum:]]" NOMATCH ++C.UTF-8 "%" "[[:alnum:]]" NOMATCH ++C.UTF-8 "+" "[[:alnum:]]" NOMATCH ++C.UTF-8 "," "[[:alnum:]]" NOMATCH ++C.UTF-8 "-" "[[:alnum:]]" NOMATCH ++C.UTF-8 "." "[[:alnum:]]" NOMATCH ++C.UTF-8 "/" "[[:alnum:]]" NOMATCH ++C.UTF-8 ":" "[[:alnum:]]" NOMATCH ++C.UTF-8 ";" "[[:alnum:]]" NOMATCH ++C.UTF-8 "=" "[[:alnum:]]" NOMATCH ++C.UTF-8 "@" "[[:alnum:]]" NOMATCH ++C.UTF-8 "[" "[[:alnum:]]" NOMATCH ++C.UTF-8 "\\" "[[:alnum:]]" NOMATCH ++C.UTF-8 "]" "[[:alnum:]]" NOMATCH ++C.UTF-8 "^" "[[:alnum:]]" NOMATCH ++C.UTF-8 "_" "[[:alnum:]]" NOMATCH ++C.UTF-8 "{" "[[:alnum:]]" NOMATCH ++C.UTF-8 "}" "[[:alnum:]]" NOMATCH ++C.UTF-8 "~" "[[:alnum:]]" NOMATCH ++C.UTF-8 "\"" "[[:alnum:]]" NOMATCH ++C.UTF-8 "$" "[[:alnum:]]" NOMATCH ++C.UTF-8 "&" "[[:alnum:]]" NOMATCH ++C.UTF-8 "'" "[[:alnum:]]" NOMATCH ++C.UTF-8 "(" "[[:alnum:]]" NOMATCH ++C.UTF-8 ")" "[[:alnum:]]" NOMATCH ++C.UTF-8 "*" "[[:alnum:]]" NOMATCH ++C.UTF-8 "?" "[[:alnum:]]" NOMATCH ++C.UTF-8 "`" "[[:alnum:]]" NOMATCH ++C.UTF-8 "|" "[[:alnum:]]" NOMATCH ++C.UTF-8 "<" "[[:alnum:]]" NOMATCH ++C.UTF-8 ">" "[[:alnum:]]" NOMATCH ++C.UTF-8 "\t" "[[:cntrl:]]" 0 ++C.UTF-8 "t" "[[:cntrl:]]" NOMATCH ++C.UTF-8 "t" "[[:lower:]]" 0 ++C.UTF-8 "\t" "[[:lower:]]" NOMATCH ++C.UTF-8 "T" "[[:lower:]]" NOMATCH ++C.UTF-8 "\t" "[[:space:]]" 0 ++C.UTF-8 "t" "[[:space:]]" NOMATCH ++C.UTF-8 "t" "[[:alpha:]]" 0 ++C.UTF-8 "\t" "[[:alpha:]]" NOMATCH ++C.UTF-8 "0" "[[:digit:]]" 0 ++C.UTF-8 "\t" "[[:digit:]]" NOMATCH ++C.UTF-8 "t" "[[:digit:]]" NOMATCH ++C.UTF-8 "\t" "[[:print:]]" NOMATCH ++C.UTF-8 "t" "[[:print:]]" 0 ++C.UTF-8 "T" "[[:upper:]]" 0 ++C.UTF-8 "\t" "[[:upper:]]" NOMATCH ++C.UTF-8 "t" "[[:upper:]]" NOMATCH ++C.UTF-8 "\t" "[[:blank:]]" 0 ++C.UTF-8 "t" "[[:blank:]]" NOMATCH ++C.UTF-8 "\t" "[[:graph:]]" NOMATCH ++C.UTF-8 "t" "[[:graph:]]" 0 ++C.UTF-8 "." "[[:punct:]]" 0 ++C.UTF-8 "t" "[[:punct:]]" NOMATCH ++C.UTF-8 "\t" "[[:punct:]]" NOMATCH ++C.UTF-8 "0" "[[:xdigit:]]" 0 ++C.UTF-8 "\t" "[[:xdigit:]]" NOMATCH ++C.UTF-8 "a" "[[:xdigit:]]" 0 ++C.UTF-8 "A" "[[:xdigit:]]" 0 ++C.UTF-8 "t" "[[:xdigit:]]" NOMATCH ++C.UTF-8 "a" "[[alpha]]" NOMATCH ++C.UTF-8 "a" "[[alpha:]]" NOMATCH ++C.UTF-8 "a]" "[[alpha]]" 0 ++C.UTF-8 "a]" "[[alpha:]]" 0 ++C.UTF-8 "a" "[[:alpha:][.b.]]" 0 ++C.UTF-8 "a" "[[:alpha:][=b=]]" 0 ++C.UTF-8 "a" "[[:alpha:][:digit:]]" 0 ++C.UTF-8 "a" "[[:digit:][:alpha:]]" 0 ++ ++# B.6 018(C) ++C.UTF-8 "a" "[a-c]" 0 ++C.UTF-8 "b" "[a-c]" 0 ++C.UTF-8 "c" "[a-c]" 0 ++C.UTF-8 "a" "[b-c]" NOMATCH ++C.UTF-8 "d" "[b-c]" NOMATCH ++C.UTF-8 "B" "[a-c]" NOMATCH ++C.UTF-8 "b" "[A-C]" NOMATCH ++C.UTF-8 "" "[a-c]" NOMATCH ++C.UTF-8 "as" "[a-ca-z]" NOMATCH ++C.UTF-8 "a" "[[.a.]-c]" 0 ++C.UTF-8 "a" "[a-[.c.]]" 0 ++C.UTF-8 "a" "[[.a.]-[.c.]]" 0 ++C.UTF-8 "b" "[[.a.]-c]" 0 ++C.UTF-8 "b" "[a-[.c.]]" 0 ++C.UTF-8 "b" "[[.a.]-[.c.]]" 0 ++C.UTF-8 "c" "[[.a.]-c]" 0 ++C.UTF-8 "c" "[a-[.c.]]" 0 ++C.UTF-8 "c" "[[.a.]-[.c.]]" 0 ++C.UTF-8 "d" "[[.a.]-c]" NOMATCH ++C.UTF-8 "d" "[a-[.c.]]" NOMATCH ++C.UTF-8 "d" "[[.a.]-[.c.]]" NOMATCH ++ ++# B.6 019(C) ++C.UTF-8 "a" "[c-a]" NOMATCH ++C.UTF-8 "a" "[[.c.]-a]" NOMATCH ++C.UTF-8 "a" "[c-[.a.]]" NOMATCH ++C.UTF-8 "a" "[[.c.]-[.a.]]" NOMATCH ++C.UTF-8 "c" "[c-a]" NOMATCH ++C.UTF-8 "c" "[[.c.]-a]" NOMATCH ++C.UTF-8 "c" "[c-[.a.]]" NOMATCH ++C.UTF-8 "c" "[[.c.]-[.a.]]" NOMATCH ++ ++# B.6 020(C) ++C.UTF-8 "a" "[a-c0-9]" 0 ++C.UTF-8 "d" "[a-c0-9]" NOMATCH ++C.UTF-8 "B" "[a-c0-9]" NOMATCH ++ ++# B.6 021(C) ++C.UTF-8 "-" "[-a]" 0 ++C.UTF-8 "a" "[-b]" NOMATCH ++C.UTF-8 "-" "[!-a]" NOMATCH ++C.UTF-8 "a" "[!-b]" 0 ++C.UTF-8 "-" "[a-c-0-9]" 0 ++C.UTF-8 "b" "[a-c-0-9]" 0 ++C.UTF-8 "a:" "a[0-9-a]" NOMATCH ++C.UTF-8 "a:" "a[09-a]" 0 ++ ++# B.6 024(C) ++C.UTF-8 "" "*" 0 ++C.UTF-8 "asd/sdf" "*" 0 ++ ++# B.6 025(C) ++C.UTF-8 "as" "[a-c][a-z]" 0 ++C.UTF-8 "as" "??" 0 ++ ++# B.6 026(C) ++C.UTF-8 "asd/sdf" "as*df" 0 ++C.UTF-8 "asd/sdf" "as*" 0 ++C.UTF-8 "asd/sdf" "*df" 0 ++C.UTF-8 "asd/sdf" "as*dg" NOMATCH ++C.UTF-8 "asdf" "as*df" 0 ++C.UTF-8 "asdf" "as*df?" NOMATCH ++C.UTF-8 "asdf" "as*??" 0 ++C.UTF-8 "asdf" "a*???" 0 ++C.UTF-8 "asdf" "*????" 0 ++C.UTF-8 "asdf" "????*" 0 ++C.UTF-8 "asdf" "??*?" 0 ++ ++# B.6 027(C) ++C.UTF-8 "/" "/" 0 ++C.UTF-8 "/" "/*" 0 ++C.UTF-8 "/" "*/" 0 ++C.UTF-8 "/" "/?" NOMATCH ++C.UTF-8 "/" "?/" NOMATCH ++C.UTF-8 "/" "?" 0 ++C.UTF-8 "." "?" 0 ++C.UTF-8 "/." "??" 0 ++C.UTF-8 "/" "[!a-c]" 0 ++C.UTF-8 "." "[!a-c]" 0 ++ ++# B.6 029(C) ++C.UTF-8 "/" "/" 0 PATHNAME ++C.UTF-8 "//" "//" 0 PATHNAME ++C.UTF-8 "/.a" "/*" 0 PATHNAME ++C.UTF-8 "/.a" "/?a" 0 PATHNAME ++C.UTF-8 "/.a" "/[!a-z]a" 0 PATHNAME ++C.UTF-8 "/.a/.b" "/*/?b" 0 PATHNAME ++ ++# B.6 030(C) ++C.UTF-8 "/" "?" NOMATCH PATHNAME ++C.UTF-8 "/" "*" NOMATCH PATHNAME ++C.UTF-8 "a/b" "a?b" NOMATCH PATHNAME ++C.UTF-8 "/.a/.b" "/*b" NOMATCH PATHNAME ++ ++# B.6 031(C) ++C.UTF-8 "/$" "\\/\\$" 0 ++C.UTF-8 "/[" "\\/\\[" 0 ++C.UTF-8 "/[" "\\/[" 0 ++C.UTF-8 "/[]" "\\/\\[]" 0 ++ ++# B.6 032(C) ++C.UTF-8 "/$" "\\/\\$" NOMATCH NOESCAPE ++C.UTF-8 "/\\$" "\\/\\$" NOMATCH NOESCAPE ++C.UTF-8 "\\/\\$" "\\/\\$" 0 NOESCAPE ++ ++# B.6 033(C) ++C.UTF-8 ".asd" ".*" 0 PERIOD ++C.UTF-8 "/.asd" "*" 0 PERIOD ++C.UTF-8 "/as/.df" "*/?*f" 0 PERIOD ++C.UTF-8 "..asd" ".[!a-z]*" 0 PERIOD ++ ++# B.6 034(C) ++C.UTF-8 ".asd" "*" NOMATCH PERIOD ++C.UTF-8 ".asd" "?asd" NOMATCH PERIOD ++C.UTF-8 ".asd" "[!a-z]*" NOMATCH PERIOD ++ ++# B.6 035(C) ++C.UTF-8 "/." "/." 0 PATHNAME|PERIOD ++C.UTF-8 "/.a./.b." "/.*/.*" 0 PATHNAME|PERIOD ++C.UTF-8 "/.a./.b." "/.??/.??" 0 PATHNAME|PERIOD ++ ++# B.6 036(C) ++C.UTF-8 "/." "*" NOMATCH PATHNAME|PERIOD ++C.UTF-8 "/." "/*" NOMATCH PATHNAME|PERIOD ++C.UTF-8 "/." "/?" NOMATCH PATHNAME|PERIOD ++C.UTF-8 "/." "/[!a-z]" NOMATCH PATHNAME|PERIOD ++C.UTF-8 "/a./.b." "/*/*" NOMATCH PATHNAME|PERIOD ++C.UTF-8 "/a./.b." "/??/???" NOMATCH PATHNAME|PERIOD ++ ++# Some home-grown tests. ++C.UTF-8 "foobar" "foo*[abc]z" NOMATCH ++C.UTF-8 "foobaz" "foo*[abc][xyz]" 0 ++C.UTF-8 "foobaz" "foo?*[abc][xyz]" 0 ++C.UTF-8 "foobaz" "foo?*[abc][x/yz]" 0 ++C.UTF-8 "foobaz" "foo?*[abc]/[xyz]" NOMATCH PATHNAME ++C.UTF-8 "a" "a/" NOMATCH PATHNAME ++C.UTF-8 "a/" "a" NOMATCH PATHNAME ++C.UTF-8 "//a" "/a" NOMATCH PATHNAME ++C.UTF-8 "/a" "//a" NOMATCH PATHNAME ++C.UTF-8 "az" "[a-]z" 0 ++C.UTF-8 "bz" "[ab-]z" 0 ++C.UTF-8 "cz" "[ab-]z" NOMATCH ++C.UTF-8 "-z" "[ab-]z" 0 ++C.UTF-8 "az" "[-a]z" 0 ++C.UTF-8 "bz" "[-ab]z" 0 ++C.UTF-8 "cz" "[-ab]z" NOMATCH ++C.UTF-8 "-z" "[-ab]z" 0 ++C.UTF-8 "\\" "[\\\\-a]" 0 ++C.UTF-8 "_" "[\\\\-a]" 0 ++C.UTF-8 "a" "[\\\\-a]" 0 ++C.UTF-8 "-" "[\\\\-a]" NOMATCH ++C.UTF-8 "\\" "[\\]-a]" NOMATCH ++C.UTF-8 "_" "[\\]-a]" 0 ++C.UTF-8 "a" "[\\]-a]" 0 ++C.UTF-8 "]" "[\\]-a]" 0 ++C.UTF-8 "-" "[\\]-a]" NOMATCH ++C.UTF-8 "\\" "[!\\\\-a]" NOMATCH ++C.UTF-8 "_" "[!\\\\-a]" NOMATCH ++C.UTF-8 "a" "[!\\\\-a]" NOMATCH ++C.UTF-8 "-" "[!\\\\-a]" 0 ++C.UTF-8 "!" "[\\!-]" 0 ++C.UTF-8 "-" "[\\!-]" 0 ++C.UTF-8 "\\" "[\\!-]" NOMATCH ++C.UTF-8 "Z" "[Z-\\\\]" 0 ++C.UTF-8 "[" "[Z-\\\\]" 0 ++C.UTF-8 "\\" "[Z-\\\\]" 0 ++C.UTF-8 "-" "[Z-\\\\]" NOMATCH ++C.UTF-8 "Z" "[Z-\\]]" 0 ++C.UTF-8 "[" "[Z-\\]]" 0 ++C.UTF-8 "\\" "[Z-\\]]" 0 ++C.UTF-8 "]" "[Z-\\]]" 0 ++C.UTF-8 "-" "[Z-\\]]" NOMATCH ++ + # Following are tests outside the scope of IEEE 2003.2 since they are using + # locales other than the C locale. The main focus of the tests is on the + # handling of ranges and the recognition of character (vs bytes). +@@ -677,7 +1068,6 @@ C "x/y" "*" 0 PATHNAME|LEADING_DIR + C "x/y/z" "*" 0 PATHNAME|LEADING_DIR + C "x" "*x" 0 PATHNAME|LEADING_DIR + +-en_US.UTF-8 "\366.csv" "*.csv" 0 + C "x/y" "*x" 0 PATHNAME|LEADING_DIR + C "x/y/z" "*x" 0 PATHNAME|LEADING_DIR + C "x" "x*" 0 PATHNAME|LEADING_DIR +@@ -693,6 +1083,33 @@ C "x" "x?y" NOMATCH PATHNAME|LEADING_DIR + C "x/y" "x?y" NOMATCH PATHNAME|LEADING_DIR + C "x/y/z" "x?y" NOMATCH PATHNAME|LEADING_DIR + ++# Duplicate the "Test of GNU extensions." tests but for C.UTF-8. ++C.UTF-8 "x" "x" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y" "x" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y/z" "x" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x" "*" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y" "*" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y/z" "*" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x" "*x" 0 PATHNAME|LEADING_DIR ++ ++C.UTF-8 "x/y" "*x" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y/z" "*x" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x" "x*" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y" "x*" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y/z" "x*" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x" "a" NOMATCH PATHNAME|LEADING_DIR ++C.UTF-8 "x/y" "a" NOMATCH PATHNAME|LEADING_DIR ++C.UTF-8 "x/y/z" "a" NOMATCH PATHNAME|LEADING_DIR ++C.UTF-8 "x" "x/y" NOMATCH PATHNAME|LEADING_DIR ++C.UTF-8 "x/y" "x/y" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x/y/z" "x/y" 0 PATHNAME|LEADING_DIR ++C.UTF-8 "x" "x?y" NOMATCH PATHNAME|LEADING_DIR ++C.UTF-8 "x/y" "x?y" NOMATCH PATHNAME|LEADING_DIR ++C.UTF-8 "x/y/z" "x?y" NOMATCH PATHNAME|LEADING_DIR ++ ++# Bug 14185 ++en_US.UTF-8 "\366.csv" "*.csv" 0 ++ + # ksh style matching. + C "abcd" "?@(a|b)*@(c)d" 0 EXTMATCH + C "/dev/udp/129.22.8.102/45" "/dev/@(tcp|udp)/*/*" 0 PATHNAME|EXTMATCH +@@ -822,3 +1239,133 @@ C "" "" 0 + C "" "" 0 EXTMATCH + C "" "*([abc])" 0 EXTMATCH + C "" "?([abc])" 0 EXTMATCH ++ ++# Duplicate the "ksh style matching." for C.UTF-8. ++C.UTF-8 "abcd" "?@(a|b)*@(c)d" 0 EXTMATCH ++C.UTF-8 "/dev/udp/129.22.8.102/45" "/dev/@(tcp|udp)/*/*" 0 PATHNAME|EXTMATCH ++C.UTF-8 "12" "[1-9]*([0-9])" 0 EXTMATCH ++C.UTF-8 "12abc" "[1-9]*([0-9])" NOMATCH EXTMATCH ++C.UTF-8 "1" "[1-9]*([0-9])" 0 EXTMATCH ++C.UTF-8 "07" "+([0-7])" 0 EXTMATCH ++C.UTF-8 "0377" "+([0-7])" 0 EXTMATCH ++C.UTF-8 "09" "+([0-7])" NOMATCH EXTMATCH ++C.UTF-8 "paragraph" "para@(chute|graph)" 0 EXTMATCH ++C.UTF-8 "paramour" "para@(chute|graph)" NOMATCH EXTMATCH ++C.UTF-8 "para991" "para?([345]|99)1" 0 EXTMATCH ++C.UTF-8 "para381" "para?([345]|99)1" NOMATCH EXTMATCH ++C.UTF-8 "paragraph" "para*([0-9])" NOMATCH EXTMATCH ++C.UTF-8 "para" "para*([0-9])" 0 EXTMATCH ++C.UTF-8 "para13829383746592" "para*([0-9])" 0 EXTMATCH ++C.UTF-8 "paragraph" "para+([0-9])" NOMATCH EXTMATCH ++C.UTF-8 "para" "para+([0-9])" NOMATCH EXTMATCH ++C.UTF-8 "para987346523" "para+([0-9])" 0 EXTMATCH ++C.UTF-8 "paragraph" "para!(*.[0-9])" 0 EXTMATCH ++C.UTF-8 "para.38" "para!(*.[0-9])" 0 EXTMATCH ++C.UTF-8 "para.graph" "para!(*.[0-9])" 0 EXTMATCH ++C.UTF-8 "para39" "para!(*.[0-9])" 0 EXTMATCH ++C.UTF-8 "" "*(0|1|3|5|7|9)" 0 EXTMATCH ++C.UTF-8 "137577991" "*(0|1|3|5|7|9)" 0 EXTMATCH ++C.UTF-8 "2468" "*(0|1|3|5|7|9)" NOMATCH EXTMATCH ++C.UTF-8 "1358" "*(0|1|3|5|7|9)" NOMATCH EXTMATCH ++C.UTF-8 "file.c" "*.c?(c)" 0 EXTMATCH ++C.UTF-8 "file.C" "*.c?(c)" NOMATCH EXTMATCH ++C.UTF-8 "file.cc" "*.c?(c)" 0 EXTMATCH ++C.UTF-8 "file.ccc" "*.c?(c)" NOMATCH EXTMATCH ++C.UTF-8 "parse.y" "!(*.c|*.h|Makefile.in|config*|README)" 0 EXTMATCH ++C.UTF-8 "shell.c" "!(*.c|*.h|Makefile.in|config*|README)" NOMATCH EXTMATCH ++C.UTF-8 "Makefile" "!(*.c|*.h|Makefile.in|config*|README)" 0 EXTMATCH ++C.UTF-8 "VMS.FILE;1" "*\;[1-9]*([0-9])" 0 EXTMATCH ++C.UTF-8 "VMS.FILE;0" "*\;[1-9]*([0-9])" NOMATCH EXTMATCH ++C.UTF-8 "VMS.FILE;" "*\;[1-9]*([0-9])" NOMATCH EXTMATCH ++C.UTF-8 "VMS.FILE;139" "*\;[1-9]*([0-9])" 0 EXTMATCH ++C.UTF-8 "VMS.FILE;1N" "*\;[1-9]*([0-9])" NOMATCH EXTMATCH ++C.UTF-8 "abcfefg" "ab**(e|f)" 0 EXTMATCH ++C.UTF-8 "abcfefg" "ab**(e|f)g" 0 EXTMATCH ++C.UTF-8 "ab" "ab*+(e|f)" NOMATCH EXTMATCH ++C.UTF-8 "abef" "ab***ef" 0 EXTMATCH ++C.UTF-8 "abef" "ab**" 0 EXTMATCH ++C.UTF-8 "fofo" "*(f*(o))" 0 EXTMATCH ++C.UTF-8 "ffo" "*(f*(o))" 0 EXTMATCH ++C.UTF-8 "foooofo" "*(f*(o))" 0 EXTMATCH ++C.UTF-8 "foooofof" "*(f*(o))" 0 EXTMATCH ++C.UTF-8 "fooofoofofooo" "*(f*(o))" 0 EXTMATCH ++C.UTF-8 "foooofof" "*(f+(o))" NOMATCH EXTMATCH ++C.UTF-8 "xfoooofof" "*(f*(o))" NOMATCH EXTMATCH ++C.UTF-8 "foooofofx" "*(f*(o))" NOMATCH EXTMATCH ++C.UTF-8 "ofxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH ++C.UTF-8 "ofooofoofofooo" "*(f*(o))" NOMATCH EXTMATCH ++C.UTF-8 "foooxfooxfoxfooox" "*(f*(o)x)" 0 EXTMATCH ++C.UTF-8 "foooxfooxofoxfooox" "*(f*(o)x)" NOMATCH EXTMATCH ++C.UTF-8 "foooxfooxfxfooox" "*(f*(o)x)" 0 EXTMATCH ++C.UTF-8 "ofxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH ++C.UTF-8 "ofoooxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH ++C.UTF-8 "ofoooxoofxoofoooxoofxo" "*(*(of*(o)x)o)" 0 EXTMATCH ++C.UTF-8 "ofoooxoofxoofoooxoofxoo" "*(*(of*(o)x)o)" 0 EXTMATCH ++C.UTF-8 "ofoooxoofxoofoooxoofxofo" "*(*(of*(o)x)o)" NOMATCH EXTMATCH ++C.UTF-8 "ofoooxoofxoofoooxoofxooofxofxo" "*(*(of*(o)x)o)" 0 EXTMATCH ++C.UTF-8 "aac" "*(@(a))a@(c)" 0 EXTMATCH ++C.UTF-8 "ac" "*(@(a))a@(c)" 0 EXTMATCH ++C.UTF-8 "c" "*(@(a))a@(c)" NOMATCH EXTMATCH ++C.UTF-8 "aaac" "*(@(a))a@(c)" 0 EXTMATCH ++C.UTF-8 "baaac" "*(@(a))a@(c)" NOMATCH EXTMATCH ++C.UTF-8 "abcd" "?@(a|b)*@(c)d" 0 EXTMATCH ++C.UTF-8 "abcd" "@(ab|a*@(b))*(c)d" 0 EXTMATCH ++C.UTF-8 "acd" "@(ab|a*(b))*(c)d" 0 EXTMATCH ++C.UTF-8 "abbcd" "@(ab|a*(b))*(c)d" 0 EXTMATCH ++C.UTF-8 "effgz" "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH ++C.UTF-8 "efgz" "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH ++C.UTF-8 "egz" "@(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH ++C.UTF-8 "egzefffgzbcdij" "*(b+(c)d|e*(f)g?|?(h)i@(j|k))" 0 EXTMATCH ++C.UTF-8 "egz" "@(b+(c)d|e+(f)g?|?(h)i@(j|k))" NOMATCH EXTMATCH ++C.UTF-8 "ofoofo" "*(of+(o))" 0 EXTMATCH ++C.UTF-8 "oxfoxoxfox" "*(oxf+(ox))" 0 EXTMATCH ++C.UTF-8 "oxfoxfox" "*(oxf+(ox))" NOMATCH EXTMATCH ++C.UTF-8 "ofoofo" "*(of+(o)|f)" 0 EXTMATCH ++C.UTF-8 "foofoofo" "@(foo|f|fo)*(f|of+(o))" 0 EXTMATCH ++C.UTF-8 "oofooofo" "*(of|oof+(o))" 0 EXTMATCH ++C.UTF-8 "fffooofoooooffoofffooofff" "*(*(f)*(o))" 0 EXTMATCH ++C.UTF-8 "fofoofoofofoo" "*(fo|foo)" 0 EXTMATCH ++C.UTF-8 "foo" "!(x)" 0 EXTMATCH ++C.UTF-8 "foo" "!(x)*" 0 EXTMATCH ++C.UTF-8 "foo" "!(foo)" NOMATCH EXTMATCH ++C.UTF-8 "foo" "!(foo)*" 0 EXTMATCH ++C.UTF-8 "foobar" "!(foo)" 0 EXTMATCH ++C.UTF-8 "foobar" "!(foo)*" 0 EXTMATCH ++C.UTF-8 "moo.cow" "!(*.*).!(*.*)" 0 EXTMATCH ++C.UTF-8 "mad.moo.cow" "!(*.*).!(*.*)" NOMATCH EXTMATCH ++C.UTF-8 "mucca.pazza" "mu!(*(c))?.pa!(*(z))?" NOMATCH EXTMATCH ++C.UTF-8 "fff" "!(f)" 0 EXTMATCH ++C.UTF-8 "fff" "*(!(f))" 0 EXTMATCH ++C.UTF-8 "fff" "+(!(f))" 0 EXTMATCH ++C.UTF-8 "ooo" "!(f)" 0 EXTMATCH ++C.UTF-8 "ooo" "*(!(f))" 0 EXTMATCH ++C.UTF-8 "ooo" "+(!(f))" 0 EXTMATCH ++C.UTF-8 "foo" "!(f)" 0 EXTMATCH ++C.UTF-8 "foo" "*(!(f))" 0 EXTMATCH ++C.UTF-8 "foo" "+(!(f))" 0 EXTMATCH ++C.UTF-8 "f" "!(f)" NOMATCH EXTMATCH ++C.UTF-8 "f" "*(!(f))" NOMATCH EXTMATCH ++C.UTF-8 "f" "+(!(f))" NOMATCH EXTMATCH ++C.UTF-8 "foot" "@(!(z*)|*x)" 0 EXTMATCH ++C.UTF-8 "zoot" "@(!(z*)|*x)" NOMATCH EXTMATCH ++C.UTF-8 "foox" "@(!(z*)|*x)" 0 EXTMATCH ++C.UTF-8 "zoox" "@(!(z*)|*x)" 0 EXTMATCH ++C.UTF-8 "foo" "*(!(foo))" 0 EXTMATCH ++C.UTF-8 "foob" "!(foo)b*" NOMATCH EXTMATCH ++C.UTF-8 "foobb" "!(foo)b*" 0 EXTMATCH ++C.UTF-8 "[" "*([a[])" 0 EXTMATCH ++C.UTF-8 "]" "*([]a[])" 0 EXTMATCH ++C.UTF-8 "a" "*([]a[])" 0 EXTMATCH ++C.UTF-8 "b" "*([!]a[])" 0 EXTMATCH ++C.UTF-8 "[" "*([!]a[]|[[])" 0 EXTMATCH ++C.UTF-8 "]" "*([!]a[]|[]])" 0 EXTMATCH ++C.UTF-8 "[" "!([!]a[])" 0 EXTMATCH ++C.UTF-8 "]" "!([!]a[])" 0 EXTMATCH ++C.UTF-8 ")" "*([)])" 0 EXTMATCH ++C.UTF-8 "*" "*([*(])" 0 EXTMATCH ++C.UTF-8 "abcd" "*!(|a)cd" 0 EXTMATCH ++C.UTF-8 "ab/.a" "+([abc])/*" NOMATCH EXTMATCH|PATHNAME|PERIOD ++C.UTF-8 "" "" 0 ++C.UTF-8 "" "" 0 EXTMATCH ++C.UTF-8 "" "*([abc])" 0 EXTMATCH ++C.UTF-8 "" "?([abc])" 0 EXTMATCH +diff --git a/posix/tst-regcomp-truncated.c b/posix/tst-regcomp-truncated.c +index 84195fcd2ec153b8..da3f97799e37c607 100644 +--- a/posix/tst-regcomp-truncated.c ++++ b/posix/tst-regcomp-truncated.c +@@ -37,6 +37,7 @@ + static const char locales[][17] = + { + "C", ++ "C.UTF-8", + "en_US.UTF-8", + "de_DE.ISO-8859-1", + }; +diff --git a/posix/tst-regex.c b/posix/tst-regex.c +index e7c2b05e8666a16e..531128de2a9176fa 100644 +--- a/posix/tst-regex.c ++++ b/posix/tst-regex.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + + #if defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 +@@ -58,7 +59,7 @@ do_test (void) + const char *file; + int fd; + struct stat st; +- int result; ++ int result = 0; + char *inmem; + char *outmem; + size_t inlen; +@@ -123,7 +124,7 @@ do_test (void) + + /* Run the actual tests. All tests are run in a single-byte and a + multi-byte locale. */ +- result = test_expr ("[äáàâéèêíìîñöóòôüúùû]", 4, 4); ++ result |= test_expr ("[äáàâéèêíìîñöóòôüúùû]", 4, 4); + result |= test_expr ("G.ran", 2, 3); + result |= test_expr ("G.\\{1\\}ran", 2, 3); + result |= test_expr ("G.*ran", 3, 44); +@@ -143,19 +144,33 @@ do_test (void) + static int + test_expr (const char *expr, int expected, int expectedicase) + { +- int result; ++ int result = 0; + char *inmem; + char *outmem; + size_t inlen; + size_t outlen; + char *uexpr; + +- /* First test: search with an UTF-8 locale. */ +- if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) +- error (EXIT_FAILURE, 0, "cannot set locale de_DE.UTF-8"); ++ /* First test: search with basic C.UTF-8 locale. */ ++ printf ("INFO: Testing C.UTF-8.\n"); ++ xsetlocale (LC_ALL, "C.UTF-8"); + + printf ("\nTest \"%s\" with multi-byte locale\n", expr); +- result = run_test (expr, mem, memlen, 0, expected); ++ result |= run_test (expr, mem, memlen, 0, expected); ++ printf ("\nTest \"%s\" with multi-byte locale, case insensitive\n", expr); ++ result |= run_test (expr, mem, memlen, 1, expectedicase); ++ printf ("\nTest \"%s\" backwards with multi-byte locale\n", expr); ++ result |= run_test_backwards (expr, mem, memlen, 0, expected); ++ printf ("\nTest \"%s\" backwards with multi-byte locale, case insensitive\n", ++ expr); ++ result |= run_test_backwards (expr, mem, memlen, 1, expectedicase); ++ ++ /* Second test: search with an UTF-8 locale. */ ++ printf ("INFO: Testing de_DE.UTF-8.\n"); ++ xsetlocale (LC_ALL, "de_DE.UTF-8"); ++ ++ printf ("\nTest \"%s\" with multi-byte locale\n", expr); ++ result |= run_test (expr, mem, memlen, 0, expected); + printf ("\nTest \"%s\" with multi-byte locale, case insensitive\n", expr); + result |= run_test (expr, mem, memlen, 1, expectedicase); + printf ("\nTest \"%s\" backwards with multi-byte locale\n", expr); +@@ -165,8 +180,8 @@ test_expr (const char *expr, int expected, int expectedicase) + result |= run_test_backwards (expr, mem, memlen, 1, expectedicase); + + /* Second test: search with an ISO-8859-1 locale. */ +- if (setlocale (LC_ALL, "de_DE.ISO-8859-1") == NULL) +- error (EXIT_FAILURE, 0, "cannot set locale de_DE.ISO-8859-1"); ++ printf ("INFO: Testing de_DE.ISO-8859-1.\n"); ++ xsetlocale (LC_ALL, "de_DE.ISO-8859-1"); + + inmem = (char *) expr; + inlen = strlen (expr); diff --git a/SOURCES/glibc-c-utf8-locale-3.patch b/SOURCES/glibc-c-utf8-locale-3.patch new file mode 100644 index 0000000..3a90a47 --- /dev/null +++ b/SOURCES/glibc-c-utf8-locale-3.patch @@ -0,0 +1,65 @@ +commit 1d8e3a2c6636cf0b1b8fa2f869cef6ec10726933 +Author: Carlos O'Donell +Date: Mon Jan 31 00:34:41 2022 -0500 + + localedef: Fix handling of empty mon_decimal_point (Bug 28847) + + The handling of mon_decimal_point is incorrect when it comes to + handling the empty "" value. The existing parser in monetary_read() + will correctly handle setting the non-wide-character value and the + wide-character value e.g. STR_ELEM_WC(mon_decimal_point) if they are + set in the locale definition. However, in monetary_finish() we have + conflicting TEST_ELEM() which sets a default value (if the locale + definition doesn't include one), and subsequent code which looks for + mon_decimal_point to be NULL to issue a specific error message and set + the defaults. The latter is unused because TEST_ELEM() always sets a + default. The simplest solution is to remove the TEST_ELEM() check, + and allow the existing check to look to see if mon_decimal_point is + NULL and set an appropriate default. The final fix is to move the + setting of mon_decimal_point_wc so it occurs only when + mon_decimal_point is being set to a default, keeping both values + consistent. There is no way to tell the difference between + mon_decimal_point_wc having been set to the empty string and not + having been defined at all, for that distinction we must use + mon_decimal_point being NULL or "", and so we must logically set + the default together with mon_decimal_point. + + Lastly, there are more fixes similar to this that could be made to + ld-monetary.c, but we avoid that in order to fix just the code + required for mon_decimal_point, which impacts the ability for C.UTF-8 + to set mon_decimal_point to "", since without this fix we end up with + an inconsistent setting of mon_decimal_point set to "", but + mon_decimal_point_wc set to "." which is incorrect. + + Tested on x86_64 and i686 without regression. + Reviewed-by: Florian Weimer + +diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c +index e1e45a3409123bf4..9b9a55bb4766dfcf 100644 +--- a/locale/programs/ld-monetary.c ++++ b/locale/programs/ld-monetary.c +@@ -208,7 +208,6 @@ No definition for %s category found"), "LC_MONETARY"); + + TEST_ELEM (int_curr_symbol, ""); + TEST_ELEM (currency_symbol, ""); +- TEST_ELEM (mon_decimal_point, "."); + TEST_ELEM (mon_thousands_sep, ""); + TEST_ELEM (positive_sign, ""); + TEST_ELEM (negative_sign, ""); +@@ -258,6 +257,7 @@ not correspond to a valid name in ISO 4217 [--no-warnings=intcurrsym]"), + record_error (0, 0, _("%s: field `%s' not defined"), + "LC_MONETARY", "mon_decimal_point"); + monetary->mon_decimal_point = "."; ++ monetary->mon_decimal_point_wc = L'.'; + } + else if (monetary->mon_decimal_point[0] == '\0' && ! be_quiet && ! nothing) + { +@@ -265,8 +265,6 @@ not correspond to a valid name in ISO 4217 [--no-warnings=intcurrsym]"), + %s: value for field `%s' must not be an empty string"), + "LC_MONETARY", "mon_decimal_point"); + } +- if (monetary->mon_decimal_point_wc == L'\0') +- monetary->mon_decimal_point_wc = L'.'; + + if (monetary->mon_grouping_len == 0) + { diff --git a/SOURCES/glibc-c-utf8-locale-4.patch b/SOURCES/glibc-c-utf8-locale-4.patch new file mode 100644 index 0000000..8e9ec4c --- /dev/null +++ b/SOURCES/glibc-c-utf8-locale-4.patch @@ -0,0 +1,734 @@ +commit de82cb0da4b8fa5b3d56c457438d2568c67ab1b1 +Author: Joseph Myers +Date: Tue Oct 12 13:48:39 2021 +0000 + + Add TEST_COMPARE_STRING_WIDE to support/check.h + + I'd like to be able to test narrow and wide string interfaces, with + the narrow string tests using TEST_COMPARE_STRING and the wide string + tests using something analogous (possibly generated using macros from + a common test template for both the narrow and wide string tests where + appropriate). + + Add such a TEST_COMPARE_STRING_WIDE, along with functions + support_quote_blob_wide and support_test_compare_string_wide that it + builds on. Those functions are built using macros from common + templates shared by the narrow and wide string implementations, though + I didn't do that for the tests of test functions. In + support_quote_blob_wide, I chose to use the \x{} delimited escape + sequence syntax proposed for C2X in N2785, rather than e.g. trying to + generate the end of a string and the start of a new string when + ambiguity would result from undelimited \x (when the next character + after such an escape sequence is valid hex) or forcing an escape + sequence to be used for the next character in the case of such + ambiguity. + + Tested for x86_64. + +diff --git a/support/Makefile b/support/Makefile +index 75bad6715ac3d08c..3c941e1ba9e29aa4 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -70,6 +70,7 @@ libsupport-routines = \ + support_openpty \ + support_paths \ + support_quote_blob \ ++ support_quote_blob_wide \ + support_quote_string \ + support_record_failure \ + support_run_diff \ +@@ -83,6 +84,7 @@ libsupport-routines = \ + support_test_compare_blob \ + support_test_compare_failure \ + support_test_compare_string \ ++ support_test_compare_string_wide \ + support_test_main \ + support_test_verify_impl \ + support_wait_for_thread_exit \ +@@ -275,11 +277,13 @@ tests = \ + tst-support-open-dev-null-range \ + tst-support-process_state \ + tst-support_quote_blob \ ++ tst-support_quote_blob_wide \ + tst-support_quote_string \ + tst-support_record_failure \ + tst-test_compare \ + tst-test_compare_blob \ + tst-test_compare_string \ ++ tst-test_compare_string_wide \ + tst-timespec \ + tst-xreadlink \ + tst-xsigstack \ +diff --git a/support/check.h b/support/check.h +index 83662b2d10c8cf58..9b1844352f32513a 100644 +--- a/support/check.h ++++ b/support/check.h +@@ -20,6 +20,7 @@ + #define SUPPORT_CHECK_H + + #include ++#include + + __BEGIN_DECLS + +@@ -171,11 +172,25 @@ void support_test_compare_blob (const void *left, + (support_test_compare_string (left, right, __FILE__, __LINE__, \ + #left, #right)) + ++/* Compare the wide strings LEFT and RIGHT and report a test failure ++ if they are different. Also report failure if one of the arguments ++ is a null pointer and the other is not. The strings should be ++ reasonably short because on mismatch, both are printed. */ ++#define TEST_COMPARE_STRING_WIDE(left, right) \ ++ (support_test_compare_string_wide (left, right, __FILE__, __LINE__, \ ++ #left, #right)) ++ + void support_test_compare_string (const char *left, const char *right, + const char *file, int line, + const char *left_expr, + const char *right_expr); + ++void support_test_compare_string_wide (const wchar_t *left, ++ const wchar_t *right, ++ const char *file, int line, ++ const char *left_expr, ++ const char *right_expr); ++ + /* Internal function called by the test driver. */ + int support_report_failure (int status) + __attribute__ ((weak, warn_unused_result)); +diff --git a/support/support.h b/support/support.h +index c219e0d9d1aef046..29d56c7c891ee34b 100644 +--- a/support/support.h ++++ b/support/support.h +@@ -73,6 +73,12 @@ void support_write_file_string (const char *path, const char *contents); + the result). */ + char *support_quote_blob (const void *blob, size_t length); + ++/* Quote the contents of the wide character array starting at BLOB, of ++ LENGTH wide characters, in such a way that the result string can be ++ included in a C wide string literal (in single/double quotes, ++ without putting the quotes into the result). */ ++char *support_quote_blob_wide (const void *blob, size_t length); ++ + /* Quote the contents of the string, in such a way that the result + string can be included in a C literal (in single/double quotes, + without putting the quotes into the result). */ +diff --git a/support/support_quote_blob.c b/support/support_quote_blob.c +index b5e70125f13eb081..611980c9a2108670 100644 +--- a/support/support_quote_blob.c ++++ b/support/support_quote_blob.c +@@ -1,4 +1,4 @@ +-/* Quote a blob so that it can be used in C literals. ++/* Quote a narrow string blob so that it can be used in C literals. + Copyright (C) 2018-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + +@@ -16,68 +16,9 @@ + License along with the GNU C Library; if not, see + . */ + +-#include +-#include ++#define CHAR unsigned char ++#define L_(C) C ++#define SUPPORT_QUOTE_BLOB support_quote_blob ++#define WIDE 0 + +-char * +-support_quote_blob (const void *blob, size_t length) +-{ +- struct xmemstream out; +- xopen_memstream (&out); +- +- const unsigned char *p = blob; +- for (size_t i = 0; i < length; ++i) +- { +- unsigned char ch = p[i]; +- +- /* Use C backslash escapes for those control characters for +- which they are defined. */ +- switch (ch) +- { +- case '\a': +- putc_unlocked ('\\', out.out); +- putc_unlocked ('a', out.out); +- break; +- case '\b': +- putc_unlocked ('\\', out.out); +- putc_unlocked ('b', out.out); +- break; +- case '\f': +- putc_unlocked ('\\', out.out); +- putc_unlocked ('f', out.out); +- break; +- case '\n': +- putc_unlocked ('\\', out.out); +- putc_unlocked ('n', out.out); +- break; +- case '\r': +- putc_unlocked ('\\', out.out); +- putc_unlocked ('r', out.out); +- break; +- case '\t': +- putc_unlocked ('\\', out.out); +- putc_unlocked ('t', out.out); +- break; +- case '\v': +- putc_unlocked ('\\', out.out); +- putc_unlocked ('v', out.out); +- break; +- case '\\': +- case '\'': +- case '\"': +- putc_unlocked ('\\', out.out); +- putc_unlocked (ch, out.out); +- break; +- default: +- if (ch < ' ' || ch > '~') +- /* Use octal sequences because they are fixed width, +- unlike hexadecimal sequences. */ +- fprintf (out.out, "\\%03o", ch); +- else +- putc_unlocked (ch, out.out); +- } +- } +- +- xfclose_memstream (&out); +- return out.buffer; +-} ++#include "support_quote_blob_main.c" +diff --git a/support/support_quote_blob_main.c b/support/support_quote_blob_main.c +new file mode 100644 +index 0000000000000000..19ccfad59311bfee +--- /dev/null ++++ b/support/support_quote_blob_main.c +@@ -0,0 +1,88 @@ ++/* Quote a blob so that it can be used in C literals. ++ Copyright (C) 2018-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++ ++char * ++SUPPORT_QUOTE_BLOB (const void *blob, size_t length) ++{ ++ struct xmemstream out; ++ xopen_memstream (&out); ++ ++ const CHAR *p = blob; ++ for (size_t i = 0; i < length; ++i) ++ { ++ CHAR ch = p[i]; ++ ++ /* Use C backslash escapes for those control characters for ++ which they are defined. */ ++ switch (ch) ++ { ++ case L_('\a'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked ('a', out.out); ++ break; ++ case L_('\b'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked ('b', out.out); ++ break; ++ case L_('\f'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked ('f', out.out); ++ break; ++ case L_('\n'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked ('n', out.out); ++ break; ++ case L_('\r'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked ('r', out.out); ++ break; ++ case L_('\t'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked ('t', out.out); ++ break; ++ case L_('\v'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked ('v', out.out); ++ break; ++ case L_('\\'): ++ case L_('\''): ++ case L_('\"'): ++ putc_unlocked ('\\', out.out); ++ putc_unlocked (ch, out.out); ++ break; ++ default: ++ if (ch < L_(' ') || ch > L_('~')) ++ /* For narrow characters, use octal sequences because they ++ are fixed width, unlike hexadecimal sequences. For ++ wide characters, use N2785 delimited escape ++ sequences. */ ++ if (WIDE) ++ fprintf (out.out, "\\x{%x}", (unsigned int) ch); ++ else ++ fprintf (out.out, "\\%03o", (unsigned int) ch); ++ else ++ putc_unlocked (ch, out.out); ++ } ++ } ++ ++ xfclose_memstream (&out); ++ return out.buffer; ++} +diff --git a/support/support_quote_blob_wide.c b/support/support_quote_blob_wide.c +new file mode 100644 +index 0000000000000000..c451ed889c21c626 +--- /dev/null ++++ b/support/support_quote_blob_wide.c +@@ -0,0 +1,24 @@ ++/* Quote a wide string blob so that it can be used in C literals. ++ Copyright (C) 2018-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#define CHAR wchar_t ++#define L_(C) L ## C ++#define SUPPORT_QUOTE_BLOB support_quote_blob_wide ++#define WIDE 1 ++ ++#include "support_quote_blob_main.c" +diff --git a/support/support_test_compare_string.c b/support/support_test_compare_string.c +index cbeaf7b1eeea8ca8..12bafe43d44ae3d7 100644 +--- a/support/support_test_compare_string.c ++++ b/support/support_test_compare_string.c +@@ -16,76 +16,13 @@ + License along with the GNU C Library; if not, see + . */ + +-#include +-#include +-#include +-#include +-#include +-#include +- +-static void +-report_length (const char *what, const char *str, size_t length) +-{ +- if (str == NULL) +- printf (" %s string: NULL\n", what); +- else +- printf (" %s string: %zu bytes\n", what, length); +-} +- +-static void +-report_string (const char *what, const unsigned char *blob, +- size_t length, const char *expr) +-{ +- if (length > 0) +- { +- printf (" %s (evaluated from %s):\n", what, expr); +- char *quoted = support_quote_blob (blob, length); +- printf (" \"%s\"\n", quoted); +- free (quoted); +- +- fputs (" ", stdout); +- for (size_t i = 0; i < length; ++i) +- printf (" %02X", blob[i]); +- putc ('\n', stdout); +- } +-} +- +-static size_t +-string_length_or_zero (const char *str) +-{ +- if (str == NULL) +- return 0; +- else +- return strlen (str); +-} +- +-void +-support_test_compare_string (const char *left, const char *right, +- const char *file, int line, +- const char *left_expr, const char *right_expr) +-{ +- /* Two null pointers are accepted. */ +- if (left == NULL && right == NULL) +- return; +- +- size_t left_length = string_length_or_zero (left); +- size_t right_length = string_length_or_zero (right); +- +- if (left_length != right_length || left == NULL || right == NULL +- || memcmp (left, right, left_length) != 0) +- { +- support_record_failure (); +- printf ("%s:%d: error: string comparison failed\n", file, line); +- if (left_length == right_length && right != NULL && left != NULL) +- printf (" string length: %zu bytes\n", left_length); +- else +- { +- report_length ("left", left, left_length); +- report_length ("right", right, right_length); +- } +- report_string ("left", (const unsigned char *) left, +- left_length, left_expr); +- report_string ("right", (const unsigned char *) right, +- right_length, right_expr); +- } +-} ++#define CHAR char ++#define UCHAR unsigned char ++#define LPREFIX "" ++#define STRLEN strlen ++#define MEMCMP memcmp ++#define SUPPORT_QUOTE_BLOB support_quote_blob ++#define SUPPORT_TEST_COMPARE_STRING support_test_compare_string ++#define WIDE 0 ++ ++#include "support_test_compare_string_main.c" +diff --git a/support/support_test_compare_string_main.c b/support/support_test_compare_string_main.c +new file mode 100644 +index 0000000000000000..0edc0ca97d79d71e +--- /dev/null ++++ b/support/support_test_compare_string_main.c +@@ -0,0 +1,94 @@ ++/* Check two strings for equality. ++ Copyright (C) 2018-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static void ++report_length (const char *what, const CHAR *str, size_t length) ++{ ++ if (str == NULL) ++ printf (" %s string: NULL\n", what); ++ else ++ printf (" %s string: %zu %s\n", what, length, ++ WIDE ? "wide characters" : "bytes"); ++} ++ ++static void ++report_string (const char *what, const UCHAR *blob, ++ size_t length, const char *expr) ++{ ++ if (length > 0) ++ { ++ printf (" %s (evaluated from %s):\n", what, expr); ++ char *quoted = SUPPORT_QUOTE_BLOB (blob, length); ++ printf (" %s\"%s\"\n", LPREFIX, quoted); ++ free (quoted); ++ ++ fputs (" ", stdout); ++ for (size_t i = 0; i < length; ++i) ++ printf (" %02X", (unsigned int) blob[i]); ++ putc ('\n', stdout); ++ } ++} ++ ++static size_t ++string_length_or_zero (const CHAR *str) ++{ ++ if (str == NULL) ++ return 0; ++ else ++ return STRLEN (str); ++} ++ ++void ++SUPPORT_TEST_COMPARE_STRING (const CHAR *left, const CHAR *right, ++ const char *file, int line, ++ const char *left_expr, const char *right_expr) ++{ ++ /* Two null pointers are accepted. */ ++ if (left == NULL && right == NULL) ++ return; ++ ++ size_t left_length = string_length_or_zero (left); ++ size_t right_length = string_length_or_zero (right); ++ ++ if (left_length != right_length || left == NULL || right == NULL ++ || MEMCMP (left, right, left_length) != 0) ++ { ++ support_record_failure (); ++ printf ("%s:%d: error: string comparison failed\n", file, line); ++ if (left_length == right_length && right != NULL && left != NULL) ++ printf (" string length: %zu %s\n", left_length, ++ WIDE ? "wide characters" : "bytes"); ++ else ++ { ++ report_length ("left", left, left_length); ++ report_length ("right", right, right_length); ++ } ++ report_string ("left", (const UCHAR *) left, ++ left_length, left_expr); ++ report_string ("right", (const UCHAR *) right, ++ right_length, right_expr); ++ } ++} +diff --git a/support/support_test_compare_string_wide.c b/support/support_test_compare_string_wide.c +new file mode 100644 +index 0000000000000000..88b560b142a3c356 +--- /dev/null ++++ b/support/support_test_compare_string_wide.c +@@ -0,0 +1,28 @@ ++/* Check two wide strings for equality. ++ Copyright (C) 2018-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#define CHAR wchar_t ++#define UCHAR wchar_t ++#define LPREFIX "L" ++#define STRLEN wcslen ++#define MEMCMP wmemcmp ++#define SUPPORT_QUOTE_BLOB support_quote_blob_wide ++#define SUPPORT_TEST_COMPARE_STRING support_test_compare_string_wide ++#define WIDE 1 ++ ++#include "support_test_compare_string_main.c" +diff --git a/support/tst-support_quote_blob_wide.c b/support/tst-support_quote_blob_wide.c +new file mode 100644 +index 0000000000000000..ea71a1f7f873b23a +--- /dev/null ++++ b/support/tst-support_quote_blob_wide.c +@@ -0,0 +1,66 @@ ++/* Test the support_quote_blob_wide function. ++ Copyright (C) 2018-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ /* Check handling of the empty blob, both with and without trailing ++ NUL byte. */ ++ char *p = support_quote_blob_wide (L"", 0); ++ TEST_COMPARE (strlen (p), 0); ++ free (p); ++ p = support_quote_blob_wide (L"X", 0); ++ TEST_COMPARE (strlen (p), 0); ++ free (p); ++ ++ /* Check escaping of backslash-escaped characters, and lack of ++ escaping for other shell meta-characters. */ ++ p = support_quote_blob_wide (L"$()*?`@[]{}~\'\"X", 14); ++ TEST_COMPARE (strcmp (p, "$()*?`@[]{}~\\'\\\""), 0); ++ free (p); ++ ++ /* Check lack of escaping for letters and digits. */ ++#define LETTERS_AND_DIGTS \ ++ "abcdefghijklmnopqrstuvwxyz" \ ++ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ ++ "0123456789" ++#define CONCATX(X, Y) X ## Y ++#define CONCAT(X, Y) CONCATX (X, Y) ++#define WLETTERS_AND_DIGTS CONCAT (L, LETTERS_AND_DIGTS) ++ p = support_quote_blob_wide (WLETTERS_AND_DIGTS "@", 2 * 26 + 10); ++ TEST_COMPARE (strcmp (p, LETTERS_AND_DIGTS), 0); ++ free (p); ++ ++ /* Check escaping of control characters and other non-printable ++ characters. */ ++ p = support_quote_blob_wide (L"\r\n\t\a\b\f\v\1\177\200\377" ++ "\x123\x76543210\xfedcba98\0@", 17); ++ TEST_COMPARE (strcmp (p, "\\r\\n\\t\\a\\b\\f\\v\\x{1}" ++ "\\x{7f}\\x{80}\\x{ff}\\x{123}\\x{76543210}" ++ "\\x{fedcba98}\\x{0}@\\x{0}"), 0); ++ free (p); ++ ++ return 0; ++} ++ ++#include +diff --git a/support/tst-test_compare_string_wide.c b/support/tst-test_compare_string_wide.c +new file mode 100644 +index 0000000000000000..548f7dcdc60b82d8 +--- /dev/null ++++ b/support/tst-test_compare_string_wide.c +@@ -0,0 +1,107 @@ ++/* Basic test for the TEST_COMPARE_STRING_WIDE macro. ++ Copyright (C) 2018-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++static void ++subprocess (void *closure) ++{ ++ /* These tests should fail. They were chosen to cover differences ++ in length (with the same contents), single-bit mismatches, and ++ mismatching null pointers. */ ++ TEST_COMPARE_STRING_WIDE (L"", NULL); /* Line 29. */ ++ TEST_COMPARE_STRING_WIDE (L"X", L""); /* Line 30. */ ++ TEST_COMPARE_STRING_WIDE (NULL, L"X"); /* Line 31. */ ++ TEST_COMPARE_STRING_WIDE (L"abcd", L"abcD"); /* Line 32. */ ++ TEST_COMPARE_STRING_WIDE (L"abcd", NULL); /* Line 33. */ ++ TEST_COMPARE_STRING_WIDE (NULL, L"abcd"); /* Line 34. */ ++} ++ ++/* Same contents, different addresses. */ ++wchar_t buffer_abc_1[] = L"abc"; ++wchar_t buffer_abc_2[] = L"abc"; ++ ++static int ++do_test (void) ++{ ++ /* This should succeed. Even if the pointers and array contents are ++ different, zero-length inputs are not different. */ ++ TEST_COMPARE_STRING_WIDE (NULL, NULL); ++ TEST_COMPARE_STRING_WIDE (L"", L""); ++ TEST_COMPARE_STRING_WIDE (buffer_abc_1, buffer_abc_2); ++ TEST_COMPARE_STRING_WIDE (buffer_abc_1, L"abc"); ++ ++ struct support_capture_subprocess proc = support_capture_subprocess ++ (&subprocess, NULL); ++ ++ /* Discard the reported error. */ ++ support_record_failure_reset (); ++ ++ puts ("info: *** subprocess output starts ***"); ++ fputs (proc.out.buffer, stdout); ++ puts ("info: *** subprocess output ends ***"); ++ ++ TEST_VERIFY ++ (strcmp (proc.out.buffer, ++"tst-test_compare_string_wide.c:29: error: string comparison failed\n" ++" left string: 0 wide characters\n" ++" right string: NULL\n" ++"tst-test_compare_string_wide.c:30: error: string comparison failed\n" ++" left string: 1 wide characters\n" ++" right string: 0 wide characters\n" ++" left (evaluated from L\"X\"):\n" ++" L\"X\"\n" ++" 58\n" ++"tst-test_compare_string_wide.c:31: error: string comparison failed\n" ++" left string: NULL\n" ++" right string: 1 wide characters\n" ++" right (evaluated from L\"X\"):\n" ++" L\"X\"\n" ++" 58\n" ++"tst-test_compare_string_wide.c:32: error: string comparison failed\n" ++" string length: 4 wide characters\n" ++" left (evaluated from L\"abcd\"):\n" ++" L\"abcd\"\n" ++" 61 62 63 64\n" ++" right (evaluated from L\"abcD\"):\n" ++" L\"abcD\"\n" ++" 61 62 63 44\n" ++"tst-test_compare_string_wide.c:33: error: string comparison failed\n" ++" left string: 4 wide characters\n" ++" right string: NULL\n" ++" left (evaluated from L\"abcd\"):\n" ++" L\"abcd\"\n" ++" 61 62 63 64\n" ++"tst-test_compare_string_wide.c:34: error: string comparison failed\n" ++" left string: NULL\n" ++" right string: 4 wide characters\n" ++" right (evaluated from L\"abcd\"):\n" ++" L\"abcd\"\n" ++" 61 62 63 64\n" ++ ) == 0); ++ ++ /* Check that there is no output on standard error. */ ++ support_capture_subprocess_check (&proc, "TEST_COMPARE_STRING_WIDE", ++ 0, sc_allow_stdout); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-c-utf8-locale-5.patch b/SOURCES/glibc-c-utf8-locale-5.patch new file mode 100644 index 0000000..06144a4 --- /dev/null +++ b/SOURCES/glibc-c-utf8-locale-5.patch @@ -0,0 +1,691 @@ +commit 7e0ad15c0fbfe25435c1acd0ed3e9cedfbff2488 +Author: Carlos O'Donell +Date: Mon Jan 31 00:34:42 2022 -0500 + + localedata: Adjust C.UTF-8 to align with C/POSIX. + + We have had one downstream report from Canonical [1] that + an rrdtool test was broken by the differences in LC_TIME + that we had in the non-builtin C locale (C.UTF-8). If one + application has an issue there are going to be others, and + so with this commit we review and fix all the issues that + cause the builtin C locale to be different from C.UTF-8, + which includes: + * mon_decimal_point should be empty e.g. "" + - Depends on mon_decimal_point_wc fix. + * negative_sign should be empty e.g. "" + * week should be aligned with the builtin C/POSIX locale + * d_fmt corrected with escaped slashes e.g. "%m//%d//%y" + * yesstr and nostr should be empty e.g. "" + * country_ab2 and country_ab3 should be empty e.g. "" + + We bump LC_IDENTIFICATION version and adjust the date to + indicate the change in the locale. + + A new tst-c-utf8-consistency test is added to ensure + consistency between C/POSIX and C.UTF-8. + + Tested on x86_64 and i686 without regression. + + [1] https://sourceware.org/pipermail/libc-alpha/2022-January/135703.html + + Co-authored-by: Florian Weimer + Reviewed-by: Florian Weimer + +diff --git a/localedata/Makefile b/localedata/Makefile +index c9dd5a954e8194cc..5830b9d05141cccd 100644 +--- a/localedata/Makefile ++++ b/localedata/Makefile +@@ -155,11 +155,31 @@ locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \ + tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \ + tst_wctype tst_wcwidth + +-tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \ +- tst-leaks tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \ +- tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \ +- tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 tst-setlocale3 \ +- tst-wctype tst-iconv-math-trans ++tests = \ ++ $(locale_test_suite) \ ++ bug-iconv-trans \ ++ bug-setlocale1 \ ++ bug-usesetlocale \ ++ tst-c-utf8-consistency \ ++ tst-digits \ ++ tst-iconv-math-trans \ ++ tst-leaks \ ++ tst-mbswcs1 \ ++ tst-mbswcs2 \ ++ tst-mbswcs3 \ ++ tst-mbswcs4 \ ++ tst-mbswcs5 \ ++ tst-mbswcs6 \ ++ tst-setlocale \ ++ tst-setlocale2 \ ++ tst-setlocale3 \ ++ tst-sscanf \ ++ tst-strfmon1 \ ++ tst-wctype \ ++ tst-xlocale1 \ ++ tst-xlocale2 \ ++ # tests ++ + tests-static = bug-setlocale1-static + tests += $(tests-static) + ifeq (yes,$(build-shared)) +diff --git a/localedata/locales/C b/localedata/locales/C +index ca801c79cf7e953e..fc0614e551519c6b 100644 +--- a/localedata/locales/C ++++ b/localedata/locales/C +@@ -12,8 +12,8 @@ tel "" + fax "" + language "" + territory "" +-revision "2.0" +-date "2020-06-28" ++revision "2.1" ++date "2022-01-30" + category "i18n:2012";LC_IDENTIFICATION + category "i18n:2012";LC_CTYPE + category "i18n:2012";LC_COLLATE +@@ -68,11 +68,11 @@ LC_MONETARY + % glibc/locale/C-monetary.c.). + int_curr_symbol "" + currency_symbol "" +-mon_decimal_point "." ++mon_decimal_point "" + mon_thousands_sep "" + mon_grouping -1 + positive_sign "" +-negative_sign "-" ++negative_sign "" + int_frac_digits -1 + frac_digits -1 + p_cs_precedes -1 +@@ -121,7 +121,9 @@ mon "January";"February";"March";"April";"May";"June";"July";/ + % + % ISO 8601 conforming applications should use the values 7, 19971201 (a + % Monday), and 4 (Thursday), respectively. +-week 7;19971201;4 ++% ++% This field is consciously aligned with the builtin C/POSIX locale. ++week 7;19971130;4 + first_weekday 1 + first_workday 2 + +@@ -129,7 +131,7 @@ first_workday 2 + d_t_fmt "%a %b %e %H:%M:%S %Y" + + % Appropriate date representation (%x) +-d_fmt "%m/%d/%y" ++d_fmt "%m//%d//%y" + + % Appropriate time representation (%X) + t_fmt "%H:%M:%S" +@@ -150,8 +152,8 @@ LC_MESSAGES + % + yesexpr "^[yY]" + noexpr "^[nN]" +-yesstr "Yes" +-nostr "No" ++yesstr "" ++nostr "" + END LC_MESSAGES + + LC_PAPER +@@ -175,6 +177,10 @@ LC_ADDRESS + % the LC_ADDRESS category. + % (also used in the built in C/POSIX locale in glibc/locale/C-address.c) + postal_fmt "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N" ++% The abbreviated 2 char and 3 char should be set to empty strings to ++% match the C/POSIX locale. ++country_ab2 "" ++country_ab3 "" + END LC_ADDRESS + + LC_TELEPHONE +diff --git a/localedata/tst-c-utf8-consistency.c b/localedata/tst-c-utf8-consistency.c +new file mode 100644 +index 0000000000000000..50feed3090df0ff1 +--- /dev/null ++++ b/localedata/tst-c-utf8-consistency.c +@@ -0,0 +1,539 @@ ++/* Test that C/POSIX and C.UTF-8 are consistent. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++/* Initialized by do_test using newlocale. */ ++static locale_t c_utf8; ++ ++/* Set to true for second pass. */ ++static bool use_nl_langinfo_l; ++ ++static void ++switch_to_c (void) ++{ ++ if (setlocale (LC_ALL, "C") == NULL) ++ FAIL_EXIT1 ("setlocale (LC_ALL, \"C\")"); ++} ++ ++static void ++switch_to_c_utf8 (void) ++{ ++ if (setlocale (LC_ALL, "C.UTF-8") == NULL) ++ FAIL_EXIT1 ("setlocale (LC_ALL, \"C.UTF-8\")"); ++} ++ ++static char * ++str (nl_item item) ++{ ++ if (!use_nl_langinfo_l) ++ switch_to_c (); ++ return nl_langinfo (item); ++} ++ ++static char * ++str_utf8 (nl_item item) ++{ ++ if (use_nl_langinfo_l) ++ return nl_langinfo_l (item, c_utf8); ++ else ++ { ++ switch_to_c_utf8 (); ++ return nl_langinfo (item); ++ } ++} ++ ++static wchar_t * ++wstr (nl_item item) ++{ ++ return (wchar_t *) str (item); ++} ++ ++static wchar_t * ++wstr_utf8 (nl_item item) ++{ ++ return (wchar_t *) str_utf8 (item); ++} ++ ++static int ++byte (nl_item item) ++{ ++ return (signed char) *str (item); ++} ++ ++static int ++byte_utf8 (nl_item item) ++{ ++ return (signed char) *str_utf8 (item); ++} ++ ++static int ++word (nl_item item) ++{ ++ union ++ { ++ char *ptr; ++ int word; ++ } u; ++ u.ptr = str (item); ++ return u.word; ++} ++ ++static int ++word_utf8 (nl_item item) ++{ ++ union ++ { ++ char *ptr; ++ int word; ++ } u; ++ u.ptr = str_utf8 (item); ++ return u.word; ++} ++ ++static void ++one_pass (void) ++{ ++ /* LC_TIME. */ ++ TEST_COMPARE_STRING (str (ABDAY_1), str_utf8 (ABDAY_1)); ++ TEST_COMPARE_STRING (str (ABDAY_2), str_utf8 (ABDAY_2)); ++ TEST_COMPARE_STRING (str (ABDAY_3), str_utf8 (ABDAY_3)); ++ TEST_COMPARE_STRING (str (ABDAY_4), str_utf8 (ABDAY_4)); ++ TEST_COMPARE_STRING (str (ABDAY_5), str_utf8 (ABDAY_5)); ++ TEST_COMPARE_STRING (str (ABDAY_6), str_utf8 (ABDAY_6)); ++ TEST_COMPARE_STRING (str (ABDAY_7), str_utf8 (ABDAY_7)); ++ ++ TEST_COMPARE_STRING (str (DAY_1), str_utf8 (DAY_1)); ++ TEST_COMPARE_STRING (str (DAY_2), str_utf8 (DAY_2)); ++ TEST_COMPARE_STRING (str (DAY_3), str_utf8 (DAY_3)); ++ TEST_COMPARE_STRING (str (DAY_4), str_utf8 (DAY_4)); ++ TEST_COMPARE_STRING (str (DAY_5), str_utf8 (DAY_5)); ++ TEST_COMPARE_STRING (str (DAY_6), str_utf8 (DAY_6)); ++ TEST_COMPARE_STRING (str (DAY_7), str_utf8 (DAY_7)); ++ ++ TEST_COMPARE_STRING (str (ABMON_1), str_utf8 (ABMON_1)); ++ TEST_COMPARE_STRING (str (ABMON_2), str_utf8 (ABMON_2)); ++ TEST_COMPARE_STRING (str (ABMON_3), str_utf8 (ABMON_3)); ++ TEST_COMPARE_STRING (str (ABMON_4), str_utf8 (ABMON_4)); ++ TEST_COMPARE_STRING (str (ABMON_5), str_utf8 (ABMON_5)); ++ TEST_COMPARE_STRING (str (ABMON_6), str_utf8 (ABMON_6)); ++ TEST_COMPARE_STRING (str (ABMON_7), str_utf8 (ABMON_7)); ++ TEST_COMPARE_STRING (str (ABMON_8), str_utf8 (ABMON_8)); ++ TEST_COMPARE_STRING (str (ABMON_9), str_utf8 (ABMON_9)); ++ TEST_COMPARE_STRING (str (ABMON_10), str_utf8 (ABMON_10)); ++ TEST_COMPARE_STRING (str (ABMON_11), str_utf8 (ABMON_11)); ++ TEST_COMPARE_STRING (str (ABMON_12), str_utf8 (ABMON_12)); ++ ++ TEST_COMPARE_STRING (str (MON_1), str_utf8 (MON_1)); ++ TEST_COMPARE_STRING (str (MON_2), str_utf8 (MON_2)); ++ TEST_COMPARE_STRING (str (MON_3), str_utf8 (MON_3)); ++ TEST_COMPARE_STRING (str (MON_4), str_utf8 (MON_4)); ++ TEST_COMPARE_STRING (str (MON_5), str_utf8 (MON_5)); ++ TEST_COMPARE_STRING (str (MON_6), str_utf8 (MON_6)); ++ TEST_COMPARE_STRING (str (MON_7), str_utf8 (MON_7)); ++ TEST_COMPARE_STRING (str (MON_8), str_utf8 (MON_8)); ++ TEST_COMPARE_STRING (str (MON_9), str_utf8 (MON_9)); ++ TEST_COMPARE_STRING (str (MON_10), str_utf8 (MON_10)); ++ TEST_COMPARE_STRING (str (MON_11), str_utf8 (MON_11)); ++ TEST_COMPARE_STRING (str (MON_12), str_utf8 (MON_12)); ++ ++ TEST_COMPARE_STRING (str (AM_STR), str_utf8 (AM_STR)); ++ TEST_COMPARE_STRING (str (PM_STR), str_utf8 (PM_STR)); ++ ++ TEST_COMPARE_STRING (str (D_T_FMT), str_utf8 (D_T_FMT)); ++ TEST_COMPARE_STRING (str (D_FMT), str_utf8 (D_FMT)); ++ TEST_COMPARE_STRING (str (T_FMT), str_utf8 (T_FMT)); ++ TEST_COMPARE_STRING (str (T_FMT_AMPM), ++ str_utf8 (T_FMT_AMPM)); ++ ++ TEST_COMPARE_STRING (str (ERA), str_utf8 (ERA)); ++ TEST_COMPARE_STRING (str (ERA_YEAR), str_utf8 (ERA_YEAR)); ++ TEST_COMPARE_STRING (str (ERA_D_FMT), str_utf8 (ERA_D_FMT)); ++ TEST_COMPARE_STRING (str (ALT_DIGITS), str_utf8 (ALT_DIGITS)); ++ TEST_COMPARE_STRING (str (ERA_D_T_FMT), str_utf8 (ERA_D_T_FMT)); ++ TEST_COMPARE_STRING (str (ERA_T_FMT), str_utf8 (ERA_T_FMT)); ++ TEST_COMPARE (word (_NL_TIME_ERA_NUM_ENTRIES), ++ word_utf8 (_NL_TIME_ERA_NUM_ENTRIES)); ++ /* No array elements, so nothing to compare for _NL_TIME_ERA_ENTRIES. */ ++ TEST_COMPARE (word (_NL_TIME_ERA_NUM_ENTRIES), 0); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABDAY_1), wstr_utf8 (_NL_WABDAY_1)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABDAY_2), wstr_utf8 (_NL_WABDAY_2)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABDAY_3), wstr_utf8 (_NL_WABDAY_3)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABDAY_4), wstr_utf8 (_NL_WABDAY_4)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABDAY_5), wstr_utf8 (_NL_WABDAY_5)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABDAY_6), wstr_utf8 (_NL_WABDAY_6)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABDAY_7), wstr_utf8 (_NL_WABDAY_7)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WDAY_1), wstr_utf8 (_NL_WDAY_1)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WDAY_2), wstr_utf8 (_NL_WDAY_2)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WDAY_3), wstr_utf8 (_NL_WDAY_3)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WDAY_4), wstr_utf8 (_NL_WDAY_4)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WDAY_5), wstr_utf8 (_NL_WDAY_5)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WDAY_6), wstr_utf8 (_NL_WDAY_6)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WDAY_7), wstr_utf8 (_NL_WDAY_7)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_1), wstr_utf8 (_NL_WABMON_1)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_2), wstr_utf8 (_NL_WABMON_2)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_3), wstr_utf8 (_NL_WABMON_3)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_4), wstr_utf8 (_NL_WABMON_4)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_5), wstr_utf8 (_NL_WABMON_5)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_6), wstr_utf8 (_NL_WABMON_6)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_7), wstr_utf8 (_NL_WABMON_7)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_8), wstr_utf8 (_NL_WABMON_8)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_9), wstr_utf8 (_NL_WABMON_9)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_10), wstr_utf8 (_NL_WABMON_10)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_11), wstr_utf8 (_NL_WABMON_11)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABMON_12), wstr_utf8 (_NL_WABMON_12)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_1), wstr_utf8 (_NL_WMON_1)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_2), wstr_utf8 (_NL_WMON_2)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_3), wstr_utf8 (_NL_WMON_3)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_4), wstr_utf8 (_NL_WMON_4)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_5), wstr_utf8 (_NL_WMON_5)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_6), wstr_utf8 (_NL_WMON_6)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_7), wstr_utf8 (_NL_WMON_7)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_8), wstr_utf8 (_NL_WMON_8)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_9), wstr_utf8 (_NL_WMON_9)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_10), wstr_utf8 (_NL_WMON_10)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_11), wstr_utf8 (_NL_WMON_11)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WMON_12), wstr_utf8 (_NL_WMON_12)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WAM_STR), wstr_utf8 (_NL_WAM_STR)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WPM_STR), wstr_utf8 (_NL_WPM_STR)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WD_T_FMT), wstr_utf8 (_NL_WD_T_FMT)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WD_FMT), wstr_utf8 (_NL_WD_FMT)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WT_FMT), wstr_utf8 (_NL_WT_FMT)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WT_FMT_AMPM), ++ wstr_utf8 (_NL_WT_FMT_AMPM)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WERA_YEAR), wstr_utf8 (_NL_WERA_YEAR)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WERA_D_FMT), wstr_utf8 (_NL_WERA_D_FMT)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALT_DIGITS), ++ wstr_utf8 (_NL_WALT_DIGITS)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WERA_D_T_FMT), ++ wstr_utf8 (_NL_WERA_D_T_FMT)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WERA_T_FMT), wstr_utf8 (_NL_WERA_T_FMT)); ++ ++ /* This is somewhat inconsistent, but see locale/categories.def. */ ++ TEST_COMPARE (byte (_NL_TIME_WEEK_NDAYS), byte_utf8 (_NL_TIME_WEEK_NDAYS)); ++ TEST_COMPARE (word (_NL_TIME_WEEK_1STDAY), ++ word_utf8 (_NL_TIME_WEEK_1STDAY)); ++ TEST_COMPARE (byte (_NL_TIME_WEEK_1STWEEK), ++ byte_utf8 (_NL_TIME_WEEK_1STWEEK)); ++ TEST_COMPARE (byte (_NL_TIME_FIRST_WEEKDAY), ++ byte_utf8 (_NL_TIME_FIRST_WEEKDAY)); ++ TEST_COMPARE (byte (_NL_TIME_FIRST_WORKDAY), ++ byte_utf8 (_NL_TIME_FIRST_WORKDAY)); ++ TEST_COMPARE (byte (_NL_TIME_CAL_DIRECTION), ++ byte_utf8 (_NL_TIME_CAL_DIRECTION)); ++ TEST_COMPARE_STRING (str (_NL_TIME_TIMEZONE), str_utf8 (_NL_TIME_TIMEZONE)); ++ ++ TEST_COMPARE_STRING (str (_DATE_FMT), str_utf8 (_DATE_FMT)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_W_DATE_FMT), wstr_utf8 (_NL_W_DATE_FMT)); ++ ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_TIME_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_TIME_CODESET), "UTF-8"); ++ ++ TEST_COMPARE_STRING (str (ALTMON_1), str_utf8 (ALTMON_1)); ++ TEST_COMPARE_STRING (str (ALTMON_2), str_utf8 (ALTMON_2)); ++ TEST_COMPARE_STRING (str (ALTMON_3), str_utf8 (ALTMON_3)); ++ TEST_COMPARE_STRING (str (ALTMON_4), str_utf8 (ALTMON_4)); ++ TEST_COMPARE_STRING (str (ALTMON_5), str_utf8 (ALTMON_5)); ++ TEST_COMPARE_STRING (str (ALTMON_6), str_utf8 (ALTMON_6)); ++ TEST_COMPARE_STRING (str (ALTMON_7), str_utf8 (ALTMON_7)); ++ TEST_COMPARE_STRING (str (ALTMON_8), str_utf8 (ALTMON_8)); ++ TEST_COMPARE_STRING (str (ALTMON_9), str_utf8 (ALTMON_9)); ++ TEST_COMPARE_STRING (str (ALTMON_10), str_utf8 (ALTMON_10)); ++ TEST_COMPARE_STRING (str (ALTMON_11), str_utf8 (ALTMON_11)); ++ TEST_COMPARE_STRING (str (ALTMON_12), str_utf8 (ALTMON_12)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_1), wstr_utf8 (_NL_WALTMON_1)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_2), wstr_utf8 (_NL_WALTMON_2)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_3), wstr_utf8 (_NL_WALTMON_3)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_4), wstr_utf8 (_NL_WALTMON_4)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_5), wstr_utf8 (_NL_WALTMON_5)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_6), wstr_utf8 (_NL_WALTMON_6)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_7), wstr_utf8 (_NL_WALTMON_7)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_8), wstr_utf8 (_NL_WALTMON_8)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_9), wstr_utf8 (_NL_WALTMON_9)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_10), wstr_utf8 (_NL_WALTMON_10)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_11), wstr_utf8 (_NL_WALTMON_11)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WALTMON_12), wstr_utf8 (_NL_WALTMON_12)); ++ ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_1), str_utf8 (_NL_ABALTMON_1)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_2), str_utf8 (_NL_ABALTMON_2)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_3), str_utf8 (_NL_ABALTMON_3)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_4), str_utf8 (_NL_ABALTMON_4)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_5), str_utf8 (_NL_ABALTMON_5)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_6), str_utf8 (_NL_ABALTMON_6)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_7), str_utf8 (_NL_ABALTMON_7)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_8), str_utf8 (_NL_ABALTMON_8)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_9), str_utf8 (_NL_ABALTMON_9)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_10), str_utf8 (_NL_ABALTMON_10)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_11), str_utf8 (_NL_ABALTMON_11)); ++ TEST_COMPARE_STRING (str (_NL_ABALTMON_12), str_utf8 (_NL_ABALTMON_12)); ++ ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_1), ++ wstr_utf8 (_NL_WABALTMON_1)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_2), ++ wstr_utf8 (_NL_WABALTMON_2)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_3), ++ wstr_utf8 (_NL_WABALTMON_3)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_4), ++ wstr_utf8 (_NL_WABALTMON_4)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_5), ++ wstr_utf8 (_NL_WABALTMON_5)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_6), ++ wstr_utf8 (_NL_WABALTMON_6)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_7), ++ wstr_utf8 (_NL_WABALTMON_7)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_8), ++ wstr_utf8 (_NL_WABALTMON_8)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_9), ++ wstr_utf8 (_NL_WABALTMON_9)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_10), ++ wstr_utf8 (_NL_WABALTMON_10)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_11), ++ wstr_utf8 (_NL_WABALTMON_11)); ++ TEST_COMPARE_STRING_WIDE (wstr (_NL_WABALTMON_12), ++ wstr_utf8 (_NL_WABALTMON_12)); ++ ++ /* LC_COLLATE. Mostly untested, only expected differences. */ ++ TEST_COMPARE_STRING (str (_NL_COLLATE_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_COLLATE_CODESET), "UTF-8"); ++ ++ /* LC_CTYPE. Mostly untested, only expected differences. */ ++ TEST_COMPARE_STRING (str (CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (CODESET), "UTF-8"); ++ ++ /* LC_MONETARY. */ ++ TEST_COMPARE_STRING (str (INT_CURR_SYMBOL), str_utf8 (INT_CURR_SYMBOL)); ++ TEST_COMPARE_STRING (str (CURRENCY_SYMBOL), str_utf8 (CURRENCY_SYMBOL)); ++ TEST_COMPARE_STRING (str (MON_DECIMAL_POINT), str_utf8 (MON_DECIMAL_POINT)); ++ TEST_COMPARE_STRING (str (MON_THOUSANDS_SEP), str_utf8 (MON_THOUSANDS_SEP)); ++ TEST_COMPARE_STRING (str (MON_GROUPING), str_utf8 (MON_GROUPING)); ++ TEST_COMPARE_STRING (str (POSITIVE_SIGN), str_utf8 (POSITIVE_SIGN)); ++ TEST_COMPARE_STRING (str (NEGATIVE_SIGN), str_utf8 (NEGATIVE_SIGN)); ++ TEST_COMPARE (byte (INT_FRAC_DIGITS), byte_utf8 (INT_FRAC_DIGITS)); ++ TEST_COMPARE (byte (FRAC_DIGITS), byte_utf8 (FRAC_DIGITS)); ++ TEST_COMPARE (byte (P_CS_PRECEDES), byte_utf8 (P_CS_PRECEDES)); ++ TEST_COMPARE (byte (P_SEP_BY_SPACE), byte_utf8 (P_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (N_CS_PRECEDES), byte_utf8 (N_CS_PRECEDES)); ++ TEST_COMPARE (byte (N_SEP_BY_SPACE), byte_utf8 (N_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (P_SIGN_POSN), byte_utf8 (P_SIGN_POSN)); ++ TEST_COMPARE (byte (N_SIGN_POSN), byte_utf8 (N_SIGN_POSN)); ++ TEST_COMPARE_STRING (str (CRNCYSTR), str_utf8 (CRNCYSTR)); ++ TEST_COMPARE (byte (INT_P_CS_PRECEDES), byte_utf8 (INT_P_CS_PRECEDES)); ++ TEST_COMPARE (byte (INT_P_SEP_BY_SPACE), byte_utf8 (INT_P_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (INT_N_CS_PRECEDES), byte_utf8 (INT_N_CS_PRECEDES)); ++ TEST_COMPARE (byte (INT_N_SEP_BY_SPACE), byte_utf8 (INT_N_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (INT_P_SIGN_POSN), byte_utf8 (INT_P_SIGN_POSN)); ++ TEST_COMPARE (byte (INT_N_SIGN_POSN), byte_utf8 (INT_N_SIGN_POSN)); ++ TEST_COMPARE_STRING (str (_NL_MONETARY_DUO_INT_CURR_SYMBOL), ++ str_utf8 (_NL_MONETARY_DUO_INT_CURR_SYMBOL)); ++ TEST_COMPARE_STRING (str (_NL_MONETARY_DUO_CURRENCY_SYMBOL), ++ str_utf8 (_NL_MONETARY_DUO_CURRENCY_SYMBOL)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_FRAC_DIGITS), ++ byte_utf8 (_NL_MONETARY_DUO_INT_FRAC_DIGITS)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_FRAC_DIGITS), ++ byte_utf8 (_NL_MONETARY_DUO_FRAC_DIGITS)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_P_CS_PRECEDES), ++ byte_utf8 (_NL_MONETARY_DUO_P_CS_PRECEDES)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_P_SEP_BY_SPACE), ++ byte_utf8 (_NL_MONETARY_DUO_P_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_N_CS_PRECEDES), ++ byte_utf8 (_NL_MONETARY_DUO_N_CS_PRECEDES)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_N_SEP_BY_SPACE), ++ byte_utf8 (_NL_MONETARY_DUO_N_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_P_CS_PRECEDES), ++ byte_utf8 (_NL_MONETARY_DUO_INT_P_CS_PRECEDES)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_P_SEP_BY_SPACE), ++ byte_utf8 (_NL_MONETARY_DUO_INT_P_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_N_CS_PRECEDES), ++ byte_utf8 (_NL_MONETARY_DUO_INT_N_CS_PRECEDES)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_N_SEP_BY_SPACE), ++ byte_utf8 (_NL_MONETARY_DUO_INT_N_SEP_BY_SPACE)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_P_SIGN_POSN), ++ byte_utf8 (_NL_MONETARY_DUO_INT_P_SIGN_POSN)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_N_SIGN_POSN), ++ byte_utf8 (_NL_MONETARY_DUO_INT_N_SIGN_POSN)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_P_SIGN_POSN), ++ byte_utf8 (_NL_MONETARY_DUO_P_SIGN_POSN)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_N_SIGN_POSN), ++ byte_utf8 (_NL_MONETARY_DUO_N_SIGN_POSN)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_P_SIGN_POSN), ++ byte_utf8 (_NL_MONETARY_DUO_INT_P_SIGN_POSN)); ++ TEST_COMPARE (byte (_NL_MONETARY_DUO_INT_N_SIGN_POSN), ++ byte_utf8 (_NL_MONETARY_DUO_INT_N_SIGN_POSN)); ++ TEST_COMPARE (word (_NL_MONETARY_UNO_VALID_FROM), ++ word_utf8 (_NL_MONETARY_UNO_VALID_FROM)); ++ TEST_COMPARE (word (_NL_MONETARY_UNO_VALID_TO), ++ word_utf8 (_NL_MONETARY_UNO_VALID_TO)); ++ TEST_COMPARE (word (_NL_MONETARY_DUO_VALID_FROM), ++ word_utf8 (_NL_MONETARY_DUO_VALID_FROM)); ++ TEST_COMPARE (word (_NL_MONETARY_DUO_VALID_TO), ++ word_utf8 (_NL_MONETARY_DUO_VALID_TO)); ++ /* _NL_MONETARY_CONVERSION_RATE cannot be tested (word array). */ ++ TEST_COMPARE (word (_NL_MONETARY_DECIMAL_POINT_WC), ++ word_utf8 (_NL_MONETARY_DECIMAL_POINT_WC)); ++ TEST_COMPARE (word (_NL_MONETARY_THOUSANDS_SEP_WC), ++ word_utf8 (_NL_MONETARY_THOUSANDS_SEP_WC)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_MONETARY_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_MONETARY_CODESET), "UTF-8"); ++ ++ /* LC_NUMERIC. */ ++ ++ TEST_COMPARE_STRING (str (DECIMAL_POINT), str_utf8 (DECIMAL_POINT)); ++ TEST_COMPARE_STRING (str (RADIXCHAR), str_utf8 (RADIXCHAR)); ++ TEST_COMPARE_STRING (str (THOUSANDS_SEP), str_utf8 (THOUSANDS_SEP)); ++ TEST_COMPARE_STRING (str (THOUSEP), str_utf8 (THOUSEP)); ++ TEST_COMPARE_STRING (str (GROUPING), str_utf8 (GROUPING)); ++ TEST_COMPARE (word (_NL_NUMERIC_DECIMAL_POINT_WC), ++ word_utf8 (_NL_NUMERIC_DECIMAL_POINT_WC)); ++ TEST_COMPARE (word (_NL_NUMERIC_THOUSANDS_SEP_WC), ++ word_utf8 (_NL_NUMERIC_THOUSANDS_SEP_WC)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_NUMERIC_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_NUMERIC_CODESET), "UTF-8"); ++ ++ /* LC_MESSAGES. */ ++ ++ TEST_COMPARE_STRING (str (YESEXPR), str_utf8 (YESEXPR)); ++ TEST_COMPARE_STRING (str (NOEXPR), str_utf8 (NOEXPR)); ++ TEST_COMPARE_STRING (str (YESSTR), str_utf8 (YESSTR)); ++ TEST_COMPARE_STRING (str (NOSTR), str_utf8 (NOSTR)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_MESSAGES_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_MESSAGES_CODESET), "UTF-8"); ++ ++ /* LC_PAPER. */ ++ ++ TEST_COMPARE (word (_NL_PAPER_HEIGHT), word_utf8 (_NL_PAPER_HEIGHT)); ++ TEST_COMPARE (word (_NL_PAPER_WIDTH), word_utf8 (_NL_PAPER_WIDTH)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_PAPER_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_PAPER_CODESET), "UTF-8"); ++ ++ /* LC_NAME. */ ++ ++ TEST_COMPARE_STRING (str (_NL_NAME_NAME_FMT), ++ str_utf8 (_NL_NAME_NAME_FMT)); ++ TEST_COMPARE_STRING (str (_NL_NAME_NAME_GEN), ++ str_utf8 (_NL_NAME_NAME_GEN)); ++ TEST_COMPARE_STRING (str (_NL_NAME_NAME_MR), ++ str_utf8 (_NL_NAME_NAME_MR)); ++ TEST_COMPARE_STRING (str (_NL_NAME_NAME_MRS), ++ str_utf8 (_NL_NAME_NAME_MRS)); ++ TEST_COMPARE_STRING (str (_NL_NAME_NAME_MISS), ++ str_utf8 (_NL_NAME_NAME_MISS)); ++ TEST_COMPARE_STRING (str (_NL_NAME_NAME_MS), ++ str_utf8 (_NL_NAME_NAME_MS)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_NAME_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_NAME_CODESET), "UTF-8"); ++ ++ /* LC_ADDRESS. */ ++ ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_POSTAL_FMT), ++ str_utf8 (_NL_ADDRESS_POSTAL_FMT)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_COUNTRY_NAME), ++ str_utf8 (_NL_ADDRESS_COUNTRY_NAME)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_COUNTRY_POST), ++ str_utf8 (_NL_ADDRESS_COUNTRY_POST)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_COUNTRY_AB2), ++ str_utf8 (_NL_ADDRESS_COUNTRY_AB2)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_COUNTRY_AB3), ++ str_utf8 (_NL_ADDRESS_COUNTRY_AB3)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_COUNTRY_CAR), ++ str_utf8 (_NL_ADDRESS_COUNTRY_CAR)); ++ TEST_COMPARE (word (_NL_ADDRESS_COUNTRY_NUM), ++ word_utf8 (_NL_ADDRESS_COUNTRY_NUM)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_COUNTRY_ISBN), ++ str_utf8 (_NL_ADDRESS_COUNTRY_ISBN)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_LANG_NAME), ++ str_utf8 (_NL_ADDRESS_LANG_NAME)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_LANG_AB), ++ str_utf8 (_NL_ADDRESS_LANG_AB)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_LANG_TERM), ++ str_utf8 (_NL_ADDRESS_LANG_TERM)); ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_LANG_LIB), ++ str_utf8 (_NL_ADDRESS_LANG_LIB)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_ADDRESS_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_ADDRESS_CODESET), "UTF-8"); ++ ++ /* LC_TELEPHONE. */ ++ ++ TEST_COMPARE_STRING (str (_NL_TELEPHONE_TEL_INT_FMT), ++ str_utf8 (_NL_TELEPHONE_TEL_INT_FMT)); ++ TEST_COMPARE_STRING (str (_NL_TELEPHONE_TEL_DOM_FMT), ++ str_utf8 (_NL_TELEPHONE_TEL_DOM_FMT)); ++ TEST_COMPARE_STRING (str (_NL_TELEPHONE_INT_SELECT), ++ str_utf8 (_NL_TELEPHONE_INT_SELECT)); ++ TEST_COMPARE_STRING (str (_NL_TELEPHONE_INT_PREFIX), ++ str_utf8 (_NL_TELEPHONE_INT_PREFIX)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_TELEPHONE_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_TELEPHONE_CODESET), "UTF-8"); ++ ++ /* LC_MEASUREMENT. */ ++ ++ TEST_COMPARE (byte (_NL_MEASUREMENT_MEASUREMENT), ++ byte_utf8 (_NL_MEASUREMENT_MEASUREMENT)); ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_MEASUREMENT_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_MEASUREMENT_CODESET), "UTF-8"); ++ ++ /* LC_IDENTIFICATION is skipped since C.UTF-8 is distinct from C. */ ++ ++ /* _NL_IDENTIFICATION_CATEGORY cannot be tested because it is a ++ string array. */ ++ /* Expected difference. */ ++ TEST_COMPARE_STRING (str (_NL_IDENTIFICATION_CODESET), "ANSI_X3.4-1968"); ++ TEST_COMPARE_STRING (str_utf8 (_NL_IDENTIFICATION_CODESET), "UTF-8"); ++} ++ ++static int ++do_test (void) ++{ ++ puts ("info: using setlocale and nl_langinfo"); ++ one_pass (); ++ ++ puts ("info: using nl_langinfo_l"); ++ ++ c_utf8 = newlocale (LC_ALL_MASK, "C.UTF-8", (locale_t) 0); ++ TEST_VERIFY_EXIT (c_utf8 != (locale_t) 0); ++ ++ switch_to_c (); ++ use_nl_langinfo_l = true; ++ one_pass (); ++ ++ freelocale (c_utf8); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-cs-path.patch b/SOURCES/glibc-cs-path.patch new file mode 100644 index 0000000..40835d2 --- /dev/null +++ b/SOURCES/glibc-cs-path.patch @@ -0,0 +1,44 @@ +Short description: Adjust CS_PATH and the test container layout. +Author(s): Fedora glibc team +Origin: PATCH +Upstream status: not-needed + +In Fedora we should return only /usr/bin as CS_PATH because /bin is just +a symlink to /usr/bin after MoveToUsr transition (which glibc has not +really completed). + +We also create /{bin,lib,lib64,sbin} in the test container as symbolic +links. This brings the test container in line with Fedora's filesystem +layout and avoids some test failures. For example, because Fedora's +CS_PATH is /usr/bin, tst-vfork3 will try to execute /usr/bin/echo in the +container. Without this change the container installs `echo' in /bin +not /usr/bin, causing the test to fail. + +diff --git a/Makefile b/Makefile +index a49870d3d1e636a9..feb2599203b10098 100644 +--- a/Makefile ++++ b/Makefile +@@ -598,9 +598,13 @@ $(tests-container) $(addsuffix /tests,$(subdirs)) : \ + $(objpfx)testroot.pristine/install.stamp : + test -d $(objpfx)testroot.pristine || \ + mkdir $(objpfx)testroot.pristine +- # We need a working /bin/sh for some of the tests. +- test -d $(objpfx)testroot.pristine/bin || \ +- mkdir $(objpfx)testroot.pristine/bin ++ # Set up symlinks to directories whose contents got moved to /usr ++ for moved in bin lib lib64 sbin; do \ ++ test -d $(objpfx)testroot.pristine/usr/$$moved || \ ++ mkdir -p $(objpfx)testroot.pristine/usr/$$moved ;\ ++ test -e $(objpfx)testroot.pristine/$$moved || \ ++ ln -s usr/$$moved $(objpfx)testroot.pristine/$$moved ;\ ++ done + # We need the compiled locale dir for localedef tests. + test -d $(objpfx)testroot.pristine/$(complocaledir) || \ + mkdir -p $(objpfx)testroot.pristine/$(complocaledir) +diff --git a/sysdeps/unix/confstr.h b/sysdeps/unix/confstr.h +index 15859c3b2759878e..9b63b7f8069866fd 100644 +--- a/sysdeps/unix/confstr.h ++++ b/sysdeps/unix/confstr.h +@@ -1 +1 @@ +-#define CS_PATH "/bin:/usr/bin" ++#define CS_PATH "/usr/bin" diff --git a/SOURCES/glibc-deprecated-selinux-makedb.patch b/SOURCES/glibc-deprecated-selinux-makedb.patch new file mode 100644 index 0000000..c762d02 --- /dev/null +++ b/SOURCES/glibc-deprecated-selinux-makedb.patch @@ -0,0 +1,20 @@ +This is necessary to get things building again after libselinux changes. +A proper fix is under discussion upstream: + + + +diff --git a/nss/makedb.c b/nss/makedb.c +index 8e389a1683747cf1..9d81aed57d384a22 100644 +--- a/nss/makedb.c ++++ b/nss/makedb.c +@@ -17,6 +17,10 @@ + License along with the GNU C Library; if not, see + . */ + ++/* This file uses deprecated declarations from libselinux. */ ++#include ++DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations"); ++ + #include + #include + #include diff --git a/SOURCES/glibc-deprecated-selinux-nscd.patch b/SOURCES/glibc-deprecated-selinux-nscd.patch new file mode 100644 index 0000000..315b6cd --- /dev/null +++ b/SOURCES/glibc-deprecated-selinux-nscd.patch @@ -0,0 +1,17 @@ +This patch works around deprecated libselinux features used by nscd. + +diff --git a/nscd/selinux.c b/nscd/selinux.c +index a4ea8008e201b939..0acca4639202a75a 100644 +--- a/nscd/selinux.c ++++ b/nscd/selinux.c +@@ -17,6 +17,10 @@ + License along with the GNU C Library; if not, see + . */ + ++/* This file uses deprecated declarations from libselinux. */ ++#include ++DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wdeprecated-declarations"); ++ + #include "config.h" + #include + #include diff --git a/SOURCES/glibc-fedora-linux-tcsetattr.patch b/SOURCES/glibc-fedora-linux-tcsetattr.patch new file mode 100644 index 0000000..3ae7e27 --- /dev/null +++ b/SOURCES/glibc-fedora-linux-tcsetattr.patch @@ -0,0 +1,61 @@ +Short description: Fedora-specific workaround for kernel pty bug. +Author(s): Fedora glibc team +Origin: PATCH +Upstream status: not-submitted + +This is a Fedora-specific workaround for a kernel bug where calling +ioctl on a pty will silently ignore the invalid c_cflag. The +workaround is to use TCGETS to verify the setting matches. This is +not upstream and needs to either be removed or submitted upstream +after analysis. + +Index: b/sysdeps/unix/sysv/linux/tcsetattr.c +=================================================================== +--- a/sysdeps/unix/sysv/linux/tcsetattr.c ++++ b/sysdeps/unix/sysv/linux/tcsetattr.c +@@ -45,6 +45,7 @@ __tcsetattr (int fd, int optional_action + { + struct __kernel_termios k_termios; + unsigned long int cmd; ++ int retval; + + switch (optional_actions) + { +@@ -75,7 +76,36 @@ __tcsetattr (int fd, int optional_action + memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0], + __KERNEL_NCCS * sizeof (cc_t)); + +- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); ++ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios); ++ ++ if (retval == 0 && cmd == TCSETS) ++ { ++ /* The Linux kernel has a bug which silently ignore the invalid ++ c_cflag on pty. We have to check it here. */ ++ int save = errno; ++ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios); ++ if (retval) ++ { ++ /* We cannot verify if the setting is ok. We don't return ++ an error (?). */ ++ __set_errno (save); ++ retval = 0; ++ } ++ else if ((termios_p->c_cflag & (PARENB | CREAD)) ++ != (k_termios.c_cflag & (PARENB | CREAD)) ++ || ((termios_p->c_cflag & CSIZE) ++ && ((termios_p->c_cflag & CSIZE) ++ != (k_termios.c_cflag & CSIZE)))) ++ { ++ /* It looks like the Linux kernel silently changed the ++ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an ++ error. */ ++ __set_errno (EINVAL); ++ retval = -1; ++ } ++ } ++ ++ return retval; + } + weak_alias (__tcsetattr, tcsetattr) + libc_hidden_def (tcsetattr) diff --git a/SOURCES/glibc-fedora-localedata-rh61908.patch b/SOURCES/glibc-fedora-localedata-rh61908.patch new file mode 100644 index 0000000..518253d --- /dev/null +++ b/SOURCES/glibc-fedora-localedata-rh61908.patch @@ -0,0 +1,49 @@ +Short description: Add 4 ISO-8859-15 locales to SUPPORTED for Euro symbol. +Author(s): Fedora glibc team +Origin: PATCH +Bug-RHEL: #61908 +Upstream status: not-needed + +Very early RHL 7.3 requirement to add these locales so users can +get access to Euro symbol. We should review this bug and decide if +the UTF-8 locales are now serving the same purpose and drop the +additional locales. + +* Tue Mar 26 2002 Jakub Jelinek 2.2.5-28 +- add a couple of .ISO-8859-15 locales (#61908) + +diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED +--- a/localedata/SUPPORTED 2012-11-25 12:59:31.000000000 -0700 ++++ b/localedata/SUPPORTED 2012-11-26 12:58:43.298223018 -0700 +@@ -89,6 +89,7 @@ cy_GB.UTF-8/UTF-8 \ + cy_GB/ISO-8859-14 \ + da_DK.UTF-8/UTF-8 \ + da_DK/ISO-8859-1 \ ++da_DK.ISO-8859-15/ISO-8859-15 \ + de_AT.UTF-8/UTF-8 \ + de_AT/ISO-8859-1 \ + de_AT@euro/ISO-8859-15 \ +@@ -121,6 +122,7 @@ en_DK.UTF-8/UTF-8 \ + en_DK/ISO-8859-1 \ + en_GB.UTF-8/UTF-8 \ + en_GB/ISO-8859-1 \ ++en_GB.ISO-8859-15/ISO-8859-15 \ + en_HK.UTF-8/UTF-8 \ + en_HK/ISO-8859-1 \ + en_IE.UTF-8/UTF-8 \ +@@ -136,6 +138,7 @@ en_SG.UTF-8/UTF-8 \ + en_SG/ISO-8859-1 \ + en_US.UTF-8/UTF-8 \ + en_US/ISO-8859-1 \ ++en_US.ISO-8859-15/ISO-8859-15 \ + en_ZA.UTF-8/UTF-8 \ + en_ZA/ISO-8859-1 \ + en_ZM/UTF-8 \ +@@ -385,6 +388,7 @@ sv_FI/ISO-8859-1 \ + sv_FI@euro/ISO-8859-15 \ + sv_SE.UTF-8/UTF-8 \ + sv_SE/ISO-8859-1 \ ++sv_SE.ISO-8859-15/ISO-8859-15 \ + sw_KE/UTF-8 \ + sw_TZ/UTF-8 \ + szl_PL/UTF-8 \ diff --git a/SOURCES/glibc-fedora-localedef.patch b/SOURCES/glibc-fedora-localedef.patch new file mode 100644 index 0000000..515611a --- /dev/null +++ b/SOURCES/glibc-fedora-localedef.patch @@ -0,0 +1,21 @@ +Short description: Fedora-specific glibc install locale changes. +Author(s): Fedora glibc team +Origin: PATCH +Upstream status: not-needed + +The Fedora glibc build and install does not need the normal install +behaviour which updates the locale archive. The Fedora install phase +in the spec file of the rpm will handle this manually. + +diff --git a/localedata/Makefile b/localedata/Makefile +index 0eea396ad86da956..54caabda33728207 100644 +--- a/localedata/Makefile ++++ b/localedata/Makefile +@@ -413,6 +413,7 @@ define build-one-locale + echo -n '...'; \ + input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \ + $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \ ++ --no-archive \ + -i locales/$$input -f charmaps/$$charset \ + $(addprefix --prefix=,$(install_root)) $$locale \ + && echo ' done'; diff --git a/SOURCES/glibc-fedora-manual-dircategory.patch b/SOURCES/glibc-fedora-manual-dircategory.patch new file mode 100644 index 0000000..11c2656 --- /dev/null +++ b/SOURCES/glibc-fedora-manual-dircategory.patch @@ -0,0 +1,31 @@ +Short description: Place glibc info into "Libraries" category. +Author(s): Fedora glibc team +Origin: PATCH +Upstream status: not-needed + +The category names for libraries is completely random including +"Libraries", "GNU Libraries", "GNU libraries", and "Software libraries." +In the GNU info manual the "Software libraries" category is given as an +example, but really we need to standardize on a category for upstream. +I suggest we drop this change after some upstream discussion. + +From 4820b9175535e13df79ce816106016040014916e Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Fri, 3 Nov 2006 16:31:21 +0000 +Subject: [PATCH] Change @dircategory. + +--- + manual/libc.texinfo | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +--- a/manual/libc.texinfo ++++ b/manual/libc.texinfo +@@ -7,7 +7,7 @@ + @include macros.texi + + @comment Tell install-info what to do. +-@dircategory Software libraries ++@dircategory Libraries + @direntry + * Libc: (libc). C library. + @end direntry diff --git a/SOURCES/glibc-fedora-nscd.patch b/SOURCES/glibc-fedora-nscd.patch new file mode 100644 index 0000000..6f8f764 --- /dev/null +++ b/SOURCES/glibc-fedora-nscd.patch @@ -0,0 +1,20 @@ +Short description: NSCD must use nscd user. +Author(s): Fedora glibc team +Origin: PATCH +Upstream status: not-needed + +Fedora-specific configuration adjustment to introduce the nscd user. +(Upstream does not assume this user exists.) + +diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf +--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600 ++++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600 +@@ -33,7 +33,7 @@ + # logfile /var/log/nscd.log + # threads 4 + # max-threads 32 +-# server-user nobody ++ server-user nscd + # stat-user somebody + debug-level 0 + # reload-count 5 diff --git a/SOURCES/glibc-fedora-nsswitch.patch b/SOURCES/glibc-fedora-nsswitch.patch new file mode 100644 index 0000000..61f0311 --- /dev/null +++ b/SOURCES/glibc-fedora-nsswitch.patch @@ -0,0 +1,46 @@ +The Fedora /etc/nsswitch.conf is based largely on the upstream +version with minor downstream distribution modifications for +use with SSSD and systemd. + +diff --git a/nss/nsswitch.conf b/nss/nsswitch.conf +index 4a6bcb1f7bc0b1f4..980a68e32e6a04b8 100644 +--- a/nss/nsswitch.conf ++++ b/nss/nsswitch.conf +@@ -1,7 +1,7 @@ + # + # /etc/nsswitch.conf + # +-# An example Name Service Switch config file. This file should be ++# Name Service Switch config file. This file should be + # sorted with the most-used services at the beginning. + # + # Valid databases are: aliases, ethers, group, gshadow, hosts, +@@ -52,19 +52,21 @@ + # shadow: db files + # group: db files + +-# In alphabetical order. Re-order as required to optimize peformance. ++# In order of likelihood of use to accelerate lookup. ++passwd: sss files ++shadow: files ++group: sss files ++hosts: files dns myhostname ++services: files sss ++netgroup: sss ++automount: files sss ++ + aliases: files + ethers: files +-group: files + gshadow: files +-hosts: files dns + # Allow initgroups to default to the setting for group. + # initgroups: files +-netgroup: files + networks: files dns +-passwd: files + protocols: files + publickey: files + rpc: files +-shadow: files +-services: files diff --git a/SOURCES/glibc-nscd-sysconfig.patch b/SOURCES/glibc-nscd-sysconfig.patch new file mode 100644 index 0000000..03dee9e --- /dev/null +++ b/SOURCES/glibc-nscd-sysconfig.patch @@ -0,0 +1,21 @@ +Short description: Provide options to nscd startup. +Author(s): Fedora glibc team +Origin: PATCH +Upstream status: not-needed + +Fedora-specific nscd startup configuration file. + +diff --git a/nscd/nscd.service b/nscd/nscd.service +index b7428a3..19ba185 100644 +--- a/nscd/nscd.service ++++ b/nscd/nscd.service +@@ -5,7 +5,8 @@ Description=Name Service Cache Daemon + + [Service] + Type=forking +-ExecStart=/usr/sbin/nscd ++EnvironmentFile=-/etc/sysconfig/nscd ++ExecStart=/usr/sbin/nscd $NSCD_OPTIONS + ExecStop=/usr/sbin/nscd --shutdown + ExecReload=/usr/sbin/nscd -i passwd + ExecReload=/usr/sbin/nscd -i group diff --git a/SOURCES/glibc-python3.patch b/SOURCES/glibc-python3.patch new file mode 100644 index 0000000..aaf45cc --- /dev/null +++ b/SOURCES/glibc-python3.patch @@ -0,0 +1,30 @@ +Use python3 for installed executable python scripts. + +Fedora is a Python3-only distribution: +https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +This fixes build failures where builders may strictly enforce only +python3 during a transitional phase. + +Author: Carlos O'Donell + +diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py +index 6fcbd0803808e5ca..d43db393d63433bc 100755 +--- a/benchtests/scripts/compare_bench.py ++++ b/benchtests/scripts/compare_bench.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # Copyright (C) 2015-2021 Free Software Foundation, Inc. + # This file is part of the GNU C Library. + # +diff --git a/benchtests/scripts/import_bench.py b/benchtests/scripts/import_bench.py +index a799b4e1b7dc6f30..3286e267168e83bf 100644 +--- a/benchtests/scripts/import_bench.py ++++ b/benchtests/scripts/import_bench.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # Copyright (C) 2015-2021 Free Software Foundation, Inc. + # This file is part of the GNU C Library. + # diff --git a/SOURCES/glibc-rh1070416.patch b/SOURCES/glibc-rh1070416.patch new file mode 100644 index 0000000..0975e0f --- /dev/null +++ b/SOURCES/glibc-rh1070416.patch @@ -0,0 +1,38 @@ +Short description: Add syslog.target dependency. +Author(s): Fedora glibc team +Origin: PATCH +Bug-Fedora: #1070416 +Upstream status: not-needed + +Fedora-specific changes to the nscd.service file. +See also: glibc-nscd-sysconfig.patch. + +--- a/nscd/nscd.service ++++ b/nscd/nscd.service +@@ -2,6 +2,7 @@ + + [Unit] + Description=Name Service Cache Daemon ++After=syslog.target + + [Service] + Type=forking +@@ -17,3 +18,4 @@ + + [Install] + WantedBy=multi-user.target ++Also=nscd.socket +diff --git a/nscd/nscd.socket b/nscd/nscd.socket +new file mode 100644 +index 0000000..7e512d5 +--- /dev/null ++++ b/nscd/nscd.socket +@@ -0,0 +1,8 @@ ++[Unit] ++Description=Name Service Cache Daemon Socket ++ ++[Socket] ++ListenDatagram=/var/run/nscd/socket ++ ++[Install] ++WantedBy=sockets.target diff --git a/SOURCES/glibc-rh1988382.patch b/SOURCES/glibc-rh1988382.patch new file mode 100644 index 0000000..37c3774 --- /dev/null +++ b/SOURCES/glibc-rh1988382.patch @@ -0,0 +1,619 @@ +commit 23645707f12f2dd9d80b51effb2d9618a7b65565 +Author: Siddhesh Poyarekar +Date: Wed Dec 8 11:21:26 2021 +0530 + + Replace --enable-static-pie with --disable-default-pie + + Build glibc programs and tests as PIE by default and enable static-pie + automatically if the architecture and toolchain supports it. + + Also add a new configuration option --disable-default-pie to prevent + building programs as PIE. + + Only the following architectures now have PIE disabled by default + because they do not work at the moment. hppa, ia64, alpha and csky + don't work because the linker is unable to handle a pcrel relocation + generated from PIE objects. The microblaze compiler is currently + failing with an ICE. GNU hurd tries to enable static-pie, which does + not work and hence fails. All these targets have default PIE disabled + at the moment and I have left it to the target maintainers to enable PIE + on their targets. + + build-many-glibcs runs clean for all targets. I also tested x86_64 on + Fedora and Ubuntu, to verify that the default build as well as + --disable-default-pie work as expected with both system toolchains. + + Signed-off-by: Siddhesh Poyarekar + Reviewed-by: Adhemerval Zanella + +diff --git a/INSTALL b/INSTALL +index 02dcf6b1ca3a4c43..d6d93ec9be4262d7 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -111,16 +111,14 @@ if 'CFLAGS' is specified it must enable optimization. For example: + systems support shared libraries; you need ELF support and + (currently) the GNU linker. + +-'--enable-static-pie' +- Enable static position independent executable (static PIE) support. +- Static PIE is similar to static executable, but can be loaded at +- any address without help from a dynamic linker. All static +- programs as well as static tests are built as static PIE, except +- for those marked with no-pie. The resulting glibc can be used with +- the GCC option, -static-pie, which is available with GCC 8 or +- above, to create static PIE. This option also implies that glibc +- programs and tests are created as dynamic position independent +- executables (PIE) by default. ++'--disable-default-pie' ++ Don't build glibc programs and the testsuite as position ++ independent executables (PIE). By default, glibc programs and tests ++ are created as position independent executables on targets that ++ support it. If the toolchain and architecture support it, static ++ executables are built as static PIE and the resulting glibc can be ++ used with the GCC option, -static-pie, which is available with GCC ++ 8 or above, to create static PIE. + + '--enable-cet' + '--enable-cet=permissive' +diff --git a/Makeconfig b/Makeconfig +index 2fa0884b4eee5e53..8bc5540292c7b6fa 100644 +--- a/Makeconfig ++++ b/Makeconfig +@@ -1,4 +1,5 @@ + # Copyright (C) 1991-2021 Free Software Foundation, Inc. ++# Copyright (C) The GNU Toolchain Authors. + # This file is part of the GNU C Library. + + # The GNU C Library is free software; you can redistribute it and/or +@@ -376,19 +377,24 @@ LDFLAGS.so += $(hashstyle-LDFLAGS) + LDFLAGS-rtld += $(hashstyle-LDFLAGS) + endif + +-ifeq (yes,$(enable-static-pie)) ++ifeq (no,$(build-pie-default)) ++pie-default = $(no-pie-ccflag) ++else # build-pie-default + pic-default = -DPIC + # Compile libc.a and libc_p.a with -fPIE/-fpie for static PIE. + pie-default = $(pie-ccflag) ++ ++ifeq (yes,$(enable-static-pie)) + ifeq (yes,$(have-static-pie)) +-default-pie-ldflag = -static-pie ++static-pie-ldflag = -static-pie + else + # Static PIE can't have dynamic relocations in read-only segments since + # static PIE is mapped into memory by kernel. --eh-frame-hdr is needed + # for PIE to support exception. +-default-pie-ldflag = -Wl,-pie,--no-dynamic-linker,--eh-frame-hdr,-z,text +-endif +-endif ++static-pie-ldflag = -Wl,-pie,--no-dynamic-linker,--eh-frame-hdr,-z,text ++endif # have-static-pie ++endif # enable-static-pie ++endif # build-pie-default + + # If lazy relocations are disabled, add the -z now flag. Use + # LDFLAGS-lib.so instead of LDFLAGS.so, to avoid adding the flag to +@@ -444,7 +450,7 @@ endif + # Command for statically linking programs with the C library. + ifndef +link-static + +link-static-before-inputs = -nostdlib -nostartfiles -static \ +- $(if $($(@F)-no-pie),$(no-pie-ldflag),$(default-pie-ldflag)) \ ++ $(if $($(@F)-no-pie),$(no-pie-ldflag),$(static-pie-ldflag)) \ + $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ + $(firstword $(CRT-$(@F)) $(csu-objpfx)$(real-static-start-installed-name)) \ + $(+preinit) $(+prectorT) +@@ -479,7 +485,7 @@ ifeq (yes,$(build-pie-default)) + +link-tests-after-inputs = $(link-libc-tests) $(+link-pie-after-libc) + +link-printers-tests = $(+link-pie-printers-tests) + else # not build-pie-default +-+link-before-inputs = -nostdlib -nostartfiles \ +++link-before-inputs = -nostdlib -nostartfiles $(no-pie-ldflag) \ + $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ + $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ + $(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-installed-name)) \ +@@ -1047,6 +1053,7 @@ PIC-ccflag = -fPIC + endif + # This can be changed by a sysdep makefile + pie-ccflag = -fpie ++no-pie-ccflag = -fno-pie + # This one should always stay like this unless there is a very good reason. + PIE-ccflag = -fPIE + ifeq (yes,$(build-profile)) +diff --git a/config.h.in b/config.h.in +index 8b45a3a61d774714..458342887e4e9380 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -277,6 +277,9 @@ + /* Build glibc with tunables support. */ + #define HAVE_TUNABLES 0 + ++/* Define if PIE is unsupported. */ ++#undef PIE_UNSUPPORTED ++ + /* Define if static PIE is supported. */ + #undef SUPPORT_STATIC_PIE + +diff --git a/config.make.in b/config.make.in +index cbf59114b0b9ae4f..e8630a8d0ccf874d 100644 +--- a/config.make.in ++++ b/config.make.in +@@ -90,9 +90,6 @@ static-nss-crypt = @libc_cv_static_nss_crypt@ + + # Configuration options. + build-shared = @shared@ +-build-pic-default= @libc_cv_pic_default@ +-build-pie-default= @libc_cv_pie_default@ +-cc-pie-default= @libc_cv_cc_pie_default@ + build-profile = @profile@ + build-static-nss = @static_nss@ + cross-compiling = @cross_compiling@ +diff --git a/configure b/configure +index 9619c10991d04362..e9d2b1f398c4dba0 100755 +--- a/configure ++++ b/configure +@@ -596,9 +596,6 @@ DEFINES + static_nss + profile + libc_cv_multidir +-libc_cv_pie_default +-libc_cv_cc_pie_default +-libc_cv_pic_default + shared + static + ldd_rewrite_script +@@ -767,7 +764,7 @@ with_nonshared_cflags + enable_sanity_checks + enable_shared + enable_profile +-enable_static_pie ++enable_default_pie + enable_timezone_tools + enable_hardcoded_path_in_tests + enable_hidden_plt +@@ -1423,8 +1420,8 @@ Optional Features: + in special situations) [default=yes] + --enable-shared build shared library [default=yes if GNU ld] + --enable-profile build profiled library [default=no] +- --enable-static-pie enable static PIE support and use it in the +- testsuite [default=no] ++ --disable-default-pie Do not build glibc programs and the testsuite as PIE ++ [default=no] + --disable-timezone-tools + do not install timezone tools [default=install] + --enable-hardcoded-path-in-tests +@@ -3408,11 +3405,11 @@ else + profile=no + fi + +-# Check whether --enable-static-pie was given. +-if test "${enable_static_pie+set}" = set; then : +- enableval=$enable_static_pie; static_pie=$enableval ++# Check whether --enable-default-pie was given. ++if test "${enable_default_pie+set}" = set; then : ++ enableval=$enable_default_pie; default_pie=$enableval + else +- static_pie=no ++ default_pie=yes + fi + + # Check whether --enable-timezone-tools was given. +@@ -6912,7 +6909,8 @@ rm -f conftest.* + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_pic_default" >&5 + $as_echo "$libc_cv_pic_default" >&6; } +- ++config_vars="$config_vars ++build-pic-default = $libc_cv_pic_default" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIE is default" >&5 + $as_echo_n "checking whether -fPIE is default... " >&6; } +@@ -6932,17 +6930,37 @@ rm -f conftest.* + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_pie_default" >&5 + $as_echo "$libc_cv_cc_pie_default" >&6; } +-libc_cv_pie_default=$libc_cv_cc_pie_default +- +- +- +-# Set the `multidir' variable by grabbing the variable from the compiler. +-# We do it once and save the result in a generated makefile. +-libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` +- ++config_vars="$config_vars ++cc-pie-default = $libc_cv_cc_pie_default" + +-if test "$static_pie" = yes; then +- # Check target support for static PIE ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can build programs as PIE" >&5 ++$as_echo_n "checking if we can build programs as PIE... " >&6; } ++if test "x$default_pie" != xno; then ++ # Disable build-pie-default if target does not support it. ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#ifdef PIE_UNSUPPORTED ++# error PIE is not supported ++#endif ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ libc_cv_pie_default=yes ++else ++ libc_cv_pie_default=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_pie_default" >&5 ++$as_echo "$libc_cv_pie_default" >&6; } ++config_vars="$config_vars ++build-pie-default = $libc_cv_pie_default" ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can build static PIE programs" >&5 ++$as_echo_n "checking if we can build static PIE programs... " >&6; } ++libc_cv_static_pie=$libc_cv_pie_default ++if test "x$libc_cv_pie_default" != xno \ ++ -a "$libc_cv_no_dynamic_linker" = yes; then ++ # Enable static-pie if available + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifndef SUPPORT_STATIC_PIE +@@ -6950,22 +6968,25 @@ if test "$static_pie" = yes; then + #endif + _ACEOF + if ac_fn_c_try_compile "$LINENO"; then : +- ++ libc_cv_static_pie=yes + else +- as_fn_error $? "the architecture does not support static PIE" "$LINENO" 5 ++ libc_cv_static_pie=no + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- # The linker must support --no-dynamic-linker. +- if test "$libc_cv_no_dynamic_linker" != yes; then +- as_fn_error $? "linker support for --no-dynamic-linker needed" "$LINENO" 5 +- fi +- # Default to PIE. +- libc_cv_pie_default=yes +- $as_echo "#define ENABLE_STATIC_PIE 1" >>confdefs.h ++ if test "$libc_cv_static_pie" = "yes"; then ++ $as_echo "#define ENABLE_STATIC_PIE 1" >>confdefs.h + ++ fi + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_static_pie" >&5 ++$as_echo "$libc_cv_static_pie" >&6; } + config_vars="$config_vars +-enable-static-pie = $static_pie" ++enable-static-pie = $libc_cv_static_pie" ++ ++# Set the `multidir' variable by grabbing the variable from the compiler. ++# We do it once and save the result in a generated makefile. ++libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` ++ + + + +diff --git a/configure.ac b/configure.ac +index 34ecbba540546337..79f6822d29ce21cf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -179,11 +179,11 @@ AC_ARG_ENABLE([profile], + [build profiled library @<:@default=no@:>@]), + [profile=$enableval], + [profile=no]) +-AC_ARG_ENABLE([static-pie], +- AS_HELP_STRING([--enable-static-pie], +- [enable static PIE support and use it in the testsuite @<:@default=no@:>@]), +- [static_pie=$enableval], +- [static_pie=no]) ++AC_ARG_ENABLE([default-pie], ++ AS_HELP_STRING([--disable-default-pie], ++ [Do not build glibc programs and the testsuite as PIE @<:@default=no@:>@]), ++ [default_pie=$enableval], ++ [default_pie=yes]) + AC_ARG_ENABLE([timezone-tools], + AS_HELP_STRING([--disable-timezone-tools], + [do not install timezone tools @<:@default=install@:>@]), +@@ -1856,7 +1856,7 @@ if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then + libc_cv_pic_default=no + fi + rm -f conftest.*]) +-AC_SUBST(libc_cv_pic_default) ++LIBC_CONFIG_VAR([build-pic-default], [$libc_cv_pic_default]) + + AC_CACHE_CHECK([whether -fPIE is default], libc_cv_cc_pie_default, + [libc_cv_cc_pie_default=yes +@@ -1869,30 +1869,38 @@ if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then + libc_cv_cc_pie_default=no + fi + rm -f conftest.*]) +-libc_cv_pie_default=$libc_cv_cc_pie_default +-AC_SUBST(libc_cv_cc_pie_default) +-AC_SUBST(libc_cv_pie_default) ++LIBC_CONFIG_VAR([cc-pie-default], [$libc_cv_cc_pie_default]) ++ ++AC_MSG_CHECKING(if we can build programs as PIE) ++if test "x$default_pie" != xno; then ++ # Disable build-pie-default if target does not support it. ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifdef PIE_UNSUPPORTED ++# error PIE is not supported ++#endif]])], [libc_cv_pie_default=yes], [libc_cv_pie_default=no]) ++fi ++AC_MSG_RESULT($libc_cv_pie_default) ++LIBC_CONFIG_VAR([build-pie-default], [$libc_cv_pie_default]) ++ ++AC_MSG_CHECKING(if we can build static PIE programs) ++libc_cv_static_pie=$libc_cv_pie_default ++if test "x$libc_cv_pie_default" != xno \ ++ -a "$libc_cv_no_dynamic_linker" = yes; then ++ # Enable static-pie if available ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef SUPPORT_STATIC_PIE ++# error static PIE is not supported ++#endif]])], [libc_cv_static_pie=yes], [libc_cv_static_pie=no]) ++ if test "$libc_cv_static_pie" = "yes"; then ++ AC_DEFINE(ENABLE_STATIC_PIE) ++ fi ++fi ++AC_MSG_RESULT($libc_cv_static_pie) ++LIBC_CONFIG_VAR([enable-static-pie], [$libc_cv_static_pie]) + + # Set the `multidir' variable by grabbing the variable from the compiler. + # We do it once and save the result in a generated makefile. + libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` + AC_SUBST(libc_cv_multidir) + +-if test "$static_pie" = yes; then +- # Check target support for static PIE +- AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef SUPPORT_STATIC_PIE +-# error static PIE is not supported +-#endif]])], , AC_MSG_ERROR([the architecture does not support static PIE])) +- # The linker must support --no-dynamic-linker. +- if test "$libc_cv_no_dynamic_linker" != yes; then +- AC_MSG_ERROR([linker support for --no-dynamic-linker needed]) +- fi +- # Default to PIE. +- libc_cv_pie_default=yes +- AC_DEFINE(ENABLE_STATIC_PIE) +-fi +-LIBC_CONFIG_VAR([enable-static-pie], [$static_pie]) +- + AC_SUBST(profile) + AC_SUBST(static_nss) + +diff --git a/manual/install.texi b/manual/install.texi +index 46f73b538d3fee6f..1320ac69b3c645f2 100644 +--- a/manual/install.texi ++++ b/manual/install.texi +@@ -141,15 +141,13 @@ Don't build shared libraries even if it is possible. Not all systems + support shared libraries; you need ELF support and (currently) the GNU + linker. + +-@item --enable-static-pie +-Enable static position independent executable (static PIE) support. +-Static PIE is similar to static executable, but can be loaded at any +-address without help from a dynamic linker. All static programs as +-well as static tests are built as static PIE, except for those marked +-with no-pie. The resulting glibc can be used with the GCC option, +--static-pie, which is available with GCC 8 or above, to create static +-PIE. This option also implies that glibc programs and tests are created +-as dynamic position independent executables (PIE) by default. ++@item --disable-default-pie ++Don't build glibc programs and the testsuite as position independent ++executables (PIE). By default, glibc programs and tests are created as ++position independent executables on targets that support it. If the toolchain ++and architecture support it, static executables are built as static PIE and the ++resulting glibc can be used with the GCC option, -static-pie, which is ++available with GCC 8 or above, to create static PIE. + + @item --enable-cet + @itemx --enable-cet=permissive +diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py +index 86537fa8005cfd3d..2fd82a5d054c51ca 100755 +--- a/scripts/build-many-glibcs.py ++++ b/scripts/build-many-glibcs.py +@@ -1,6 +1,7 @@ + #!/usr/bin/python3 + # Build many configurations of glibc. + # Copyright (C) 2016-2021 Free Software Foundation, Inc. ++# Copyright (C) The GNU Toolchain Authors. + # This file is part of the GNU C Library. + # + # The GNU C Library is free software; you can redistribute it and/or +@@ -435,15 +436,15 @@ class Context(object): + '--disable-experimental-malloc', + '--disable-build-nscd', + '--disable-nscd']}, +- {'variant': 'static-pie', +- 'cfg': ['--enable-static-pie']}, +- {'variant': 'x32-static-pie', ++ {'variant': 'no-pie', ++ 'cfg': ['--disable-default-pie']}, ++ {'variant': 'x32-no-pie', + 'ccopts': '-mx32', +- 'cfg': ['--enable-static-pie']}, +- {'variant': 'static-pie', ++ 'cfg': ['--disable-default-pie']}, ++ {'variant': 'no-pie', + 'arch': 'i686', + 'ccopts': '-m32 -march=i686', +- 'cfg': ['--enable-static-pie']}, ++ 'cfg': ['--disable-default-pie']}, + {'variant': 'disable-multi-arch', + 'arch': 'i686', + 'ccopts': '-m32 -march=i686', +diff --git a/sysdeps/alpha/configure b/sysdeps/alpha/configure +index 464b5965276dca19..3d665d96f2b40c4e 100644 +--- a/sysdeps/alpha/configure ++++ b/sysdeps/alpha/configure +@@ -5,4 +5,9 @@ + # symbols in a position independent way. + $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++$as_echo "#define PIE_UNSUPPORTED 1" >>confdefs.h ++ + # work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/alpha/configure.ac b/sysdeps/alpha/configure.ac +index 38e52e71ac2a5bc0..8f9a39ed2e4a29cb 100644 +--- a/sysdeps/alpha/configure.ac ++++ b/sysdeps/alpha/configure.ac +@@ -4,4 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # With required gcc+binutils, we can always access static and hidden + # symbols in a position independent way. + AC_DEFINE(PI_STATIC_AND_HIDDEN) ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++AC_DEFINE(PIE_UNSUPPORTED) + # work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/csky/configure b/sysdeps/csky/configure +index 19acb084fb43d9ea..27464eb707ebd6c6 100644 +--- a/sysdeps/csky/configure ++++ b/sysdeps/csky/configure +@@ -2,3 +2,10 @@ + # Local configure fragment for sysdeps/csky. + + $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h ++ ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++$as_echo "#define PIE_UNSUPPORTED 1" >>confdefs.h ++ ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/csky/configure.ac b/sysdeps/csky/configure.ac +index 5656b665da698d05..8e008249094d9e5a 100644 +--- a/sysdeps/csky/configure.ac ++++ b/sysdeps/csky/configure.ac +@@ -2,3 +2,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # Local configure fragment for sysdeps/csky. + + AC_DEFINE(PI_STATIC_AND_HIDDEN) ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++AC_DEFINE(PIE_UNSUPPORTED) ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/hppa/configure b/sysdeps/hppa/configure +index 2cfe6cbea14549d0..cf5acf966dad67ba 100644 +--- a/sysdeps/hppa/configure ++++ b/sysdeps/hppa/configure +@@ -30,3 +30,10 @@ $as_echo "$libc_cv_asm_line_sep" >&6; } + cat >>confdefs.h <<_ACEOF + #define ASM_LINE_SEP $libc_cv_asm_line_sep + _ACEOF ++ ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++$as_echo "#define PIE_UNSUPPORTED 1" >>confdefs.h ++ ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/hppa/configure.ac b/sysdeps/hppa/configure.ac +index 1ec417b9474c3382..3e1c35bbd992f548 100644 +--- a/sysdeps/hppa/configure.ac ++++ b/sysdeps/hppa/configure.ac +@@ -19,3 +19,8 @@ else + fi + rm -f conftest*]) + AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep) ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++AC_DEFINE(PIE_UNSUPPORTED) ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/ia64/configure b/sysdeps/ia64/configure +index 1ef70921bc5266db..748cb526012adeb8 100644 +--- a/sysdeps/ia64/configure ++++ b/sysdeps/ia64/configure +@@ -3,4 +3,9 @@ + + $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++$as_echo "#define PIE_UNSUPPORTED 1" >>confdefs.h ++ + # work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/ia64/configure.ac b/sysdeps/ia64/configure.ac +index 3bae9fc5e1a3ff45..8e5fba32c3ec8bfc 100644 +--- a/sysdeps/ia64/configure.ac ++++ b/sysdeps/ia64/configure.ac +@@ -4,4 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + dnl It is always possible to access static and hidden symbols in an + dnl position independent way. + AC_DEFINE(PI_STATIC_AND_HIDDEN) ++ ++# PIE builds fail on binutils 2.37 and earlier, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28672 ++AC_DEFINE(PIE_UNSUPPORTED) + # work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure +index 8d0702ad438d1c0a..3303e5dff8ef5ecf 100644 +--- a/sysdeps/mach/hurd/configure ++++ b/sysdeps/mach/hurd/configure +@@ -49,3 +49,9 @@ fi + + # Hurd has libpthread as a separate library. + pthread_in_libc=no ++ ++# Hurd build needs to be updated to support static pie, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28671 ++$as_echo "#define PIE_UNSUPPORTED 1" >>confdefs.h ++ ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac +index 82d085af33701aa2..022c2eff79fc0d08 100644 +--- a/sysdeps/mach/hurd/configure.ac ++++ b/sysdeps/mach/hurd/configure.ac +@@ -29,3 +29,8 @@ fi + + # Hurd has libpthread as a separate library. + pthread_in_libc=no ++ ++# Hurd build needs to be updated to support static pie, see: ++# https://sourceware.org/bugzilla/show_bug.cgi?id=28671 ++AC_DEFINE(PIE_UNSUPPORTED) ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/microblaze/configure b/sysdeps/microblaze/configure +new file mode 100755 +index 0000000000000000..e6652562d212b688 +--- /dev/null ++++ b/sysdeps/microblaze/configure +@@ -0,0 +1,8 @@ ++# This file is generated from configure.ac by Autoconf. DO NOT EDIT! ++ # Local configure fragment for sysdeps/microblaze. ++ ++# gcc 11.2.1 and earlier crash with an internal compiler error, see: ++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103613 ++$as_echo "#define PIE_UNSUPPORTED 1" >>confdefs.h ++ ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/microblaze/configure.ac b/sysdeps/microblaze/configure.ac +new file mode 100644 +index 0000000000000000..1c58f70a7bdfebcb +--- /dev/null ++++ b/sysdeps/microblaze/configure.ac +@@ -0,0 +1,7 @@ ++GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. ++# Local configure fragment for sysdeps/microblaze. ++ ++# gcc 11.2.1 and earlier crash with an internal compiler error, see: ++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103613 ++AC_DEFINE(PIE_UNSUPPORTED) ++# work around problem with autoconf and empty lines at the end of files +diff --git a/sysdeps/sparc/Makefile b/sysdeps/sparc/Makefile +index 1be9a3db2ca12216..12c2c1b085fd4ae2 100644 +--- a/sysdeps/sparc/Makefile ++++ b/sysdeps/sparc/Makefile +@@ -2,6 +2,7 @@ + long-double-fcts = yes + + pie-ccflag = -fPIE ++no-pie-ccflag = -fno-PIE + + ifeq ($(subdir),gmon) + sysdep_routines += sparc-mcount diff --git a/SOURCES/glibc-rh2023422-1.patch b/SOURCES/glibc-rh2023422-1.patch new file mode 100644 index 0000000..c3ba08e --- /dev/null +++ b/SOURCES/glibc-rh2023422-1.patch @@ -0,0 +1,250 @@ +commit c1cb2deeca1a85c6fc5bd41b90816d48a95bc434 +Author: Florian Weimer +Date: Sun Dec 5 11:28:34 2021 +0100 + + elf: execve statically linked programs instead of crashing [BZ #28648] + + Programs without dynamic dependencies and without a program + interpreter are now run via execve. + + Previously, the dynamic linker either crashed while attempting to + read a non-existing dynamic segment (looking for DT_AUDIT/DT_DEPAUDIT + data), or the self-relocated in the static PIE executable crashed + because the outer dynamic linker had already applied RELRO protection. + + is needed because execve is not available in the + dynamic loader on Hurd. + + Reviewed-by: H.J. Lu + +Conflicts: + elf/Makefile + (usual test differences) + elf/rtld.c + (missing ld.so self-relocation cleanup downstream) + +diff --git a/elf/Makefile b/elf/Makefile +index 118d579c42c38110..7696aa1324919a80 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -224,7 +224,8 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \ + tst-tls-ie tst-tls-ie-dlmopen argv0test \ + tst-glibc-hwcaps tst-glibc-hwcaps-prepend tst-glibc-hwcaps-mask \ + tst-tls20 tst-tls21 tst-dlmopen-dlerror tst-dlmopen-gethostbyname \ +- tst-dl-is_dso tst-ro-dynamic ++ tst-dl-is_dso tst-ro-dynamic \ ++ tst-rtld-run-static \ + # reldep9 + tests-internal += loadtest unload unload2 circleload1 \ + neededtest neededtest2 neededtest3 neededtest4 \ +@@ -1914,3 +1915,5 @@ $(objpfx)tst-ro-dynamic-mod.so: $(objpfx)tst-ro-dynamic-mod.os \ + $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \ + -Wl,--script=tst-ro-dynamic-mod.map \ + $(objpfx)tst-ro-dynamic-mod.os ++ ++$(objpfx)tst-rtld-run-static.out: $(objpfx)/ldconfig +diff --git a/elf/rtld.c b/elf/rtld.c +index d83ac1bdc40a6081..6b0d6107801b2f44 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -50,6 +50,7 @@ + #include + #include + #include ++#include + + #include + +@@ -1106,6 +1107,45 @@ load_audit_modules (struct link_map *main_map, struct audit_list *audit_list) + } + } + ++/* Check if the executable is not actualy dynamically linked, and ++ invoke it directly in that case. */ ++static void ++rtld_chain_load (struct link_map *main_map, char *argv0) ++{ ++ /* The dynamic loader run against itself. */ ++ const char *rtld_soname ++ = ((const char *) D_PTR (&GL(dl_rtld_map), l_info[DT_STRTAB]) ++ + GL(dl_rtld_map).l_info[DT_SONAME]->d_un.d_val); ++ if (main_map->l_info[DT_SONAME] != NULL ++ && strcmp (rtld_soname, ++ ((const char *) D_PTR (main_map, l_info[DT_STRTAB]) ++ + main_map->l_info[DT_SONAME]->d_un.d_val)) == 0) ++ _dl_fatal_printf ("%s: loader cannot load itself\n", rtld_soname); ++ ++ /* With DT_NEEDED dependencies, the executable is dynamically ++ linked. */ ++ if (__glibc_unlikely (main_map->l_info[DT_NEEDED] != NULL)) ++ return; ++ ++ /* If the executable has program interpreter, it is dynamically ++ linked. */ ++ for (size_t i = 0; i < main_map->l_phnum; ++i) ++ if (main_map->l_phdr[i].p_type == PT_INTERP) ++ return; ++ ++ const char *pathname = _dl_argv[0]; ++ if (argv0 != NULL) ++ _dl_argv[0] = argv0; ++ int errcode = __rtld_execve (pathname, _dl_argv, _environ); ++ const char *errname = strerrorname_np (errcode); ++ if (errname != NULL) ++ _dl_fatal_printf("%s: cannot execute %s: %s\n", ++ rtld_soname, pathname, errname); ++ else ++ _dl_fatal_printf("%s: cannot execute %s: %d\n", ++ rtld_soname, pathname, errno); ++} ++ + static void + dl_main (const ElfW(Phdr) *phdr, + ElfW(Word) phnum, +@@ -1374,14 +1414,8 @@ dl_main (const ElfW(Phdr) *phdr, + /* Now the map for the main executable is available. */ + main_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded; + +- if (__glibc_likely (state.mode == rtld_mode_normal) +- && GL(dl_rtld_map).l_info[DT_SONAME] != NULL +- && main_map->l_info[DT_SONAME] != NULL +- && strcmp ((const char *) D_PTR (&GL(dl_rtld_map), l_info[DT_STRTAB]) +- + GL(dl_rtld_map).l_info[DT_SONAME]->d_un.d_val, +- (const char *) D_PTR (main_map, l_info[DT_STRTAB]) +- + main_map->l_info[DT_SONAME]->d_un.d_val) == 0) +- _dl_fatal_printf ("loader cannot load itself\n"); ++ if (__glibc_likely (state.mode == rtld_mode_normal)) ++ rtld_chain_load (main_map, argv0); + + phdr = main_map->l_phdr; + phnum = main_map->l_phnum; +diff --git a/elf/tst-rtld-run-static.c b/elf/tst-rtld-run-static.c +new file mode 100644 +index 0000000000000000..7281093504b675c4 +--- /dev/null ++++ b/elf/tst-rtld-run-static.c +@@ -0,0 +1,62 @@ ++/* Test running statically linked programs using ld.so. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ char *ldconfig_path = xasprintf ("%s/elf/ldconfig", support_objdir_root); ++ ++ { ++ char *argv[] = { (char *) "ld.so", ldconfig_path, (char *) "--help", NULL }; ++ struct support_capture_subprocess cap ++ = support_capture_subprogram (support_objdir_elf_ldso, argv); ++ support_capture_subprocess_check (&cap, "no --argv0", 0, sc_allow_stdout); ++ puts ("info: output without --argv0:"); ++ puts (cap.out.buffer); ++ TEST_VERIFY (strstr (cap.out.buffer, "Usage: ldconfig [OPTION...]\n") ++ == cap.out.buffer); ++ support_capture_subprocess_free (&cap); ++ } ++ ++ { ++ char *argv[] = ++ { ++ (char *) "ld.so", (char *) "--argv0", (char *) "ldconfig-argv0", ++ ldconfig_path, (char *) "--help", NULL ++ }; ++ struct support_capture_subprocess cap ++ = support_capture_subprogram (support_objdir_elf_ldso, argv); ++ support_capture_subprocess_check (&cap, "with --argv0", 0, sc_allow_stdout); ++ puts ("info: output with --argv0:"); ++ puts (cap.out.buffer); ++ TEST_VERIFY (strstr (cap.out.buffer, "Usage: ldconfig-argv0 [OPTION...]\n") ++ == cap.out.buffer); ++ support_capture_subprocess_free (&cap); ++ } ++ ++ free (ldconfig_path); ++ return 0; ++} ++ ++#include +diff --git a/sysdeps/generic/dl-execve.h b/sysdeps/generic/dl-execve.h +new file mode 100644 +index 0000000000000000..5fd097df69e1770c +--- /dev/null ++++ b/sysdeps/generic/dl-execve.h +@@ -0,0 +1,25 @@ ++/* execve for the dynamic linker. Generic stub version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++static int ++__rtld_execve (const char *path, char *const *argv, char *const *envp) ++{ ++ return ENOSYS; ++} +diff --git a/sysdeps/unix/sysv/linux/dl-execve.h b/sysdeps/unix/sysv/linux/dl-execve.h +new file mode 100644 +index 0000000000000000..ead3e1c28da34363 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/dl-execve.h +@@ -0,0 +1,25 @@ ++/* execve for the dynamic linker. Linux version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++static inline int ++__rtld_execve (const char *path, char *const *argv, char *const *envp) ++{ ++ return -INTERNAL_SYSCALL_CALL (execve, path, argv, envp); ++} diff --git a/SOURCES/glibc-rh2023422-2.patch b/SOURCES/glibc-rh2023422-2.patch new file mode 100644 index 0000000..c6d87df --- /dev/null +++ b/SOURCES/glibc-rh2023422-2.patch @@ -0,0 +1,37 @@ +commit 2e75604f8337fa4332977f72a8f6726309679edf +Author: Florian Weimer +Date: Fri Dec 10 16:06:36 2021 +0100 + + elf: Install a symbolic link to ld.so as /usr/bin/ld.so + + This makes ld.so features such as --preload, --audit, + and --list-diagnostics more accessible to end users because they + do not need to know the ABI name of the dynamic loader. + + Reviewed-by: Carlos O'Donell + +diff --git a/elf/Makefile b/elf/Makefile +index 7696aa1324919a80..3e7debdd81baafe0 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -104,7 +104,7 @@ endif + ifeq (yes,$(build-shared)) + extra-objs = $(all-rtld-routines:%=%.os) sofini.os interp.os + generated += librtld.os dl-allobjs.os ld.so ldd +-install-others = $(inst_rtlddir)/$(rtld-installed-name) ++install-others = $(inst_rtlddir)/$(rtld-installed-name) $(inst_bindir)/ld.so + install-bin-script = ldd + endif + +@@ -645,6 +645,11 @@ $(inst_rtlddir)/$(rtld-installed-name): $(objpfx)ld.so $(+force) + $(make-target-directory) + $(do-install-program) + ++# Creates the relative /usr/bin/ld.so symbolic link. ++$(inst_bindir)/ld.so: $(inst_rtlddir)/$(rtld-installed-name) ++ $(make-target-directory) ++ $(make-link) ++ + # Special target called by parent to install just the dynamic linker. + .PHONY: ldso_install + ldso_install: $(inst_rtlddir)/$(rtld-installed-name) diff --git a/SOURCES/glibc-rh2023422-3.patch b/SOURCES/glibc-rh2023422-3.patch new file mode 100644 index 0000000..36f8949 --- /dev/null +++ b/SOURCES/glibc-rh2023422-3.patch @@ -0,0 +1,19 @@ +commit f1eeef945d49c72eb13654bd30b5904e89b4626f +Author: Florian Weimer +Date: Fri Dec 10 21:34:30 2021 +0100 + + elf: Use errcode instead of (unset) errno in rtld_chain_load + +diff --git a/elf/rtld.c b/elf/rtld.c +index 6b0d6107801b2f44..6bbb373c5743cb99 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -1143,7 +1143,7 @@ rtld_chain_load (struct link_map *main_map, char *argv0) + rtld_soname, pathname, errname); + else + _dl_fatal_printf("%s: cannot execute %s: %d\n", +- rtld_soname, pathname, errno); ++ rtld_soname, pathname, errcode); + } + + static void diff --git a/SOURCES/glibc-rh2024347-1.patch b/SOURCES/glibc-rh2024347-1.patch new file mode 100644 index 0000000..1c18bfa --- /dev/null +++ b/SOURCES/glibc-rh2024347-1.patch @@ -0,0 +1,98 @@ +commit 84a7eb1f87c1d01b58ad887a0ab5d87abbc1c772 +Author: H.J. Lu +Date: Fri Jul 30 19:07:30 2021 -0700 + + Use __executable_start as the lowest address for profiling [BZ #28153] + + Glibc assumes that ENTRY_POINT is the lowest address for which we need + to keep profiling records and BFD linker uses a linker script to place + the input sections. + + Starting from GCC 4.6, the main function is placed in .text.startup + section and starting from binutils 2.22, BFD linker with + + commit add44f8d5c5c05e08b11e033127a744d61c26aee + Author: Alan Modra + Date: Thu Nov 25 03:03:02 2010 +0000 + + * scripttempl/elf.sc: Group .text.exit, text.startup and .text.hot + sections. + + places .text.startup section before .text section, which leave the main + function out of profiling records. + + Starting from binutils 2.15, linker provides __executable_start to mark + the lowest address of the executable. Use __executable_start as the + lowest address to keep the main function in profiling records. This fixes + [BZ #28153]. + + Tested on Linux/x86-64, Linux/x32 and Linux/i686 as well as with + build-many-glibcs.py. + +diff --git a/csu/gmon-start.c b/csu/gmon-start.c +index b3432885b39071cc..344606a676c188d4 100644 +--- a/csu/gmon-start.c ++++ b/csu/gmon-start.c +@@ -52,6 +52,11 @@ extern char ENTRY_POINT[]; + #endif + extern char etext[]; + ++/* Use __executable_start as the lowest address to keep profiling records ++ if it provided by the linker. */ ++extern const char executable_start[] asm ("__executable_start") ++ __attribute__ ((weak, visibility ("hidden"))); ++ + #ifndef TEXT_START + # ifdef ENTRY_POINT_DECL + # define TEXT_START ENTRY_POINT +@@ -92,7 +97,10 @@ __gmon_start__ (void) + called = 1; + + /* Start keeping profiling records. */ +- __monstartup ((u_long) TEXT_START, (u_long) &etext); ++ if (&executable_start != NULL) ++ __monstartup ((u_long) &executable_start, (u_long) &etext); ++ else ++ __monstartup ((u_long) TEXT_START, (u_long) &etext); + + /* Call _mcleanup before exiting; it will write out gmon.out from the + collected data. */ +diff --git a/gmon/tst-gmon-gprof.sh b/gmon/tst-gmon-gprof.sh +index 9d371582b99677fa..dc0be021104f725d 100644 +--- a/gmon/tst-gmon-gprof.sh ++++ b/gmon/tst-gmon-gprof.sh +@@ -39,12 +39,14 @@ trap cleanup 0 + cat > "$expected" < "$expected_dot" < "$expected" < "$expected_dot" < +Date: Thu Dec 9 09:49:32 2021 +0100 + + nptl: rseq failure after registration on main thread is fatal + + This simplifies the application programming model. + + Browser sandboxes have already been fixed: + + Sandbox is incompatible with rseq registration + + + Allow rseq in the Linux sandboxes. r=gcp + + + Sandbox needs to support rseq system call + + + Linux sandbox: Allow rseq(2) + + + Reviewed-by: Szabolcs Nagy + +diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c +index f405fa356c2955ce..109c5e3dc78c9aa2 100644 +--- a/nptl/pthread_create.c ++++ b/nptl/pthread_create.c +@@ -371,7 +371,8 @@ start_thread (void *arg) + /* Register rseq TLS to the kernel. */ + { + bool do_rseq = THREAD_GETMEM (pd, flags) & ATTR_FLAG_DO_RSEQ; +- rseq_register_current_thread (pd, do_rseq); ++ if (!rseq_register_current_thread (pd, do_rseq) && do_rseq) ++ __libc_fatal ("Fatal glibc error: rseq registration failed\n"); + } + + #ifndef __ASSUME_SET_ROBUST_LIST +diff --git a/sysdeps/unix/sysv/linux/rseq-internal.h b/sysdeps/unix/sysv/linux/rseq-internal.h +index 15bc7ffd6eda632d..6a3441f2cc49e7c4 100644 +--- a/sysdeps/unix/sysv/linux/rseq-internal.h ++++ b/sysdeps/unix/sysv/linux/rseq-internal.h +@@ -26,7 +26,7 @@ + #include + + #ifdef RSEQ_SIG +-static inline void ++static inline bool + rseq_register_current_thread (struct pthread *self, bool do_rseq) + { + if (do_rseq) +@@ -35,15 +35,17 @@ rseq_register_current_thread (struct pthread *self, bool do_rseq) + sizeof (self->rseq_area), + 0, RSEQ_SIG); + if (!INTERNAL_SYSCALL_ERROR_P (ret)) +- return; ++ return true; + } + THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); ++ return false; + } + #else /* RSEQ_SIG */ + static inline void + rseq_register_current_thread (struct pthread *self, bool do_rseq) + { + THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); ++ return false; + } + #endif /* RSEQ_SIG */ + diff --git a/SOURCES/glibc-rh2024347-11.patch b/SOURCES/glibc-rh2024347-11.patch new file mode 100644 index 0000000..3060a51 --- /dev/null +++ b/SOURCES/glibc-rh2024347-11.patch @@ -0,0 +1,592 @@ +commit 627f5ede70d70c77bdaf857db07404e8bf7f60af +Author: Florian Weimer +Date: Thu Dec 9 17:57:11 2021 +0100 + + Remove TLS_TCB_ALIGN and TLS_INIT_TCB_ALIGN + + TLS_INIT_TCB_ALIGN is not actually used. TLS_TCB_ALIGN was likely + introduced to support a configuration where the thread pointer + has not the same alignment as THREAD_SELF. Only ia64 seems to use + that, but for the stack/pointer guard, not for storing tcbhead_t. + Some ports use TLS_TCB_OFFSET and TLS_PRE_TCB_SIZE to shift + the thread pointer, potentially landing in a different residue class + modulo the alignment, but the changes should not impact that. + + In general, given that TLS variables have their own alignment + requirements, having different alignment for the (unshifted) thread + pointer and struct pthread would potentially result in dynamic + offsets, leading to more complexity. + + hppa had different values before: __alignof__ (tcbhead_t), which + seems to be 4, and __alignof__ (struct pthread), which was 8 + (old default) and is now 32. However, it defines THREAD_SELF as: + + /* Return the thread descriptor for the current thread. */ + # define THREAD_SELF \ + ({ struct pthread *__self; \ + __self = __get_cr27(); \ + __self - 1; \ + }) + + So the thread pointer points after struct pthread (hence __self - 1), + and they have to have the same alignment on hppa as well. + + Similarly, on ia64, the definitions were different. We have: + + # define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ + + (PTHREAD_STRUCT_END_PADDING < 2 * sizeof (uintptr_t) \ + ? ((2 * sizeof (uintptr_t) + __alignof__ (struct pthread) - 1) \ + & ~(__alignof__ (struct pthread) - 1)) \ + : 0)) + # define THREAD_SELF \ + ((struct pthread *) ((char *) __thread_self - TLS_PRE_TCB_SIZE)) + + And TLS_PRE_TCB_SIZE is a multiple of the struct pthread alignment + (confirmed by the new _Static_assert in sysdeps/ia64/libc-tls.c). + + On m68k, we have a larger gap between tcbhead_t and struct pthread. + But as far as I can tell, the port is fine with that. The definition + of TCB_OFFSET is sufficient to handle the shifted TCB scenario. + + This fixes commit 23c77f60181eb549f11ec2f913b4270af29eee38 + ("nptl: Increase default TCB alignment to 32"). + + Reviewed-by: H.J. Lu + +diff --git a/csu/libc-tls.c b/csu/libc-tls.c +index 5515204863218163..d83e69f6257ae981 100644 +--- a/csu/libc-tls.c ++++ b/csu/libc-tls.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #ifdef SHARED + #error makefile bug, this file is for static only +@@ -89,7 +90,7 @@ init_static_tls (size_t memsz, size_t align) + { + /* That is the size of the TLS memory for this object. */ + GL(dl_tls_static_size) = roundup (memsz + GLRO(dl_tls_static_surplus), +- TLS_TCB_ALIGN); ++ TCB_ALIGNMENT); + #if TLS_TCB_AT_TP + GL(dl_tls_static_size) += TLS_TCB_SIZE; + #endif +@@ -214,5 +215,5 @@ __libc_setup_tls (void) + memsz += tcb_offset; + #endif + +- init_static_tls (memsz, MAX (TLS_TCB_ALIGN, max_align)); ++ init_static_tls (memsz, MAX (TCB_ALIGNMENT, max_align)); + } +diff --git a/elf/dl-tls.c b/elf/dl-tls.c +index 40263cf586e74c64..e2012d0cd515103b 100644 +--- a/elf/dl-tls.c ++++ b/elf/dl-tls.c +@@ -219,7 +219,7 @@ _dl_count_modids (void) + void + _dl_determine_tlsoffset (void) + { +- size_t max_align = TLS_TCB_ALIGN; ++ size_t max_align = TCB_ALIGNMENT; + size_t freetop = 0; + size_t freebottom = 0; + +@@ -350,7 +350,7 @@ _dl_determine_tlsoffset (void) + + GL(dl_tls_static_used) = offset; + GLRO (dl_tls_static_size) = roundup (offset + GLRO(dl_tls_static_surplus), +- TLS_TCB_ALIGN); ++ TCB_ALIGNMENT); + #else + # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" + #endif +diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h +index cd9abb5d1d073593..75c469d51b532a89 100644 +--- a/sysdeps/aarch64/nptl/tls.h ++++ b/sysdeps/aarch64/nptl/tls.h +@@ -52,18 +52,12 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ + # define INSTALL_DTV(tcbp, dtvp) \ +diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h +index 5f4843b28e7f1ad1..c0b6c93891546480 100644 +--- a/sysdeps/alpha/nptl/tls.h ++++ b/sysdeps/alpha/nptl/tls.h +@@ -46,18 +46,12 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN 16 +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN 16 +- + /* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ + # define INSTALL_DTV(tcbp, dtvp) \ +diff --git a/sysdeps/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h +index d9ada2f38089e6cd..d5d282297d12ec98 100644 +--- a/sysdeps/arc/nptl/tls.h ++++ b/sysdeps/arc/nptl/tls.h +@@ -48,17 +48,11 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. */ + #ifndef TLS_TCB_SIZE + # define TLS_TCB_SIZE sizeof (tcbhead_t) + #endif + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h +index 354aae3318291395..8475c66588f99cae 100644 +--- a/sysdeps/arm/nptl/tls.h ++++ b/sysdeps/arm/nptl/tls.h +@@ -50,18 +50,12 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN 16 +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN 16 +- + /* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ + # define INSTALL_DTV(tcbp, dtvp) \ +diff --git a/sysdeps/csky/nptl/tls.h b/sysdeps/csky/nptl/tls.h +index f3fa3fcb02748776..e81d4552d27e0378 100644 +--- a/sysdeps/csky/nptl/tls.h ++++ b/sysdeps/csky/nptl/tls.h +@@ -61,15 +61,9 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN 8 +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN 8 +- + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +diff --git a/sysdeps/generic/tls.h b/sysdeps/generic/tls.h +index e86d70e6cebba5c8..9214ed39b6383e8c 100644 +--- a/sysdeps/generic/tls.h ++++ b/sysdeps/generic/tls.h +@@ -19,6 +19,11 @@ + /* An architecture-specific version of this file has to defined a + number of symbols: + ++ TCB_ALIGNMENT ++ ++ Alignment of THREAD_SELF (struct pthread *) and the thread ++ pointer. ++ + TLS_TCB_AT_TP or TLS_DTV_AT_TP + + The presence of one of these symbols signals which variant of +@@ -43,15 +48,6 @@ + dynamic linker itself. There are no threads in use at that time. + + +- TLS_TCB_ALIGN +- +- Alignment requirements for the TCB structure. +- +- TLS_INIT_TCB_ALIGN +- +- Similarly, but for the structure used at startup time. +- +- + INSTALL_DTV(tcb, init_dtv) + + This macro must install the given initial DTV into the thread control +diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h +index f0e274c45fb5e91e..88a6b902c0b7e2fd 100644 +--- a/sysdeps/hppa/nptl/tls.h ++++ b/sysdeps/hppa/nptl/tls.h +@@ -52,15 +52,9 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size we need before TCB */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h +index 111c9ee59df30bc3..06ab9784a5358b0b 100644 +--- a/sysdeps/i386/nptl/tls.h ++++ b/sysdeps/i386/nptl/tls.h +@@ -102,15 +102,9 @@ union user_desc_init + struct pthread even when not linked with -lpthread. */ + # define TLS_INIT_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* The TCB can have any size and the memory following the address the + thread pointer points to is unspecified. Allocate the TCB there. */ + # define TLS_TCB_AT_TP 1 +diff --git a/sysdeps/ia64/libc-tls.c b/sysdeps/ia64/libc-tls.c +index a01edceab36d375e..ede1e8f463b135b4 100644 +--- a/sysdeps/ia64/libc-tls.c ++++ b/sysdeps/ia64/libc-tls.c +@@ -18,6 +18,9 @@ + + #include + ++_Static_assert (TLS_PRE_TCB_SIZE % __alignof (struct pthread) == 0, ++ "__thread_self and THREAD_SELF have same alignment"); ++ + /* On IA-64, as it lacks linker optimizations, __tls_get_addr can be + called even in statically linked binaries. + In this case module must be always 1 and PT_TLS segment +diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h +index 26fe555cb4b5e164..ca8f1280aeeed3d5 100644 +--- a/sysdeps/ia64/nptl/tls.h ++++ b/sysdeps/ia64/nptl/tls.h +@@ -53,9 +53,6 @@ register struct pthread *__thread_self __asm__("r13"); + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + +@@ -70,9 +67,6 @@ register struct pthread *__thread_self __asm__("r13"); + & ~(__alignof__ (struct pthread) - 1)) \ + : 0)) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* The DTV is allocated at the TP; the TCB is placed elsewhere. */ + # define TLS_DTV_AT_TP 1 + # define TLS_TCB_AT_TP 0 +diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h +index 9f562c38288df200..b88ef0c9c74ae0b0 100644 +--- a/sysdeps/m68k/nptl/tls.h ++++ b/sysdeps/m68k/nptl/tls.h +@@ -54,20 +54,15 @@ typedef struct + pointer, we don't need this. */ + # define TLS_INIT_TCB_SIZE 0 + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. Because our TCB is before the thread + pointer, we don't need this. */ + # define TLS_TCB_SIZE 0 + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size we need before TCB - actually, it includes the TCB. */ + # define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ +- + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) ++ + ((sizeof (tcbhead_t) + __alignof (struct pthread) - 1) \ ++ & ~(__alignof (struct pthread) - 1))) + + /* The thread pointer (TP) points to the end of the + TCB + 0x7000, as for PowerPC and MIPS. This implies that TCB address is +diff --git a/sysdeps/mach/hurd/tls.h b/sysdeps/mach/hurd/tls.h +index f83956d3d7ca4f9f..773a2a0c36d5d57d 100644 +--- a/sysdeps/mach/hurd/tls.h ++++ b/sysdeps/mach/hurd/tls.h +@@ -29,20 +29,12 @@ + # include + # include + +- + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE TLS_INIT_TCB_SIZE /* XXX */ + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN TLS_INIT_TCB_ALIGN /* XXX */ +- +- + /* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ + # define INSTALL_DTV(descr, dtvp) \ +diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h +index bfa6efa78049bb2d..b69d7b4f28f3b757 100644 +--- a/sysdeps/microblaze/nptl/tls.h ++++ b/sysdeps/microblaze/nptl/tls.h +@@ -56,18 +56,12 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* Install the dtv pointer. The pointer passed is to the element with + index -1 which contain the length. */ + # define INSTALL_DTV(tcbp, dtvp) \ +diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h +index ef99aa646c898e76..6ccaf9804a68634a 100644 +--- a/sysdeps/mips/nptl/tls.h ++++ b/sysdeps/mips/nptl/tls.h +@@ -83,20 +83,15 @@ typedef struct + pointer, we don't need this. */ + # define TLS_INIT_TCB_SIZE 0 + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. Because our TCB is before the thread + pointer, we don't need this. */ + # define TLS_TCB_SIZE 0 + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size we need before TCB - actually, it includes the TCB. */ + # define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ +- + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) ++ + ((sizeof (tcbhead_t) + __alignof (struct pthread) - 1) \ ++ & ~(__alignof (struct pthread) - 1))) + + /* The thread pointer (in hardware register $29) points to the end of + the TCB + 0x7000, as for PowerPC. The pthread_descr structure is +diff --git a/sysdeps/nios2/nptl/tls.h b/sysdeps/nios2/nptl/tls.h +index 7110cfccad7131f4..6ab6bd27b00a70ee 100644 +--- a/sysdeps/nios2/nptl/tls.h ++++ b/sysdeps/nios2/nptl/tls.h +@@ -59,20 +59,15 @@ register struct pthread *__thread_self __asm__("r23"); + pointer, we don't need this. */ + # define TLS_INIT_TCB_SIZE 0 + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. Because our TCB is before the thread + pointer, we don't need this. */ + # define TLS_TCB_SIZE 0 + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size we need before TCB - actually, it includes the TCB. */ + # define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ +- + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) ++ + ((sizeof (tcbhead_t) + __alignof (struct pthread) - 1) \ ++ & ~(__alignof (struct pthread) - 1))) + + /* The thread pointer (in hardware register r23) points to the end of + the TCB + 0x7000, as for PowerPC and MIPS. */ +diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h +index 110d085d30c86302..e194b334216eaa02 100644 +--- a/sysdeps/powerpc/nptl/tls.h ++++ b/sysdeps/powerpc/nptl/tls.h +@@ -108,19 +108,14 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE 0 + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE 0 + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ +- + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) ++ + ((sizeof (tcbhead_t) + __alignof (struct pthread) - 1) \ ++ & ~(__alignof (struct pthread) - 1))) + + /* The following assumes that TP (R2 or R13) points to the end of the + TCB + 0x7000 (per the ABI). This implies that TCB address is +diff --git a/sysdeps/riscv/nptl/tls.h b/sysdeps/riscv/nptl/tls.h +index bdc0a3a6f91b51e8..8c12d8f971adeddb 100644 +--- a/sysdeps/riscv/nptl/tls.h ++++ b/sysdeps/riscv/nptl/tls.h +@@ -50,20 +50,15 @@ typedef struct + pointer, we don't need this. */ + # define TLS_INIT_TCB_SIZE 0 + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. Because our TCB is before the thread + pointer, we don't need this. */ + # define TLS_TCB_SIZE 0 + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size we need before TCB - actually, it includes the TCB. */ + # define TLS_PRE_TCB_SIZE \ + (sizeof (struct pthread) \ +- + ((sizeof (tcbhead_t) + TLS_TCB_ALIGN - 1) & ~(TLS_TCB_ALIGN - 1))) ++ + ((sizeof (tcbhead_t) + __alignof (struct pthread) - 1) \ ++ & ~(__alignof (struct pthread) - 1))) + + /* The thread pointer tp points to the end of the TCB. + The pthread_descr structure is immediately in front of the TCB. */ +diff --git a/sysdeps/s390/nptl/tls.h b/sysdeps/s390/nptl/tls.h +index 2cdd18eb2907c060..3b4c0ab32a9439a3 100644 +--- a/sysdeps/s390/nptl/tls.h ++++ b/sysdeps/s390/nptl/tls.h +@@ -66,15 +66,9 @@ typedef struct + struct pthread even when not linked with -lpthread. */ + # define TLS_INIT_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* The TCB can have any size and the memory following the address the + thread pointer points to is unspecified. Allocate the TCB there. */ + # define TLS_TCB_AT_TP 1 +diff --git a/sysdeps/sh/nptl/tls.h b/sysdeps/sh/nptl/tls.h +index 390640020e45f716..3e4d480b35951253 100644 +--- a/sysdeps/sh/nptl/tls.h ++++ b/sysdeps/sh/nptl/tls.h +@@ -51,18 +51,12 @@ typedef struct + /* This is the size of the initial TCB. */ + # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (tcbhead_t) + + /* This is the size we need before TCB. */ + # define TLS_PRE_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* The TLS blocks start right after the TCB. */ + # define TLS_DTV_AT_TP 1 + # define TLS_TCB_AT_TP 0 +diff --git a/sysdeps/sparc/nptl/tls.h b/sysdeps/sparc/nptl/tls.h +index 376d729989e35660..3fb4ce6e6dacf28c 100644 +--- a/sysdeps/sparc/nptl/tls.h ++++ b/sysdeps/sparc/nptl/tls.h +@@ -63,15 +63,9 @@ register struct pthread *__thread_self __asm__("%g7"); + struct pthread even when not linked with -lpthread. */ + # define TLS_INIT_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* The TCB can have any size and the memory following the address the + thread pointer points to is unspecified. Allocate the TCB there. */ + # define TLS_TCB_AT_TP 1 +diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h +index 3af1836e28b26fdb..50f7e8b544f9e6fc 100644 +--- a/sysdeps/x86_64/nptl/tls.h ++++ b/sysdeps/x86_64/nptl/tls.h +@@ -106,15 +106,9 @@ _Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x80, + struct pthread even when not linked with -lpthread. */ + # define TLS_INIT_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the initial TCB. */ +-# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread) +- + /* This is the size of the TCB. */ + # define TLS_TCB_SIZE sizeof (struct pthread) + +-/* Alignment requirements for the TCB. */ +-# define TLS_TCB_ALIGN __alignof__ (struct pthread) +- + /* The TCB can have any size and the memory following the address the + thread pointer points to is unspecified. Allocate the TCB there. */ + # define TLS_TCB_AT_TP 1 diff --git a/SOURCES/glibc-rh2024347-12.patch b/SOURCES/glibc-rh2024347-12.patch new file mode 100644 index 0000000..02a9cea --- /dev/null +++ b/SOURCES/glibc-rh2024347-12.patch @@ -0,0 +1,73 @@ +commit cb976fba4c51ede7bf8cee5035888527c308dfbc +Author: Florian Weimer +Date: Wed Dec 15 16:06:25 2021 +0100 + + powerpc: Use global register variable in + + A local register variable is merely a compiler hint, and so not + appropriate in this context. Move the global register variable into + and include it from , as there can only + be one global definition for one particular register. + + Fixes commit 8dbeb0561eeb876f557ac9eef5721912ec074ea5 + ("nptl: Add for defining __thread_pointer"). + + Reported-by: Mathieu Desnoyers + Reviewed-by: Raphael M Zinsly + +diff --git a/sysdeps/powerpc/nptl/thread_pointer.h b/sysdeps/powerpc/nptl/thread_pointer.h +index 8fd5ba671f6f5e64..4feba5961062cfaf 100644 +--- a/sysdeps/powerpc/nptl/thread_pointer.h ++++ b/sysdeps/powerpc/nptl/thread_pointer.h +@@ -19,15 +19,16 @@ + #ifndef _SYS_THREAD_POINTER_H + #define _SYS_THREAD_POINTER_H + +-static inline void * +-__thread_pointer (void) +-{ + #ifdef __powerpc64__ +- register void *__result asm ("r13"); ++register void *__thread_register asm ("r13"); + #else +- register void *__result asm ("r2"); ++register void *__thread_register asm ("r2"); + #endif +- return __result; ++ ++static inline void * ++__thread_pointer (void) ++{ ++ return __thread_register; + } + + #endif /* _SYS_THREAD_POINTER_H */ +diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h +index e194b334216eaa02..050beb06a8f7de65 100644 +--- a/sysdeps/powerpc/nptl/tls.h ++++ b/sysdeps/powerpc/nptl/tls.h +@@ -26,6 +26,7 @@ + # include + # include + # include ++# include + + #else /* __ASSEMBLER__ */ + # include +@@ -36,16 +37,10 @@ + #ifndef __powerpc64__ + /* Register r2 (tp) is reserved by the ABI as "thread pointer". */ + # define PT_THREAD_POINTER PT_R2 +-# ifndef __ASSEMBLER__ +-register void *__thread_register __asm__ ("r2"); +-# endif + + #else /* __powerpc64__ */ + /* Register r13 (tp) is reserved by the ABI as "thread pointer". */ + # define PT_THREAD_POINTER PT_R13 +-# ifndef __ASSEMBLER__ +-register void *__thread_register __asm__ ("r13"); +-# endif + #endif /* __powerpc64__ */ + + #ifndef __ASSEMBLER__ diff --git a/SOURCES/glibc-rh2024347-13.patch b/SOURCES/glibc-rh2024347-13.patch new file mode 100644 index 0000000..f002a78 --- /dev/null +++ b/SOURCES/glibc-rh2024347-13.patch @@ -0,0 +1,42 @@ +Downstream-only patch to disable rseq by default. This is necessary +because CRIU does not yet support rseq: + + criu: Implement rseq support + + +diff --git a/manual/tunables.texi b/manual/tunables.texi +index 28ff502990c2a10f..f559c44dcec4624b 100644 +--- a/manual/tunables.texi ++++ b/manual/tunables.texi +@@ -425,11 +425,13 @@ The value is measured in bytes. The default is @samp{41943040} + @end deftp + + @deftp Tunable glibc.pthread.rseq +-The @code{glibc.pthread.rseq} tunable can be set to @samp{0}, to disable +-restartable sequences support in @theglibc{}. This enables applications +-to perform direct restartable sequence registration with the kernel. +-The default is @samp{1}, which means that @theglibc{} performs +-registration on behalf of the application. ++The @code{glibc.pthread.rseq} tunable can be set to @samp{1}, to enable ++restartable sequences support. @Theglibc{} uses this to optimize the ++@code{sched_getcpu} function. ++ ++The default is @samp{0}, which means that applications can perform ++restartable sequences registration, but @code{sched_getcpu} is not ++accelerated. + + Restartable sequences are a Linux-specific extension. + @end deftp +diff --git a/sysdeps/nptl/dl-tunables.list b/sysdeps/nptl/dl-tunables.list +index d24f4be0d08ba407..df2a39ce01858d3b 100644 +--- a/sysdeps/nptl/dl-tunables.list ++++ b/sysdeps/nptl/dl-tunables.list +@@ -31,7 +31,7 @@ glibc { + type: INT_32 + minval: 0 + maxval: 1 +- default: 1 ++ default: 0 + } + } + } diff --git a/SOURCES/glibc-rh2024347-2.patch b/SOURCES/glibc-rh2024347-2.patch new file mode 100644 index 0000000..71613f3 --- /dev/null +++ b/SOURCES/glibc-rh2024347-2.patch @@ -0,0 +1,259 @@ +commit 23c77f60181eb549f11ec2f913b4270af29eee38 +Author: Florian Weimer +Date: Fri Dec 3 16:28:07 2021 +0100 + + nptl: Increase default TCB alignment to 32 + + rseq support will use a 32-byte aligned field in struct pthread, + so the whole struct needs to have at least that alignment. + + nptl/tst-tls3mod.c uses TCB_ALIGNMENT, therefore include + to obtain the fallback definition. + + Reviewed-by: H.J. Lu + +diff --git a/nptl/descr.h b/nptl/descr.h +index 4de84138fb960fa4..57be5b4fef564b36 100644 +--- a/nptl/descr.h ++++ b/nptl/descr.h +@@ -37,7 +37,9 @@ + #include + + #ifndef TCB_ALIGNMENT +-# define TCB_ALIGNMENT sizeof (double) ++# define TCB_ALIGNMENT 32 ++#elif TCB_ALIGNMENT < 32 ++# error TCB_ALIGNMENT must be at least 32 + #endif + + +diff --git a/nptl/tst-tls3mod.c b/nptl/tst-tls3mod.c +index cfd13aace1affcd5..77dcc550fc3b5017 100644 +--- a/nptl/tst-tls3mod.c ++++ b/nptl/tst-tls3mod.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + + extern pthread_barrier_t b; +diff --git a/sysdeps/aarch64/nptl/pthreaddef.h b/sysdeps/aarch64/nptl/pthreaddef.h +index 4d5ecf6661fd0fe6..8d9a10622d132a7a 100644 +--- a/sysdeps/aarch64/nptl/pthreaddef.h ++++ b/sysdeps/aarch64/nptl/pthreaddef.h +@@ -28,8 +28,5 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/alpha/nptl/pthreaddef.h b/sysdeps/alpha/nptl/pthreaddef.h +index 25edb5093e095548..660e5694a25ec60f 100644 +--- a/sysdeps/alpha/nptl/pthreaddef.h ++++ b/sysdeps/alpha/nptl/pthreaddef.h +@@ -27,8 +27,5 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 4096 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/arc/nptl/pthreaddef.h b/sysdeps/arc/nptl/pthreaddef.h +index 873b9d149ac46a62..d4dbe9e079445353 100644 +--- a/sysdeps/arc/nptl/pthreaddef.h ++++ b/sysdeps/arc/nptl/pthreaddef.h +@@ -28,8 +28,5 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 4 +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/arm/nptl/pthreaddef.h b/sysdeps/arm/nptl/pthreaddef.h +index 332f4079c4c3f2bf..13769f5ae270b0ca 100644 +--- a/sysdeps/arm/nptl/pthreaddef.h ++++ b/sysdeps/arm/nptl/pthreaddef.h +@@ -28,9 +28,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + + /* Location of current stack frame. + +diff --git a/sysdeps/csky/nptl/pthreaddef.h b/sysdeps/csky/nptl/pthreaddef.h +index e78bc0016b43b450..7dde9131b9b1a6b0 100644 +--- a/sysdeps/csky/nptl/pthreaddef.h ++++ b/sysdeps/csky/nptl/pthreaddef.h +@@ -28,8 +28,5 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 8 +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/ia64/nptl/pthreaddef.h b/sysdeps/ia64/nptl/pthreaddef.h +index 3a0f6daf9ad871aa..c7420fd1e4ee6081 100644 +--- a/sysdeps/ia64/nptl/pthreaddef.h ++++ b/sysdeps/ia64/nptl/pthreaddef.h +@@ -30,9 +30,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 16384 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __stack_pointer +diff --git a/sysdeps/m68k/nptl/pthreaddef.h b/sysdeps/m68k/nptl/pthreaddef.h +index 13e785a86bbf47b4..ce9511cb02da69fd 100644 +--- a/sysdeps/m68k/nptl/pthreaddef.h ++++ b/sysdeps/m68k/nptl/pthreaddef.h +@@ -28,9 +28,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/microblaze/nptl/pthreaddef.h b/sysdeps/microblaze/nptl/pthreaddef.h +index 517157444da556ad..19d7235782afde53 100644 +--- a/sysdeps/microblaze/nptl/pthreaddef.h ++++ b/sysdeps/microblaze/nptl/pthreaddef.h +@@ -31,8 +31,5 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/mips/nptl/pthreaddef.h b/sysdeps/mips/nptl/pthreaddef.h +index a7bccef6e512438f..322591c293ce5e15 100644 +--- a/sysdeps/mips/nptl/pthreaddef.h ++++ b/sysdeps/mips/nptl/pthreaddef.h +@@ -27,9 +27,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/nios2/nptl/pthreaddef.h b/sysdeps/nios2/nptl/pthreaddef.h +index e01a0e6df72c089a..aa0709d0dc69f251 100644 +--- a/sysdeps/nios2/nptl/pthreaddef.h ++++ b/sysdeps/nios2/nptl/pthreaddef.h +@@ -28,8 +28,5 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 4 +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/powerpc/nptl/pthreaddef.h b/sysdeps/powerpc/nptl/pthreaddef.h +index ef5310e6315fde2c..117c35229ea68f48 100644 +--- a/sysdeps/powerpc/nptl/pthreaddef.h ++++ b/sysdeps/powerpc/nptl/pthreaddef.h +@@ -28,9 +28,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 4096 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/riscv/nptl/pthreaddef.h b/sysdeps/riscv/nptl/pthreaddef.h +index 7bf93d6a63fdecd2..0f33cc48fe4fc728 100644 +--- a/sysdeps/riscv/nptl/pthreaddef.h ++++ b/sysdeps/riscv/nptl/pthreaddef.h +@@ -28,8 +28,5 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/s390/nptl/pthreaddef.h b/sysdeps/s390/nptl/pthreaddef.h +index 091f82df24a4024c..0e32bd862f7fea48 100644 +--- a/sysdeps/s390/nptl/pthreaddef.h ++++ b/sysdeps/s390/nptl/pthreaddef.h +@@ -28,9 +28,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/sh/nptl/pthreaddef.h b/sysdeps/sh/nptl/pthreaddef.h +index 3fa3d189ef969c90..f4e3a290df4ee6e6 100644 +--- a/sysdeps/sh/nptl/pthreaddef.h ++++ b/sysdeps/sh/nptl/pthreaddef.h +@@ -29,9 +29,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 8 +- + + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME __builtin_frame_address (0) +diff --git a/sysdeps/sparc/sparc32/pthreaddef.h b/sysdeps/sparc/sparc32/pthreaddef.h +index 6526fb3d6e7e1448..7a0a04789dac478e 100644 +--- a/sysdeps/sparc/sparc32/pthreaddef.h ++++ b/sysdeps/sparc/sparc32/pthreaddef.h +@@ -27,9 +27,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 2048 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- + + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME (stack_pointer + (2 * 64)) +diff --git a/sysdeps/sparc/sparc64/pthreaddef.h b/sysdeps/sparc/sparc64/pthreaddef.h +index 3da9d7afc8054598..103842856d40432b 100644 +--- a/sysdeps/sparc/sparc64/pthreaddef.h ++++ b/sysdeps/sparc/sparc64/pthreaddef.h +@@ -27,10 +27,6 @@ + /* Minimal stack size after allocating thread descriptor and guard size. */ + #define MINIMAL_REST_STACK 4096 + +-/* Alignment requirement for TCB. */ +-#define TCB_ALIGNMENT 16 +- +- + /* Location of current stack frame. */ + #define CURRENT_STACK_FRAME (stack_pointer + (2 * 128)) + register char *stack_pointer __asm__("%sp"); diff --git a/SOURCES/glibc-rh2024347-3.patch b/SOURCES/glibc-rh2024347-3.patch new file mode 100644 index 0000000..08e30f7 --- /dev/null +++ b/SOURCES/glibc-rh2024347-3.patch @@ -0,0 +1,150 @@ +commit 4fb4e7e821e36180835bf88e363f9f13b5797e3a +Author: Florian Weimer +Date: Sun Dec 5 13:50:17 2021 +0100 + + csu: Always use __executable_start in gmon-start.c + + Current binutils defines __executable_start as the lowest text + address, so using the entry point address as a fallback is no + longer necessary. As a result, overriding is only + necessary if the entry point is not called _start. + + The previous approach to define __ASSEMBLY__ to suppress the + declaration breaks if headers included by are not + compatible with __ASSEMBLY__. This happens with rseq integration + because it is necessary to include kernel headers in more places. + + Reviewed-by: H.J. Lu + +diff --git a/csu/gmon-start.c b/csu/gmon-start.c +index 344606a676c188d4..260c7613e291a32d 100644 +--- a/csu/gmon-start.c ++++ b/csu/gmon-start.c +@@ -38,32 +38,12 @@ + #include + #include + #include +-#define __ASSEMBLY__ +-#include +- +-/* Beginning and end of our code segment. We cannot declare them +- as the external functions since we want the addresses of those +- labels. Taking the address of a function may have different +- meanings on different platforms. */ +-#ifdef ENTRY_POINT_DECL +-ENTRY_POINT_DECL(extern) +-#else +-extern char ENTRY_POINT[]; +-#endif +-extern char etext[]; + + /* Use __executable_start as the lowest address to keep profiling records + if it provided by the linker. */ +-extern const char executable_start[] asm ("__executable_start") +- __attribute__ ((weak, visibility ("hidden"))); ++extern const char __executable_start[] __attribute__ ((visibility ("hidden"))); + +-#ifndef TEXT_START +-# ifdef ENTRY_POINT_DECL +-# define TEXT_START ENTRY_POINT +-# else +-# define TEXT_START &ENTRY_POINT +-# endif +-#endif ++extern char etext[]; + + #if !ELF_INITFINI + /* Instead of defining __gmon_start__ globally in gcrt1.o, we make it +@@ -97,10 +77,7 @@ __gmon_start__ (void) + called = 1; + + /* Start keeping profiling records. */ +- if (&executable_start != NULL) +- __monstartup ((u_long) &executable_start, (u_long) &etext); +- else +- __monstartup ((u_long) TEXT_START, (u_long) &etext); ++ __monstartup ((u_long) &__executable_start, (u_long) &etext); + + /* Call _mcleanup before exiting; it will write out gmon.out from the + collected data. */ +diff --git a/sysdeps/hppa/entry.h b/sysdeps/hppa/entry.h +deleted file mode 100644 +index 5ea5b47448ceb2e7..0000000000000000 +--- a/sysdeps/hppa/entry.h ++++ /dev/null +@@ -1,13 +0,0 @@ +-#ifndef __ASSEMBLY__ +-extern void _start (void); +-#endif +- +-/* Lives in libgcc.so and canonicalizes function pointers for comparison. */ +-extern unsigned int __canonicalize_funcptr_for_compare (unsigned int fptr); +- +-/* The function's entry point is stored in the first word of the +- function descriptor (plabel) of _start(). */ +-#define ENTRY_POINT __canonicalize_funcptr_for_compare((unsigned int)_start) +- +-/* We have to provide a special declaration. */ +-#define ENTRY_POINT_DECL(class) class void _start (void); +diff --git a/sysdeps/ia64/entry.h b/sysdeps/ia64/entry.h +deleted file mode 100644 +index e11b49fc53602eb8..0000000000000000 +--- a/sysdeps/ia64/entry.h ++++ /dev/null +@@ -1,13 +0,0 @@ +-#include +-#include +- +-#ifndef __ASSEMBLY__ +-extern void _start (void); +-#endif +- +-/* The function's entry point is stored in the first word of the +- function descriptor (plabel) of _start(). */ +-#define ENTRY_POINT ELF_PTR_TO_FDESC (_start)->ip +- +-/* We have to provide a special declaration. */ +-#define ENTRY_POINT_DECL(class) class void _start (void); +diff --git a/sysdeps/powerpc/powerpc64/entry.h b/sysdeps/powerpc/powerpc64/entry.h +deleted file mode 100644 +index 99c81cb9820d188d..0000000000000000 +--- a/sysdeps/powerpc/powerpc64/entry.h ++++ /dev/null +@@ -1,37 +0,0 @@ +-/* Finding the entry point and start of text. PowerPC64 version. +- Copyright (C) 2002-2021 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +- +-#ifndef __ASSEMBLY__ +-extern void _start (void); +-#endif +- +-#define ENTRY_POINT _start +- +-#if _CALL_ELF != 2 +-/* We have to provide a special declaration. */ +-#define ENTRY_POINT_DECL(class) class void _start (void); +- +-/* Use the address of ._start as the lowest address for which we need +- to keep profiling records. We can't copy the ia64 scheme as our +- entry poiny address is really the address of the function +- descriptor, not the actual function entry. */ +-#define TEXT_START \ +- ({ extern unsigned long int _start_as_data[] asm ("_start"); \ +- _start_as_data[0]; }) +-#endif diff --git a/SOURCES/glibc-rh2024347-4.patch b/SOURCES/glibc-rh2024347-4.patch new file mode 100644 index 0000000..a49f626 --- /dev/null +++ b/SOURCES/glibc-rh2024347-4.patch @@ -0,0 +1,130 @@ +commit 8dbeb0561eeb876f557ac9eef5721912ec074ea5 +Author: Florian Weimer +Date: Thu Dec 9 09:49:32 2021 +0100 + + nptl: Add for defining __thread_pointer + + already contains a definition that is quite similar, + but it is not consistent across architectures. + + Only architectures for which rseq support is added are covered. + + Reviewed-by: Szabolcs Nagy + +diff --git a/sysdeps/nptl/thread_pointer.h b/sysdeps/nptl/thread_pointer.h +new file mode 100644 +index 0000000000000000..92f2f3093eba55bb +--- /dev/null ++++ b/sysdeps/nptl/thread_pointer.h +@@ -0,0 +1,28 @@ ++/* __thread_pointer definition. Generic version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library. If not, see ++ . */ ++ ++#ifndef _SYS_THREAD_POINTER_H ++#define _SYS_THREAD_POINTER_H ++ ++static inline void * ++__thread_pointer (void) ++{ ++ return __builtin_thread_pointer (); ++} ++ ++#endif /* _SYS_THREAD_POINTER_H */ +diff --git a/sysdeps/powerpc/nptl/thread_pointer.h b/sysdeps/powerpc/nptl/thread_pointer.h +new file mode 100644 +index 0000000000000000..8fd5ba671f6f5e64 +--- /dev/null ++++ b/sysdeps/powerpc/nptl/thread_pointer.h +@@ -0,0 +1,33 @@ ++/* __thread_pointer definition. powerpc version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library. If not, see ++ . */ ++ ++#ifndef _SYS_THREAD_POINTER_H ++#define _SYS_THREAD_POINTER_H ++ ++static inline void * ++__thread_pointer (void) ++{ ++#ifdef __powerpc64__ ++ register void *__result asm ("r13"); ++#else ++ register void *__result asm ("r2"); ++#endif ++ return __result; ++} ++ ++#endif /* _SYS_THREAD_POINTER_H */ +diff --git a/sysdeps/x86/nptl/thread_pointer.h b/sysdeps/x86/nptl/thread_pointer.h +new file mode 100644 +index 0000000000000000..6b71b6f7e1401e4c +--- /dev/null ++++ b/sysdeps/x86/nptl/thread_pointer.h +@@ -0,0 +1,38 @@ ++/* __thread_pointer definition. x86 version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library. If not, see ++ . */ ++ ++#ifndef _SYS_THREAD_POINTER_H ++#define _SYS_THREAD_POINTER_H ++ ++static inline void * ++__thread_pointer (void) ++{ ++#if __GNUC_PREREQ (11, 1) ++ return __builtin_thread_pointer (); ++#else ++ void *__result; ++# ifdef __x86_64__ ++ __asm__ ("mov %%fs:0, %0" : "=r" (__result)); ++# else ++ __asm__ ("mov %%gs:0, %0" : "=r" (__result)); ++# endif ++ return __result; ++#endif /* !GCC 11 */ ++} ++ ++#endif /* _SYS_THREAD_POINTER_H */ diff --git a/SOURCES/glibc-rh2024347-5.patch b/SOURCES/glibc-rh2024347-5.patch new file mode 100644 index 0000000..36b1db1 --- /dev/null +++ b/SOURCES/glibc-rh2024347-5.patch @@ -0,0 +1,904 @@ +commit ce2248ab91b2ea09a378f85012f251f31ac65e31 +Author: Florian Weimer +Date: Thu Dec 9 09:49:32 2021 +0100 + + nptl: Introduce for THREAD_* accessors + + These are common between most architectures. Only the x86 targets + are outliers. + + Reviewed-by: Szabolcs Nagy + +diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h +index 6e896207a659514f..cd9abb5d1d073593 100644 +--- a/sysdeps/aarch64/nptl/tls.h ++++ b/sysdeps/aarch64/nptl/tls.h +@@ -98,15 +98,7 @@ typedef struct + # define DB_THREAD_SELF \ + CONST_THREAD_AREA (64, sizeof (struct pthread)) + +-/* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Get and set the global scope generation counter in struct pthread. */ + # define THREAD_GSCOPE_IN_TCB 1 +diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h +index 4dbccc5249539325..5f4843b28e7f1ad1 100644 +--- a/sysdeps/alpha/nptl/tls.h ++++ b/sysdeps/alpha/nptl/tls.h +@@ -92,15 +92,7 @@ typedef struct + # define DB_THREAD_SELF \ + REGISTER (64, 64, 32 * 8, -sizeof (struct pthread)) + +-/* Access to data in the thread descriptor is easy. */ +-#define THREAD_GETMEM(descr, member) \ +- descr->member +-#define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-#define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-#define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Get and set the global scope generation counter in struct pthread. */ + #define THREAD_GSCOPE_IN_TCB 1 +diff --git a/sysdeps/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h +index 95300fdd2159dc53..d9ada2f38089e6cd 100644 +--- a/sysdeps/arc/nptl/tls.h ++++ b/sysdeps/arc/nptl/tls.h +@@ -100,15 +100,7 @@ typedef struct + # define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, sizeof (struct pthread)) + +-/* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Get and set the global scope generation counter in struct pthread. */ + #define THREAD_GSCOPE_IN_TCB 1 +diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h +index 1bd11307ce0a7f0a..354aae3318291395 100644 +--- a/sysdeps/arm/nptl/tls.h ++++ b/sysdeps/arm/nptl/tls.h +@@ -89,15 +89,7 @@ typedef struct + # define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, sizeof (struct pthread)) + +-/* Access to data in the thread descriptor is easy. */ +-#define THREAD_GETMEM(descr, member) \ +- descr->member +-#define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-#define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-#define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Get and set the global scope generation counter in struct pthread. */ + #define THREAD_GSCOPE_IN_TCB 1 +diff --git a/sysdeps/csky/nptl/tls.h b/sysdeps/csky/nptl/tls.h +index 7a234041ed0bff39..f3fa3fcb02748776 100644 +--- a/sysdeps/csky/nptl/tls.h ++++ b/sysdeps/csky/nptl/tls.h +@@ -116,15 +116,7 @@ typedef struct + # define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, sizeof (struct pthread)) + +-/* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Get and set the global scope generation counter in struct pthread. */ + # define THREAD_GSCOPE_IN_TCB 1 +diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h +index 857003a7d35073eb..f0e274c45fb5e91e 100644 +--- a/sysdeps/hppa/nptl/tls.h ++++ b/sysdeps/hppa/nptl/tls.h +@@ -107,15 +107,7 @@ typedef struct + # define DB_THREAD_SELF \ + REGISTER (32, 32, 53 * 4, -sizeof (struct pthread)) + +-/* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + static inline struct pthread *__get_cr27(void) + { +diff --git a/sysdeps/i386/nptl/tcb-access.h b/sysdeps/i386/nptl/tcb-access.h +new file mode 100644 +index 0000000000000000..6c6d561e394817c7 +--- /dev/null ++++ b/sysdeps/i386/nptl/tcb-access.h +@@ -0,0 +1,123 @@ ++/* THREAD_* accessors. i386 version. ++ Copyright (C) 2002-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Read member of the thread descriptor directly. */ ++#define THREAD_GETMEM(descr, member) \ ++ ({ __typeof (descr->member) __value; \ ++ _Static_assert (sizeof (__value) == 1 \ ++ || sizeof (__value) == 4 \ ++ || sizeof (__value) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (__value) == 1) \ ++ asm volatile ("movb %%gs:%P2,%b0" \ ++ : "=q" (__value) \ ++ : "0" (0), "i" (offsetof (struct pthread, member))); \ ++ else if (sizeof (__value) == 4) \ ++ asm volatile ("movl %%gs:%P1,%0" \ ++ : "=r" (__value) \ ++ : "i" (offsetof (struct pthread, member))); \ ++ else /* 8 */ \ ++ { \ ++ asm volatile ("movl %%gs:%P1,%%eax\n\t" \ ++ "movl %%gs:%P2,%%edx" \ ++ : "=A" (__value) \ ++ : "i" (offsetof (struct pthread, member)), \ ++ "i" (offsetof (struct pthread, member) + 4)); \ ++ } \ ++ __value; }) ++ ++ ++/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ ++#define THREAD_GETMEM_NC(descr, member, idx) \ ++ ({ __typeof (descr->member[0]) __value; \ ++ _Static_assert (sizeof (__value) == 1 \ ++ || sizeof (__value) == 4 \ ++ || sizeof (__value) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (__value) == 1) \ ++ asm volatile ("movb %%gs:%P2(%3),%b0" \ ++ : "=q" (__value) \ ++ : "0" (0), "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ else if (sizeof (__value) == 4) \ ++ asm volatile ("movl %%gs:%P1(,%2,4),%0" \ ++ : "=r" (__value) \ ++ : "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ else /* 8 */ \ ++ { \ ++ asm volatile ("movl %%gs:%P1(,%2,8),%%eax\n\t" \ ++ "movl %%gs:4+%P1(,%2,8),%%edx" \ ++ : "=&A" (__value) \ ++ : "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ } \ ++ __value; }) ++ ++ ++ ++/* Set member of the thread descriptor directly. */ ++#define THREAD_SETMEM(descr, member, value) \ ++ ({ \ ++ _Static_assert (sizeof (descr->member) == 1 \ ++ || sizeof (descr->member) == 4 \ ++ || sizeof (descr->member) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (descr->member) == 1) \ ++ asm volatile ("movb %b0,%%gs:%P1" : \ ++ : "iq" (value), \ ++ "i" (offsetof (struct pthread, member))); \ ++ else if (sizeof (descr->member) == 4) \ ++ asm volatile ("movl %0,%%gs:%P1" : \ ++ : "ir" (value), \ ++ "i" (offsetof (struct pthread, member))); \ ++ else /* 8 */ \ ++ { \ ++ asm volatile ("movl %%eax,%%gs:%P1\n\t" \ ++ "movl %%edx,%%gs:%P2" : \ ++ : "A" ((uint64_t) cast_to_integer (value)), \ ++ "i" (offsetof (struct pthread, member)), \ ++ "i" (offsetof (struct pthread, member) + 4)); \ ++ }}) ++ ++ ++/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ ++#define THREAD_SETMEM_NC(descr, member, idx, value) \ ++ ({ \ ++ _Static_assert (sizeof (descr->member[0]) == 1 \ ++ || sizeof (descr->member[0]) == 4 \ ++ || sizeof (descr->member[0]) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (descr->member[0]) == 1) \ ++ asm volatile ("movb %b0,%%gs:%P1(%2)" : \ ++ : "iq" (value), \ ++ "i" (offsetof (struct pthread, member)), \ ++ "r" (idx)); \ ++ else if (sizeof (descr->member[0]) == 4) \ ++ asm volatile ("movl %0,%%gs:%P1(,%2,4)" : \ ++ : "ir" (value), \ ++ "i" (offsetof (struct pthread, member)), \ ++ "r" (idx)); \ ++ else /* 8 */ \ ++ { \ ++ asm volatile ("movl %%eax,%%gs:%P1(,%2,8)\n\t" \ ++ "movl %%edx,%%gs:4+%P1(,%2,8)" : \ ++ : "A" ((uint64_t) cast_to_integer (value)), \ ++ "i" (offsetof (struct pthread, member)), \ ++ "r" (idx)); \ ++ }}) +diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h +index 86ee1ef30270f960..111c9ee59df30bc3 100644 +--- a/sysdeps/i386/nptl/tls.h ++++ b/sysdeps/i386/nptl/tls.h +@@ -250,113 +250,7 @@ tls_fill_user_desc (union user_desc_init *desc, + REGISTER_THREAD_AREA (32, offsetof (struct user_regs_struct, xgs), 3) \ + REGISTER_THREAD_AREA (64, 26 * 8, 3) /* x86-64's user_regs_struct->gs */ + +- +-/* Read member of the thread descriptor directly. */ +-# define THREAD_GETMEM(descr, member) \ +- ({ __typeof (descr->member) __value; \ +- _Static_assert (sizeof (__value) == 1 \ +- || sizeof (__value) == 4 \ +- || sizeof (__value) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (__value) == 1) \ +- asm volatile ("movb %%gs:%P2,%b0" \ +- : "=q" (__value) \ +- : "0" (0), "i" (offsetof (struct pthread, member))); \ +- else if (sizeof (__value) == 4) \ +- asm volatile ("movl %%gs:%P1,%0" \ +- : "=r" (__value) \ +- : "i" (offsetof (struct pthread, member))); \ +- else /* 8 */ \ +- { \ +- asm volatile ("movl %%gs:%P1,%%eax\n\t" \ +- "movl %%gs:%P2,%%edx" \ +- : "=A" (__value) \ +- : "i" (offsetof (struct pthread, member)), \ +- "i" (offsetof (struct pthread, member) + 4)); \ +- } \ +- __value; }) +- +- +-/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- ({ __typeof (descr->member[0]) __value; \ +- _Static_assert (sizeof (__value) == 1 \ +- || sizeof (__value) == 4 \ +- || sizeof (__value) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (__value) == 1) \ +- asm volatile ("movb %%gs:%P2(%3),%b0" \ +- : "=q" (__value) \ +- : "0" (0), "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- else if (sizeof (__value) == 4) \ +- asm volatile ("movl %%gs:%P1(,%2,4),%0" \ +- : "=r" (__value) \ +- : "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- else /* 8 */ \ +- { \ +- asm volatile ("movl %%gs:%P1(,%2,8),%%eax\n\t" \ +- "movl %%gs:4+%P1(,%2,8),%%edx" \ +- : "=&A" (__value) \ +- : "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- } \ +- __value; }) +- +- +- +-/* Set member of the thread descriptor directly. */ +-# define THREAD_SETMEM(descr, member, value) \ +- ({ \ +- _Static_assert (sizeof (descr->member) == 1 \ +- || sizeof (descr->member) == 4 \ +- || sizeof (descr->member) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (descr->member) == 1) \ +- asm volatile ("movb %b0,%%gs:%P1" : \ +- : "iq" (value), \ +- "i" (offsetof (struct pthread, member))); \ +- else if (sizeof (descr->member) == 4) \ +- asm volatile ("movl %0,%%gs:%P1" : \ +- : "ir" (value), \ +- "i" (offsetof (struct pthread, member))); \ +- else /* 8 */ \ +- { \ +- asm volatile ("movl %%eax,%%gs:%P1\n\t" \ +- "movl %%edx,%%gs:%P2" : \ +- : "A" ((uint64_t) cast_to_integer (value)), \ +- "i" (offsetof (struct pthread, member)), \ +- "i" (offsetof (struct pthread, member) + 4)); \ +- }}) +- +- +-/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- ({ \ +- _Static_assert (sizeof (descr->member[0]) == 1 \ +- || sizeof (descr->member[0]) == 4 \ +- || sizeof (descr->member[0]) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (descr->member[0]) == 1) \ +- asm volatile ("movb %b0,%%gs:%P1(%2)" : \ +- : "iq" (value), \ +- "i" (offsetof (struct pthread, member)), \ +- "r" (idx)); \ +- else if (sizeof (descr->member[0]) == 4) \ +- asm volatile ("movl %0,%%gs:%P1(,%2,4)" : \ +- : "ir" (value), \ +- "i" (offsetof (struct pthread, member)), \ +- "r" (idx)); \ +- else /* 8 */ \ +- { \ +- asm volatile ("movl %%eax,%%gs:%P1(,%2,8)\n\t" \ +- "movl %%edx,%%gs:4+%P1(,%2,8)" : \ +- : "A" ((uint64_t) cast_to_integer (value)), \ +- "i" (offsetof (struct pthread, member)), \ +- "r" (idx)); \ +- }}) +- ++# include + + /* Set the stack guard field in TCB head. */ + #define THREAD_SET_STACK_GUARD(value) \ +diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h +index 66d9bf3189f0b727..26fe555cb4b5e164 100644 +--- a/sysdeps/ia64/nptl/tls.h ++++ b/sysdeps/ia64/nptl/tls.h +@@ -128,15 +128,7 @@ register struct pthread *__thread_self __asm__("r13"); + /* Magic for libthread_db to know how to do THREAD_SELF. */ + # define DB_THREAD_SELF REGISTER (64, 64, 13 * 8, -TLS_PRE_TCB_SIZE) + +-/* Access to data in the thread descriptor is easy. */ +-#define THREAD_GETMEM(descr, member) \ +- descr->member +-#define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-#define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-#define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Set the stack guard field in TCB head. */ + #define THREAD_SET_STACK_GUARD(value) \ +diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h +index cfcd6d2b7b59321c..9f562c38288df200 100644 +--- a/sysdeps/m68k/nptl/tls.h ++++ b/sysdeps/m68k/nptl/tls.h +@@ -118,15 +118,7 @@ extern void * __m68k_read_tp (void); + # define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + +-/* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* l_tls_offset == 0 is perfectly valid on M68K, so we have to use some + different value to mean unset l_tls_offset. */ +diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h +index c93d90b11bfe4c74..bfa6efa78049bb2d 100644 +--- a/sysdeps/microblaze/nptl/tls.h ++++ b/sysdeps/microblaze/nptl/tls.h +@@ -100,20 +100,7 @@ typedef struct + # define DB_THREAD_SELF \ + CONST_THREAD_AREA (32, sizeof (struct pthread)) + +-/* Read member of the thread descriptor directly. */ +-# define THREAD_GETMEM(descr, member) (descr->member) +- +-/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- (descr->member[idx]) +- +-/* Set member of the thread descriptor directly. */ +-# define THREAD_SETMEM(descr, member, value) \ +- (descr->member = (value)) +- +-/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- (descr->member[idx] = (value)) ++# include + + /* Get and set the global scope generation counter in struct pthread. */ + # define THREAD_GSCOPE_IN_TCB 1 +diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h +index c09f49071cf3b5b9..ef99aa646c898e76 100644 +--- a/sysdeps/mips/nptl/tls.h ++++ b/sysdeps/mips/nptl/tls.h +@@ -144,14 +144,7 @@ typedef struct + CONST_THREAD_AREA (32, TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE) + + /* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* l_tls_offset == 0 is perfectly valid on MIPS, so we have to use some + different value to mean unset l_tls_offset. */ +diff --git a/sysdeps/nios2/nptl/tls.h b/sysdeps/nios2/nptl/tls.h +index 02a05b4e741092bf..7110cfccad7131f4 100644 +--- a/sysdeps/nios2/nptl/tls.h ++++ b/sysdeps/nios2/nptl/tls.h +@@ -112,15 +112,7 @@ register struct pthread *__thread_self __asm__("r23"); + # define DB_THREAD_SELF \ + REGISTER (32, 32, 23 * 4, -TLS_PRE_TCB_SIZE - TLS_TCB_OFFSET) + +-/* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + # define THREAD_GET_POINTER_GUARD() \ + (((tcbhead_t *) (READ_THREAD_POINTER () \ +diff --git a/sysdeps/nptl/tcb-access.h b/sysdeps/nptl/tcb-access.h +new file mode 100644 +index 0000000000000000..b4137b8ab8067915 +--- /dev/null ++++ b/sysdeps/nptl/tcb-access.h +@@ -0,0 +1,30 @@ ++/* THREAD_* accessors. Generic version based on struct pthread pointers. ++ Copyright (C) 2002-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Note: These are for accessing the TCB of the *current* thread. ++ descr can be disregarded on some targets as an optimization. See ++ i386 for an example. */ ++ ++#define THREAD_GETMEM(descr, member) \ ++ descr->member ++#define THREAD_GETMEM_NC(descr, member, idx) \ ++ descr->member[idx] ++#define THREAD_SETMEM(descr, member, value) \ ++ descr->member = (value) ++#define THREAD_SETMEM_NC(descr, member, idx, value) \ ++ descr->member[idx] = (value) +diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h +index 6c779b6609147d54..110d085d30c86302 100644 +--- a/sysdeps/powerpc/nptl/tls.h ++++ b/sysdeps/powerpc/nptl/tls.h +@@ -176,20 +176,7 @@ typedef struct + REGISTER (64, 64, PT_THREAD_POINTER * 8, \ + - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + +-/* Read member of the thread descriptor directly. */ +-# define THREAD_GETMEM(descr, member) ((void)(descr), (THREAD_SELF)->member) +- +-/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- ((void)(descr), (THREAD_SELF)->member[idx]) +- +-/* Set member of the thread descriptor directly. */ +-# define THREAD_SETMEM(descr, member, value) \ +- ((void)(descr), (THREAD_SELF)->member = (value)) +- +-/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- ((void)(descr), (THREAD_SELF)->member[idx] = (value)) ++# include + + /* Set the stack guard field in TCB head. */ + # define THREAD_SET_STACK_GUARD(value) \ +diff --git a/sysdeps/riscv/nptl/tls.h b/sysdeps/riscv/nptl/tls.h +index 5350bcc0498bab69..bdc0a3a6f91b51e8 100644 +--- a/sysdeps/riscv/nptl/tls.h ++++ b/sysdeps/riscv/nptl/tls.h +@@ -105,14 +105,7 @@ typedef struct + REGISTER (64, 64, 4 * 8, - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE) + + /* Access to data in the thread descriptor is easy. */ +-# define THREAD_GETMEM(descr, member) \ +- descr->member +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* l_tls_offset == 0 is perfectly valid, so we have to use some different + value to mean unset l_tls_offset. */ +diff --git a/sysdeps/s390/nptl/tls.h b/sysdeps/s390/nptl/tls.h +index efb52515e05c06a9..2cdd18eb2907c060 100644 +--- a/sysdeps/s390/nptl/tls.h ++++ b/sysdeps/s390/nptl/tls.h +@@ -135,15 +135,7 @@ typedef struct + # define DB_THREAD_SELF REGISTER (32, 32, 18 * 4, 0) \ + REGISTER (64, __WORDSIZE, 18 * 8, 0) + +-/* Access to data in the thread descriptor is easy. */ +-#define THREAD_GETMEM(descr, member) \ +- descr->member +-#define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-#define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-#define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Set the stack guard field in TCB head. */ + #define THREAD_SET_STACK_GUARD(value) \ +diff --git a/sysdeps/sh/nptl/tls.h b/sysdeps/sh/nptl/tls.h +index ac3c9a9e856ee686..390640020e45f716 100644 +--- a/sysdeps/sh/nptl/tls.h ++++ b/sysdeps/sh/nptl/tls.h +@@ -113,19 +113,7 @@ typedef struct + # define DB_THREAD_SELF \ + REGISTER (32, 32, REG_GBR * 4, -sizeof (struct pthread)) + +-/* Read member of the thread descriptor directly. */ +-# define THREAD_GETMEM(descr, member) (descr->member) +- +-/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +-# define THREAD_GETMEM_NC(descr, member, idx) (descr->member[idx]) +- +-/* Set member of the thread descriptor directly. */ +-# define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +- +-/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + #define THREAD_GET_POINTER_GUARD() \ + ({ tcbhead_t *__tcbp; \ +diff --git a/sysdeps/sparc/nptl/tls.h b/sysdeps/sparc/nptl/tls.h +index dd1eb82a595619a9..376d729989e35660 100644 +--- a/sysdeps/sparc/nptl/tls.h ++++ b/sysdeps/sparc/nptl/tls.h +@@ -112,15 +112,7 @@ register struct pthread *__thread_self __asm__("%g7"); + REGISTER (32, 32, 10 * 4, 0) \ + REGISTER (64, __WORDSIZE, (6 * 8) + (__WORDSIZE==64?0:4), 0) + +-/* Access to data in the thread descriptor is easy. */ +-#define THREAD_GETMEM(descr, member) \ +- descr->member +-#define THREAD_GETMEM_NC(descr, member, idx) \ +- descr->member[idx] +-#define THREAD_SETMEM(descr, member, value) \ +- descr->member = (value) +-#define THREAD_SETMEM_NC(descr, member, idx, value) \ +- descr->member[idx] = (value) ++# include + + /* Set the stack guard field in TCB head. */ + #define THREAD_SET_STACK_GUARD(value) \ +diff --git a/sysdeps/x86_64/nptl/tcb-access.h b/sysdeps/x86_64/nptl/tcb-access.h +new file mode 100644 +index 0000000000000000..18848a729d16a4f5 +--- /dev/null ++++ b/sysdeps/x86_64/nptl/tcb-access.h +@@ -0,0 +1,130 @@ ++/* THREAD_* accessors. x86_64 version. ++ Copyright (C) 2002-2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Read member of the thread descriptor directly. */ ++# define THREAD_GETMEM(descr, member) \ ++ ({ __typeof (descr->member) __value; \ ++ _Static_assert (sizeof (__value) == 1 \ ++ || sizeof (__value) == 4 \ ++ || sizeof (__value) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (__value) == 1) \ ++ asm volatile ("movb %%fs:%P2,%b0" \ ++ : "=q" (__value) \ ++ : "0" (0), "i" (offsetof (struct pthread, member))); \ ++ else if (sizeof (__value) == 4) \ ++ asm volatile ("movl %%fs:%P1,%0" \ ++ : "=r" (__value) \ ++ : "i" (offsetof (struct pthread, member))); \ ++ else /* 8 */ \ ++ { \ ++ asm volatile ("movq %%fs:%P1,%q0" \ ++ : "=r" (__value) \ ++ : "i" (offsetof (struct pthread, member))); \ ++ } \ ++ __value; }) ++ ++ ++/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ ++# define THREAD_GETMEM_NC(descr, member, idx) \ ++ ({ __typeof (descr->member[0]) __value; \ ++ _Static_assert (sizeof (__value) == 1 \ ++ || sizeof (__value) == 4 \ ++ || sizeof (__value) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (__value) == 1) \ ++ asm volatile ("movb %%fs:%P2(%q3),%b0" \ ++ : "=q" (__value) \ ++ : "0" (0), "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ else if (sizeof (__value) == 4) \ ++ asm volatile ("movl %%fs:%P1(,%q2,4),%0" \ ++ : "=r" (__value) \ ++ : "i" (offsetof (struct pthread, member[0])), "r" (idx));\ ++ else /* 8 */ \ ++ { \ ++ asm volatile ("movq %%fs:%P1(,%q2,8),%q0" \ ++ : "=r" (__value) \ ++ : "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ } \ ++ __value; }) ++ ++ ++/* Loading addresses of objects on x86-64 needs to be treated special ++ when generating PIC code. */ ++#ifdef __pic__ ++# define IMM_MODE "nr" ++#else ++# define IMM_MODE "ir" ++#endif ++ ++ ++/* Set member of the thread descriptor directly. */ ++# define THREAD_SETMEM(descr, member, value) \ ++ ({ \ ++ _Static_assert (sizeof (descr->member) == 1 \ ++ || sizeof (descr->member) == 4 \ ++ || sizeof (descr->member) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (descr->member) == 1) \ ++ asm volatile ("movb %b0,%%fs:%P1" : \ ++ : "iq" (value), \ ++ "i" (offsetof (struct pthread, member))); \ ++ else if (sizeof (descr->member) == 4) \ ++ asm volatile ("movl %0,%%fs:%P1" : \ ++ : IMM_MODE (value), \ ++ "i" (offsetof (struct pthread, member))); \ ++ else /* 8 */ \ ++ { \ ++ /* Since movq takes a signed 32-bit immediate or a register source \ ++ operand, use "er" constraint for 32-bit signed integer constant \ ++ or register. */ \ ++ asm volatile ("movq %q0,%%fs:%P1" : \ ++ : "er" ((uint64_t) cast_to_integer (value)), \ ++ "i" (offsetof (struct pthread, member))); \ ++ }}) ++ ++ ++/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ ++# define THREAD_SETMEM_NC(descr, member, idx, value) \ ++ ({ \ ++ _Static_assert (sizeof (descr->member[0]) == 1 \ ++ || sizeof (descr->member[0]) == 4 \ ++ || sizeof (descr->member[0]) == 8, \ ++ "size of per-thread data"); \ ++ if (sizeof (descr->member[0]) == 1) \ ++ asm volatile ("movb %b0,%%fs:%P1(%q2)" : \ ++ : "iq" (value), \ ++ "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ else if (sizeof (descr->member[0]) == 4) \ ++ asm volatile ("movl %0,%%fs:%P1(,%q2,4)" : \ ++ : IMM_MODE (value), \ ++ "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ else /* 8 */ \ ++ { \ ++ /* Since movq takes a signed 32-bit immediate or a register source \ ++ operand, use "er" constraint for 32-bit signed integer constant \ ++ or register. */ \ ++ asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \ ++ : "er" ((uint64_t) cast_to_integer (value)), \ ++ "i" (offsetof (struct pthread, member[0])), \ ++ "r" (idx)); \ ++ }}) +diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h +index a78c4f4d016002fa..3af1836e28b26fdb 100644 +--- a/sysdeps/x86_64/nptl/tls.h ++++ b/sysdeps/x86_64/nptl/tls.h +@@ -195,119 +195,7 @@ _Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x80, + # define DB_THREAD_SELF_INCLUDE /* For the FS constant. */ + # define DB_THREAD_SELF CONST_THREAD_AREA (64, FS) + +-/* Read member of the thread descriptor directly. */ +-# define THREAD_GETMEM(descr, member) \ +- ({ __typeof (descr->member) __value; \ +- _Static_assert (sizeof (__value) == 1 \ +- || sizeof (__value) == 4 \ +- || sizeof (__value) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (__value) == 1) \ +- asm volatile ("movb %%fs:%P2,%b0" \ +- : "=q" (__value) \ +- : "0" (0), "i" (offsetof (struct pthread, member))); \ +- else if (sizeof (__value) == 4) \ +- asm volatile ("movl %%fs:%P1,%0" \ +- : "=r" (__value) \ +- : "i" (offsetof (struct pthread, member))); \ +- else /* 8 */ \ +- { \ +- asm volatile ("movq %%fs:%P1,%q0" \ +- : "=r" (__value) \ +- : "i" (offsetof (struct pthread, member))); \ +- } \ +- __value; }) +- +- +-/* Same as THREAD_GETMEM, but the member offset can be non-constant. */ +-# define THREAD_GETMEM_NC(descr, member, idx) \ +- ({ __typeof (descr->member[0]) __value; \ +- _Static_assert (sizeof (__value) == 1 \ +- || sizeof (__value) == 4 \ +- || sizeof (__value) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (__value) == 1) \ +- asm volatile ("movb %%fs:%P2(%q3),%b0" \ +- : "=q" (__value) \ +- : "0" (0), "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- else if (sizeof (__value) == 4) \ +- asm volatile ("movl %%fs:%P1(,%q2,4),%0" \ +- : "=r" (__value) \ +- : "i" (offsetof (struct pthread, member[0])), "r" (idx));\ +- else /* 8 */ \ +- { \ +- asm volatile ("movq %%fs:%P1(,%q2,8),%q0" \ +- : "=r" (__value) \ +- : "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- } \ +- __value; }) +- +- +-/* Loading addresses of objects on x86-64 needs to be treated special +- when generating PIC code. */ +-#ifdef __pic__ +-# define IMM_MODE "nr" +-#else +-# define IMM_MODE "ir" +-#endif +- +- +-/* Set member of the thread descriptor directly. */ +-# define THREAD_SETMEM(descr, member, value) \ +- ({ \ +- _Static_assert (sizeof (descr->member) == 1 \ +- || sizeof (descr->member) == 4 \ +- || sizeof (descr->member) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (descr->member) == 1) \ +- asm volatile ("movb %b0,%%fs:%P1" : \ +- : "iq" (value), \ +- "i" (offsetof (struct pthread, member))); \ +- else if (sizeof (descr->member) == 4) \ +- asm volatile ("movl %0,%%fs:%P1" : \ +- : IMM_MODE (value), \ +- "i" (offsetof (struct pthread, member))); \ +- else /* 8 */ \ +- { \ +- /* Since movq takes a signed 32-bit immediate or a register source \ +- operand, use "er" constraint for 32-bit signed integer constant \ +- or register. */ \ +- asm volatile ("movq %q0,%%fs:%P1" : \ +- : "er" ((uint64_t) cast_to_integer (value)), \ +- "i" (offsetof (struct pthread, member))); \ +- }}) +- +- +-/* Same as THREAD_SETMEM, but the member offset can be non-constant. */ +-# define THREAD_SETMEM_NC(descr, member, idx, value) \ +- ({ \ +- _Static_assert (sizeof (descr->member[0]) == 1 \ +- || sizeof (descr->member[0]) == 4 \ +- || sizeof (descr->member[0]) == 8, \ +- "size of per-thread data"); \ +- if (sizeof (descr->member[0]) == 1) \ +- asm volatile ("movb %b0,%%fs:%P1(%q2)" : \ +- : "iq" (value), \ +- "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- else if (sizeof (descr->member[0]) == 4) \ +- asm volatile ("movl %0,%%fs:%P1(,%q2,4)" : \ +- : IMM_MODE (value), \ +- "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- else /* 8 */ \ +- { \ +- /* Since movq takes a signed 32-bit immediate or a register source \ +- operand, use "er" constraint for 32-bit signed integer constant \ +- or register. */ \ +- asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \ +- : "er" ((uint64_t) cast_to_integer (value)), \ +- "i" (offsetof (struct pthread, member[0])), \ +- "r" (idx)); \ +- }}) +- ++# include + + /* Set the stack guard field in TCB head. */ + # define THREAD_SET_STACK_GUARD(value) \ diff --git a/SOURCES/glibc-rh2024347-6.patch b/SOURCES/glibc-rh2024347-6.patch new file mode 100644 index 0000000..4782cdf --- /dev/null +++ b/SOURCES/glibc-rh2024347-6.patch @@ -0,0 +1,49 @@ +commit 8d1927d8dc5aad0f01c929123086be3a5b799d18 +Author: Florian Weimer +Date: Thu Dec 9 09:49:32 2021 +0100 + + nptl: Introduce THREAD_GETMEM_VOLATILE + + This will be needed for rseq TCB access. + + Reviewed-by: Szabolcs Nagy + +diff --git a/sysdeps/i386/nptl/tcb-access.h b/sysdeps/i386/nptl/tcb-access.h +index 6c6d561e394817c7..5ddd83224bc8eb77 100644 +--- a/sysdeps/i386/nptl/tcb-access.h ++++ b/sysdeps/i386/nptl/tcb-access.h +@@ -41,6 +41,8 @@ + } \ + __value; }) + ++/* THREAD_GETMEM already forces a read. */ ++#define THREAD_GETMEM_VOLATILE(descr, member) THREAD_GETMEM (descr, member) + + /* Same as THREAD_GETMEM, but the member offset can be non-constant. */ + #define THREAD_GETMEM_NC(descr, member, idx) \ +diff --git a/sysdeps/nptl/tcb-access.h b/sysdeps/nptl/tcb-access.h +index b4137b8ab8067915..bbe20b7225b060fd 100644 +--- a/sysdeps/nptl/tcb-access.h ++++ b/sysdeps/nptl/tcb-access.h +@@ -22,6 +22,8 @@ + + #define THREAD_GETMEM(descr, member) \ + descr->member ++#define THREAD_GETMEM_VOLATILE(descr, member) \ ++ (*(volatile __typeof (descr->member) *)&descr->member) + #define THREAD_GETMEM_NC(descr, member, idx) \ + descr->member[idx] + #define THREAD_SETMEM(descr, member, value) \ +diff --git a/sysdeps/x86_64/nptl/tcb-access.h b/sysdeps/x86_64/nptl/tcb-access.h +index 18848a729d16a4f5..e4d2d07a9b218025 100644 +--- a/sysdeps/x86_64/nptl/tcb-access.h ++++ b/sysdeps/x86_64/nptl/tcb-access.h +@@ -39,6 +39,8 @@ + } \ + __value; }) + ++/* THREAD_GETMEM already forces a read. */ ++#define THREAD_GETMEM_VOLATILE(descr, member) THREAD_GETMEM (descr, member) + + /* Same as THREAD_GETMEM, but the member offset can be non-constant. */ + # define THREAD_GETMEM_NC(descr, member, idx) \ diff --git a/SOURCES/glibc-rh2024347-7.patch b/SOURCES/glibc-rh2024347-7.patch new file mode 100644 index 0000000..b0d158b --- /dev/null +++ b/SOURCES/glibc-rh2024347-7.patch @@ -0,0 +1,1130 @@ +commit 95e114a0919d844d8fe07839cb6538b7f5ee920e +Author: Florian Weimer +Date: Thu Dec 9 09:49:32 2021 +0100 + + nptl: Add rseq registration + + The rseq area is placed directly into struct pthread. rseq + registration failure is not treated as an error, so it is possible + that threads run with inconsistent registration status. + + is not yet installed as a public header. + + Co-Authored-By: Mathieu Desnoyers + Reviewed-by: Szabolcs Nagy + Reviewed-by: Siddhesh Poyarekar + +diff --git a/nptl/descr.h b/nptl/descr.h +index 57be5b4fef564b36..dabf980e29615db3 100644 +--- a/nptl/descr.h ++++ b/nptl/descr.h +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #ifndef TCB_ALIGNMENT + # define TCB_ALIGNMENT 32 +@@ -407,6 +408,9 @@ struct pthread + /* Used on strsignal. */ + struct tls_internal_t tls_state; + ++ /* rseq area registered with the kernel. */ ++ struct rseq rseq_area; ++ + /* This member must be last. */ + char end_padding[]; + +diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c +index 3db0c9fdf40ae2bf..d2b40924dafad316 100644 +--- a/nptl/pthread_create.c ++++ b/nptl/pthread_create.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include "libioP.h" + #include + #include +@@ -367,6 +368,9 @@ start_thread (void *arg) + /* Initialize pointers to locale data. */ + __ctype_init (); + ++ /* Register rseq TLS to the kernel. */ ++ rseq_register_current_thread (pd); ++ + #ifndef __ASSUME_SET_ROBUST_LIST + if (__nptl_set_robust_list_avail) + #endif +@@ -572,6 +576,15 @@ out: + process is really dead since 'clone' got passed the CLONE_CHILD_CLEARTID + flag. The 'tid' field in the TCB will be set to zero. + ++ rseq TLS is still registered at this point. Rely on implicit ++ unregistration performed by the kernel on thread teardown. This is not a ++ problem because the rseq TLS lives on the stack, and the stack outlives ++ the thread. If TCB allocation is ever changed, additional steps may be ++ required, such as performing explicit rseq unregistration before ++ reclaiming the rseq TLS area memory. It is NOT sufficient to block ++ signals because the kernel may write to the rseq area even without ++ signals. ++ + The exit code is zero since in case all threads exit by calling + 'pthread_exit' the exit status must be 0 (zero). */ + while (1) +diff --git a/sysdeps/nptl/dl-tls_init_tp.c b/sysdeps/nptl/dl-tls_init_tp.c +index ca494dd3a52c4ebf..fedb876fdb2642d2 100644 +--- a/sysdeps/nptl/dl-tls_init_tp.c ++++ b/sysdeps/nptl/dl-tls_init_tp.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + #ifndef __ASSUME_SET_ROBUST_LIST + bool __nptl_set_robust_list_avail; +@@ -57,11 +58,12 @@ __tls_pre_init_tp (void) + void + __tls_init_tp (void) + { ++ struct pthread *pd = THREAD_SELF; ++ + /* Set up thread stack list management. */ +- list_add (&THREAD_SELF->list, &GL (dl_stack_user)); ++ list_add (&pd->list, &GL (dl_stack_user)); + + /* Early initialization of the TCB. */ +- struct pthread *pd = THREAD_SELF; + pd->tid = INTERNAL_SYSCALL_CALL (set_tid_address, &pd->tid); + THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]); + THREAD_SETMEM (pd, user_stack, true); +@@ -90,6 +92,8 @@ __tls_init_tp (void) + } + } + ++ rseq_register_current_thread (pd); ++ + /* Set initial thread's stack block from 0 up to __libc_stack_end. + It will be bigger than it actually is, but for unwind.c/pt-longjmp.c + purposes this is good enough. */ +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +index 76ad06361c4323d7..f84ccd6bbb3b16ad 100644 +--- a/sysdeps/unix/sysv/linux/Makefile ++++ b/sysdeps/unix/sysv/linux/Makefile +@@ -130,7 +130,10 @@ ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes) + tests += tst-ofdlocks-compat + endif + +-tests-internal += tst-sigcontext-get_pc ++tests-internal += \ ++ tst-rseq \ ++ tst-sigcontext-get_pc \ ++ # tests-internal + + tests-time64 += \ + tst-adjtimex-time64 \ +@@ -356,4 +359,8 @@ endif + + ifeq ($(subdir),nptl) + tests += tst-align-clone tst-getpid1 ++ ++# tst-rseq-nptl is an internal test because it requires a definition of ++# __NR_rseq from the internal system call list. ++tests-internal += tst-rseq-nptl + endif +diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/rseq.h b/sysdeps/unix/sysv/linux/aarch64/bits/rseq.h +new file mode 100644 +index 0000000000000000..9ba92725c76b9d4f +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/aarch64/bits/rseq.h +@@ -0,0 +1,43 @@ ++/* Restartable Sequences Linux aarch64 architecture header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++# error "Never use directly; include instead." ++#endif ++ ++/* RSEQ_SIG is a signature required before each abort handler code. ++ ++ It is a 32-bit value that maps to actual architecture code compiled ++ into applications and libraries. It needs to be defined for each ++ architecture. When choosing this value, it needs to be taken into ++ account that generating invalid instructions may have ill effects on ++ tools like objdump, and may also have impact on the CPU speculative ++ execution efficiency in some cases. ++ ++ aarch64 -mbig-endian generates mixed endianness code vs data: ++ little-endian code and big-endian data. Ensure the RSEQ_SIG signature ++ matches code endianness. */ ++ ++#define RSEQ_SIG_CODE 0xd428bc00 /* BRK #0x45E0. */ ++ ++#ifdef __AARCH64EB__ ++# define RSEQ_SIG_DATA 0x00bc28d4 /* BRK #0x45E0. */ ++#else ++# define RSEQ_SIG_DATA RSEQ_SIG_CODE ++#endif ++ ++#define RSEQ_SIG RSEQ_SIG_DATA +diff --git a/sysdeps/unix/sysv/linux/arm/bits/rseq.h b/sysdeps/unix/sysv/linux/arm/bits/rseq.h +new file mode 100644 +index 0000000000000000..0542b26f6a023dec +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/arm/bits/rseq.h +@@ -0,0 +1,83 @@ ++/* Restartable Sequences Linux arm architecture header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++# error "Never use directly; include instead." ++#endif ++ ++/* ++ RSEQ_SIG is a signature required before each abort handler code. ++ ++ It is a 32-bit value that maps to actual architecture code compiled ++ into applications and libraries. It needs to be defined for each ++ architecture. When choosing this value, it needs to be taken into ++ account that generating invalid instructions may have ill effects on ++ tools like objdump, and may also have impact on the CPU speculative ++ execution efficiency in some cases. ++ ++ - ARM little endian ++ ++ RSEQ_SIG uses the udf A32 instruction with an uncommon immediate operand ++ value 0x5de3. This traps if user-space reaches this instruction by mistake, ++ and the uncommon operand ensures the kernel does not move the instruction ++ pointer to attacker-controlled code on rseq abort. ++ ++ The instruction pattern in the A32 instruction set is: ++ ++ e7f5def3 udf #24035 ; 0x5de3 ++ ++ This translates to the following instruction pattern in the T16 instruction ++ set: ++ ++ little endian: ++ def3 udf #243 ; 0xf3 ++ e7f5 b.n <7f5> ++ ++ - ARMv6+ big endian (BE8): ++ ++ ARMv6+ -mbig-endian generates mixed endianness code vs data: little-endian ++ code and big-endian data. The data value of the signature needs to have its ++ byte order reversed to generate the trap instruction: ++ ++ Data: 0xf3def5e7 ++ ++ Translates to this A32 instruction pattern: ++ ++ e7f5def3 udf #24035 ; 0x5de3 ++ ++ Translates to this T16 instruction pattern: ++ ++ def3 udf #243 ; 0xf3 ++ e7f5 b.n <7f5> ++ ++ - Prior to ARMv6 big endian (BE32): ++ ++ Prior to ARMv6, -mbig-endian generates big-endian code and data ++ (which match), so the endianness of the data representation of the ++ signature should not be reversed. However, the choice between BE32 ++ and BE8 is done by the linker, so we cannot know whether code and ++ data endianness will be mixed before the linker is invoked. So rather ++ than try to play tricks with the linker, the rseq signature is simply ++ data (not a trap instruction) prior to ARMv6 on big endian. This is ++ why the signature is expressed as data (.word) rather than as ++ instruction (.inst) in assembler. */ ++ ++#ifdef __ARMEB__ ++# define RSEQ_SIG 0xf3def5e7 /* udf #24035 ; 0x5de3 (ARMv6+) */ ++#else ++# define RSEQ_SIG 0xe7f5def3 /* udf #24035 ; 0x5de3 */ ++#endif +diff --git a/sysdeps/unix/sysv/linux/bits/rseq.h b/sysdeps/unix/sysv/linux/bits/rseq.h +new file mode 100644 +index 0000000000000000..46cf5d1c743f25eb +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/bits/rseq.h +@@ -0,0 +1,29 @@ ++/* Restartable Sequences architecture header. Stub version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++# error "Never use directly; include instead." ++#endif ++ ++/* RSEQ_SIG is a signature required before each abort handler code. ++ ++ It is a 32-bit value that maps to actual architecture code compiled ++ into applications and libraries. It needs to be defined for each ++ architecture. When choosing this value, it needs to be taken into ++ account that generating invalid instructions may have ill effects on ++ tools like objdump, and may also have impact on the CPU speculative ++ execution efficiency in some cases. */ +diff --git a/sysdeps/unix/sysv/linux/mips/bits/rseq.h b/sysdeps/unix/sysv/linux/mips/bits/rseq.h +new file mode 100644 +index 0000000000000000..a9defee568ae04a5 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/mips/bits/rseq.h +@@ -0,0 +1,62 @@ ++/* Restartable Sequences Linux mips architecture header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++# error "Never use directly; include instead." ++#endif ++ ++/* RSEQ_SIG is a signature required before each abort handler code. ++ ++ It is a 32-bit value that maps to actual architecture code compiled ++ into applications and libraries. It needs to be defined for each ++ architecture. When choosing this value, it needs to be taken into ++ account that generating invalid instructions may have ill effects on ++ tools like objdump, and may also have impact on the CPU speculative ++ execution efficiency in some cases. ++ ++ RSEQ_SIG uses the break instruction. The instruction pattern is: ++ ++ On MIPS: ++ 0350000d break 0x350 ++ ++ On nanoMIPS: ++ 00100350 break 0x350 ++ ++ On microMIPS: ++ 0000d407 break 0x350 ++ ++ For nanoMIPS32 and microMIPS, the instruction stream is encoded as ++ 16-bit halfwords, so the signature halfwords need to be swapped ++ accordingly for little-endian. */ ++ ++#if defined (__nanomips__) ++# ifdef __MIPSEL__ ++# define RSEQ_SIG 0x03500010 ++# else ++# define RSEQ_SIG 0x00100350 ++# endif ++#elif defined (__mips_micromips) ++# ifdef __MIPSEL__ ++# define RSEQ_SIG 0xd4070000 ++# else ++# define RSEQ_SIG 0x0000d407 ++# endif ++#elif defined (__mips__) ++# define RSEQ_SIG 0x0350000d ++#else ++/* Unknown MIPS architecture. */ ++#endif +diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/rseq.h b/sysdeps/unix/sysv/linux/powerpc/bits/rseq.h +new file mode 100644 +index 0000000000000000..05b3cf7b8fe75b92 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/powerpc/bits/rseq.h +@@ -0,0 +1,37 @@ ++/* Restartable Sequences Linux powerpc architecture header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++# error "Never use directly; include instead." ++#endif ++ ++/* RSEQ_SIG is a signature required before each abort handler code. ++ ++ It is a 32-bit value that maps to actual architecture code compiled ++ into applications and libraries. It needs to be defined for each ++ architecture. When choosing this value, it needs to be taken into ++ account that generating invalid instructions may have ill effects on ++ tools like objdump, and may also have impact on the CPU speculative ++ execution efficiency in some cases. ++ ++ RSEQ_SIG uses the following trap instruction: ++ ++ powerpc-be: 0f e5 00 0b twui r5,11 ++ powerpc64-le: 0b 00 e5 0f twui r5,11 ++ powerpc64-be: 0f e5 00 0b twui r5,11 */ ++ ++#define RSEQ_SIG 0x0fe5000b +diff --git a/sysdeps/unix/sysv/linux/rseq-internal.h b/sysdeps/unix/sysv/linux/rseq-internal.h +new file mode 100644 +index 0000000000000000..909f5478251d3d13 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/rseq-internal.h +@@ -0,0 +1,45 @@ ++/* Restartable Sequences internal API. Linux implementation. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef RSEQ_INTERNAL_H ++#define RSEQ_INTERNAL_H ++ ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef RSEQ_SIG ++static inline void ++rseq_register_current_thread (struct pthread *self) ++{ ++ int ret = INTERNAL_SYSCALL_CALL (rseq, ++ &self->rseq_area, sizeof (self->rseq_area), ++ 0, RSEQ_SIG); ++ if (INTERNAL_SYSCALL_ERROR_P (ret)) ++ THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); ++} ++#else /* RSEQ_SIG */ ++static inline void ++rseq_register_current_thread (struct pthread *self) ++{ ++ THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); ++} ++#endif /* RSEQ_SIG */ ++ ++#endif /* rseq-internal.h */ +diff --git a/sysdeps/unix/sysv/linux/s390/bits/rseq.h b/sysdeps/unix/sysv/linux/s390/bits/rseq.h +new file mode 100644 +index 0000000000000000..3030e38f403784b3 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/s390/bits/rseq.h +@@ -0,0 +1,37 @@ ++/* Restartable Sequences Linux s390 architecture header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++# error "Never use directly; include instead." ++#endif ++ ++/* RSEQ_SIG is a signature required before each abort handler code. ++ ++ It is a 32-bit value that maps to actual architecture code compiled ++ into applications and libraries. It needs to be defined for each ++ architecture. When choosing this value, it needs to be taken into ++ account that generating invalid instructions may have ill effects on ++ tools like objdump, and may also have impact on the CPU speculative ++ execution efficiency in some cases. ++ ++ RSEQ_SIG uses the trap4 instruction. As Linux does not make use of the ++ access-register mode nor the linkage stack this instruction will always ++ cause a special-operation exception (the trap-enabled bit in the DUCT ++ is and will stay 0). The instruction pattern is ++ b2 ff 0f ff trap4 4095(%r0) */ ++ ++#define RSEQ_SIG 0xB2FF0FFF +diff --git a/sysdeps/unix/sysv/linux/sys/rseq.h b/sysdeps/unix/sysv/linux/sys/rseq.h +new file mode 100644 +index 0000000000000000..c8edff50d40e29b6 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/sys/rseq.h +@@ -0,0 +1,174 @@ ++/* Restartable Sequences exported symbols. Linux header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++#define _SYS_RSEQ_H 1 ++ ++/* Architecture-specific rseq signature. */ ++#include ++ ++#include ++#include ++#include ++ ++#ifdef __has_include ++# if __has_include ("linux/rseq.h") ++# define __GLIBC_HAVE_KERNEL_RSEQ ++# endif ++#else ++# include ++# if LINUX_VERSION_CODE >= KERNEL_VERSION (4, 18, 0) ++# define __GLIBC_HAVE_KERNEL_RSEQ ++# endif ++#endif ++ ++#ifdef __GLIBC_HAVE_KERNEL_RSEQ ++/* We use the structures declarations from the kernel headers. */ ++# include ++#else /* __GLIBC_HAVE_KERNEL_RSEQ */ ++/* We use a copy of the include/uapi/linux/rseq.h kernel header. */ ++ ++enum rseq_cpu_id_state ++ { ++ RSEQ_CPU_ID_UNINITIALIZED = -1, ++ RSEQ_CPU_ID_REGISTRATION_FAILED = -2, ++ }; ++ ++enum rseq_flags ++ { ++ RSEQ_FLAG_UNREGISTER = (1 << 0), ++ }; ++ ++enum rseq_cs_flags_bit ++ { ++ RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT = 0, ++ RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT = 1, ++ RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT = 2, ++ }; ++ ++enum rseq_cs_flags ++ { ++ RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT = ++ (1U << RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT), ++ RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL = ++ (1U << RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT), ++ RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE = ++ (1U << RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT), ++ }; ++ ++/* struct rseq_cs is aligned on 32 bytes to ensure it is always ++ contained within a single cache-line. It is usually declared as ++ link-time constant data. */ ++struct rseq_cs ++ { ++ /* Version of this structure. */ ++ uint32_t version; ++ /* enum rseq_cs_flags. */ ++ uint32_t flags; ++ uint64_t start_ip; ++ /* Offset from start_ip. */ ++ uint64_t post_commit_offset; ++ uint64_t abort_ip; ++ } __attribute__ ((__aligned__ (32))); ++ ++/* struct rseq is aligned on 32 bytes to ensure it is always ++ contained within a single cache-line. ++ ++ A single struct rseq per thread is allowed. */ ++struct rseq ++ { ++ /* Restartable sequences cpu_id_start field. Updated by the ++ kernel. Read by user-space with single-copy atomicity ++ semantics. This field should only be read by the thread which ++ registered this data structure. Aligned on 32-bit. Always ++ contains a value in the range of possible CPUs, although the ++ value may not be the actual current CPU (e.g. if rseq is not ++ initialized). This CPU number value should always be compared ++ against the value of the cpu_id field before performing a rseq ++ commit or returning a value read from a data structure indexed ++ using the cpu_id_start value. */ ++ uint32_t cpu_id_start; ++ /* Restartable sequences cpu_id field. Updated by the kernel. ++ Read by user-space with single-copy atomicity semantics. This ++ field should only be read by the thread which registered this ++ data structure. Aligned on 32-bit. Values ++ RSEQ_CPU_ID_UNINITIALIZED and RSEQ_CPU_ID_REGISTRATION_FAILED ++ have a special semantic: the former means "rseq uninitialized", ++ and latter means "rseq initialization failed". This value is ++ meant to be read within rseq critical sections and compared ++ with the cpu_id_start value previously read, before performing ++ the commit instruction, or read and compared with the ++ cpu_id_start value before returning a value loaded from a data ++ structure indexed using the cpu_id_start value. */ ++ uint32_t cpu_id; ++ /* Restartable sequences rseq_cs field. ++ ++ Contains NULL when no critical section is active for the current ++ thread, or holds a pointer to the currently active struct rseq_cs. ++ ++ Updated by user-space, which sets the address of the currently ++ active rseq_cs at the beginning of assembly instruction sequence ++ block, and set to NULL by the kernel when it restarts an assembly ++ instruction sequence block, as well as when the kernel detects that ++ it is preempting or delivering a signal outside of the range ++ targeted by the rseq_cs. Also needs to be set to NULL by user-space ++ before reclaiming memory that contains the targeted struct rseq_cs. ++ ++ Read and set by the kernel. Set by user-space with single-copy ++ atomicity semantics. This field should only be updated by the ++ thread which registered this data structure. Aligned on 64-bit. */ ++ union ++ { ++ uint64_t ptr64; ++# ifdef __LP64__ ++ uint64_t ptr; ++# else /* __LP64__ */ ++ struct ++ { ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint32_t padding; /* Initialized to zero. */ ++ uint32_t ptr32; ++# else /* LITTLE */ ++ uint32_t ptr32; ++ uint32_t padding; /* Initialized to zero. */ ++# endif /* ENDIAN */ ++ } ptr; ++# endif /* __LP64__ */ ++ } rseq_cs; ++ ++ /* Restartable sequences flags field. ++ ++ This field should only be updated by the thread which ++ registered this data structure. Read by the kernel. ++ Mainly used for single-stepping through rseq critical sections ++ with debuggers. ++ ++ - RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT ++ Inhibit instruction sequence block restart on preemption ++ for this thread. ++ - RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL ++ Inhibit instruction sequence block restart on signal ++ delivery for this thread. ++ - RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE ++ Inhibit instruction sequence block restart on migration for ++ this thread. */ ++ uint32_t flags; ++ } __attribute__ ((__aligned__ (32))); ++ ++#endif /* __GLIBC_HAVE_KERNEL_RSEQ */ ++ ++#endif /* sys/rseq.h */ +diff --git a/sysdeps/unix/sysv/linux/tst-rseq-nptl.c b/sysdeps/unix/sysv/linux/tst-rseq-nptl.c +new file mode 100644 +index 0000000000000000..d31d94445caa9ee3 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-rseq-nptl.c +@@ -0,0 +1,260 @@ ++/* Restartable Sequences NPTL test. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* These tests validate that rseq is registered from various execution ++ contexts (main thread, destructor, other threads, other threads created ++ from destructor, forked process (without exec), pthread_atfork handlers, ++ pthread setspecific destructors, signal handlers, atexit handlers). ++ ++ See the Linux kernel selftests for extensive rseq stress-tests. */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef RSEQ_SIG ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include "tst-rseq.h" ++ ++static pthread_key_t rseq_test_key; ++ ++static void ++atfork_prepare (void) ++{ ++ if (!rseq_thread_registered ()) ++ { ++ printf ("error: rseq not registered in pthread atfork prepare\n"); ++ support_record_failure (); ++ } ++} ++ ++static void ++atfork_parent (void) ++{ ++ if (!rseq_thread_registered ()) ++ { ++ printf ("error: rseq not registered in pthread atfork parent\n"); ++ support_record_failure (); ++ } ++} ++ ++static void ++atfork_child (void) ++{ ++ if (!rseq_thread_registered ()) ++ { ++ printf ("error: rseq not registered in pthread atfork child\n"); ++ support_record_failure (); ++ } ++} ++ ++static void ++rseq_key_destructor (void *arg) ++{ ++ /* Cannot use deferred failure reporting after main returns. */ ++ if (!rseq_thread_registered ()) ++ FAIL_EXIT1 ("rseq not registered in pthread key destructor"); ++} ++ ++static void ++atexit_handler (void) ++{ ++ /* Cannot use deferred failure reporting after main returns. */ ++ if (!rseq_thread_registered ()) ++ FAIL_EXIT1 ("rseq not registered in atexit handler"); ++} ++ ++/* Used to avoid -Werror=stringop-overread warning with ++ pthread_setspecific and GCC 11. */ ++static char one = 1; ++ ++static void ++do_rseq_main_test (void) ++{ ++ TEST_COMPARE (atexit (atexit_handler), 0); ++ rseq_test_key = xpthread_key_create (rseq_key_destructor); ++ TEST_COMPARE (pthread_atfork (atfork_prepare, atfork_parent, atfork_child), 0); ++ xraise (SIGUSR1); ++ TEST_COMPARE (pthread_setspecific (rseq_test_key, &one), 0); ++ TEST_VERIFY_EXIT (rseq_thread_registered ()); ++} ++ ++static void ++cancel_routine (void *arg) ++{ ++ if (!rseq_thread_registered ()) ++ { ++ printf ("error: rseq not registered in cancel routine\n"); ++ support_record_failure (); ++ } ++} ++ ++static pthread_barrier_t cancel_thread_barrier; ++static pthread_cond_t cancel_thread_cond = PTHREAD_COND_INITIALIZER; ++static pthread_mutex_t cancel_thread_mutex = PTHREAD_MUTEX_INITIALIZER; ++ ++static void ++test_cancel_thread (void) ++{ ++ pthread_cleanup_push (cancel_routine, NULL); ++ (void) xpthread_barrier_wait (&cancel_thread_barrier); ++ /* Wait forever until cancellation. */ ++ xpthread_cond_wait (&cancel_thread_cond, &cancel_thread_mutex); ++ pthread_cleanup_pop (0); ++} ++ ++static void * ++thread_function (void * arg) ++{ ++ int i = (int) (intptr_t) arg; ++ ++ xraise (SIGUSR1); ++ if (i == 0) ++ test_cancel_thread (); ++ TEST_COMPARE (pthread_setspecific (rseq_test_key, &one), 0); ++ return rseq_thread_registered () ? NULL : (void *) 1l; ++} ++ ++static void ++sighandler (int sig) ++{ ++ if (!rseq_thread_registered ()) ++ { ++ printf ("error: rseq not registered in signal handler\n"); ++ support_record_failure (); ++ } ++} ++ ++static void ++setup_signals (void) ++{ ++ struct sigaction sa; ++ ++ sigemptyset (&sa.sa_mask); ++ sigaddset (&sa.sa_mask, SIGUSR1); ++ sa.sa_flags = 0; ++ sa.sa_handler = sighandler; ++ xsigaction (SIGUSR1, &sa, NULL); ++} ++ ++static int ++do_rseq_threads_test (int nr_threads) ++{ ++ pthread_t th[nr_threads]; ++ int i; ++ int result = 0; ++ ++ xpthread_barrier_init (&cancel_thread_barrier, NULL, 2); ++ ++ for (i = 0; i < nr_threads; ++i) ++ th[i] = xpthread_create (NULL, thread_function, ++ (void *) (intptr_t) i); ++ ++ (void) xpthread_barrier_wait (&cancel_thread_barrier); ++ ++ xpthread_cancel (th[0]); ++ ++ for (i = 0; i < nr_threads; ++i) ++ { ++ void *v; ++ ++ v = xpthread_join (th[i]); ++ if (i != 0 && v != NULL) ++ { ++ printf ("error: join %d successful, but child failed\n", i); ++ result = 1; ++ } ++ else if (i == 0 && v == NULL) ++ { ++ printf ("error: join %d successful, child did not fail as expected\n", i); ++ result = 1; ++ } ++ } ++ ++ xpthread_barrier_destroy (&cancel_thread_barrier); ++ ++ return result; ++} ++ ++static void ++subprocess_callback (void *closure) ++{ ++ do_rseq_main_test (); ++} ++ ++static void ++do_rseq_fork_test (void) ++{ ++ support_isolate_in_subprocess (subprocess_callback, NULL); ++} ++ ++static int ++do_rseq_test (void) ++{ ++ int t[] = { 1, 2, 6, 5, 4, 3, 50 }; ++ int i, result = 0; ++ ++ if (!rseq_available ()) ++ FAIL_UNSUPPORTED ("kernel does not support rseq, skipping test"); ++ setup_signals (); ++ xraise (SIGUSR1); ++ do_rseq_main_test (); ++ for (i = 0; i < array_length (t); i++) ++ if (do_rseq_threads_test (t[i])) ++ result = 1; ++ do_rseq_fork_test (); ++ return result; ++} ++ ++static void __attribute__ ((destructor)) ++do_rseq_destructor_test (void) ++{ ++ /* Cannot use deferred failure reporting after main returns. */ ++ if (do_rseq_test ()) ++ FAIL_EXIT1 ("rseq not registered within destructor"); ++ xpthread_key_delete (rseq_test_key); ++} ++ ++#else /* RSEQ_SIG */ ++static int ++do_rseq_test (void) ++{ ++ FAIL_UNSUPPORTED ("glibc does not define RSEQ_SIG, skipping test"); ++ return 0; ++} ++#endif /* RSEQ_SIG */ ++ ++static int ++do_test (void) ++{ ++ return do_rseq_test (); ++} ++ ++#include +diff --git a/sysdeps/unix/sysv/linux/tst-rseq.c b/sysdeps/unix/sysv/linux/tst-rseq.c +new file mode 100644 +index 0000000000000000..926376b6a5446ece +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-rseq.c +@@ -0,0 +1,64 @@ ++/* Restartable Sequences single-threaded tests. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* These tests validate that rseq is registered from main in an executable ++ not linked against libpthread. */ ++ ++#include ++#include ++#include ++#include ++ ++#ifdef RSEQ_SIG ++# include ++# include ++# include ++# include ++# include ++# include "tst-rseq.h" ++ ++static void ++do_rseq_main_test (void) ++{ ++ TEST_VERIFY_EXIT (rseq_thread_registered ()); ++} ++ ++static void ++do_rseq_test (void) ++{ ++ if (!rseq_available ()) ++ { ++ FAIL_UNSUPPORTED ("kernel does not support rseq, skipping test"); ++ } ++ do_rseq_main_test (); ++} ++#else /* RSEQ_SIG */ ++static void ++do_rseq_test (void) ++{ ++ FAIL_UNSUPPORTED ("glibc does not define RSEQ_SIG, skipping test"); ++} ++#endif /* RSEQ_SIG */ ++ ++static int ++do_test (void) ++{ ++ do_rseq_test (); ++ return 0; ++} ++ ++#include +diff --git a/sysdeps/unix/sysv/linux/tst-rseq.h b/sysdeps/unix/sysv/linux/tst-rseq.h +new file mode 100644 +index 0000000000000000..a476c316fc2671a0 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-rseq.h +@@ -0,0 +1,57 @@ ++/* Restartable Sequences tests header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static inline bool ++rseq_thread_registered (void) ++{ ++ return THREAD_GETMEM_VOLATILE (THREAD_SELF, rseq_area.cpu_id) >= 0; ++} ++ ++static inline int ++sys_rseq (struct rseq *rseq_abi, uint32_t rseq_len, int flags, uint32_t sig) ++{ ++ return syscall (__NR_rseq, rseq_abi, rseq_len, flags, sig); ++} ++ ++static inline bool ++rseq_available (void) ++{ ++ int rc; ++ ++ rc = sys_rseq (NULL, 0, 0, 0); ++ if (rc != -1) ++ FAIL_EXIT1 ("Unexpected rseq return value %d", rc); ++ switch (errno) ++ { ++ case ENOSYS: ++ return false; ++ case EINVAL: ++ /* rseq is implemented, but detected an invalid rseq_len parameter. */ ++ return true; ++ default: ++ FAIL_EXIT1 ("Unexpected rseq error %s", strerror (errno)); ++ } ++} +diff --git a/sysdeps/unix/sysv/linux/x86/bits/rseq.h b/sysdeps/unix/sysv/linux/x86/bits/rseq.h +new file mode 100644 +index 0000000000000000..9fc909e7c8a25bbb +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/x86/bits/rseq.h +@@ -0,0 +1,30 @@ ++/* Restartable Sequences Linux x86 architecture header. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _SYS_RSEQ_H ++# error "Never use directly; include instead." ++#endif ++ ++/* RSEQ_SIG is a signature required before each abort handler code. ++ ++ RSEQ_SIG is used with the following reserved undefined instructions, which ++ trap in user-space: ++ ++ x86-32: 0f b9 3d 53 30 05 53 ud1 0x53053053,%edi ++ x86-64: 0f b9 3d 53 30 05 53 ud1 0x53053053(%rip),%edi */ ++ ++#define RSEQ_SIG 0x53053053 diff --git a/SOURCES/glibc-rh2024347-8.patch b/SOURCES/glibc-rh2024347-8.patch new file mode 100644 index 0000000..1436fe1 --- /dev/null +++ b/SOURCES/glibc-rh2024347-8.patch @@ -0,0 +1,43 @@ +commit 1d350aa06091211863e41169729cee1bca39f72f +Author: Florian Weimer +Date: Thu Dec 9 09:49:32 2021 +0100 + + Linux: Use rseq to accelerate sched_getcpu + + Co-Authored-By: Mathieu Desnoyers + Reviewed-by: Szabolcs Nagy + +diff --git a/sysdeps/unix/sysv/linux/sched_getcpu.c b/sysdeps/unix/sysv/linux/sched_getcpu.c +index c41e986f2cab5e42..6f78edaea1495342 100644 +--- a/sysdeps/unix/sysv/linux/sched_getcpu.c ++++ b/sysdeps/unix/sysv/linux/sched_getcpu.c +@@ -20,8 +20,8 @@ + #include + #include + +-int +-sched_getcpu (void) ++static int ++vsyscall_sched_getcpu (void) + { + unsigned int cpu; + int r = -1; +@@ -32,3 +32,18 @@ sched_getcpu (void) + #endif + return r == -1 ? r : cpu; + } ++ ++#ifdef RSEQ_SIG ++int ++sched_getcpu (void) ++{ ++ int cpu_id = THREAD_GETMEM_VOLATILE (THREAD_SELF, rseq_area.cpu_id); ++ return __glibc_likely (cpu_id >= 0) ? cpu_id : vsyscall_sched_getcpu (); ++} ++#else /* RSEQ_SIG */ ++int ++sched_getcpu (void) ++{ ++ return vsyscall_sched_getcpu (); ++} ++#endif /* RSEQ_SIG */ diff --git a/SOURCES/glibc-rh2024347-9.patch b/SOURCES/glibc-rh2024347-9.patch new file mode 100644 index 0000000..af25983 --- /dev/null +++ b/SOURCES/glibc-rh2024347-9.patch @@ -0,0 +1,278 @@ +commit e3e589829d16af9f7e73c7b70f74f3c5d5003e45 +Author: Florian Weimer +Date: Thu Dec 9 09:49:32 2021 +0100 + + nptl: Add glibc.pthread.rseq tunable to control rseq registration + + This tunable allows applications to register the rseq area instead + of glibc. + + Reviewed-by: Szabolcs Nagy + Reviewed-by: Siddhesh Poyarekar + +diff --git a/manual/tunables.texi b/manual/tunables.texi +index 658547c6137bf177..1f5c410288eeecec 100644 +--- a/manual/tunables.texi ++++ b/manual/tunables.texi +@@ -413,6 +413,16 @@ The value is measured in bytes. The default is @samp{41943040} + (fourty mibibytes). + @end deftp + ++@deftp Tunable glibc.pthread.rseq ++The @code{glibc.pthread.rseq} tunable can be set to @samp{0}, to disable ++restartable sequences support in @theglibc{}. This enables applications ++to perform direct restartable sequence registration with the kernel. ++The default is @samp{1}, which means that @theglibc{} performs ++registration on behalf of the application. ++ ++Restartable sequences are a Linux-specific extension. ++@end deftp ++ + @node Hardware Capability Tunables + @section Hardware Capability Tunables + @cindex hardware capability tunables +diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c +index d2b40924dafad316..f405fa356c2955ce 100644 +--- a/nptl/pthread_create.c ++++ b/nptl/pthread_create.c +@@ -369,7 +369,10 @@ start_thread (void *arg) + __ctype_init (); + + /* Register rseq TLS to the kernel. */ +- rseq_register_current_thread (pd); ++ { ++ bool do_rseq = THREAD_GETMEM (pd, flags) & ATTR_FLAG_DO_RSEQ; ++ rseq_register_current_thread (pd, do_rseq); ++ } + + #ifndef __ASSUME_SET_ROBUST_LIST + if (__nptl_set_robust_list_avail) +@@ -678,6 +681,11 @@ __pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr, + pd->flags = ((iattr->flags & ~(ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET)) + | (self->flags & (ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET))); + ++ /* Inherit rseq registration state. Without seccomp filters, rseq ++ registration will either always fail or always succeed. */ ++ if ((int) THREAD_GETMEM_VOLATILE (self, rseq_area.cpu_id) >= 0) ++ pd->flags |= ATTR_FLAG_DO_RSEQ; ++ + /* Initialize the field for the ID of the thread which is waiting + for us. This is a self-reference in case the thread is created + detached. */ +diff --git a/sysdeps/nptl/dl-tls_init_tp.c b/sysdeps/nptl/dl-tls_init_tp.c +index fedb876fdb2642d2..b39dfbff2c6678d5 100644 +--- a/sysdeps/nptl/dl-tls_init_tp.c ++++ b/sysdeps/nptl/dl-tls_init_tp.c +@@ -23,6 +23,9 @@ + #include + #include + ++#define TUNABLE_NAMESPACE pthread ++#include ++ + #ifndef __ASSUME_SET_ROBUST_LIST + bool __nptl_set_robust_list_avail; + rtld_hidden_data_def (__nptl_set_robust_list_avail) +@@ -92,7 +95,13 @@ __tls_init_tp (void) + } + } + +- rseq_register_current_thread (pd); ++ { ++ bool do_rseq = true; ++#if HAVE_TUNABLES ++ do_rseq = TUNABLE_GET (rseq, int, NULL); ++#endif ++ rseq_register_current_thread (pd, do_rseq); ++ } + + /* Set initial thread's stack block from 0 up to __libc_stack_end. + It will be bigger than it actually is, but for unwind.c/pt-longjmp.c +diff --git a/sysdeps/nptl/dl-tunables.list b/sysdeps/nptl/dl-tunables.list +index ac5d053298725468..d24f4be0d08ba407 100644 +--- a/sysdeps/nptl/dl-tunables.list ++++ b/sysdeps/nptl/dl-tunables.list +@@ -27,5 +27,11 @@ glibc { + type: SIZE_T + default: 41943040 + } ++ rseq { ++ type: INT_32 ++ minval: 0 ++ maxval: 1 ++ default: 1 ++ } + } + } +diff --git a/sysdeps/nptl/internaltypes.h b/sysdeps/nptl/internaltypes.h +index 50a2ad19ae7210ae..8205c6d15a918952 100644 +--- a/sysdeps/nptl/internaltypes.h ++++ b/sysdeps/nptl/internaltypes.h +@@ -49,6 +49,7 @@ struct pthread_attr + #define ATTR_FLAG_OLDATTR 0x0010 + #define ATTR_FLAG_SCHED_SET 0x0020 + #define ATTR_FLAG_POLICY_SET 0x0040 ++#define ATTR_FLAG_DO_RSEQ 0x0080 + + /* Used to allocate a pthread_attr_t object which is also accessed + internally. */ +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +index f84ccd6bbb3b16ad..d30d21898b402d1e 100644 +--- a/sysdeps/unix/sysv/linux/Makefile ++++ b/sysdeps/unix/sysv/linux/Makefile +@@ -135,6 +135,12 @@ tests-internal += \ + tst-sigcontext-get_pc \ + # tests-internal + ++ifneq (no,$(have-tunables)) ++tests-internal += \ ++ tst-rseq-disable \ ++ # tests-internal $(have-tunables) ++endif ++ + tests-time64 += \ + tst-adjtimex-time64 \ + tst-clock_adjtime-time64 \ +@@ -226,6 +232,8 @@ $(objpfx)tst-mman-consts.out: ../sysdeps/unix/sysv/linux/tst-mman-consts.py + < /dev/null > $@ 2>&1; $(evaluate-test) + $(objpfx)tst-mman-consts.out: $(sysdeps-linux-python-deps) + ++tst-rseq-disable-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0 ++ + endif # $(subdir) == misc + + ifeq ($(subdir),time) +diff --git a/sysdeps/unix/sysv/linux/rseq-internal.h b/sysdeps/unix/sysv/linux/rseq-internal.h +index 909f5478251d3d13..15bc7ffd6eda632d 100644 +--- a/sysdeps/unix/sysv/linux/rseq-internal.h ++++ b/sysdeps/unix/sysv/linux/rseq-internal.h +@@ -21,22 +21,27 @@ + #include + #include + #include ++#include + #include + #include + + #ifdef RSEQ_SIG + static inline void +-rseq_register_current_thread (struct pthread *self) ++rseq_register_current_thread (struct pthread *self, bool do_rseq) + { +- int ret = INTERNAL_SYSCALL_CALL (rseq, +- &self->rseq_area, sizeof (self->rseq_area), +- 0, RSEQ_SIG); +- if (INTERNAL_SYSCALL_ERROR_P (ret)) +- THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); ++ if (do_rseq) ++ { ++ int ret = INTERNAL_SYSCALL_CALL (rseq, &self->rseq_area, ++ sizeof (self->rseq_area), ++ 0, RSEQ_SIG); ++ if (!INTERNAL_SYSCALL_ERROR_P (ret)) ++ return; ++ } ++ THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); + } + #else /* RSEQ_SIG */ + static inline void +-rseq_register_current_thread (struct pthread *self) ++rseq_register_current_thread (struct pthread *self, bool do_rseq) + { + THREAD_SETMEM (self, rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); + } +diff --git a/sysdeps/unix/sysv/linux/tst-rseq-disable.c b/sysdeps/unix/sysv/linux/tst-rseq-disable.c +new file mode 100644 +index 0000000000000000..000e351872fc2f76 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-rseq-disable.c +@@ -0,0 +1,89 @@ ++/* Test disabling of rseq registration via tunable. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef RSEQ_SIG ++ ++/* Check that rseq can be registered and has not been taken by glibc. */ ++static void ++check_rseq_disabled (void) ++{ ++ struct pthread *pd = THREAD_SELF; ++ TEST_COMPARE ((int) pd->rseq_area.cpu_id, RSEQ_CPU_ID_REGISTRATION_FAILED); ++ ++ int ret = syscall (__NR_rseq, &pd->rseq_area, sizeof (pd->rseq_area), ++ 0, RSEQ_SIG); ++ if (ret == 0) ++ { ++ ret = syscall (__NR_rseq, &pd->rseq_area, sizeof (pd->rseq_area), ++ RSEQ_FLAG_UNREGISTER, RSEQ_SIG); ++ TEST_COMPARE (ret, 0); ++ pd->rseq_area.cpu_id = RSEQ_CPU_ID_REGISTRATION_FAILED; ++ } ++ else ++ { ++ TEST_VERIFY (errno != -EINVAL); ++ TEST_VERIFY (errno != -EBUSY); ++ } ++} ++ ++static void * ++thread_func (void *ignored) ++{ ++ check_rseq_disabled (); ++ return NULL; ++} ++ ++static void ++proc_func (void *ignored) ++{ ++ check_rseq_disabled (); ++} ++ ++static int ++do_test (void) ++{ ++ puts ("info: checking main thread"); ++ check_rseq_disabled (); ++ ++ puts ("info: checking main thread (2)"); ++ check_rseq_disabled (); ++ ++ puts ("info: checking new thread"); ++ xpthread_join (xpthread_create (NULL, thread_func, NULL)); ++ ++ puts ("info: checking subprocess"); ++ support_isolate_in_subprocess (proc_func, NULL); ++ ++ return 0; ++} ++#else /* !RSEQ_SIG */ ++static int ++do_test (void) ++{ ++ FAIL_UNSUPPORTED ("glibc does not define RSEQ_SIG, skipping test"); ++} ++#endif ++ ++#include diff --git a/SOURCES/glibc-rh2027789.patch b/SOURCES/glibc-rh2027789.patch new file mode 100644 index 0000000..798d496 --- /dev/null +++ b/SOURCES/glibc-rh2027789.patch @@ -0,0 +1,23 @@ +Downstream-only patch from Mark Wielaard to avoid a +crash in backtrace if the vDSO is not available. + +Upstream, this code was removed in commit 82fd7314c7df8c5555dce02 +("powerpc: Remove backtrace implementation"), so patch is not needed +there. + +diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c +index 37de9b5bdd73c316..0ffa7509dfa4862a 100644 +--- a/sysdeps/powerpc/powerpc64/backtrace.c ++++ b/sysdeps/powerpc/powerpc64/backtrace.c +@@ -68,8 +68,9 @@ static inline bool + is_sigtramp_address (void *nip) + { + #ifdef HAVE_SIGTRAMP_RT64 +- if (nip == GLRO (dl_vdso_sigtramp_rt64) || +- nip == GLRO (dl_vdso_sigtramp_rt64) + 4) ++ if ((nip == GLRO (dl_vdso_sigtramp_rt64) || ++ nip == GLRO (dl_vdso_sigtramp_rt64) + 4) ++ && nip != NULL) + return true; + #endif + return false; diff --git a/SOURCES/glibc-rh2029410.patch b/SOURCES/glibc-rh2029410.patch new file mode 100644 index 0000000..256380a --- /dev/null +++ b/SOURCES/glibc-rh2029410.patch @@ -0,0 +1,143 @@ +commit ea5814467a02c9d2d7608b6445c5d60e2a81d3ee +Author: H.J. Lu +Date: Fri Dec 10 13:00:09 2021 -0800 + + x86-64: Remove LD_PREFER_MAP_32BIT_EXEC support [BZ #28656] + + Remove the LD_PREFER_MAP_32BIT_EXEC environment variable support since + the first PT_LOAD segment is no longer executable due to defaulting to + -z separate-code. + + This fixes [BZ #28656]. + + Reviewed-by: Florian Weimer + +diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h +deleted file mode 100644 +index 5b9696e2de8e5482..0000000000000000 +--- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h ++++ /dev/null +@@ -1,45 +0,0 @@ +-/* Optional code to distinguish library flavours. x86-64 version. +- Copyright (C) 2015-2021 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#ifndef _DL_LIBRECON_H +- +-#include +- +-/* Recognizing extra environment variables. For 64-bit applications, +- branch prediction performance may be negatively impacted when the +- target of a branch is more than 4GB away from the branch. Add the +- Prefer_MAP_32BIT_EXEC bit so that mmap will try to map executable +- pages with MAP_32BIT first. NB: MAP_32BIT will map to lower 2GB, +- not lower 4GB, address. Prefer_MAP_32BIT_EXEC reduces bits available +- for address space layout randomization (ASLR). Prefer_MAP_32BIT_EXEC +- is always disabled for SUID programs and can be enabled by setting +- environment variable, LD_PREFER_MAP_32BIT_EXEC. */ +-#define EXTRA_LD_ENVVARS \ +- case 21: \ +- if (!__libc_enable_secure \ +- && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \ +- GLRO(dl_x86_cpu_features).preferred[index_arch_Prefer_MAP_32BIT_EXEC] \ +- |= bit_arch_Prefer_MAP_32BIT_EXEC; \ +- break; +- +-/* Extra unsecure variables. The names are all stuffed in a single +- string which means they have to be terminated with a '\0' explicitly. */ +-#define EXTRA_UNSECURE_ENVVARS \ +- "LD_PREFER_MAP_32BIT_EXEC\0" +- +-#endif /* dl-librecon.h */ +diff --git a/sysdeps/unix/sysv/linux/x86_64/64/mmap_internal.h b/sysdeps/unix/sysv/linux/x86_64/64/mmap_internal.h +deleted file mode 100644 +index 18177d2cb3ae645f..0000000000000000 +--- a/sysdeps/unix/sysv/linux/x86_64/64/mmap_internal.h ++++ /dev/null +@@ -1,42 +0,0 @@ +-/* Linux mmap system call. x86-64 version. +- Copyright (C) 2015-2021 Free Software Foundation, Inc. +- +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public License as +- published by the Free Software Foundation; either version 2.1 of the +- License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#ifndef MMAP_X86_64_INTERNAL_H +-#define MMAP_X86_64_INTERNAL_H +- +-#include +- +-/* If the Prefer_MAP_32BIT_EXEC bit is set, try to map executable pages +- with MAP_32BIT first. */ +-#define MMAP_PREPARE(addr, len, prot, flags, fd, offset) \ +- if ((addr) == NULL \ +- && ((prot) & PROT_EXEC) != 0 \ +- && HAS_ARCH_FEATURE (Prefer_MAP_32BIT_EXEC)) \ +- { \ +- void *ret = (void*) INLINE_SYSCALL_CALL (mmap, (addr), (len), \ +- (prot), \ +- (flags) | MAP_32BIT, \ +- (fd), (offset)); \ +- if (ret != MAP_FAILED) \ +- return ret; \ +- } +- +-#include_next +- +-#endif +diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c +index 00fe5045eb56eb07..58f2fad4323d5d91 100644 +--- a/sysdeps/x86/cpu-tunables.c ++++ b/sysdeps/x86/cpu-tunables.c +@@ -260,13 +260,6 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) + 20); + } + break; +- case 21: +- { +- CHECK_GLIBC_IFUNC_PREFERRED_BOTH (n, cpu_features, +- Prefer_MAP_32BIT_EXEC, +- disable, 21); +- } +- break; + case 23: + { + CHECK_GLIBC_IFUNC_PREFERRED_NEED_BOTH +diff --git a/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def b/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def +index d7c93f00c5928a30..3bdc76cf71007948 100644 +--- a/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def ++++ b/sysdeps/x86/include/cpu-features-preferred_feature_index_1.def +@@ -26,7 +26,6 @@ BIT (I586) + BIT (I686) + BIT (Slow_SSE4_2) + BIT (AVX_Fast_Unaligned_Load) +-BIT (Prefer_MAP_32BIT_EXEC) + BIT (Prefer_No_VZEROUPPER) + BIT (Prefer_ERMS) + BIT (Prefer_No_AVX512) diff --git a/SOURCES/glibc-rh2032647-1.patch b/SOURCES/glibc-rh2032647-1.patch new file mode 100644 index 0000000..ebc11b1 --- /dev/null +++ b/SOURCES/glibc-rh2032647-1.patch @@ -0,0 +1,2024 @@ +commit e6fd79f3795d46dfb583e124be49fc063bc3d58b +Author: Chung-Lin Tang +Date: Thu Oct 21 21:41:21 2021 +0800 + + elf: Testing infrastructure for ld.so DSO sorting (BZ #17645) + + This is the first of a 2-part patch set that fixes slow DSO sorting behavior in + the dynamic loader, as reported in BZ #17645. In order to facilitate such a + large modification to the dynamic loader, this first patch implements a testing + framework for validating shared object sorting behavior, to enable comparison + between old/new sorting algorithms, and any later enhancements. + + This testing infrastructure consists of a Python script + scripts/dso-ordering-test.py' which takes in a description language, consisting + of strings that describe a set of link dependency relations between DSOs, and + generates testcase programs and Makefile fragments to automatically test the + described situation, for example: + + a->b->c->d # four objects linked one after another + + a->[bc]->d;b->c # a depends on b and c, which both depend on d, + # b depends on c (b,c linked to object a in fixed order) + + a->b->c;{+a;%a;-a} # a, b, c serially dependent, main program uses + # dlopen/dlsym/dlclose on object a + + a->b->c;{}!->[abc] # a, b, c serially dependent; multiple tests generated + # to test all permutations of a, b, c ordering linked + # to main program + + (Above is just a short description of what the script can do, more + documentation is in the script comments.) + + Two files containing several new tests, elf/dso-sort-tests-[12].def are added, + including test scenarios for BZ #15311 and Redhat issue #1162810 [1]. + + Due to the nature of dynamic loader tests, where the sorting behavior and test + output occurs before/after main(), generating testcases to use + support/test-driver.c does not suffice to control meaningful timeout for ld.so. + Therefore a new utility program 'support/test-run-command', based on + test-driver.c/support_test_main.c has been added. This does the same testcase + control, but for a program specified through a command-line rather than at the + source code level. This utility is used to run the dynamic loader testcases + generated by dso-ordering-test.py. + + [1] https://bugzilla.redhat.com/show_bug.cgi?id=1162810 + + Signed-off-by: Chung-Lin Tang + Reviewed-by: Adhemerval Zanella + +diff --git a/elf/Makefile b/elf/Makefile +index 3e7debdd81baafe0..8dd2b24328113536 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -471,6 +471,21 @@ tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \ + $(objpfx)tst-unused-dep-cmp.out + endif + ++# DSO sorting tests: ++# The dso-ordering-test.py script generates testcase source files in $(objpfx), ++# creating a $(objpfx)-dir for each testcase, and creates a ++# Makefile fragment to be included. ++define include_dsosort_tests ++$(objpfx)$(1).generated-makefile: $(1) ++ $(PYTHON) $(..)scripts/dso-ordering-test.py \ ++ --description-file $$< --objpfx $(objpfx) --output-makefile $$@ ++include $(objpfx)$(1).generated-makefile ++endef ++ ++# Generate from each testcase description file ++$(eval $(call include_dsosort_tests,dso-sort-tests-1.def)) ++$(eval $(call include_dsosort_tests,dso-sort-tests-2.def)) ++ + check-abi: $(objpfx)check-abi-ld.out + tests-special += $(objpfx)check-abi-ld.out + update-abi: update-abi-ld +diff --git a/elf/dso-sort-tests-1.def b/elf/dso-sort-tests-1.def +new file mode 100644 +index 0000000000000000..873ddf55d91155c6 +--- /dev/null ++++ b/elf/dso-sort-tests-1.def +@@ -0,0 +1,66 @@ ++# DSO sorting test descriptions. ++# This file is to be processed by ../scripts/dso-ordering-test.py, see usage ++# in elf/Makefile for how it is executed. ++ ++# We test both dynamic loader sorting algorithms ++tunable_option: glibc.rtld.dynamic_sort=1 ++tunable_option: glibc.rtld.dynamic_sort=2 ++ ++# Sequence of single dependencies with no cycles. ++tst-dso-ordering1: a->b->c ++output: c>b>a>{}b->[cd]->e ++output: e>d>c>b>a>{}[bc]->[def]->[gh]->i ++output: i>h>g>f>e>d>c>b>a>{}b->[de];a->c->d->e ++output: e>d>c>b>a>{}c cross link is respected correctly ++tst-dso-ordering5: a!->[bc]->d;b->c ++output: d>c>b>a>{}[bcde]->f ++output: f>e>d>c>b>a>{}[bc];b->[cde];e->f ++output: f>e>d>c>b>a>{}b->c=>a;{}->[ba] ++output: c>b>a>{}b->c->d->e;{}!->[abcde] ++output: e>d>c>b>a>{}a->b->c;soname({})=c ++output: b>a>{}b->c->d order). ++# The older dynamic_sort=1 algorithm does not achieve this, while the DFS-based ++# dynamic_sort=2 algorithm does, although it is still arguable whether going ++# beyond spec to do this is the right thing to do. ++# The below expected outputs are what the two algorithms currently produce ++# respectively, for regression testing purposes. ++tst-bz15311: {+a;+e;+f;+g;+d;%d;-d;-g;-f;-e;-a};a->b->c->d;d=>[ba];c=>a;b=>e=>a;c=>f=>b;d=>g=>c ++xfail_output(glibc.rtld.dynamic_sort=1): {+a[d>c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[A101 ++{}->* ++A101->(B101 B163 B122 B181) ++A102->(B102 B140 B199 B158) ++A103->(B103 B117 B176 B135) ++A104->(B104 B194 B153 B112) ++A105->(B105 B171 B130 B189) ++A106->(B106 B148 B107 B166) ++A107->(B107 B125 B184 B143) ++A108->(B108 B102 B161 B120) ++A109->(B109 B179 B138 B197) ++A110->(B110 B156 B115 B174) ++A111->(B111 B133 B192 B151) ++A112->(B112 B110 B169 B128) ++A113->(B113 B187 B146 B105) ++A114->(B114 B164 B123 B182) ++A115->(B115 B141 B200 B159) ++A116->(B116 B118 B177 B136) ++A117->(B117 B195 B154 B113) ++A118->(B118 B172 B131 B190) ++A119->(B119 B149 B108 B167) ++A120->(B120 B126 B185 B144) ++A121->(B121 B103 B162) ++A122->(B122 B180 B139 B198) ++A123->(B123 B157 B116 B175) ++A124->(B124 B134 B193 B152) ++A125->(B125 B111 B170 B129) ++A126->(B126 B188 B147 B106) ++A127->(B127 B165 B124 B183) ++A128->(B128 B142 B101 B160) ++A129->(B129 B119 B178 B137) ++A130->(B130 B196 B155 B114) ++A131->(B131 B173 B132 B191) ++A132->(B132 B150 B109 B168) ++A133->(B133 B127 B186 B145) ++A134->(B134 B104 B163 B122) ++A135->(B135 B181 B140 B199) ++A136->(B136 B158 B117 B176) ++A137->(B137 B135 B194 B153) ++A138->(B138 B112 B171 B130) ++A139->(B139 B189 B148 B107) ++A140->(B140 B166 B125 B184) ++A141->(B141 B143 B102 B161) ++A142->(B142 B120 B179 B138) ++A143->(B143 B197 B156 B115) ++A144->(B144 B174 B133 B192) ++A145->(B145 B151 B110 B169) ++A146->(B146 B128 B187) ++A147->(B147 B105 B164 B123) ++A148->(B148 B182 B141 B200) ++A149->(B149 B159 B118 B177) ++A150->(B150 B136 B195 B154) ++A151->(B151 B113 B172 B131) ++A152->(B152 B190 B149 B108) ++A153->(B153 B167 B126 B185) ++A154->(B154 B144 B103 B162) ++A155->(B155 B121 B180 B139) ++A156->(B156 B198 B157 B116) ++A157->(B157 B175 B134 B193) ++A158->(B158 B152 B111 B170) ++A159->(B159 B129 B188 B147) ++A160->(B160 B106 B165 B124) ++A161->(B161 B183 B142 B101) ++A162->(B162 B160 B119 B178) ++A163->(B163 B137 B196 B155) ++A164->(B164 B114 B173 B132) ++A165->(B165 B191 B150 B109) ++A166->(B166 B168 B127 B186) ++A167->(B167 B145 B104 B163) ++A168->(B168 B122 B181 B140) ++A169->(B169 B199 B158 B117) ++A170->(B170 B176 B135 B194) ++A171->(B171 B153 B112) ++A172->(B172 B130 B189 B148) ++A173->(B173 B107 B166 B125) ++A174->(B174 B184 B143 B102) ++A175->(B175 B161 B120 B179) ++A176->(B176 B138 B197 B156) ++A177->(B177 B115 B174 B133) ++A178->(B178 B192 B151 B110) ++A179->(B179 B169 B128 B187) ++A180->(B180 B146 B105 B164) ++A181->(B181 B123 B182 B141) ++A182->(B182 B200 B159 B118) ++A183->(B183 B177 B136 B195) ++A184->(B184 B154 B113 B172) ++A185->(B185 B131 B190 B149) ++A186->(B186 B108 B167 B126) ++A187->(B187 B185 B144 B103) ++A188->(B188 B162 B121 B180) ++A189->(B189 B139 B198 B157) ++A190->(B190 B116 B175 B134) ++A191->(B191 B193 B152 B111) ++A192->(B192 B170 B129 B188) ++A193->(B193 B147 B106 B165) ++A194->(B194 B124 B183 B142) ++A195->(B195 B101 B160 B119) ++A196->(B196 B178 B137) ++A197->(B197 B155 B114 B173) ++A198->(B198 B132 B191 B150) ++A199->(B199 B109 B168 B127) ++A200->(B200 B186 B145 B104) ++B101->(C101 C164 C123 C182) ++B102->(C102 C141 C200 C159) ++B103->(C103 C118 C177 C136) ++B104->(C104 C195 C154 C113) ++B105->(C105 C172 C131 C190) ++B106->(C106 C149 C108 C167) ++B107->(C107 C126 C185 C144) ++B108->(C108 C103 C162 C121) ++B109->(C109 C180 C139 C198) ++B110->(C110 C157 C116 C175) ++B111->(C111 C134 C193 C152) ++B112->(C112 C111 C170 C129) ++B113->(C113 C188 C147 C106) ++B114->(C114 C165 C124 C183) ++B115->(C115 C142 C101 C160) ++B116->(C116 C119 C178 C137) ++B117->(C117 C196 C155 C114) ++B118->(C118 C173 C132 C191) ++B119->(C119 C150 C109 C168) ++B120->(C120 C127 C186 C145) ++B121->(C121 C104 C163 C122) ++B122->(C122 C181 C140 C199) ++B123->(C123 C158 C117 C176) ++B124->(C124 C135 C194 C153) ++B125->(C125 C112 C171 C130) ++B126->(C126 C189 C148 C107) ++B127->(C127 C166 C125 C184) ++B128->(C128 C143 C102 C161) ++B129->(C129 C120 C179 C138) ++B130->(C130 C197 C156 C115) ++B131->(C131 C174 C133 C192) ++B132->(C132 C151 C110 C169) ++B133->(C133 C128 C187 C146) ++B134->(C134 C105 C164 C123) ++B135->(C135 C182 C141 C200) ++B136->(C136 C159 C118 C177) ++B137->(C137 C136 C195 C154) ++B138->(C138 C113 C172 C131) ++B139->(C139 C190 C149 C108) ++B140->(C140 C167 C126 C185) ++B141->(C141 C144 C103 C162) ++B142->(C142 C121 C180 C139) ++B143->(C143 C198 C157 C116) ++B144->(C144 C175 C134 C193) ++B145->(C145 C152 C111 C170) ++B146->(C146 C129 C188 C147) ++B147->(C147 C106 C165 C124) ++B148->(C148 C183 C142 C101) ++B149->(C149 C160 C119 C178) ++B150->(C150 C137 C196 C155) ++B151->(C151 C114 C173 C132) ++B152->(C152 C191 C150 C109) ++B153->(C153 C168 C127 C186) ++B154->(C154 C145 C104 C163) ++B155->(C155 C122 C181 C140) ++B156->(C156 C199 C158 C117) ++B157->(C157 C176 C135 C194) ++B158->(C158 C153 C112 C171) ++B159->(C159 C130 C189 C148) ++B160->(C160 C107 C166 C125) ++B161->(C161 C184 C143 C102) ++B162->(C162 C161 C120 C179) ++B163->(C163 C138 C197 C156) ++B164->(C164 C115 C174 C133) ++B165->(C165 C192 C151 C110) ++B166->(C166 C169 C128 C187) ++B167->(C167 C146 C105 C164) ++B168->(C168 C123 C182 C141) ++B169->(C169 C200 C159 C118) ++B170->(C170 C177 C136 C195) ++B171->(C171 C154 C113 C172) ++B172->(C172 C131 C190 C149) ++B173->(C173 C108 C167 C126) ++B174->(C174 C185 C144 C103) ++B175->(C175 C162 C121 C180) ++B176->(C176 C139 C198 C157) ++B177->(C177 C116 C175 C134) ++B178->(C178 C193 C152 C111) ++B179->(C179 C170 C129 C188) ++B180->(C180 C147 C106 C165) ++B181->(C181 C124 C183 C142) ++B182->(C182 C101 C160 C119) ++B183->(C183 C178 C137 C196) ++B184->(C184 C155 C114 C173) ++B185->(C185 C132 C191 C150) ++B186->(C186 C109 C168 C127) ++B187->(C187 C186 C145 C104) ++B188->(C188 C163 C122 C181) ++B189->(C189 C140 C199 C158) ++B190->(C190 C117 C176 C135) ++B191->(C191 C194 C153 C112) ++B192->(C192 C171 C130 C189) ++B193->(C193 C148 C107 C166) ++B194->(C194 C125 C184 C143) ++B195->(C195 C102 C161 C120) ++B196->(C196 C179 C138 C197) ++B197->(C197 C156 C115 C174) ++B198->(C198 C133 C192 C151) ++B199->(C199 C110 C169 C128) ++B200->(C200 C187 C146 C105) ++C101->(A165 A124) ++C102->(A183 A142) ++C103->(A101 A160) ++C104->(A119 A178) ++C105->(A137 A196) ++C106->(A155 A114) ++C107->(A173 A132) ++C108->(A191 A150) ++C109->(A109 A168) ++C110->(A127 A186) ++C111->(A145 A104) ++C112->(A163 A122) ++C113->(A181 A140) ++C114->(A199 A158) ++C115->(A117 A176) ++C116->(A135 A194) ++C117->(A153 A112) ++C118->(A171 A130) ++C119->(A189 A148) ++C120->(A107 A166) ++C121->(A125 A184) ++C122->(A143 A102) ++C123->(A161 A120) ++C124->(A179 A138) ++C125->(A197 A156) ++C126->(A115 A174) ++C127->(A133 A192) ++C128->(A151 A110) ++C129->(A169 A128) ++C130->(A187 A146) ++C131->(A105 A164) ++C132->(A123 A182) ++C133->(A141 A200) ++C134->(A159 A118) ++C135->(A177 A136) ++C136->(A195 A154) ++C137->(A113 A172) ++C138->(A131 A190) ++C139->(A149 A108) ++C140->(A167 A126) ++C141->(A185 A144) ++C142->(A103 A162) ++C143->(A121 A180) ++C144->(A139 A198) ++C145->(A157 A116) ++C146->(A175 A134) ++C147->(A193 A152) ++C148->(A111 A170) ++C149->(A129 A188) ++C150->(A147 A106) ++C151->(A165 A124) ++C152->(A183 A142) ++C153->(A101 A160) ++C154->(A119 A178) ++C155->(A137 A196) ++C156->(A155 A114) ++C157->(A173 A132) ++C158->(A191 A150) ++C159->(A109 A168) ++C160->(A127 A186) ++C161->(A145 A104) ++C162->(A163 A122) ++C163->(A181 A140) ++C164->(A199 A158) ++C165->(A117 A176) ++C166->(A135 A194) ++C167->(A153 A112) ++C168->(A171 A130) ++C169->(A189 A148) ++C170->(A107 A166) ++C171->(A125 A184) ++C172->(A143 A102) ++C173->(A161 A120) ++C174->(A179 A138) ++C175->(A197 A156) ++C176->(A115 A174) ++C177->(A133 A192) ++C178->(A151 A110) ++C179->(A169 A128) ++C180->(A187 A146) ++C181->(A105 A164) ++C182->(A123 A182) ++C183->(A141 A200) ++C184->(A159 A118) ++C185->(A177 A136) ++C186->(A195 A154) ++C187->(A113 A172) ++C188->(A131 A190) ++C189->(A149 A108) ++C190->(A167 A126) ++C191->(A185 A144) ++C192->(A103 A162) ++C193->(A121 A180) ++C194->(A139 A198) ++C195->(A157 A116) ++C196->(A175 A134) ++C197->(A193 A152) ++C198->(A111 A170) ++C199->(A129 A188) ++C200->(A147 A106) ++M11X11->(M13X14 M12X13 M12X12 M12X11) ++M11X12->(M13X25 M12X24 M12X23 M12X22) ++M11X13->(M13X21 M12X20 M12X19 M12X18) ++M11X14->(M13X17 M12X16 M12X15 M12X14) ++M11X15->(M13X13 M12X12 M12X11 M12X25) ++M11X16->(M13X24 M12X23 M12X22 M12X21) ++M11X17->(M13X20 M12X19 M12X18 M12X17) ++M11X18->(M13X16 M12X15 M12X14 M12X13) ++M11X19->(M13X12 M12X11 M12X25 M12X24) ++M11X20->(M13X23 M12X22 M12X21 M12X20) ++M11X21->(M13X19 M12X18 M12X17 M12X16) ++M11X22->(M13X15 M12X14 M12X13 M12X12) ++M11X23->(M13X11 M12X25 M12X24 M12X23) ++M11X24->(M13X22 M12X21 M12X20 M12X19) ++M11X25->(M13X18 M12X17 M12X16 M12X15) ++M12X11->(M14X14 M13X13 M13X12 M13X11) ++M12X12->(M14X25 M13X24 M13X23 M13X22) ++M12X13->(M14X21 M13X20 M13X19 M13X18) ++M12X14->(M14X17 M13X16 M13X15 M13X14) ++M12X15->(M14X13 M13X12 M13X11 M13X25) ++M12X16->(M14X24 M13X23 M13X22 M13X21) ++M12X17->(M14X20 M13X19 M13X18 M13X17) ++M12X18->(M14X16 M13X15 M13X14 M13X13) ++M12X19->(M14X12 M13X11 M13X25 M13X24) ++M12X20->(M14X23 M13X22 M13X21 M13X20) ++M12X21->(M14X19 M13X18 M13X17 M13X16) ++M12X22->(M14X15 M13X14 M13X13 M13X12) ++M12X23->(M14X11 M13X25 M13X24 M13X23) ++M12X24->(M14X22 M13X21 M13X20 M13X19) ++M12X25->(M14X18 M13X17 M13X16 M13X15) ++M13X11->(M15X14 M14X13 M14X12 M14X11) ++M13X12->(M15X25 M14X24 M14X23 M14X22) ++M13X13->(M15X21 M14X20 M14X19 M14X18) ++M13X14->(M15X17 M14X16 M14X15 M14X14) ++M13X15->(M15X13 M14X12 M14X11 M14X25) ++M13X16->(M15X24 M14X23 M14X22 M14X21) ++M13X17->(M15X20 M14X19 M14X18 M14X17) ++M13X18->(M15X16 M14X15 M14X14 M14X13) ++M13X19->(M15X12 M14X11 M14X25 M14X24) ++M13X20->(M15X23 M14X22 M14X21 M14X20) ++M13X21->(M15X19 M14X18 M14X17 M14X16) ++M13X22->(M15X15 M14X14 M14X13 M14X12) ++M13X23->(M15X11 M14X25 M14X24 M14X23) ++M13X24->(M15X22 M14X21 M14X20 M14X19) ++M13X25->(M15X18 M14X17 M14X16 M14X15) ++M14X11->(M16X14 M15X13 M15X12 M15X11) ++M14X12->(M16X25 M15X24 M15X23 M15X22) ++M14X13->(M16X21 M15X20 M15X19 M15X18) ++M14X14->(M16X17 M15X16 M15X15 M15X14) ++M14X15->(M16X13 M15X12 M15X11 M15X25) ++M14X16->(M16X24 M15X23 M15X22 M15X21) ++M14X17->(M16X20 M15X19 M15X18 M15X17) ++M14X18->(M16X16 M15X15 M15X14 M15X13) ++M14X19->(M16X12 M15X11 M15X25 M15X24) ++M14X20->(M16X23 M15X22 M15X21 M15X20) ++M14X21->(M16X19 M15X18 M15X17 M15X16) ++M14X22->(M16X15 M15X14 M15X13 M15X12) ++M14X23->(M16X11 M15X25 M15X24 M15X23) ++M14X24->(M16X22 M15X21 M15X20 M15X19) ++M14X25->(M16X18 M15X17 M15X16 M15X15) ++M15X11->(M17X14 M16X13 M16X12 M16X11) ++M15X12->(M17X25 M16X24 M16X23 M16X22) ++M15X13->(M17X21 M16X20 M16X19 M16X18) ++M15X14->(M17X17 M16X16 M16X15 M16X14) ++M15X15->(M17X13 M16X12 M16X11 M16X25) ++M15X16->(M17X24 M16X23 M16X22 M16X21) ++M15X17->(M17X20 M16X19 M16X18 M16X17) ++M15X18->(M17X16 M16X15 M16X14 M16X13) ++M15X19->(M17X12 M16X11 M16X25 M16X24) ++M15X20->(M17X23 M16X22 M16X21 M16X20) ++M15X21->(M17X19 M16X18 M16X17 M16X16) ++M15X22->(M17X15 M16X14 M16X13 M16X12) ++M15X23->(M17X11 M16X25 M16X24 M16X23) ++M15X24->(M17X22 M16X21 M16X20 M16X19) ++M15X25->(M17X18 M16X17 M16X16 M16X15) ++M16X11->(M18X14 M17X13 M17X12 M17X11) ++M16X12->(M18X25 M17X24 M17X23 M17X22) ++M16X13->(M18X21 M17X20 M17X19 M17X18) ++M16X14->(M18X17 M17X16 M17X15 M17X14) ++M16X15->(M18X13 M17X12 M17X11 M17X25) ++M16X16->(M18X24 M17X23 M17X22 M17X21) ++M16X17->(M18X20 M17X19 M17X18 M17X17) ++M16X18->(M18X16 M17X15 M17X14 M17X13) ++M16X19->(M18X12 M17X11 M17X25 M17X24) ++M16X20->(M18X23 M17X22 M17X21 M17X20) ++M16X21->(M18X19 M17X18 M17X17 M17X16) ++M16X22->(M18X15 M17X14 M17X13 M17X12) ++M16X23->(M18X11 M17X25 M17X24 M17X23) ++M16X24->(M18X22 M17X21 M17X20 M17X19) ++M16X25->(M18X18 M17X17 M17X16 M17X15) ++M17X11->(M19X14 M18X13 M18X12 M18X11) ++M17X12->(M19X25 M18X24 M18X23 M18X22) ++M17X13->(M19X21 M18X20 M18X19 M18X18) ++M17X14->(M19X17 M18X16 M18X15 M18X14) ++M17X15->(M19X13 M18X12 M18X11 M18X25) ++M17X16->(M19X24 M18X23 M18X22 M18X21) ++M17X17->(M19X20 M18X19 M18X18 M18X17) ++M17X18->(M19X16 M18X15 M18X14 M18X13) ++M17X19->(M19X12 M18X11 M18X25 M18X24) ++M17X20->(M19X23 M18X22 M18X21 M18X20) ++M17X21->(M19X19 M18X18 M18X17 M18X16) ++M17X22->(M19X15 M18X14 M18X13 M18X12) ++M17X23->(M19X11 M18X25 M18X24 M18X23) ++M17X24->(M19X22 M18X21 M18X20 M18X19) ++M17X25->(M19X18 M18X17 M18X16 M18X15) ++M18X11->(M20X14 M19X13 M19X12 M19X11) ++M18X12->(M20X25 M19X24 M19X23 M19X22) ++M18X13->(M20X21 M19X20 M19X19 M19X18) ++M18X14->(M20X17 M19X16 M19X15 M19X14) ++M18X15->(M20X13 M19X12 M19X11 M19X25) ++M18X16->(M20X24 M19X23 M19X22 M19X21) ++M18X17->(M20X20 M19X19 M19X18 M19X17) ++M18X18->(M20X16 M19X15 M19X14 M19X13) ++M18X19->(M20X12 M19X11 M19X25 M19X24) ++M18X20->(M20X23 M19X22 M19X21 M19X20) ++M18X21->(M20X19 M19X18 M19X17 M19X16) ++M18X22->(M20X15 M19X14 M19X13 M19X12) ++M18X23->(M20X11 M19X25 M19X24 M19X23) ++M18X24->(M20X22 M19X21 M19X20 M19X19) ++M18X25->(M20X18 M19X17 M19X16 M19X15) ++M19X11->(M21X14 M20X13 M20X12 M20X11) ++M19X12->(M21X25 M20X24 M20X23 M20X22) ++M19X13->(M21X21 M20X20 M20X19 M20X18) ++M19X14->(M21X17 M20X16 M20X15 M20X14) ++M19X15->(M21X13 M20X12 M20X11 M20X25) ++M19X16->(M21X24 M20X23 M20X22 M20X21) ++M19X17->(M21X20 M20X19 M20X18 M20X17) ++M19X18->(M21X16 M20X15 M20X14 M20X13) ++M19X19->(M21X12 M20X11 M20X25 M20X24) ++M19X20->(M21X23 M20X22 M20X21 M20X20) ++M19X21->(M21X19 M20X18 M20X17 M20X16) ++M19X22->(M21X15 M20X14 M20X13 M20X12) ++M19X23->(M21X11 M20X25 M20X24 M20X23) ++M19X24->(M21X22 M20X21 M20X20 M20X19) ++M19X25->(M21X18 M20X17 M20X16 M20X15) ++M20X11->(M22X14 M21X13 M21X12 M21X11) ++M20X12->(M22X25 M21X24 M21X23 M21X22) ++M20X13->(M22X21 M21X20 M21X19 M21X18) ++M20X14->(M22X17 M21X16 M21X15 M21X14) ++M20X15->(M22X13 M21X12 M21X11 M21X25) ++M20X16->(M22X24 M21X23 M21X22 M21X21) ++M20X17->(M22X20 M21X19 M21X18 M21X17) ++M20X18->(M22X16 M21X15 M21X14 M21X13) ++M20X19->(M22X12 M21X11 M21X25 M21X24) ++M20X20->(M22X23 M21X22 M21X21 M21X20) ++M20X21->(M22X19 M21X18 M21X17 M21X16) ++M20X22->(M22X15 M21X14 M21X13 M21X12) ++M20X23->(M22X11 M21X25 M21X24 M21X23) ++M20X24->(M22X22 M21X21 M21X20 M21X19) ++M20X25->(M22X18 M21X17 M21X16 M21X15) ++M21X11->(M23X15 M22X14 M22X13 M22X12) ++M21X12->(M11X11 M23X25 M22X24 M22X23 M22X22) ++M21X13->(M23X21 M22X20 M22X19 M22X18) ++M21X14->(M23X17 M22X16 M22X15 M22X14) ++M21X15->(M23X13 M22X12 M22X11 M22X25) ++M21X16->(M23X24 M22X23 M22X22 M22X21) ++M21X17->(M23X20 M22X19 M22X18 M22X17) ++M21X18->(M23X16 M22X15 M22X14 M22X13) ++M21X19->(M23X12 M22X11 M22X25 M22X24) ++M21X20->(M23X23 M22X22 M22X21 M22X20) ++M21X21->(M23X19 M22X18 M22X17 M22X16) ++M21X22->(M23X15 M22X14 M22X13 M22X12) ++M21X23->(M23X11 M22X25 M22X24 M22X23) ++M21X24->(M23X22 M22X21 M22X20 M22X19) ++M21X25->(M23X18 M22X17 M22X16 M22X15) ++M22X11->(M24X16 M23X15 M23X14 M23X13) ++M22X12->(M12X12 M24X11 M23X25 M23X24 M23X23) ++M22X13->(M24X22 M23X21 M23X20 M23X19) ++M22X14->(M24X18 M23X17 M23X16 M23X15) ++M22X15->(M24X14 M23X13 M23X12 M23X11) ++M22X16->(M24X25 M23X24 M23X23 M23X22) ++M22X17->(M24X21 M23X20 M23X19 M23X18) ++M22X18->(M24X17 M23X16 M23X15 M23X14) ++M22X19->(M24X13 M23X12 M23X11 M23X25) ++M22X20->(M24X24 M23X23 M23X22 M23X21) ++M22X21->(M24X20 M23X19 M23X18 M23X17) ++M22X22->(M24X16 M23X15 M23X14 M23X13) ++M22X23->(M24X12 M23X11 M23X25 M23X24) ++M22X24->(M24X23 M23X22 M23X21 M23X20) ++M22X25->(M24X19 M23X18 M23X17 M23X16) ++M23X11->(M25X17 M24X16 M24X15 M24X14) ++M23X12->(M13X13 M25X12 M24X11 M24X25 M24X24) ++M23X13->(M25X23 M24X22 M24X21 M24X20) ++M23X14->(M25X19 M24X18 M24X17 M24X16) ++M23X15->(M25X15 M24X14 M24X13 M24X12) ++M23X16->(M25X11 M24X25 M24X24 M24X23) ++M23X17->(M25X22 M24X21 M24X20 M24X19) ++M23X18->(M25X18 M24X17 M24X16 M24X15) ++M23X19->(M25X14 M24X13 M24X12 M24X11) ++M23X20->(M25X25 M24X24 M24X23 M24X22) ++M23X21->(M25X21 M24X20 M24X19 M24X18) ++M23X22->(M25X17 M24X16 M24X15 M24X14) ++M23X23->(M25X13 M24X12 M24X11 M24X25) ++M23X24->(M25X24 M24X23 M24X22 M24X21) ++M23X25->(M25X20 M24X19 M24X18 M24X17) ++M24X11->(M26X18 M25X17 M25X16 M25X15) ++M24X12->(M14X14 M26X13 M25X12 M25X11 M25X25) ++M24X13->(M26X24 M25X23 M25X22 M25X21) ++M24X14->(M26X20 M25X19 M25X18 M25X17) ++M24X15->(M26X16 M25X15 M25X14 M25X13) ++M24X16->(M26X12 M25X11 M25X25 M25X24) ++M24X17->(M26X23 M25X22 M25X21 M25X20) ++M24X18->(M26X19 M25X18 M25X17 M25X16) ++M24X19->(M26X15 M25X14 M25X13 M25X12) ++M24X20->(M26X11 M25X25 M25X24 M25X23) ++M24X21->(M26X22 M25X21 M25X20 M25X19) ++M24X22->(M26X18 M25X17 M25X16 M25X15) ++M24X23->(M26X14 M25X13 M25X12 M25X11) ++M24X24->(M26X25 M25X24 M25X23 M25X22) ++M24X25->(M26X21 M25X20 M25X19 M25X18) ++M25X11->(M27X19 M26X18 M26X17 M26X16) ++M25X12->(M15X15 M27X14 M26X13 M26X12 M26X11) ++M25X13->(M27X25 M26X24 M26X23 M26X22) ++M25X14->(M27X21 M26X20 M26X19 M26X18) ++M25X15->(M27X17 M26X16 M26X15 M26X14) ++M25X16->(M27X13 M26X12 M26X11 M26X25) ++M25X17->(M27X24 M26X23 M26X22 M26X21) ++M25X18->(M27X20 M26X19 M26X18 M26X17) ++M25X19->(M27X16 M26X15 M26X14 M26X13) ++M25X20->(M27X12 M26X11 M26X25 M26X24) ++M25X21->(M27X23 M26X22 M26X21 M26X20) ++M25X22->(M27X19 M26X18 M26X17 M26X16) ++M25X23->(M27X15 M26X14 M26X13 M26X12) ++M25X24->(M27X11 M26X25 M26X24 M26X23) ++M25X25->(M27X22 M26X21 M26X20 M26X19) ++M26X11->(M28X20 M27X19 M27X18 M27X17) ++M26X12->(M16X16 M28X15 M27X14 M27X13 M27X12) ++M26X13->(M28X11 M27X25 M27X24 M27X23) ++M26X14->(M28X22 M27X21 M27X20 M27X19) ++M26X15->(M28X18 M27X17 M27X16 M27X15) ++M26X16->(M28X14 M27X13 M27X12 M27X11) ++M26X17->(M28X25 M27X24 M27X23 M27X22) ++M26X18->(M28X21 M27X20 M27X19 M27X18) ++M26X19->(M28X17 M27X16 M27X15 M27X14) ++M26X20->(M28X13 M27X12 M27X11 M27X25) ++M26X21->(M28X24 M27X23 M27X22 M27X21) ++M26X22->(M28X20 M27X19 M27X18 M27X17) ++M26X23->(M28X16 M27X15 M27X14 M27X13) ++M26X24->(M28X12 M27X11 M27X25 M27X24) ++M26X25->(M28X23 M27X22 M27X21 M27X20) ++M27X11->(M29X21 M28X20 M28X19 M28X18) ++M27X12->(M17X17 M29X16 M28X15 M28X14 M28X13) ++M27X13->(M29X12 M28X11 M28X25 M28X24) ++M27X14->(M29X23 M28X22 M28X21 M28X20) ++M27X15->(M29X19 M28X18 M28X17 M28X16) ++M27X16->(M29X15 M28X14 M28X13 M28X12) ++M27X17->(M29X11 M28X25 M28X24 M28X23) ++M27X18->(M29X22 M28X21 M28X20 M28X19) ++M27X19->(M29X18 M28X17 M28X16 M28X15) ++M27X20->(M29X14 M28X13 M28X12 M28X11) ++M27X21->(M29X25 M28X24 M28X23 M28X22) ++M27X22->(M29X21 M28X20 M28X19 M28X18) ++M27X23->(M29X17 M28X16 M28X15 M28X14) ++M27X24->(M29X13 M28X12 M28X11 M28X25) ++M27X25->(M29X24 M28X23 M28X22 M28X21) ++M28X11->(M30X22 M29X21 M29X20 M29X19) ++M28X12->(M18X18 M30X17 M29X16 M29X15 M29X14) ++M28X13->(M30X13 M29X12 M29X11 M29X25) ++M28X14->(M30X24 M29X23 M29X22 M29X21) ++M28X15->(M30X20 M29X19 M29X18 M29X17) ++M28X16->(M30X16 M29X15 M29X14 M29X13) ++M28X17->(M30X12 M29X11 M29X25 M29X24) ++M28X18->(M30X23 M29X22 M29X21 M29X20) ++M28X19->(M30X19 M29X18 M29X17 M29X16) ++M28X20->(M30X15 M29X14 M29X13 M29X12) ++M28X21->(M30X11 M29X25 M29X24 M29X23) ++M28X22->(M30X22 M29X21 M29X20 M29X19) ++M28X23->(M30X18 M29X17 M29X16 M29X15) ++M28X24->(M30X14 M29X13 M29X12 M29X11) ++M28X25->(M30X25 M29X24 M29X23 M29X22) ++M29X11->(M30X22 M30X21 M30X20) ++M29X12->(M30X17 M30X16 M30X15) ++M29X13->(M30X13 M30X12 M30X11) ++M29X14->(M30X24 M30X23 M30X22) ++M29X15->(M30X20 M30X19 M30X18) ++M29X16->(M30X16 M30X15 M30X14) ++M29X17->(M30X12 M30X11 M30X25) ++M29X18->(M30X23 M30X22 M30X21) ++M29X19->(M30X19 M30X18 M30X17) ++M29X20->(M30X15 M30X14 M30X13) ++M29X21->(M30X11 M30X25 M30X24) ++M29X22->(M30X22 M30X21 M30X20) ++M29X23->(M30X18 M30X17 M30X16) ++M29X24->(M30X14 M30X13 M30X12) ++M29X25->(M30X25 M30X24 M30X23) ++M30X11 ++M30X12 ++M30X13 ++M30X14 ++M30X15 ++M30X16 ++M30X17 ++M30X18 ++M30X19 ++M30X20 ++M30X21 ++M30X22 ++M30X23 ++M30X24 ++M30X25 ++xfail_output(glibc.rtld.dynamic_sort=1): M30X19>M30X15>M30X16>M30X11>M30X12>M30X17>M30X13>M30X14>M29X20>M30X23>M30X24>M30X20>M30X18>M29X15>M29X12>M30X22>M30X21>M29X22>M30X25>M29X19>M29X23>M29X16>M29X24>M29X13>M29X17>M29X18>M28X19>M29X21>M29X25>M29X14>M28X20>M28X15>M28X16>M28X21>M27X18>M29X11>M28X17>M28X11>M28X22>M27X14>M28X18>M27X15>M28X13>M27X11>M28X23>M27X25>M28X14>M28X25>M27X23>M27X22>M28X24>M27X21>M27X13>M27X19>M27X17>M26X11>M26X23>M26X21>M26X22>M26X20>M26X16>M25X21>M17X22>M15X15>M20X14>M20X16>M18X18>M28X12>M27X24>M25X17>M27X20>M26X18>M26X17>M27X16>M26X19>M25X18>M26X24>M25X20>M24X17>M23X18>M25X13>M26X13>M17X23>M16X16>M26X12>M25X12>M26X15>M24X19>M25X23>M25X24>M25X25>M24X20>M25X19>M24X21>M23X17>M22X21>M24X14>M23X22>M24X24>M22X20>M24X13>M25X11>M24X12>M25X15>M23X15>M25X16>M24X22>M23X13>M24X18>M23X14>M22X22>M21X20>M24X25>M23X16>M22X25>M21X19>M22X14>M23X11>M22X15>M21X18>M22X19>M21X17>M20X17>M19X17>M21X24>M21X12>M20X22>M19X16>M18X25>M19X21>M19X20>M18X24>M20X12>M19X11>M23X20>M22X24>M22X16>M21X21>M25X14>M23X19>M23X24>M20X24>M19X12>M18X15>M17X14>M16X18>M14X25>M16X22>M16X20>M17X17>M22X12>M21X11>M20X15>M18X22>M19X24>M19X18>M18X21>M17X16>M17X18>M16X21>M15X20>M19X22>M18X20>M18X11>M17X19>M16X17>M15X21>M16X14>M16X13>M15X22>M14X20>M17X25>M16X19>M14X21>M13X24>M12X12>M16X24>M15X23>M14X16>M16X15>M15X25>M15X11>M15X12>M14X15>M13X14>M14X22>M13X20>M12X13>M11X11>M22X23>M21X15>M21X16>M20X21>M20X20>M18X17>M19X25>M18X23>M21X13>M15X17>M15X18>M18X19>M17X24>M16X12>M17X13>M20X25>M19X23>M15X19>M14X13>M13X18>M15X13>M17X12>M16X11>M18X13>M18X12>M14X11>M14X24>M13X19>M15X14>M17X20>M20X11>M20X13>M21X14>M15X24>M14X12>M13X22>M14X23>M13X23>M14X19>M17X15>M16X25>M17X11>M18X14>M19X19>M21X25>M13X12>M13X11>M14X18>M13X13>M12X11>M15X16>M14X14>M27X12>M17X21>M20X23>M22X13>M21X22>M24X16>M24X15>M26X25>M23X25>M26X14>M23X12>M22X18>M24X11>M16X23>M19X14>M19X13>M21X23>M22X17>M23X23>M23X21>M25X22>M18X16>M19X15>M20X18>M20X19>M22X11>M24X23>C156>C118>C143>C137>C147>C106>C168>C113>C163>C155>C105>C146>C187>A150>C139>C180>C164>C193>C157>A191>C158>B188>A159>C184>C121>C154>B171>A105>C131>C104>B104>C161>C111>B145>C160>B155>A163>C112>C142>B148>C133>B198>A198>A115>C114>B157>A156>C175>B144>A120>C173>B184>A174>C126>B107>A139>C194>B194>A194>C116>B116>C166>B160>B110>A110>C128>B128>A128>C179>B162>A154>C186>B187>A179>C124>B181>A101>C153>B158>A136>C135>C176>A192>B133>A133>C177>B177>A177>C185>C103>B141>A141>C183>A162>C192>C129>B179>C144>B124>B183>C127>B127>A127>B108>A112>B153>A153>C167>B167>A186>A122>C162>A144>B149>C174>B131>A185>C141>B106>A126>A167>C140>B122>A170>C198>B143>C117>C123>B123>A147>A106>C200>B169>C191>B175>A123>B118>A182>C132>B151>A145>A104>A109>C159>C150>B119>A119>A178>B164>B114>A164>C181>A102>C122>B134>A157>A116>C195>B191>B111>C172>B172>A118>B129>A129>C149>A107>C170>B197>A197>A173>B168>A132>C107>B165>A160>A131>C188>A168>B109>C178>A189>A148>C119>C190>C120>B166>B176>C108>B135>B139>A103>B178>A169>B132>C125>C138>B163>A111>B170>C110>A165>C151>C169>C199>A138>C182>A135>B101>B142>C101>C148>B193>B152>A158>A199>C136>B137>A161>B120>A108>A149>A125>B113>A184>C171>A134>A175>A124>B150>B161>B102>A146>A187>C130>B192>B200>A200>A142>A183>C102>B105>B156>A176>C165>B147>A137>A196>B190>A190>B125>C134>C189>B126>B186>A166>B136>B195>A195>B154>B138>B112>B173>A117>B159>B182>A181>A140>C145>B117>A152>A193>C197>B130>A172>A113>A151>B115>A143>B140>B185>B103>A121>A180>A130>A171>B199>C196>B146>B180>C115>B174>B121>A188>B196>B189>C152>C109>A155>A114>M14X17>M13X15>M13X16>M13X17>M12X17>M12X21>M12X25>M12X14>M13X25>M12X15>M13X21>M12X16>M12X18>M12X19>M12X20>M12X22>M12X23>M12X24>M11X25>M11X24>M11X23>M11X22>M11X21>M11X20>M11X19>M11X18>M11X17>M11X16>M11X15>M11X14>M11X13>M11X12>{}M30X15>M30X16>M30X11>M30X12>M30X17>M30X13>M30X14>M29X20>M30X23>M30X24>M30X20>M30X18>M29X15>M29X12>M30X22>M30X21>M29X22>M30X25>M29X19>M29X23>M29X16>M29X24>M29X13>M29X17>M29X18>M28X19>M29X21>M29X25>M29X14>M28X20>M28X15>M28X16>M28X21>M27X18>M29X11>M28X17>M28X11>M28X22>M28X24>M28X23>M27X21>M28X13>M27X20>M27X19>M26X14>M27X25>M28X18>M27X11>M28X25>M27X24>M26X24>M27X15>M27X14>M27X13>M26X23>M27X17>M26X22>M25X13>M28X14>M27X16>M26X19>M26X18>M27X23>M27X22>M26X17>M25X18>M26X21>M25X17>M26X20>M26X15>M26X13>M25X19>M24X14>M25X23>M26X11>M26X25>M25X16>M25X15>M24X22>M25X21>M25X20>M24X21>M25X25>M25X24>M24X20>M23X13>M22X15>M25X14>M24X19>M23X17>M24X25>M23X24>M24X13>M23X15>M24X18>M23X14>M22X11>M24X15>M23X22>M24X11>M23X19>M22X21>M24X24>M23X21>M22X20>M23X25>M22X19>M21X24>M20X23>M22X22>M25X11>M23X16>M22X18>M23X20>M22X17>M21X21>M21X20>M20X24>M22X14>M22X13>M21X11>M21X17>M22X23>M21X16>M20X25>M19X23>M18X16>M21X22>M20X20>M20X19>M21X13>M20X18>M19X13>M21X18>M20X21>M19X24>M18X12>M20X14>M20X13>M22X25>M20X12>M20X15>M19X14>M18X22>M19X18>M20X17>M19X17>M19X16>M18X21>M17X20>M19X19>M18X13>M17X11>M18X17>M19X25>M18X15>M17X25>M18X19>M17X24>M16X19>M15X17>M17X21>M16X24>M18X23>M17X16>M16X25>M19X15>M18X25>M17X23>M16X23>M15X23>M18X14>M17X14>M16X14>M17X18>M16X13>M17X22>M16X12>M15X22>M14X16>M17X12>M16X22>M15X12>M16X11>M15X11>M16X15>M15X25>M14X15>M13X14>M15X18>M16X21>M15X16>M14X21>M15X14>M16X20>M15X13>M14X22>M15X20>M14X20>M13X20>M14X11>M15X19>M14X24>M13X19>M14X13>M13X18>M12X13>M15X24>M14X23>M13X12>M14X12>M13X11>M12X11>M11X11>M21X12>M20X11>M19X11>M18X11>M17X15>M16X18>M14X25>M14X19>M13X24>M13X23>M13X22>M12X12>M22X12>M21X15>M19X22>M18X20>M16X17>M14X14>M24X12>M23X23>M22X16>M21X14>M20X22>M18X24>M16X16>M26X12>M24X16>M23X11>M21X23>M19X20>M17X17>M27X12>M26X16>M25X22>M24X17>M23X18>M21X25>M19X12>M17X19>M15X21>M14X18>M13X13>M23X12>M21X19>M19X21>M17X13>M15X15>M25X12>M24X23>M22X24>M20X16>M18X18>M28X12>A150>C158>B112>A112>C167>B146>A146>C180>B180>A180>C143>B143>A115>C126>B126>A126>C190>B190>A190>C138>B138>A138>C174>B174>A102>C122>B122>A122>C162>B162>A162>C142>B142>A142>C102>B102>A174>C176>B176>A176>C115>B115>A143>C172>B172>A172>C187>B187>A187>C130>B130>A130>C118>B118>A118>C184>B184>A184>C171>B171>A171>C168>B182>A182>C182>B168>A168>C109>B109>A109>C159>B159>A159>C134>B134>A134>C146>B167>A167>C140>B140>A140>C163>B163>A163>C112>B158>A158>C164>B164>A164>C131>B131>A131>C188>B188>A188>C199>B199>A199>C114>B114>A114>C106>B106>A106>C200>B200>A200>C183>B183>A183>C152>B152>A152>C147>B147>A147>C150>B150>A198>C144>B144>A144>C191>B191>A191>C108>B108>A108>C139>B139>A139>C194>B194>A194>C166>B166>A166>C120>B120>A120>C123>B123>A123>C132>B132>A132>C107>B107>A107>C170>B170>A170>C198>B198>A156>C125>B125>A125>C121>B121>A121>C193>B193>A193>C197>B197>A197>C175>B175>A175>C196>B196>A196>C105>B105>A105>C181>B181>A181>C113>B113>A113>C137>B137>A137>C155>B155>A155>C156>B156>A110>C128>B128>A128>C179>B179>A179>C124>B124>A124>C151>B151>A151>C178>B178>A178>C104>B104>A104>C111>B111>A111>C148>B148>A148>C169>B169>A169>C129>B129>A129>C149>B149>A149>C189>B189>A189>C119>B119>A119>C154>B154>A154>C136>B136>A136>C135>B135>A135>C116>B116>A116>C145>B145>A145>C161>B161>A161>C173>B173>A173>C157>B157>A157>C195>B195>A195>C186>B186>A186>C160>B160>A160>C153>B153>A153>C117>B117>A117>C165>B165>A165>C101>B101>A101>C103>B103>A103>C192>B192>A192>C177>B177>A177>C185>B185>A185>C141>B141>A141>C133>B133>A133>C127>B127>A127>C110>B110>M14X17>M13X15>M13X16>M13X17>M12X17>M12X21>M12X25>M12X14>M13X25>M12X15>M13X21>M12X16>M12X18>M12X19>M12X20>M12X22>M12X23>M12X24>M11X25>M11X24>M11X23>M11X22>M11X21>M11X20>M11X19>M11X18>M11X17>M11X16>M11X15>M11X14>M11X13>M11X12>{}. ++ ++"""Generate testcase files and Makefile fragments for DSO sorting test ++ ++This script takes a small description string language, and generates ++testcases for displaying the ELF dynamic linker's dependency sorting ++behavior, allowing verification. ++ ++Testcase descriptions are semicolon-separated description strings, and ++this tool generates a testcase from the description, including main program, ++associated modules, and Makefile fragments for including into elf/Makefile. ++ ++This allows automation of what otherwise would be very laborous manual ++construction of complex dependency cases, however it must be noted that this ++is only a tool to speed up testcase construction, and thus the generation ++features are largely mechanical in nature; inconsistencies or errors may occur ++if the input description was itself erroneous or have unforeseen interactions. ++ ++The format of the input test description files are: ++ ++ # Each test description has a name, lines of description, ++ # and an expected output specification. Comments use '#'. ++ testname1: ++ output: ++ ++ # Tests can be marked to be XFAIL by using 'xfail_output' instead ++ testname2: ++ xfail_output: ++ ++ # A default set of GLIBC_TUNABLES tunables can be specified, for which ++ # all following tests will run multiple times, once for each of the ++ # GLIBC_TUNABLES=... strings set by the 'tunable_option' command. ++ tunable_option: ++ tunable_option: ++ ++ # Test descriptions can use multiple lines, which will all be merged ++ # together, so order is not important. ++ testname3: ++ ++ ++ ... ++ output: ++ ++ # 'testname3' will be run and compared two times, for both ++ # GLIBC_TUNABLES= and ++ # GLIBC_TUNABLES=. This can be cleared and reset by the ++ # 'clear_tunables' command: ++ clear_tunables ++ ++ # Multiple expected outputs can also be specified, with an associated ++ # tunable option in (), which multiple tests will be run with each ++ # GLIBC_TUNABLES=... option tried. ++ testname4: ++ ++ ... ++ output(): ++ output(): ++ # Individual tunable output cases can be XFAILed, though note that ++ # this will have the effect of XFAILing the entire 'testname4' test ++ # in the final top-level tests.sum summary. ++ xfail_output(): ++ ++ # When multiple outputs (with specific tunable strings) are specified, ++ # these take priority over any active 'tunable_option' settings. ++ ++ # When a test is meant to be placed under 'xtests' (not run under ++ # "make check", but only when "make xtests" is used), the testcase name can be ++ # declared using 'xtest()': ++ ... ++ xtest(test-too-big1): ++ output: ++ ... ++ ++ # Do note that under current elf/Makefile organization, for such a xtest case, ++ # while the test execution is only run under 'make xtests', the associated ++ # DSOs are always built even under 'make check'. ++ ++On the description language used, an example description line string: ++ ++ a->b!->[cdef];c=>g=>h;{+c;%c;-c}->a ++ ++Each identifier represents a shared object module, currently sequences of ++letters/digits are allowed, case-sensitive. ++ ++All such shared objects have a constructor/destructor generated for them ++that emits its name followed by a '>' for constructors, and '<' followed by ++its name for destructors, e.g. if the name is 'obj1', then "obj1>" and " operator specifies a link time dependency, these can be chained for ++convenience (e.g. a->b->c->d). ++ ++The => operator creates a call-reference, e.g. for a=>b, an fn_a() function ++is created inside module 'a', which calls fn_b() in module 'b'. ++These module functions emit 'name()' output in nested form, ++e.g. a=>b emits 'a(b())' ++ ++For single character object names, square brackets [] in the description ++allows specifying multiple objects; e.g. a->[bcd]->e is equivalent to ++ a->b->e;a->c->e;a->d->e ++ ++The () parenthesis construct with space separated names is also allowed for ++specifying objects. For names with integer suffixes a range can also be used, ++e.g. (foo1 bar2-5), specifies DSOs foo1, bar2, bar2, bar3, bar4, bar5. ++ ++A {} construct specifies the main test program, and its link dependencies ++are also specified using ->. Inside {}, a few ;-separated constructs are ++allowed: ++ +a Loads module a using dlopen(RTLD_LAZY|RTLD_GLOBAL) ++ ^a Loads module a using dlopen(RTLD_LAZY) ++ %a Use dlsym() to load and call fn_a() ++ @a Calls fn_a() directly. ++ -a Unloads module a using dlclose() ++ ++The generated main program outputs '{' '}' with all output from above ++constructs in between. The other output before/after {} are the ordered ++constructor/destructor output. ++ ++If no {} construct is present, a default empty main program is linked ++against all objects which have no dependency linked to it. e.g. for ++'[ab]->c;d->e', the default main program is equivalent to '{}->[abd]' ++ ++Sometimes for very complex or large testcases, besides specifying a ++few explicit dependencies from main{}, the above default dependency ++behavior is still useful to automatically have, but is turned off ++upon specifying a single explicit {}->dso_name. ++In this case, add {}->* to explicitly add this generation behavior: ++ ++ # Main program links to 'foo', and all other objects which have no ++ # dependency linked to it. ++ {}->foo,{}->* ++ ++Note that '*' works not only on main{}, but can be used as the ++dependency target of any object. Note that it only works as a target, ++not a dependency source. ++ ++The '!' operator after object names turns on permutation of its ++dependencies, e.g. while a->[bcd] only generates one set of objects, ++with 'a.so' built with a link line of "b.so c.so d.so", for a!->[bcd] ++permutations of a's dependencies creates multiple testcases with ++different link line orders: "b.so c.so d.so", "c.so b.so d.so", ++"b.so d.so c.so", etc. Note that for a specified on ++the script command-line, multiple , , etc. ++tests will be generated (e.g. for a!->[bc]!->[de], eight tests with ++different link orders for a, b, and c will be generated) ++ ++It is possible to specify the ELF soname field for an object or the ++main program: ++ # DSO 'a' will be linked with the appropriate -Wl,-soname=x setting ++ a->b->c;soname(a)=x ++ # The the main program can also have a soname specified ++ soname({})=y ++ ++This can be used to test how ld.so behaves when objects and/or the ++main program have such a field set. ++ ++ ++Strings Output by Generated Testcase Programs ++ ++The text output produced by a generated testcase consists of three main ++parts: ++ 1. The constructors' output ++ 2. Output from the main program ++ 3. Destructors' output ++ ++To see by example, a simple test description "a->b->c" generates a testcase ++that when run, outputs: "c>b>a>{}' character, ++and the "c>b>a" part above is the full constructor output by all DSOs, the ++order indicating that DSO 'c', which does not depend on any other DSO, has ++its constructor run first, followed by 'b' and then 'a'. ++ ++Destructor output for each DSO is a '<' character followed by its name, ++reflecting its reverse nature of constructors. In the above example, the ++destructor output part is "g=>h;{+c;%c;-c}->a->h ++ ++This produces a testcase, that when executed outputs: ++ h>a>{+c[g>c>];%c();-c[h dependency as expected. ++Inside the main program, the "+c" action triggers a dlopen() of DSO 'c', ++causing another chain of constructors "g>c>" to be triggered. Here it is ++displayed inside [] brackets for each dlopen call. The same is done for "-c", ++a dlclose() of 'c'. ++ ++The "%c" output is due to calling to fn_c() inside DSO 'c', this comprises ++of two parts: the '%' character is printed by the caller, here it is the main ++program. The 'c' character is printed from inside fn_c(). The '%' character ++indicates that this is called by a dlsym() of "fn_c". A '@' character would ++mean a direct call (with a symbol reference). These can all be controlled ++by the main test program constructs documented earlier. ++ ++The output strings described here is the exact same form placed in ++test description files' "output: " line. ++""" ++ ++import sys ++import re ++import os ++import subprocess ++import argparse ++from collections import OrderedDict ++import itertools ++ ++# BUILD_GCC is only used under the --build option, ++# which builds the generated testcase, including DSOs using BUILD_GCC. ++# Mainly for testing purposes, especially debugging of this script, ++# and can be changed here to another toolchain path if needed. ++build_gcc = "gcc" ++ ++def get_parser(): ++ parser = argparse.ArgumentParser("") ++ parser.add_argument("description", ++ help="Description string of DSO dependency test to be " ++ "generated (see script source for documentation of " ++ "description language), either specified here as " ++ "command line argument, or by input file using " ++ "-f/--description-file option", ++ nargs="?", default="") ++ parser.add_argument("test_name", ++ help="Identifier for testcase being generated", ++ nargs="?", default="") ++ parser.add_argument("--objpfx", ++ help="Path to place generated files, defaults to " ++ "current directory if none specified", ++ nargs="?", default="./") ++ parser.add_argument("-m", "--output-makefile", ++ help="File to write Makefile fragment to, defaults to " ++ "stdout when option not present", ++ nargs="?", default="") ++ parser.add_argument("-f", "--description-file", ++ help="Input file containing testcase descriptions", ++ nargs="?", default="") ++ parser.add_argument("--build", help="After C testcase generated, build it " ++ "using gcc (for manual testing purposes)", ++ action="store_true") ++ parser.add_argument("--debug-output", ++ help="Prints some internal data " ++ "structures; used for debugging of this script", ++ action="store_true") ++ return parser ++ ++# Main script starts here. ++cmdlineargs = get_parser().parse_args() ++test_name = cmdlineargs.test_name ++description = cmdlineargs.description ++objpfx = cmdlineargs.objpfx ++description_file = cmdlineargs.description_file ++output_makefile = cmdlineargs.output_makefile ++makefile = "" ++default_tunable_options = [] ++ ++current_input_lineno = 0 ++def error(msg): ++ global current_input_lineno ++ print("Error: %s%s" % ((("Line %d, " % current_input_lineno) ++ if current_input_lineno != 0 else ""), ++ msg)) ++ exit(1) ++ ++if(test_name or description) and description_file: ++ error("both command-line testcase and input file specified") ++if test_name and not description: ++ error("command-line testcase name without description string") ++ ++# Main class type describing a testcase. ++class TestDescr: ++ def __init__(self): ++ self.objs = [] # list of all DSO objects ++ self.deps = OrderedDict() # map of DSO object -> list of dependencies ++ ++ # map of DSO object -> list of call refs ++ self.callrefs = OrderedDict() ++ ++ # map of DSO object -> list of permutations of dependencies ++ self.dep_permutations = OrderedDict() ++ ++ # map of DSO object -> SONAME of object (if one is specified) ++ self.soname_map = OrderedDict() ++ ++ # list of main program operations ++ self.main_program = [] ++ # set if default dependencies added to main ++ self.main_program_default_deps = True ++ ++ self.test_name = "" # name of testcase ++ self.expected_outputs = OrderedDict() # expected outputs of testcase ++ self.xfail = False # set if this is a XFAIL testcase ++ self.xtest = False # set if this is put under 'xtests' ++ ++ # Add 'object -> [object, object, ...]' relations to CURR_MAP ++ def __add_deps_internal(self, src_objs, dst_objs, curr_map): ++ for src in src_objs: ++ for dst in dst_objs: ++ if not src in curr_map: ++ curr_map[src] = [] ++ if not dst in curr_map[src]: ++ curr_map[src].append(dst) ++ def add_deps(self, src_objs, dst_objs): ++ self.__add_deps_internal(src_objs, dst_objs, self.deps) ++ def add_callrefs(self, src_objs, dst_objs): ++ self.__add_deps_internal(src_objs, dst_objs, self.callrefs) ++ ++# Process commands inside the {} construct. ++# Note that throughout this script, the main program object is represented ++# by the '#' string. ++def process_main_program(test_descr, mainprog_str): ++ if mainprog_str: ++ test_descr.main_program = mainprog_str.split(';') ++ for s in test_descr.main_program: ++ m = re.match(r"^([+\-%^@])([0-9a-zA-Z]+)$", s) ++ if not m: ++ error("'%s' is not recognized main program operation" % (s)) ++ opr = m.group(1) ++ obj = m.group(2) ++ if not obj in test_descr.objs: ++ test_descr.objs.append(obj) ++ if opr == '%' or opr == '@': ++ test_descr.add_callrefs(['#'], [obj]) ++ # We have a main program specified, turn this off ++ test_descr.main_program_default_deps = False ++ ++# For(a1 a2 b1-12) object set descriptions, expand into an object list ++def expand_object_set_string(descr_str): ++ obj_list = [] ++ descr_list = descr_str.split() ++ for descr in descr_list: ++ m = re.match(r"^([a-zA-Z][0-9a-zA-Z]*)(-[0-9]+)?$", descr) ++ if not m: ++ error("'%s' is not a valid object set description" % (descr)) ++ obj = m.group(1) ++ idx_end = m.group(2) ++ if not idx_end: ++ if not obj in obj_list: ++ obj_list.append(obj) ++ else: ++ idx_end = int(idx_end[1:]) ++ m = re.match(r"^([0-9a-zA-Z][a-zA-Z]*)([0-9]+)$", obj) ++ if not m: ++ error("object description '%s' is malformed" % (obj)) ++ obj_name = m.group(1) ++ idx_start = int(m.group (2)) ++ if idx_start > idx_end: ++ error("index range %s-%s invalid" % (idx_start, idx_end)) ++ for i in range(idx_start, idx_end + 1): ++ o = obj_name + str(i) ++ if not o in obj_list: ++ obj_list.append(o) ++ return obj_list ++ ++# Lexer for tokens ++tokenspec = [ ("SONAME", r"soname\(([0-9a-zA-Z{}]+)\)=([0-9a-zA-Z]+)"), ++ ("OBJ", r"([0-9a-zA-Z]+)"), ++ ("DEP", r"->"), ++ ("CALLREF", r"=>"), ++ ("OBJSET", r"\[([0-9a-zA-Z]+)\]"), ++ ("OBJSET2", r"\(([0-9a-zA-Z \-]+)\)"), ++ ("OBJSET3", r"\*"), ++ ("PROG", r"{([0-9a-zA-Z;+^\-%@]*)}"), ++ ("PERMUTE", r"!"), ++ ("SEMICOL", r";"), ++ ("ERROR", r".") ] ++tok_re = '|'.join('(?P<%s>%s)' % pair for pair in tokenspec) ++ ++# Main line parser of description language ++def parse_description_string(t, descr_str): ++ # State used when parsing dependencies ++ curr_objs = [] ++ in_dep = False ++ in_callref = False ++ def clear_dep_state(): ++ nonlocal in_dep, in_callref ++ in_dep = in_callref = False ++ ++ for m in re.finditer(tok_re, descr_str): ++ kind = m.lastgroup ++ value = m.group() ++ if kind == "SONAME": ++ s = re.match(r"soname\(([0-9a-zA-Z{}]+)\)=([0-9a-zA-Z]+)", value) ++ obj = s.group(1) ++ val = s.group(2) ++ if obj == "{}": ++ if '#' in t.soname_map: ++ error("soname of main program already set") ++ # Adjust to internal name ++ obj = '#' ++ else: ++ if re.match(r"[{}]", obj): ++ error("invalid object name '%s'" % (obj)) ++ if not obj in t.objs: ++ error("'%s' is not name of already defined object" % (obj)) ++ if obj in t.soname_map: ++ error("'%s' already has soname of '%s' set" ++ % (obj, t.soname_map[obj])) ++ t.soname_map[obj] = val ++ ++ elif kind == "OBJ": ++ if in_dep: ++ t.add_deps(curr_objs, [value]) ++ elif in_callref: ++ t.add_callrefs(curr_objs, [value]) ++ clear_dep_state() ++ curr_objs = [value] ++ if not value in t.objs: ++ t.objs.append(value) ++ ++ elif kind == "OBJSET": ++ objset = value[1:len(value)-1] ++ if in_dep: ++ t.add_deps(curr_objs, list (objset)) ++ elif in_callref: ++ t.add_callrefs(curr_objs, list (objset)) ++ clear_dep_state() ++ curr_objs = list(objset) ++ for o in list(objset): ++ if not o in t.objs: ++ t.objs.append(o) ++ ++ elif kind == "OBJSET2": ++ descr_str = value[1:len(value)-1] ++ descr_str.strip() ++ objs = expand_object_set_string(descr_str) ++ if not objs: ++ error("empty object set '%s'" % (value)) ++ if in_dep: ++ t.add_deps(curr_objs, objs) ++ elif in_callref: ++ t.add_callrefs(curr_objs, objs) ++ clear_dep_state() ++ curr_objs = objs ++ for o in objs: ++ if not o in t.objs: ++ t.objs.append(o) ++ ++ elif kind == "OBJSET3": ++ if in_dep: ++ t.add_deps(curr_objs, ['*']) ++ elif in_callref: ++ t.add_callrefs(curr_objs, ['*']) ++ else: ++ error("non-dependence target set '*' can only be used " ++ "as target of ->/=> operations") ++ clear_dep_state() ++ curr_objs = ['*'] ++ ++ elif kind == "PERMUTE": ++ if in_dep or in_callref: ++ error("syntax error, permute operation invalid here") ++ if not curr_objs: ++ error("syntax error, no objects to permute here") ++ ++ for obj in curr_objs: ++ if not obj in t.dep_permutations: ++ # Signal this object has permuted dependencies ++ t.dep_permutations[obj] = [] ++ ++ elif kind == "PROG": ++ if t.main_program: ++ error("cannot have more than one main program") ++ if in_dep: ++ error("objects cannot have dependency on main program") ++ if in_callref: ++ # TODO: A DSO can resolve to a symbol in the main binary, ++ # which we syntactically allow here, but haven't yet ++ # implemented. ++ t.add_callrefs(curr_objs, ["#"]) ++ process_main_program(t, value[1:len(value)-1]) ++ clear_dep_state() ++ curr_objs = ["#"] ++ ++ elif kind == "DEP": ++ if in_dep or in_callref: ++ error("syntax error, multiple contiguous ->,=> operations") ++ if '*' in curr_objs: ++ error("non-dependence target set '*' can only be used " ++ "as target of ->/=> operations") ++ in_dep = True ++ ++ elif kind == "CALLREF": ++ if in_dep or in_callref: ++ error("syntax error, multiple contiguous ->,=> operations") ++ if '*' in curr_objs: ++ error("non-dependence target set '*' can only be used " ++ "as target of ->/=> operations") ++ in_callref = True ++ ++ elif kind == "SEMICOL": ++ curr_objs = [] ++ clear_dep_state() ++ ++ else: ++ error("unknown token '%s'" % (value)) ++ return t ++ ++# Main routine to process each testcase description ++def process_testcase(t): ++ global objpfx ++ assert t.test_name ++ ++ base_test_name = t.test_name ++ test_subdir = base_test_name + "-dir" ++ testpfx = objpfx + test_subdir + "/" ++ ++ if not os.path.exists(testpfx): ++ os.mkdir(testpfx) ++ ++ def find_objs_not_depended_on(t): ++ objs_not_depended_on = [] ++ for obj in t.objs: ++ skip = False ++ for r in t.deps.items(): ++ if obj in r[1]: ++ skip = True ++ break ++ if not skip: ++ objs_not_depended_on.append(obj) ++ return objs_not_depended_on ++ ++ non_dep_tgt_objs = find_objs_not_depended_on(t) ++ for obj in t.objs: ++ if obj in t.deps: ++ deps = t.deps[obj] ++ if '*' in deps: ++ t.deps[obj].remove('*') ++ t.add_deps([obj], non_dep_tgt_objs) ++ if obj in t.callrefs: ++ deps = t.callrefs[obj] ++ if '*' in deps: ++ t.deps[obj].remove('*') ++ t.add_callrefs([obj], non_dep_tgt_objs) ++ if "#" in t.deps: ++ deps = t.deps["#"] ++ if '*' in deps: ++ t.deps["#"].remove('*') ++ t.add_deps(["#"], non_dep_tgt_objs) ++ ++ # If no main program was specified in dependency description, make a ++ # default main program with deps pointing to all DSOs which are not ++ # depended by another DSO. ++ if t.main_program_default_deps: ++ main_deps = non_dep_tgt_objs ++ if not main_deps: ++ error("no objects for default main program to point " ++ "dependency to(all objects strongly connected?)") ++ t.add_deps(["#"], main_deps) ++ ++ # Some debug output ++ if cmdlineargs.debug_output: ++ print("Testcase: %s" % (t.test_name)) ++ print("All objects: %s" % (t.objs)) ++ print("--- Static link dependencies ---") ++ for r in t.deps.items(): ++ print("%s -> %s" % (r[0], r[1])) ++ print("--- Objects whose dependencies are to be permuted ---") ++ for r in t.dep_permutations.items(): ++ print("%s" % (r[0])) ++ print("--- Call reference dependencies ---") ++ for r in t.callrefs.items(): ++ print("%s => %s" % (r[0], r[1])) ++ print("--- main program ---") ++ print(t.main_program) ++ ++ # Main testcase generation routine, does Makefile fragment generation, ++ # testcase source generation, and if --build specified builds testcase. ++ def generate_testcase(test_descr, test_suffix): ++ ++ test_name = test_descr.test_name + test_suffix ++ ++ # Print out needed Makefile fragments for use in glibc/elf/Makefile. ++ module_names = "" ++ for o in test_descr.objs: ++ module_names += " " + test_subdir + "/" + test_name + "-" + o ++ makefile.write("modules-names +=%s\n" % (module_names)) ++ ++ # Depth-first traversal, executing FN(OBJ) in post-order ++ def dfs(t, fn): ++ def dfs_rec(obj, fn, obj_visited): ++ if obj in obj_visited: ++ return ++ obj_visited[obj] = True ++ if obj in t.deps: ++ for dep in t.deps[obj]: ++ dfs_rec(dep, fn, obj_visited) ++ fn(obj) ++ ++ obj_visited = {} ++ for obj in t.objs: ++ dfs_rec(obj, fn, obj_visited) ++ ++ # Generate link dependencies for all DSOs, done in a DFS fashion. ++ # Usually this doesn't need to be this complex, just listing the direct ++ # dependencies is enough. However to support creating circular ++ # dependency situations, traversing it by DFS and tracking processing ++ # status is the natural way to do it. ++ obj_processed = {} ++ fake_created = {} ++ def gen_link_deps(obj): ++ if obj in test_descr.deps: ++ dso = test_subdir + "/" + test_name + "-" + obj + ".so" ++ dependencies = "" ++ for dep in test_descr.deps[obj]: ++ if dep in obj_processed: ++ depstr = (" $(objpfx)" + test_subdir + "/" ++ + test_name + "-" + dep + ".so") ++ else: ++ # A circular dependency is satisfied by making a ++ # fake DSO tagged with the correct SONAME ++ depstr = (" $(objpfx)" + test_subdir + "/" ++ + test_name + "-" + dep + ".FAKE.so") ++ # Create empty C file and Makefile fragments for fake ++ # object. This only needs to be done at most once for ++ # an object name. ++ if not dep in fake_created: ++ f = open(testpfx + test_name + "-" + dep ++ + ".FAKE.c", "w") ++ f.write(" \n") ++ f.close() ++ # Generate rule to create fake object ++ makefile.write \ ++ ("LDFLAGS-%s = -Wl,--no-as-needed " ++ "-Wl,-soname=%s\n" ++ % (test_name + "-" + dep + ".FAKE.so", ++ ("$(objpfx)" + test_subdir + "/" ++ + test_name + "-" + dep + ".so"))) ++ makefile.write \ ++ ("modules-names += %s\n" ++ % (test_subdir + "/" ++ + test_name + "-" + dep + ".FAKE")) ++ fake_created[dep] = True ++ dependencies += depstr ++ makefile.write("$(objpfx)%s:%s\n" % (dso, dependencies)) ++ # Mark obj as processed ++ obj_processed[obj] = True ++ ++ dfs(test_descr, gen_link_deps) ++ ++ # Print LDFLAGS-* and *-no-z-defs ++ for o in test_descr.objs: ++ dso = test_name + "-" + o + ".so" ++ ldflags = "-Wl,--no-as-needed" ++ if o in test_descr.soname_map: ++ soname = ("$(objpfx)" + test_subdir + "/" ++ + test_name + "-" ++ + test_descr.soname_map[o] + ".so") ++ ldflags += (" -Wl,-soname=" + soname) ++ makefile.write("LDFLAGS-%s = %s\n" % (dso, ldflags)) ++ if o in test_descr.callrefs: ++ makefile.write("%s-no-z-defs = yes\n" % (dso)) ++ ++ # Print dependencies for main test program. ++ depstr = "" ++ if '#' in test_descr.deps: ++ for o in test_descr.deps['#']: ++ depstr += (" $(objpfx)" + test_subdir + "/" ++ + test_name + "-" + o + ".so") ++ makefile.write("$(objpfx)%s/%s:%s\n" % (test_subdir, test_name, depstr)) ++ ldflags = "-Wl,--no-as-needed" ++ if '#' in test_descr.soname_map: ++ soname = ("$(objpfx)" + test_subdir + "/" ++ + test_name + "-" ++ + test_descr.soname_map['#'] + ".so") ++ ldflags += (" -Wl,-soname=" + soname) ++ makefile.write("LDFLAGS-%s = %s\n" % (test_name, ldflags)) ++ ++ not_depended_objs = find_objs_not_depended_on(test_descr) ++ if not_depended_objs: ++ depstr = "" ++ for dep in not_depended_objs: ++ depstr += (" $(objpfx)" + test_subdir + "/" ++ + test_name + "-" + dep + ".so") ++ makefile.write("$(objpfx)%s.out:%s\n" % (base_test_name, depstr)) ++ ++ # Add main executable to test-srcs ++ makefile.write("test-srcs += %s/%s\n" % (test_subdir, test_name)) ++ # Add dependency on main executable of test ++ makefile.write("$(objpfx)%s.out: $(objpfx)%s/%s\n" ++ % (base_test_name, test_subdir, test_name)) ++ ++ for r in test_descr.expected_outputs.items(): ++ tunable_options = [] ++ specific_tunable = r[0] ++ xfail = r[1][1] ++ if specific_tunable != "": ++ tunable_options = [specific_tunable] ++ else: ++ tunable_options = default_tunable_options ++ if not tunable_options: ++ tunable_options = [""] ++ ++ for tunable in tunable_options: ++ tunable_env = "" ++ tunable_sfx = "" ++ exp_tunable_sfx = "" ++ if tunable: ++ tunable_env = "GLIBC_TUNABLES=%s " % tunable ++ tunable_sfx = "-" + tunable.replace("=","_") ++ if specific_tunable: ++ tunable_sfx = "-" + specific_tunable.replace("=","_") ++ exp_tunable_sfx = tunable_sfx ++ tunable_descr = ("(%s)" % tunable_env.strip() ++ if tunable_env else "") ++ # Write out fragment of shell script for this single test. ++ test_descr.sh.write \ ++ ("%s${test_wrapper_env} ${run_program_env} \\\n" ++ "${common_objpfx}support/test-run-command \\\n" ++ "${common_objpfx}elf/ld.so \\\n" ++ "--library-path ${common_objpfx}elf/%s:" ++ "${common_objpfx}elf:${common_objpfx}.:" ++ "${common_objpfx}dlfcn \\\n" ++ "${common_objpfx}elf/%s/%s > \\\n" ++ " ${common_objpfx}elf/%s/%s%s.output\n" ++ % (tunable_env ,test_subdir, ++ test_subdir, test_name, test_subdir, test_name, ++ tunable_sfx)) ++ # Generate a run of each test and compare with expected out ++ test_descr.sh.write \ ++ ("if [ $? -ne 0 ]; then\n" ++ " echo '%sFAIL: %s%s execution test'\n" ++ " something_failed=true\n" ++ "else\n" ++ " diff -wu ${common_objpfx}elf/%s/%s%s.output \\\n" ++ " ${common_objpfx}elf/%s/%s%s.exp\n" ++ " if [ $? -ne 0 ]; then\n" ++ " echo '%sFAIL: %s%s expected output comparison'\n" ++ " something_failed=true\n" ++ " fi\n" ++ "fi\n" ++ % (("X" if xfail else ""), test_name, tunable_descr, ++ test_subdir, test_name, tunable_sfx, ++ test_subdir, base_test_name, exp_tunable_sfx, ++ ("X" if xfail else ""), test_name, tunable_descr)) ++ ++ # Generate C files according to dependency and calling relations from ++ # description string. ++ for obj in test_descr.objs: ++ src_name = test_name + "-" + obj + ".c" ++ f = open(testpfx + src_name, "w") ++ if obj in test_descr.callrefs: ++ called_objs = test_descr.callrefs[obj] ++ for callee in called_objs: ++ f.write("extern void fn_%s (void);\n" % (callee)) ++ if len(obj) == 1: ++ f.write("extern int putchar(int);\n") ++ f.write("static void __attribute__((constructor)) " + ++ "init(void){putchar('%s');putchar('>');}\n" % (obj)) ++ f.write("static void __attribute__((destructor)) " + ++ "fini(void){putchar('<');putchar('%s');}\n" % (obj)) ++ else: ++ f.write('extern int printf(const char *, ...);\n') ++ f.write('static void __attribute__((constructor)) ' + ++ 'init(void){printf("%s>");}\n' % (obj)) ++ f.write('static void __attribute__((destructor)) ' + ++ 'fini(void){printf("<%s");}\n' % (obj)) ++ if obj in test_descr.callrefs: ++ called_objs = test_descr.callrefs[obj] ++ if len(obj) != 1: ++ f.write("extern int putchar(int);\n") ++ f.write("void fn_%s (void) {\n" % (obj)) ++ if len(obj) == 1: ++ f.write(" putchar ('%s');\n" % (obj)); ++ f.write(" putchar ('(');\n"); ++ else: ++ f.write(' printf ("%s(");\n' % (obj)); ++ for callee in called_objs: ++ f.write(" fn_%s ();\n" % (callee)) ++ f.write(" putchar (')');\n"); ++ f.write("}\n") ++ else: ++ for callref in test_descr.callrefs.items(): ++ if obj in callref[1]: ++ if len(obj) == 1: ++ # We need to declare printf here in this case. ++ f.write('extern int printf(const char *, ...);\n') ++ f.write("void fn_%s (void) {\n" % (obj)) ++ f.write(' printf ("%s()");\n' % (obj)) ++ f.write("}\n") ++ break ++ f.close() ++ ++ # Open C file for writing main program ++ f = open(testpfx + test_name + ".c", "w") ++ ++ # if there are some operations in main(), it means we need -ldl ++ f.write("#include \n") ++ f.write("#include \n") ++ f.write("#include \n") ++ for s in test_descr.main_program: ++ if s[0] == '@': ++ f.write("extern void fn_%s (void);\n" % (s[1:])); ++ f.write("int main (void) {\n") ++ f.write(" putchar('{');\n") ++ ++ # Helper routine for generating sanity checking code. ++ def put_fail_check(fail_cond, action_desc): ++ f.write(' if (%s) { printf ("\\n%s failed: %%s\\n", ' ++ 'dlerror()); exit (1);}\n' % (fail_cond, action_desc)) ++ i = 0 ++ while i < len(test_descr.main_program): ++ s = test_descr.main_program[i] ++ obj = s[1:] ++ dso = test_name + "-" + obj ++ if s[0] == '+' or s[0] == '^': ++ if s[0] == '+': ++ dlopen_flags = "RTLD_LAZY|RTLD_GLOBAL" ++ f.write(" putchar('+');\n"); ++ else: ++ dlopen_flags = "RTLD_LAZY" ++ f.write(" putchar(':');\n"); ++ if len(obj) == 1: ++ f.write(" putchar('%s');\n" % (obj)); ++ else: ++ f.write(' printf("%s");\n' % (obj)); ++ f.write(" putchar('[');\n"); ++ f.write(' void *%s = dlopen ("%s.so", %s);\n' ++ % (obj, dso, dlopen_flags)) ++ put_fail_check("!%s" % (obj), ++ "%s.so dlopen" % (dso)) ++ f.write(" putchar(']');\n"); ++ elif s[0] == '-': ++ f.write(" putchar('-');\n"); ++ if len(obj) == 1: ++ f.write(" putchar('%s');\n" % (obj)); ++ else: ++ f.write(' printf("%s");\n' % (obj)); ++ f.write(" putchar('[');\n"); ++ put_fail_check("dlclose (%s) != 0" % (obj), ++ "%s.so dlclose" % (dso)) ++ f.write(" putchar(']');\n"); ++ elif s[0] == '%': ++ f.write(" putchar('%');\n"); ++ f.write(' void (*fn_%s)(void) = dlsym (%s, "fn_%s");\n' ++ % (obj, obj, obj)) ++ put_fail_check("!fn_%s" % (obj), ++ "dlsym(fn_%s) from %s.so" % (obj, dso)) ++ f.write(" fn_%s ();\n" % (obj)) ++ elif s[0] == '@': ++ f.write(" putchar('@');\n"); ++ f.write(" fn_%s ();\n" % (obj)) ++ f.write(" putchar(';');\n"); ++ i += 1 ++ f.write(" putchar('}');\n") ++ f.write(" return 0;\n") ++ f.write("}\n") ++ f.close() ++ ++ # --build option processing: build generated sources using 'build_gcc' ++ if cmdlineargs.build: ++ # Helper routine to run a shell command, for running GCC below ++ def run_cmd(args): ++ cmd = str.join(' ', args) ++ if cmdlineargs.debug_output: ++ print(cmd) ++ p = subprocess.Popen(args) ++ p.wait() ++ if p.returncode != 0: ++ error("error running command: %s" % (cmd)) ++ ++ # Compile individual .os files ++ for obj in test_descr.objs: ++ src_name = test_name + "-" + obj + ".c" ++ obj_name = test_name + "-" + obj + ".os" ++ run_cmd([build_gcc, "-c", "-fPIC", testpfx + src_name, ++ "-o", testpfx + obj_name]) ++ ++ obj_processed = {} ++ fake_created = {} ++ # Function to create -.so ++ def build_dso(obj): ++ obj_name = test_name + "-" + obj + ".os" ++ dso_name = test_name + "-" + obj + ".so" ++ deps = [] ++ if obj in test_descr.deps: ++ for dep in test_descr.deps[obj]: ++ if dep in obj_processed: ++ deps.append(dep) ++ else: ++ deps.append(dep + ".FAKE") ++ if not dep in fake_created: ++ base_name = testpfx + test_name + "-" + dep ++ cmd = [build_gcc, "-Wl,--no-as-needed", ++ ("-Wl,-soname=" + base_name + ".so"), ++ "-shared", base_name + ".FAKE.c", ++ "-o", base_name + ".FAKE.so"] ++ run_cmd(cmd) ++ fake_created[dep] = True ++ dso_deps = map(lambda d: testpfx + test_name + "-" + d + ".so", ++ deps) ++ cmd = [build_gcc, "-shared", "-o", testpfx + dso_name, ++ testpfx + obj_name, "-Wl,--no-as-needed"] ++ if obj in test_descr.soname_map: ++ soname = ("-Wl,-soname=" + testpfx + test_name + "-" ++ + test_descr.soname_map[obj] + ".so") ++ cmd += [soname] ++ cmd += list(dso_deps) ++ run_cmd(cmd) ++ obj_processed[obj] = True ++ ++ # Build all DSOs, this needs to be in topological dependency order, ++ # or link will fail ++ dfs(test_descr, build_dso) ++ ++ # Build main program ++ deps = [] ++ if '#' in test_descr.deps: ++ deps = test_descr.deps['#'] ++ main_deps = map(lambda d: testpfx + test_name + "-" + d + ".so", ++ deps) ++ cmd = [build_gcc, "-Wl,--no-as-needed", "-o", testpfx + test_name, ++ testpfx + test_name + ".c", "-L%s" % (os.getcwd()), ++ "-Wl,-rpath-link=%s" % (os.getcwd())] ++ if '#' in test_descr.soname_map: ++ soname = ("-Wl,-soname=" + testpfx + test_name + "-" ++ + test_descr.soname_map['#'] + ".so") ++ cmd += [soname] ++ cmd += list(main_deps) ++ run_cmd(cmd) ++ ++ # Check if we need to enumerate permutations of dependencies ++ need_permutation_processing = False ++ if t.dep_permutations: ++ # Adjust dep_permutations into map of object -> dependency permutations ++ for r in t.dep_permutations.items(): ++ obj = r[0] ++ if obj in t.deps and len(t.deps[obj]) > 1: ++ deps = t.deps[obj] ++ t.dep_permutations[obj] = list(itertools.permutations (deps)) ++ need_permutation_processing = True ++ ++ def enum_permutations(t, perm_list): ++ test_subindex = 1 ++ curr_perms = [] ++ def enum_permutations_rec(t, perm_list): ++ nonlocal test_subindex, curr_perms ++ if len(perm_list) >= 1: ++ curr = perm_list[0] ++ obj = curr[0] ++ perms = curr[1] ++ if not perms: ++ # This may be an empty list if no multiple dependencies to ++ # permute were found, skip to next in this case ++ enum_permutations_rec(t, perm_list[1:]) ++ else: ++ for deps in perms: ++ t.deps[obj] = deps ++ permstr = "" if obj == "#" else obj + "_" ++ permstr += str.join('', deps) ++ curr_perms.append(permstr) ++ enum_permutations_rec(t, perm_list[1:]) ++ curr_perms = curr_perms[0:len(curr_perms)-1] ++ else: ++ # t.deps is now instantiated with one dependency order ++ # permutation(across all objects that have multiple ++ # permutations), now process a testcase ++ generate_testcase(t, ("_" + str (test_subindex) ++ + "-" + str.join('-', curr_perms))) ++ test_subindex += 1 ++ enum_permutations_rec(t, perm_list) ++ ++ # Create *.exp files with expected outputs ++ for r in t.expected_outputs.items(): ++ sfx = "" ++ if r[0] != "": ++ sfx = "-" + r[0].replace("=","_") ++ f = open(testpfx + t.test_name + sfx + ".exp", "w") ++ (output, xfail) = r[1] ++ f.write('%s' % output) ++ f.close() ++ ++ # Create header part of top-level testcase shell script, to wrap execution ++ # and output comparison together. ++ t.sh = open(testpfx + t.test_name + ".sh", "w") ++ t.sh.write("#!/bin/sh\n") ++ t.sh.write("# Test driver for %s, generated by " ++ "dso-ordering-test.py\n" % (t.test_name)) ++ t.sh.write("common_objpfx=$1\n") ++ t.sh.write("test_wrapper_env=$2\n") ++ t.sh.write("run_program_env=$3\n") ++ t.sh.write("something_failed=false\n") ++ ++ # Starting part of Makefile fragment ++ makefile.write("ifeq (yes,$(build-shared))\n") ++ ++ if need_permutation_processing: ++ enum_permutations(t, list (t.dep_permutations.items())) ++ else: ++ # We have no permutations to enumerate, just process testcase normally ++ generate_testcase(t, "") ++ ++ # If testcase is XFAIL, indicate so ++ if t.xfail: ++ makefile.write("test-xfail-%s = yes\n" % t.test_name) ++ ++ # Output end part of Makefile fragment ++ expected_output_files = "" ++ for r in t.expected_outputs.items(): ++ sfx = "" ++ if r[0] != "": ++ sfx = "-" + r[0].replace("=","_") ++ expected_output_files += " $(objpfx)%s/%s%s.exp" % (test_subdir, ++ t.test_name, sfx) ++ makefile.write \ ++ ("$(objpfx)%s.out: $(objpfx)%s/%s.sh%s " ++ "$(common-objpfx)support/test-run-command\n" ++ % (t.test_name, test_subdir, t.test_name, ++ expected_output_files)) ++ makefile.write("\t$(SHELL) $< $(common-objpfx) '$(test-wrapper-env)' " ++ "'$(run-program-env)' > $@; $(evaluate-test)\n") ++ makefile.write("ifeq ($(run-built-tests),yes)\n") ++ if t.xtest: ++ makefile.write("xtests-special += $(objpfx)%s.out\n" % (t.test_name)) ++ else: ++ makefile.write("tests-special += $(objpfx)%s.out\n" % (t.test_name)) ++ makefile.write("endif\n") ++ makefile.write("endif\n") ++ ++ # Write ending part of shell script generation ++ t.sh.write("if $something_failed; then\n" ++ " exit 1\n" ++ "else\n" ++ " echo '%sPASS: all tests for %s succeeded'\n" ++ " exit 0\n" ++ "fi\n" % (("X" if t.xfail else ""), ++ t.test_name)) ++ t.sh.close() ++ ++# Decription file parsing ++def parse_description_file(filename): ++ global default_tunable_options ++ global current_input_lineno ++ f = open(filename) ++ if not f: ++ error("cannot open description file %s" % (filename)) ++ descrfile_lines = f.readlines() ++ t = None ++ for line in descrfile_lines: ++ p = re.compile(r"#.*$") ++ line = p.sub("", line) # Filter out comments ++ line = line.strip() # Remove excess whitespace ++ current_input_lineno += 1 ++ ++ m = re.match(r"^tunable_option:\s*(.*)$", line) ++ if m: ++ if m.group(1) == "": ++ error("tunable option cannot be empty") ++ default_tunable_options.append(m.group (1)) ++ continue ++ ++ m = re.match(r"^clear_tunables$", line) ++ if m: ++ default_tunable_options = [] ++ continue ++ ++ m = re.match(r"^([^:]+):\s*(.*)$", line) ++ if m: ++ lhs = m.group(1) ++ o = re.match(r"^output(.*)$", lhs) ++ xfail = False ++ if not o: ++ o = re.match(r"^xfail_output(.*)$", lhs) ++ if o: ++ xfail = True; ++ if o: ++ if not t: ++ error("output specification without testcase description") ++ tsstr = "" ++ if o.group(1): ++ ts = re.match(r"^\(([a-zA-Z0-9_.=]*)\)$", o.group (1)) ++ if not ts: ++ error("tunable option malformed '%s'" % o.group(1)) ++ tsstr = ts.group(1) ++ t.expected_outputs[tsstr] = (m.group(2), xfail) ++ # Any tunable option XFAILed means entire testcase ++ # is XFAIL/XPASS ++ t.xfail |= xfail ++ else: ++ if t: ++ # Starting a new test description, end and process ++ # current one. ++ process_testcase(t) ++ t = TestDescr() ++ x = re.match(r"^xtest\((.*)\)$", lhs) ++ if x: ++ t.xtest = True ++ t.test_name = x.group(1) ++ else: ++ t.test_name = lhs ++ descr_string = m.group(2) ++ parse_description_string(t, descr_string) ++ continue ++ else: ++ if line: ++ if not t: ++ error("no active testcase description") ++ parse_description_string(t, line) ++ # Process last completed test description ++ if t: ++ process_testcase(t) ++ ++# Setup Makefile output to file or stdout as selected ++if output_makefile: ++ output_makefile_dir = os.path.dirname(output_makefile) ++ if output_makefile_dir: ++ os.makedirs(output_makefile_dir, exist_ok = True) ++ makefile = open(output_makefile, "w") ++else: ++ makefile = open(sys.stdout.fileno (), "w") ++ ++# Finally, the main top-level calling of above parsing routines. ++if description_file: ++ parse_description_file(description_file) ++else: ++ t = TestDescr() ++ t.test_name = test_name ++ parse_description_string(t, description) ++ process_testcase(t) ++ ++# Close Makefile fragment output ++makefile.close() +diff --git a/support/Depend b/support/Depend +new file mode 100644 +index 0000000000000000..7e7d5dc67c13e669 +--- /dev/null ++++ b/support/Depend +@@ -0,0 +1 @@ ++elf +diff --git a/support/Makefile b/support/Makefile +index 2a0731796fdb3f2d..75bad6715ac3d08c 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -254,10 +254,16 @@ others-noinstall += shell-container echo-container true-container + others += $(LINKS_DSO_PROGRAM) + others-noinstall += $(LINKS_DSO_PROGRAM) + ++others += test-run-command ++others-static += test-run-command ++others-noinstall += test-run-command ++LDLIBS-test-run-command = $(libsupport) ++ + $(objpfx)test-container : $(libsupport) + $(objpfx)shell-container : $(libsupport) + $(objpfx)echo-container : $(libsupport) + $(objpfx)true-container : $(libsupport) ++$(objpfx)test-run-command : $(libsupport) $(common-objpfx)elf/static-stubs.o + + tests = \ + README-testing \ +diff --git a/support/support_test_main.c b/support/support_test_main.c +index 07e3cdd173cecfc0..66a754b84fbb79ad 100644 +--- a/support/support_test_main.c ++++ b/support/support_test_main.c +@@ -228,6 +228,18 @@ run_test_function (int argc, char **argv, const struct test_config *config) + while (wait_for_debugger) + usleep (1000); + ++ if (config->run_command_mode) ++ { ++ /* In run-command-mode, the child process executes the command line ++ arguments as a new program. */ ++ char **argv_ = xmalloc (sizeof (char *) * argc); ++ memcpy (argv_, &argv[1], sizeof (char *) * (argc - 1)); ++ argv_[argc - 1] = NULL; ++ execv (argv_[0], argv_); ++ printf ("error: should not return here\n"); ++ exit (1); ++ } ++ + if (config->test_function != NULL) + return config->test_function (); + else if (config->test_function_argv != NULL) +diff --git a/support/test-driver.c b/support/test-driver.c +index b0bea46deeb41b3b..1552f62c9b5d0f7b 100644 +--- a/support/test-driver.c ++++ b/support/test-driver.c +@@ -116,7 +116,9 @@ main (int argc, char **argv) + #if defined (TEST_FUNCTION) && defined (TEST_FUNCTON_ARGV) + # error TEST_FUNCTION and TEST_FUNCTION_ARGV cannot be defined at the same time + #endif +-#if defined (TEST_FUNCTION) ++#ifdef RUN_COMMAND_MODE ++ test_config.run_command_mode = 1; ++#elif defined (TEST_FUNCTION) + test_config.test_function = TEST_FUNCTION; + #elif defined (TEST_FUNCTION_ARGV) + test_config.test_function_argv = TEST_FUNCTION_ARGV; +diff --git a/support/test-driver.h b/support/test-driver.h +index 8d4f38275d219de0..b44c0ff03326fca4 100644 +--- a/support/test-driver.h ++++ b/support/test-driver.h +@@ -36,6 +36,7 @@ struct test_config + int expected_signal; /* If non-zero, expect termination by signal. */ + char no_mallopt; /* Boolean flag to disable mallopt. */ + char no_setvbuf; /* Boolean flag to disable setvbuf. */ ++ char run_command_mode; /* Boolean flag to indicate run-command-mode. */ + const char *optstring; /* Short command line options. */ + }; + +diff --git a/support/test-run-command.c b/support/test-run-command.c +new file mode 100644 +index 0000000000000000..61560d7bfb1686a8 +--- /dev/null ++++ b/support/test-run-command.c +@@ -0,0 +1,22 @@ ++/* Main program for test-run-command support utility. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This is basically a configuration of test-driver.c into a general ++ command-line program runner. */ ++#define RUN_COMMAND_MODE ++#include diff --git a/SOURCES/glibc-rh2032647-2.patch b/SOURCES/glibc-rh2032647-2.patch new file mode 100644 index 0000000..4ac1d1a --- /dev/null +++ b/SOURCES/glibc-rh2032647-2.patch @@ -0,0 +1,585 @@ +commit 15a0c5730d1d5aeb95f50c9ec7470640084feae8 +Author: Chung-Lin Tang +Date: Thu Oct 21 21:41:22 2021 +0800 + + elf: Fix slow DSO sorting behavior in dynamic loader (BZ #17645) + + This second patch contains the actual implementation of a new sorting algorithm + for shared objects in the dynamic loader, which solves the slow behavior that + the current "old" algorithm falls into when the DSO set contains circular + dependencies. + + The new algorithm implemented here is simply depth-first search (DFS) to obtain + the Reverse-Post Order (RPO) sequence, a topological sort. A new l_visited:1 + bitfield is added to struct link_map to more elegantly facilitate such a search. + + The DFS algorithm is applied to the input maps[nmap-1] backwards towards + maps[0]. This has the effect of a more "shallow" recursion depth in general + since the input is in BFS. Also, when combined with the natural order of + processing l_initfini[] at each node, this creates a resulting output sorting + closer to the intuitive "left-to-right" order in most cases. + + Another notable implementation adjustment related to this _dl_sort_maps change + is the removing of two char arrays 'used' and 'done' in _dl_close_worker to + represent two per-map attributes. This has been changed to simply use two new + bit-fields l_map_used:1, l_map_done:1 added to struct link_map. This also allows + discarding the clunky 'used' array sorting that _dl_sort_maps had to sometimes + do along the way. + + Tunable support for switching between different sorting algorithms at runtime is + also added. A new tunable 'glibc.rtld.dynamic_sort' with current valid values 1 + (old algorithm) and 2 (new DFS algorithm) has been added. At time of commit + of this patch, the default setting is 1 (old algorithm). + + Signed-off-by: Chung-Lin Tang + Reviewed-by: Adhemerval Zanella + +diff --git a/elf/dl-close.c b/elf/dl-close.c +index cd7b9c9fe83a1a44..f6fbf9de7d78555b 100644 +--- a/elf/dl-close.c ++++ b/elf/dl-close.c +@@ -167,8 +167,6 @@ _dl_close_worker (struct link_map *map, bool force) + + bool any_tls = false; + const unsigned int nloaded = ns->_ns_nloaded; +- char used[nloaded]; +- char done[nloaded]; + struct link_map *maps[nloaded]; + + /* Run over the list and assign indexes to the link maps and enter +@@ -176,24 +174,21 @@ _dl_close_worker (struct link_map *map, bool force) + int idx = 0; + for (struct link_map *l = ns->_ns_loaded; l != NULL; l = l->l_next) + { ++ l->l_map_used = 0; ++ l->l_map_done = 0; + l->l_idx = idx; + maps[idx] = l; + ++idx; +- + } + assert (idx == nloaded); + +- /* Prepare the bitmaps. */ +- memset (used, '\0', sizeof (used)); +- memset (done, '\0', sizeof (done)); +- + /* Keep track of the lowest index link map we have covered already. */ + int done_index = -1; + while (++done_index < nloaded) + { + struct link_map *l = maps[done_index]; + +- if (done[done_index]) ++ if (l->l_map_done) + /* Already handled. */ + continue; + +@@ -204,12 +199,12 @@ _dl_close_worker (struct link_map *map, bool force) + /* See CONCURRENCY NOTES in cxa_thread_atexit_impl.c to know why + acquire is sufficient and correct. */ + && atomic_load_acquire (&l->l_tls_dtor_count) == 0 +- && !used[done_index]) ++ && !l->l_map_used) + continue; + + /* We need this object and we handle it now. */ +- done[done_index] = 1; +- used[done_index] = 1; ++ l->l_map_used = 1; ++ l->l_map_done = 1; + /* Signal the object is still needed. */ + l->l_idx = IDX_STILL_USED; + +@@ -225,9 +220,9 @@ _dl_close_worker (struct link_map *map, bool force) + { + assert ((*lp)->l_idx >= 0 && (*lp)->l_idx < nloaded); + +- if (!used[(*lp)->l_idx]) ++ if (!(*lp)->l_map_used) + { +- used[(*lp)->l_idx] = 1; ++ (*lp)->l_map_used = 1; + /* If we marked a new object as used, and we've + already processed it, then we need to go back + and process again from that point forward to +@@ -250,9 +245,9 @@ _dl_close_worker (struct link_map *map, bool force) + { + assert (jmap->l_idx >= 0 && jmap->l_idx < nloaded); + +- if (!used[jmap->l_idx]) ++ if (!jmap->l_map_used) + { +- used[jmap->l_idx] = 1; ++ jmap->l_map_used = 1; + if (jmap->l_idx - 1 < done_index) + done_index = jmap->l_idx - 1; + } +@@ -262,8 +257,7 @@ _dl_close_worker (struct link_map *map, bool force) + + /* Sort the entries. We can skip looking for the binary itself which is + at the front of the search list for the main namespace. */ +- _dl_sort_maps (maps + (nsid == LM_ID_BASE), nloaded - (nsid == LM_ID_BASE), +- used + (nsid == LM_ID_BASE), true); ++ _dl_sort_maps (maps, nloaded, (nsid == LM_ID_BASE), true); + + /* Call all termination functions at once. */ + #ifdef SHARED +@@ -280,7 +274,7 @@ _dl_close_worker (struct link_map *map, bool force) + /* All elements must be in the same namespace. */ + assert (imap->l_ns == nsid); + +- if (!used[i]) ++ if (!imap->l_map_used) + { + assert (imap->l_type == lt_loaded && !imap->l_nodelete_active); + +@@ -333,7 +327,7 @@ _dl_close_worker (struct link_map *map, bool force) + if (i < first_loaded) + first_loaded = i; + } +- /* Else used[i]. */ ++ /* Else imap->l_map_used. */ + else if (imap->l_type == lt_loaded) + { + struct r_scope_elem *new_list = NULL; +@@ -560,7 +554,7 @@ _dl_close_worker (struct link_map *map, bool force) + for (unsigned int i = first_loaded; i < nloaded; ++i) + { + struct link_map *imap = maps[i]; +- if (!used[i]) ++ if (!imap->l_map_used) + { + assert (imap->l_type == lt_loaded); + +diff --git a/elf/dl-deps.c b/elf/dl-deps.c +index 087a49b212a96920..237d9636c5be780c 100644 +--- a/elf/dl-deps.c ++++ b/elf/dl-deps.c +@@ -613,10 +613,9 @@ Filters not supported with LD_TRACE_PRELINKING")); + + /* If libc.so.6 is the main map, it participates in the sort, so + that the relocation order is correct regarding libc.so.6. */ +- if (l_initfini[0] == GL (dl_ns)[l_initfini[0]->l_ns].libc_map) +- _dl_sort_maps (l_initfini, nlist, NULL, false); +- else +- _dl_sort_maps (&l_initfini[1], nlist - 1, NULL, false); ++ _dl_sort_maps (l_initfini, nlist, ++ (l_initfini[0] != GL (dl_ns)[l_initfini[0]->l_ns].libc_map), ++ false); + + /* Terminate the list of dependencies. */ + l_initfini[nlist] = NULL; +diff --git a/elf/dl-fini.c b/elf/dl-fini.c +index 6dbdfe4b3ebbeb89..c683884c355dfd52 100644 +--- a/elf/dl-fini.c ++++ b/elf/dl-fini.c +@@ -92,8 +92,7 @@ _dl_fini (void) + /* Now we have to do the sorting. We can skip looking for the + binary itself which is at the front of the search list for + the main namespace. */ +- _dl_sort_maps (maps + (ns == LM_ID_BASE), nmaps - (ns == LM_ID_BASE), +- NULL, true); ++ _dl_sort_maps (maps, nmaps, (ns == LM_ID_BASE), true); + + /* We do not rely on the linked list of loaded object anymore + from this point on. We have our own list here (maps). The +diff --git a/elf/dl-sort-maps.c b/elf/dl-sort-maps.c +index d21770267a37e128..a274ed66cc987735 100644 +--- a/elf/dl-sort-maps.c ++++ b/elf/dl-sort-maps.c +@@ -16,16 +16,24 @@ + License along with the GNU C Library; if not, see + . */ + ++#include + #include ++#include + ++/* Note: this is the older, "original" sorting algorithm, being used as ++ default up to 2.35. + +-/* Sort array MAPS according to dependencies of the contained objects. +- Array USED, if non-NULL, is permutated along MAPS. If FOR_FINI this is +- called for finishing an object. */ +-void +-_dl_sort_maps (struct link_map **maps, unsigned int nmaps, char *used, +- bool for_fini) ++ Sort array MAPS according to dependencies of the contained objects. ++ If FOR_FINI is true, this is called for finishing an object. */ ++static void ++_dl_sort_maps_original (struct link_map **maps, unsigned int nmaps, ++ unsigned int skip, bool for_fini) + { ++ /* Allows caller to do the common optimization of skipping the first map, ++ usually the main binary. */ ++ maps += skip; ++ nmaps -= skip; ++ + /* A list of one element need not be sorted. */ + if (nmaps <= 1) + return; +@@ -66,14 +74,6 @@ _dl_sort_maps (struct link_map **maps, unsigned int nmaps, char *used, + (k - i) * sizeof (maps[0])); + maps[k] = thisp; + +- if (used != NULL) +- { +- char here_used = used[i]; +- memmove (&used[i], &used[i + 1], +- (k - i) * sizeof (used[0])); +- used[k] = here_used; +- } +- + if (seen[i + 1] > nmaps - i) + { + ++i; +@@ -120,3 +120,183 @@ _dl_sort_maps (struct link_map **maps, unsigned int nmaps, char *used, + next:; + } + } ++ ++#if !HAVE_TUNABLES ++/* In this case, just default to the original algorithm. */ ++strong_alias (_dl_sort_maps_original, _dl_sort_maps); ++#else ++ ++/* We use a recursive function due to its better clarity and ease of ++ implementation, as well as faster execution speed. We already use ++ alloca() for list allocation during the breadth-first search of ++ dependencies in _dl_map_object_deps(), and this should be on the ++ same order of worst-case stack usage. ++ ++ Note: the '*rpo' parameter is supposed to point to one past the ++ last element of the array where we save the sort results, and is ++ decremented before storing the current map at each level. */ ++ ++static void ++dfs_traversal (struct link_map ***rpo, struct link_map *map, ++ bool *do_reldeps) ++{ ++ if (map->l_visited) ++ return; ++ ++ map->l_visited = 1; ++ ++ if (map->l_initfini) ++ { ++ for (int i = 0; map->l_initfini[i] != NULL; i++) ++ { ++ struct link_map *dep = map->l_initfini[i]; ++ if (dep->l_visited == 0 ++ && dep->l_main_map == 0) ++ dfs_traversal (rpo, dep, do_reldeps); ++ } ++ } ++ ++ if (__glibc_unlikely (do_reldeps != NULL && map->l_reldeps != NULL)) ++ { ++ /* Indicate that we encountered relocation dependencies during ++ traversal. */ ++ *do_reldeps = true; ++ ++ for (int m = map->l_reldeps->act - 1; m >= 0; m--) ++ { ++ struct link_map *dep = map->l_reldeps->list[m]; ++ if (dep->l_visited == 0 ++ && dep->l_main_map == 0) ++ dfs_traversal (rpo, dep, do_reldeps); ++ } ++ } ++ ++ *rpo -= 1; ++ **rpo = map; ++} ++ ++/* Topologically sort array MAPS according to dependencies of the contained ++ objects. */ ++ ++static void ++_dl_sort_maps_dfs (struct link_map **maps, unsigned int nmaps, ++ unsigned int skip __attribute__ ((unused)), bool for_fini) ++{ ++ for (int i = nmaps - 1; i >= 0; i--) ++ maps[i]->l_visited = 0; ++ ++ /* We apply DFS traversal for each of maps[i] until the whole total order ++ is found and we're at the start of the Reverse-Postorder (RPO) sequence, ++ which is a topological sort. ++ ++ We go from maps[nmaps - 1] backwards towards maps[0] at this level. ++ Due to the breadth-first search (BFS) ordering we receive, going ++ backwards usually gives a more shallow depth-first recursion depth, ++ adding more stack usage safety. Also, combined with the natural ++ processing order of l_initfini[] at each node during DFS, this maintains ++ an ordering closer to the original link ordering in the sorting results ++ under most simpler cases. ++ ++ Another reason we order the top level backwards, it that maps[0] is ++ usually exactly the main object of which we're in the midst of ++ _dl_map_object_deps() processing, and maps[0]->l_initfini[] is still ++ blank. If we start the traversal from maps[0], since having no ++ dependencies yet filled in, maps[0] will always be immediately ++ incorrectly placed at the last place in the order (first in reverse). ++ Adjusting the order so that maps[0] is last traversed naturally avoids ++ this problem. ++ ++ Further, the old "optimization" of skipping the main object at maps[0] ++ from the call-site (i.e. _dl_sort_maps(maps+1,nmaps-1)) is in general ++ no longer valid, since traversing along object dependency-links ++ may "find" the main object even when it is not included in the initial ++ order (e.g. a dlopen()'ed shared object can have circular dependencies ++ linked back to itself). In such a case, traversing N-1 objects will ++ create a N-object result, and raise problems. ++ ++ To summarize, just passing in the full list, and iterating from back ++ to front makes things much more straightforward. */ ++ ++ /* Array to hold RPO sorting results, before we copy back to maps[]. */ ++ struct link_map *rpo[nmaps]; ++ ++ /* The 'head' position during each DFS iteration. Note that we start at ++ one past the last element due to first-decrement-then-store (see the ++ bottom of above dfs_traversal() routine). */ ++ struct link_map **rpo_head = &rpo[nmaps]; ++ ++ bool do_reldeps = false; ++ bool *do_reldeps_ref = (for_fini ? &do_reldeps : NULL); ++ ++ for (int i = nmaps - 1; i >= 0; i--) ++ { ++ dfs_traversal (&rpo_head, maps[i], do_reldeps_ref); ++ ++ /* We can break early if all objects are already placed. */ ++ if (rpo_head == rpo) ++ goto end; ++ } ++ assert (rpo_head == rpo); ++ ++ end: ++ /* Here we may do a second pass of sorting, using only l_initfini[] ++ static dependency links. This is avoided if !FOR_FINI or if we didn't ++ find any reldeps in the first DFS traversal. ++ ++ The reason we do this is: while it is unspecified how circular ++ dependencies should be handled, the presumed reasonable behavior is to ++ have destructors to respect static dependency links as much as possible, ++ overriding reldeps if needed. And the first sorting pass, which takes ++ l_initfini/l_reldeps links equally, may not preserve this priority. ++ ++ Hence we do a 2nd sorting pass, taking only DT_NEEDED links into account ++ (see how the do_reldeps argument to dfs_traversal() is NULL below). */ ++ if (do_reldeps) ++ { ++ for (int i = nmaps - 1; i >= 0; i--) ++ rpo[i]->l_visited = 0; ++ ++ struct link_map **maps_head = &maps[nmaps]; ++ for (int i = nmaps - 1; i >= 0; i--) ++ { ++ dfs_traversal (&maps_head, rpo[i], NULL); ++ ++ /* We can break early if all objects are already placed. ++ The below memcpy is not needed in the do_reldeps case here, ++ since we wrote back to maps[] during DFS traversal. */ ++ if (maps_head == maps) ++ return; ++ } ++ assert (maps_head == maps); ++ return; ++ } ++ ++ memcpy (maps, rpo, sizeof (struct link_map *) * nmaps); ++} ++ ++void ++_dl_sort_maps_init (void) ++{ ++ int32_t algorithm = TUNABLE_GET (glibc, rtld, dynamic_sort, int32_t, NULL); ++ GLRO(dl_dso_sort_algo) = algorithm == 1 ? dso_sort_algorithm_original ++ : dso_sort_algorithm_dfs; ++} ++ ++void ++_dl_sort_maps (struct link_map **maps, unsigned int nmaps, ++ unsigned int skip, bool for_fini) ++{ ++ /* It can be tempting to use a static function pointer to store and call ++ the current selected sorting algorithm routine, but experimentation ++ shows that current processors still do not handle indirect branches ++ that efficiently, plus a static function pointer will involve ++ PTR_MANGLE/DEMANGLE, further impairing performance of small, common ++ input cases. A simple if-case with direct function calls appears to ++ be the fastest. */ ++ if (__glibc_likely (GLRO(dl_dso_sort_algo) == dso_sort_algorithm_original)) ++ _dl_sort_maps_original (maps, nmaps, skip, for_fini); ++ else ++ _dl_sort_maps_dfs (maps, nmaps, skip, for_fini); ++} ++ ++#endif /* HAVE_TUNABLES. */ +diff --git a/elf/dl-support.c b/elf/dl-support.c +index d8c06ba7eb4c76ea..c5ee5d33aa7e1d65 100644 +--- a/elf/dl-support.c ++++ b/elf/dl-support.c +@@ -166,6 +166,8 @@ size_t _dl_phnum; + uint64_t _dl_hwcap; + uint64_t _dl_hwcap2; + ++enum dso_sort_algorithm _dl_dso_sort_algo; ++ + /* The value of the FPU control word the kernel will preset in hardware. */ + fpu_control_t _dl_fpu_control = _FPU_DEFAULT; + +diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c +index 2c684c2db2a1f59b..4dc366eea445e974 100644 +--- a/elf/dl-sysdep.c ++++ b/elf/dl-sysdep.c +@@ -231,6 +231,9 @@ _dl_sysdep_start (void **start_argptr, + + __tunables_init (_environ); + ++ /* Initialize DSO sorting algorithm after tunables. */ ++ _dl_sort_maps_init (); ++ + #ifdef DL_SYSDEP_INIT + DL_SYSDEP_INIT; + #endif +diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list +index 8ddd4a23142a941b..46ffb2378416f90f 100644 +--- a/elf/dl-tunables.list ++++ b/elf/dl-tunables.list +@@ -156,4 +156,13 @@ glibc { + security_level: SXID_IGNORE + } + } ++ ++ rtld { ++ dynamic_sort { ++ type: INT_32 ++ minval: 1 ++ maxval: 2 ++ default: 1 ++ } ++ } + } +diff --git a/elf/dso-sort-tests-1.def b/elf/dso-sort-tests-1.def +index 873ddf55d91155c6..5f7f18ef270bc12d 100644 +--- a/elf/dso-sort-tests-1.def ++++ b/elf/dso-sort-tests-1.def +@@ -62,5 +62,5 @@ output: b>a>{}b->c->d;d=>[ba];c=>a;b=>e=>a;c=>f=>b;d=>g=>c +-xfail_output(glibc.rtld.dynamic_sort=1): {+a[d>c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[c>b>a>];+e[e>];+f[f>];+g[g>];+d[];%d(b(e(a()))a()g(c(a()f(b(e(a()))))));-d[];-g[];-f[];-e[];-a[l_name = (char *) ""; + *user_entry = main_map->l_entry; + ++ /* Set bit indicating this is the main program map. */ ++ main_map->l_main_map = 1; ++ + #ifdef HAVE_AUX_VECTOR + /* Adjust the on-stack auxiliary vector so that it looks like the + binary was executed directly. */ +diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp +index 9f66c528855fb21d..9bf572715f996ca6 100644 +--- a/elf/tst-rtld-list-tunables.exp ++++ b/elf/tst-rtld-list-tunables.exp +@@ -10,5 +10,6 @@ glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+) + glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+) + glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+) + glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+) ++glibc.rtld.dynamic_sort: 1 (min: 1, max: 2) + glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10) + glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+) +diff --git a/include/link.h b/include/link.h +index c46aced9f7b43ba0..4dcf01d8aea90bc2 100644 +--- a/include/link.h ++++ b/include/link.h +@@ -181,6 +181,11 @@ struct link_map + unsigned int l_init_called:1; /* Nonzero if DT_INIT function called. */ + unsigned int l_global:1; /* Nonzero if object in _dl_global_scope. */ + unsigned int l_reserved:2; /* Reserved for internal use. */ ++ unsigned int l_main_map:1; /* Nonzero for the map of the main program. */ ++ unsigned int l_visited:1; /* Used internally for map dependency ++ graph traversal. */ ++ unsigned int l_map_used:1; /* These two bits are used during traversal */ ++ unsigned int l_map_done:1; /* of maps in _dl_close_worker. */ + unsigned int l_phdr_allocated:1; /* Nonzero if the data structure pointed + to by `l_phdr' is allocated. */ + unsigned int l_soname_added:1; /* Nonzero if the SONAME is for sure in +diff --git a/manual/tunables.texi b/manual/tunables.texi +index 658547c6137bf177..10f4d75993f9940f 100644 +--- a/manual/tunables.texi ++++ b/manual/tunables.texi +@@ -309,6 +309,17 @@ changed once allocated at process startup. The default allocation of + optional static TLS is 512 bytes and is allocated in every thread. + @end deftp + ++@deftp Tunable glibc.rtld.dynamic_sort ++Sets the algorithm to use for DSO sorting, valid values are @samp{1} and ++@samp{2}. For value of @samp{1}, an older O(n^3) algorithm is used, which is ++long time tested, but may have performance issues when dependencies between ++shared objects contain cycles due to circular dependencies. When set to the ++value of @samp{2}, a different algorithm is used, which implements a ++topological sort through depth-first search, and does not exhibit the ++performance issues of @samp{1}. ++ ++The default value of this tunable is @samp{1}. ++@end deftp + + @node Elision Tunables + @section Elision Tunables +diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h +index fcbbf6974827cdf1..bcf1f199c5985c65 100644 +--- a/sysdeps/generic/ldsodefs.h ++++ b/sysdeps/generic/ldsodefs.h +@@ -245,6 +245,13 @@ enum allowmask + }; + + ++/* DSO sort algorithm to use (check dl-sort-maps.c). */ ++enum dso_sort_algorithm ++ { ++ dso_sort_algorithm_original, ++ dso_sort_algorithm_dfs ++ }; ++ + struct audit_ifaces + { + void (*activity) (uintptr_t *, unsigned int); +@@ -672,6 +679,8 @@ struct rtld_global_ro + platforms. */ + EXTERN uint64_t _dl_hwcap2; + ++ EXTERN enum dso_sort_algorithm _dl_dso_sort_algo; ++ + #ifdef SHARED + /* We add a function table to _rtld_global which is then used to + call the function instead of going through the PLT. The result +@@ -1098,7 +1107,7 @@ extern void _dl_fini (void) attribute_hidden; + + /* Sort array MAPS according to dependencies of the contained objects. */ + extern void _dl_sort_maps (struct link_map **maps, unsigned int nmaps, +- char *used, bool for_fini) attribute_hidden; ++ unsigned int skip, bool for_fini) attribute_hidden; + + /* The dynamic linker calls this function before and having changing + any shared object mappings. The `r_state' member of `struct r_debug' +@@ -1225,6 +1234,9 @@ extern struct link_map * _dl_get_dl_main_map (void) + # endif + #endif + ++/* Initialize the DSO sort algorithm to use. */ ++extern void _dl_sort_maps_init (void) attribute_hidden; ++ + /* Initialization of libpthread for statically linked applications. + If libpthread is not linked in, this is an empty function. */ + void __pthread_initialize_minimal (void) weak_function; diff --git a/SOURCES/glibc-rh2032647-3.patch b/SOURCES/glibc-rh2032647-3.patch new file mode 100644 index 0000000..789e644 --- /dev/null +++ b/SOURCES/glibc-rh2032647-3.patch @@ -0,0 +1,25 @@ +commit d3bf2f5927d51258a51ac7fde04f4805f8ee294a +Author: Adhemerval Zanella +Date: Wed Nov 3 09:19:30 2021 -0300 + + elf: Do not run DSO sorting if tunables is not enabled + + Since the argorithm selection requires tunables. + + Checked on x86_64-linux-gnu with --enable-tunables=no. + +diff --git a/elf/Makefile b/elf/Makefile +index 8dd2b24328113536..02ee834fdaf00a26 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -483,8 +483,10 @@ include $(objpfx)$(1).generated-makefile + endef + + # Generate from each testcase description file ++ifeq (yes,$(have-tunables)) + $(eval $(call include_dsosort_tests,dso-sort-tests-1.def)) + $(eval $(call include_dsosort_tests,dso-sort-tests-2.def)) ++endif + + check-abi: $(objpfx)check-abi-ld.out + tests-special += $(objpfx)check-abi-ld.out diff --git a/SOURCES/glibc-rh2032647-4.patch b/SOURCES/glibc-rh2032647-4.patch new file mode 100644 index 0000000..1c415d4 --- /dev/null +++ b/SOURCES/glibc-rh2032647-4.patch @@ -0,0 +1,189 @@ +commit b4bbedb1e75737a80bcc3d53d6eef1fbe0b5f4d5 +Author: H.J. Lu +Date: Sat Nov 6 14:13:27 2021 -0700 + + dso-ordering-test.py: Put all sources in one directory [BZ #28550] + + Put all sources for DSO sorting tests in the dso-sort-tests-src directory + and compile test relocatable objects with + + $(objpfx)tst-dso-ordering1-dir/tst-dso-ordering1-a.os: $(objpfx)dso-sort-tests-src/tst-dso-ordering1-a.c + $(compile.c) $(OUTPUT_OPTION) + + to avoid random $< values from $(before-compile) when compiling test + relocatable objects with + + $(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c) + compile-command.c = $(compile.c) $(OUTPUT_OPTION) $(compile-mkdep-flags) + compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS) + + for 3 "make -j 28" parallel builds on a machine with 112 cores at the + same time. + + This partially fixes BZ #28550. + + Reviewed-by: Adhemerval Zanella + +diff --git a/scripts/dso-ordering-test.py b/scripts/dso-ordering-test.py +index 944ee740527d60fd..bde0406be9da14fc 100644 +--- a/scripts/dso-ordering-test.py ++++ b/scripts/dso-ordering-test.py +@@ -526,9 +526,13 @@ def process_testcase(t): + base_test_name = t.test_name + test_subdir = base_test_name + "-dir" + testpfx = objpfx + test_subdir + "/" ++ test_srcdir = "dso-sort-tests-src/" ++ testpfx_src = objpfx + test_srcdir + + if not os.path.exists(testpfx): + os.mkdir(testpfx) ++ if not os.path.exists(testpfx_src): ++ os.mkdir(testpfx_src) + + def find_objs_not_depended_on(t): + objs_not_depended_on = [] +@@ -595,6 +599,11 @@ def process_testcase(t): + # Print out needed Makefile fragments for use in glibc/elf/Makefile. + module_names = "" + for o in test_descr.objs: ++ rule = ("$(objpfx)" + test_subdir + "/" + test_name ++ + "-" + o + ".os: $(objpfx)" + test_srcdir ++ + test_name + "-" + o + ".c\n" ++ "\t$(compile.c) $(OUTPUT_OPTION)\n") ++ makefile.write (rule) + module_names += " " + test_subdir + "/" + test_name + "-" + o + makefile.write("modules-names +=%s\n" % (module_names)) + +@@ -637,7 +646,7 @@ def process_testcase(t): + # object. This only needs to be done at most once for + # an object name. + if not dep in fake_created: +- f = open(testpfx + test_name + "-" + dep ++ f = open(testpfx_src + test_name + "-" + dep + + ".FAKE.c", "w") + f.write(" \n") + f.close() +@@ -648,6 +657,12 @@ def process_testcase(t): + % (test_name + "-" + dep + ".FAKE.so", + ("$(objpfx)" + test_subdir + "/" + + test_name + "-" + dep + ".so"))) ++ rule = ("$(objpfx)" + test_subdir + "/" ++ + test_name + "-" + dep + ".FAKE.os: " ++ "$(objpfx)" + test_srcdir ++ + test_name + "-" + dep + ".FAKE.c\n" ++ "\t$(compile.c) $(OUTPUT_OPTION)\n") ++ makefile.write (rule) + makefile.write \ + ("modules-names += %s\n" + % (test_subdir + "/" +@@ -687,6 +702,10 @@ def process_testcase(t): + + test_descr.soname_map['#'] + ".so") + ldflags += (" -Wl,-soname=" + soname) + makefile.write("LDFLAGS-%s = %s\n" % (test_name, ldflags)) ++ rule = ("$(objpfx)" + test_subdir + "/" + test_name + ".o: " ++ "$(objpfx)" + test_srcdir + test_name + ".c\n" ++ "\t$(compile.c) $(OUTPUT_OPTION)\n") ++ makefile.write (rule) + + not_depended_objs = find_objs_not_depended_on(test_descr) + if not_depended_objs: +@@ -745,7 +764,7 @@ def process_testcase(t): + " something_failed=true\n" + "else\n" + " diff -wu ${common_objpfx}elf/%s/%s%s.output \\\n" +- " ${common_objpfx}elf/%s/%s%s.exp\n" ++ " ${common_objpfx}elf/%s%s%s.exp\n" + " if [ $? -ne 0 ]; then\n" + " echo '%sFAIL: %s%s expected output comparison'\n" + " something_failed=true\n" +@@ -753,14 +772,14 @@ def process_testcase(t): + "fi\n" + % (("X" if xfail else ""), test_name, tunable_descr, + test_subdir, test_name, tunable_sfx, +- test_subdir, base_test_name, exp_tunable_sfx, ++ test_srcdir, base_test_name, exp_tunable_sfx, + ("X" if xfail else ""), test_name, tunable_descr)) + + # Generate C files according to dependency and calling relations from + # description string. + for obj in test_descr.objs: + src_name = test_name + "-" + obj + ".c" +- f = open(testpfx + src_name, "w") ++ f = open(testpfx_src + src_name, "w") + if obj in test_descr.callrefs: + called_objs = test_descr.callrefs[obj] + for callee in called_objs: +@@ -804,7 +823,7 @@ def process_testcase(t): + f.close() + + # Open C file for writing main program +- f = open(testpfx + test_name + ".c", "w") ++ f = open(testpfx_src + test_name + ".c", "w") + + # if there are some operations in main(), it means we need -ldl + f.write("#include \n") +@@ -885,7 +904,7 @@ def process_testcase(t): + for obj in test_descr.objs: + src_name = test_name + "-" + obj + ".c" + obj_name = test_name + "-" + obj + ".os" +- run_cmd([build_gcc, "-c", "-fPIC", testpfx + src_name, ++ run_cmd([build_gcc, "-c", "-fPIC", testpfx_src + src_name, + "-o", testpfx + obj_name]) + + obj_processed = {} +@@ -903,10 +922,12 @@ def process_testcase(t): + deps.append(dep + ".FAKE") + if not dep in fake_created: + base_name = testpfx + test_name + "-" + dep ++ src_base_name = (testpfx_src + test_name ++ + "-" + dep) + cmd = [build_gcc, "-Wl,--no-as-needed", + ("-Wl,-soname=" + base_name + ".so"), + "-shared", base_name + ".FAKE.c", +- "-o", base_name + ".FAKE.so"] ++ "-o", src_base_name + ".FAKE.so"] + run_cmd(cmd) + fake_created[dep] = True + dso_deps = map(lambda d: testpfx + test_name + "-" + d + ".so", +@@ -932,7 +953,7 @@ def process_testcase(t): + main_deps = map(lambda d: testpfx + test_name + "-" + d + ".so", + deps) + cmd = [build_gcc, "-Wl,--no-as-needed", "-o", testpfx + test_name, +- testpfx + test_name + ".c", "-L%s" % (os.getcwd()), ++ testpfx_src + test_name + ".c", "-L%s" % (os.getcwd()), + "-Wl,-rpath-link=%s" % (os.getcwd())] + if '#' in test_descr.soname_map: + soname = ("-Wl,-soname=" + testpfx + test_name + "-" +@@ -987,14 +1008,14 @@ def process_testcase(t): + sfx = "" + if r[0] != "": + sfx = "-" + r[0].replace("=","_") +- f = open(testpfx + t.test_name + sfx + ".exp", "w") ++ f = open(testpfx_src + t.test_name + sfx + ".exp", "w") + (output, xfail) = r[1] + f.write('%s' % output) + f.close() + + # Create header part of top-level testcase shell script, to wrap execution + # and output comparison together. +- t.sh = open(testpfx + t.test_name + ".sh", "w") ++ t.sh = open(testpfx_src + t.test_name + ".sh", "w") + t.sh.write("#!/bin/sh\n") + t.sh.write("# Test driver for %s, generated by " + "dso-ordering-test.py\n" % (t.test_name)) +@@ -1022,12 +1043,12 @@ def process_testcase(t): + sfx = "" + if r[0] != "": + sfx = "-" + r[0].replace("=","_") +- expected_output_files += " $(objpfx)%s/%s%s.exp" % (test_subdir, ++ expected_output_files += " $(objpfx)%s%s%s.exp" % (test_srcdir, + t.test_name, sfx) + makefile.write \ +- ("$(objpfx)%s.out: $(objpfx)%s/%s.sh%s " ++ ("$(objpfx)%s.out: $(objpfx)%s%s.sh%s " + "$(common-objpfx)support/test-run-command\n" +- % (t.test_name, test_subdir, t.test_name, ++ % (t.test_name, test_srcdir, t.test_name, + expected_output_files)) + makefile.write("\t$(SHELL) $< $(common-objpfx) '$(test-wrapper-env)' " + "'$(run-program-env)' > $@; $(evaluate-test)\n") diff --git a/SOURCES/glibc-rh2032647-5.patch b/SOURCES/glibc-rh2032647-5.patch new file mode 100644 index 0000000..308d831 --- /dev/null +++ b/SOURCES/glibc-rh2032647-5.patch @@ -0,0 +1,45 @@ +commit 1f67d8286b5da9266a138198ef1f15c27cbb0010 +Author: H.J. Lu +Date: Mon Nov 15 16:28:39 2021 -0800 + + elf: Use a temporary file to generate Makefile fragments [BZ #28550] + + 1. Use a temporary file to generate Makefile fragments for DSO sorting + tests and use -include on them. + 2. Add Makefile fragments to postclean-generated so that a "make clean" + removes the autogenerated fragments and a subsequent "make" regenerates + them. + + This partially fixes BZ #28550. + + Reviewed-by: Adhemerval Zanella + +diff --git a/elf/Makefile b/elf/Makefile +index 02ee834fdaf00a26..535ba4260fb98e64 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -471,6 +471,7 @@ tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \ + $(objpfx)tst-unused-dep-cmp.out + endif + ++ifndef avoid-generated + # DSO sorting tests: + # The dso-ordering-test.py script generates testcase source files in $(objpfx), + # creating a $(objpfx)-dir for each testcase, and creates a +@@ -478,9 +479,14 @@ endif + define include_dsosort_tests + $(objpfx)$(1).generated-makefile: $(1) + $(PYTHON) $(..)scripts/dso-ordering-test.py \ +- --description-file $$< --objpfx $(objpfx) --output-makefile $$@ +-include $(objpfx)$(1).generated-makefile ++ --description-file $$< --objpfx $(objpfx) --output-makefile $$@T ++ mv $$@T $$@ ++-include $(objpfx)$(1).generated-makefile + endef ++endif ++ ++postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \ ++ $(objpfx)/dso-sort-tests-2.generated-makefile + + # Generate from each testcase description file + ifeq (yes,$(have-tunables)) diff --git a/SOURCES/glibc-rh2032647-6.patch b/SOURCES/glibc-rh2032647-6.patch new file mode 100644 index 0000000..6dcaccd --- /dev/null +++ b/SOURCES/glibc-rh2032647-6.patch @@ -0,0 +1,49 @@ +commit 0884724a95b60452ad483dbe086d237d02ba624d +Author: Florian Weimer +Date: Tue Dec 14 12:37:44 2021 +0100 + + elf: Use new dependency sorting algorithm by default + + The default has to change eventually, and there are no known failures + that require a delay. + + Reviewed-by: Adhemerval Zanella + +diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list +index 46ffb2378416f90f..ffcd7f18d4fafb91 100644 +--- a/elf/dl-tunables.list ++++ b/elf/dl-tunables.list +@@ -162,7 +162,7 @@ glibc { + type: INT_32 + minval: 1 + maxval: 2 +- default: 1 ++ default: 2 + } + } + } +diff --git a/elf/tst-rtld-list-tunables.exp b/elf/tst-rtld-list-tunables.exp +index 9bf572715f996ca6..44e4834cfb431633 100644 +--- a/elf/tst-rtld-list-tunables.exp ++++ b/elf/tst-rtld-list-tunables.exp +@@ -10,6 +10,6 @@ glibc.malloc.tcache_max: 0x0 (min: 0x0, max: 0x[f]+) + glibc.malloc.tcache_unsorted_limit: 0x0 (min: 0x0, max: 0x[f]+) + glibc.malloc.top_pad: 0x0 (min: 0x0, max: 0x[f]+) + glibc.malloc.trim_threshold: 0x0 (min: 0x0, max: 0x[f]+) +-glibc.rtld.dynamic_sort: 1 (min: 1, max: 2) ++glibc.rtld.dynamic_sort: 2 (min: 1, max: 2) + glibc.rtld.nns: 0x4 (min: 0x1, max: 0x10) + glibc.rtld.optional_static_tls: 0x200 (min: 0x0, max: 0x[f]+) +diff --git a/manual/tunables.texi b/manual/tunables.texi +index 10f4d75993f9940f..7c3b28d029410a6f 100644 +--- a/manual/tunables.texi ++++ b/manual/tunables.texi +@@ -318,7 +318,7 @@ value of @samp{2}, a different algorithm is used, which implements a + topological sort through depth-first search, and does not exhibit the + performance issues of @samp{1}. + +-The default value of this tunable is @samp{1}. ++The default value of this tunable is @samp{2}. + @end deftp + + @node Elision Tunables diff --git a/SOURCES/glibc-rh2040657-1.patch b/SOURCES/glibc-rh2040657-1.patch new file mode 100644 index 0000000..4a25277 --- /dev/null +++ b/SOURCES/glibc-rh2040657-1.patch @@ -0,0 +1,547 @@ +commit 28713c06129f8f64f88c423266e6ff2880216509 +Author: H.J. Lu +Date: Mon Dec 13 09:43:52 2021 -0800 + + elf: Sort tests and modules-names + + Sort tests and modules-names to reduce future conflicts. + +Conflicts: + elf/Makefile + (Usual backport differences. Recreated tests and module-names + from scratch. Note that the upstream sort order is difficult + to fathom.) + +diff --git a/elf/Makefile b/elf/Makefile +index 535ba4260fb98e64..33df5b4714176adc 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -193,40 +193,134 @@ static-dlopen-environment = \ + tst-tls9-static-ENV = $(static-dlopen-environment) + tst-single_threaded-static-dlopen-ENV = $(static-dlopen-environment) + +-tests += restest1 preloadtest loadfail multiload origtest resolvfail \ +- constload1 order noload filter \ +- reldep reldep2 reldep3 reldep4 nodelete nodelete2 \ +- nodlopen nodlopen2 lateglobal initfirst global \ +- restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \ +- tst-tls4 tst-tls5 \ +- tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 \ +- tst-tls16 tst-tls17 tst-tls18 tst-tls19 tst-tls-dlinfo \ +- tst-align tst-align2 \ +- tst-dlmodcount tst-dlopenrpath tst-deep1 \ +- tst-dlmopen1 tst-dlmopen3 \ +- unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \ +- tst-audit1 tst-audit2 tst-audit8 tst-audit9 \ +- tst-addr1 tst-thrlock \ +- tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \ +- tst-nodelete tst-dlopen-nodelete-reloc) \ +- tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \ +- tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \ +- tst-nodelete2 tst-audit11 tst-audit12 tst-dlsym-error tst-noload \ +- tst-latepthread tst-tls-manydynamic tst-nodelete-dlclose \ +- tst-debug1 tst-main1 tst-absolute-sym tst-absolute-zero tst-big-note \ +- tst-unwind-ctor tst-unwind-main tst-audit13 \ +- tst-sonamemove-link tst-sonamemove-dlopen tst-dlopen-tlsmodid \ +- tst-dlopen-self tst-auditmany tst-initfinilazyfail tst-dlopenfail \ +- tst-dlopenfail-2 \ +- tst-filterobj tst-filterobj-dlopen tst-auxobj tst-auxobj-dlopen \ +- tst-audit14 tst-audit15 tst-audit16 tst-audit17 \ +- tst-single_threaded tst-single_threaded-pthread \ +- tst-tls-ie tst-tls-ie-dlmopen argv0test \ +- tst-glibc-hwcaps tst-glibc-hwcaps-prepend tst-glibc-hwcaps-mask \ +- tst-tls20 tst-tls21 tst-dlmopen-dlerror tst-dlmopen-gethostbyname \ +- tst-dl-is_dso tst-ro-dynamic \ +- tst-rtld-run-static \ ++tests += \ ++ argv0test \ ++ constload1 \ ++ dblload \ ++ dblunload \ ++ filter \ ++ global \ ++ initfirst \ ++ lateglobal \ ++ loadfail \ ++ multiload \ ++ next \ ++ nodelete \ ++ nodelete2 \ ++ nodlopen \ ++ nodlopen2 \ ++ noload \ ++ order \ ++ order2 \ ++ origtest \ ++ preloadtest \ ++ reldep \ ++ reldep2 \ ++ reldep3 \ ++ reldep4 \ ++ reldep5 \ ++ reldep6 \ ++ reldep7 \ ++ reldep8 \ ++ resolvfail \ ++ restest1 \ ++ restest2 \ ++ tst-absolute-sym \ ++ tst-absolute-zero \ ++ tst-addr1 \ ++ tst-align \ ++ tst-align2 \ ++ tst-audit1 \ ++ tst-audit2 \ ++ tst-audit8 \ ++ tst-audit9 \ ++ tst-audit11 \ ++ tst-audit12 \ ++ tst-audit13 \ ++ tst-audit14 \ ++ tst-audit15 \ ++ tst-audit16 \ ++ tst-audit17 \ ++ tst-auditmany \ ++ tst-auxobj \ ++ tst-auxobj-dlopen \ ++ tst-big-note \ ++ tst-debug1 \ ++ tst-deep1 \ ++ tst-dl-is_dso \ ++ tst-dlmodcount \ ++ tst-dlmopen1 \ ++ tst-dlmopen3 \ ++ tst-dlmopen-dlerror \ ++ tst-dlmopen-gethostbyname \ ++ tst-dlopenfail \ ++ tst-dlopenfail-2 \ ++ tst-dlopenrpath \ ++ tst-dlopen-self \ ++ tst-dlopen-tlsmodid \ ++ tst-dlsym-error \ ++ tst-filterobj \ ++ tst-filterobj-dlopen \ ++ tst-glibc-hwcaps \ ++ tst-glibc-hwcaps-mask \ ++ tst-glibc-hwcaps-prepend \ ++ tst-global1 \ ++ tst-initfinilazyfail \ ++ tst-initorder \ ++ tst-initorder2 \ ++ tst-latepthread \ ++ tst-main1 \ ++ tst-nodelete2 \ ++ tst-nodelete-dlclose \ ++ tst-nodelete-opened \ ++ tst-noload \ ++ tst-null-argv \ ++ tst-relsort1 \ ++ tst-ro-dynamic \ ++ tst-rtld-run-static \ ++ tst-single_threaded \ ++ tst-single_threaded-pthread \ ++ tst-sonamemove-dlopen \ ++ tst-sonamemove-link \ ++ tst-thrlock \ ++ tst-tls10 \ ++ tst-tls11 \ ++ tst-tls12 \ ++ tst-tls13 \ ++ tst-tls14 \ ++ tst-tls15 \ ++ tst-tls16 \ ++ tst-tls17 \ ++ tst-tls18 \ ++ tst-tls19 \ ++ tst-tls20 \ ++ tst-tls21 \ ++ tst-tls4 \ ++ tst-tls5 \ ++ tst-tlsalign \ ++ tst-tlsalign-extern \ ++ tst-tls-dlinfo \ ++ tst-tls-ie \ ++ tst-tls-ie-dlmopen \ ++ tst-tls-manydynamic \ ++ tst-unique1 \ ++ tst-unique2 \ ++ tst-unwind-ctor \ ++ tst-unwind-main \ ++ unload3 \ ++ unload4 \ ++ unload5 \ ++ unload6 \ ++ unload7 \ ++ unload8 \ + # reldep9 ++tests-cxx = \ ++ tst-dlopen-nodelete-reloc \ ++ tst-nodelete \ ++ tst-unique3 \ ++ tst-unique4 \ ++ ++tests += $(if $(CXX),$(tests-cxx)) + tests-internal += loadtest unload unload2 circleload1 \ + neededtest neededtest2 neededtest3 neededtest4 \ + tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \ +@@ -264,101 +358,265 @@ tst-tls-many-dynamic-modules-dep-bad = \ + extra-test-objs += $(tlsmod17a-modules:=.os) $(tlsmod18a-modules:=.os) \ + tst-tlsalign-vars.o + test-extras += tst-tlsmod17a tst-tlsmod18a tst-tlsalign-vars +-modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ +- testobj1_1 failobj constload2 constload3 unloadmod \ +- dep1 dep2 dep3 dep4 vismod1 vismod2 vismod3 \ +- nodelmod1 nodelmod2 nodelmod3 nodelmod4 \ +- nodel2mod1 nodel2mod2 nodel2mod3 \ +- nodlopenmod nodlopenmod2 filtmod1 filtmod2 \ +- reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \ +- reldep4mod1 reldep4mod2 reldep4mod3 reldep4mod4 \ +- neededobj1 neededobj2 neededobj3 neededobj4 \ +- neededobj5 neededobj6 firstobj globalmod1 \ +- unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj \ +- dblloadmod1 dblloadmod2 dblloadmod3 reldepmod5 reldepmod6 \ +- reldep6mod0 reldep6mod1 reldep6mod2 reldep6mod3 reldep6mod4 \ +- reldep7mod1 reldep7mod2 \ +- tst-tlsmod1 tst-tlsmod2 tst-tlsmod3 tst-tlsmod4 \ +- tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \ +- tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \ +- tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \ +- tst-tlsmod15a tst-tlsmod15b tst-tlsmod16a tst-tlsmod16b \ +- $(tlsmod17a-modules) tst-tlsmod17b $(tlsmod18a-modules) \ +- tst-tls19mod1 tst-tls19mod2 tst-tls19mod3 \ +- circlemod1 circlemod1a circlemod2 circlemod2a \ +- circlemod3 circlemod3a \ +- reldep8mod1 reldep8mod2 reldep8mod3 \ +- reldep9mod1 reldep9mod2 reldep9mod3 \ +- tst-alignmod tst-alignmod2 \ +- $(modules-execstack-$(have-z-execstack)) \ +- tst-dlopenrpathmod tst-deep1mod1 tst-deep1mod2 tst-deep1mod3 \ +- tst-dlmopen1mod tst-auditmod1 \ +- unload3mod1 unload3mod2 unload3mod3 unload3mod4 \ +- unload4mod1 unload4mod2 unload4mod3 unload4mod4 \ +- unload6mod1 unload6mod2 unload6mod3 \ +- unload7mod1 unload7mod2 \ +- unload8mod1 unload8mod1x unload8mod2 unload8mod3 \ +- order2mod1 order2mod2 order2mod3 order2mod4 \ +- tst-unique1mod1 tst-unique1mod2 \ +- tst-unique2mod1 tst-unique2mod2 \ +- tst-auditmod9a tst-auditmod9b \ +- $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \ +- tst-nodelete-uniquemod tst-nodelete-rtldmod \ +- tst-nodelete-zmod \ +- tst-dlopen-nodelete-reloc-mod1 \ +- tst-dlopen-nodelete-reloc-mod2 \ +- tst-dlopen-nodelete-reloc-mod3 \ +- tst-dlopen-nodelete-reloc-mod4 \ +- tst-dlopen-nodelete-reloc-mod5 \ +- tst-dlopen-nodelete-reloc-mod6 \ +- tst-dlopen-nodelete-reloc-mod7 \ +- tst-dlopen-nodelete-reloc-mod8 \ +- tst-dlopen-nodelete-reloc-mod9 \ +- tst-dlopen-nodelete-reloc-mod10 \ +- tst-dlopen-nodelete-reloc-mod11 \ +- tst-dlopen-nodelete-reloc-mod12 \ +- tst-dlopen-nodelete-reloc-mod13 \ +- tst-dlopen-nodelete-reloc-mod14 \ +- tst-dlopen-nodelete-reloc-mod15 \ +- tst-dlopen-nodelete-reloc-mod16 \ +- tst-dlopen-nodelete-reloc-mod17) \ +- tst-initordera1 tst-initorderb1 \ +- tst-initordera2 tst-initorderb2 \ +- tst-initordera3 tst-initordera4 \ +- tst-initorder2a tst-initorder2b tst-initorder2c \ +- tst-initorder2d \ +- tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \ +- tst-array5dep tst-null-argv-lib \ +- tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod \ +- tst-audit11mod1 tst-audit11mod2 tst-auditmod11 \ +- tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12 \ +- tst-latepthreadmod $(tst-tls-many-dynamic-modules) \ +- $(tst-tls-many-dynamic-modules-dep) \ +- $(tst-tls-many-dynamic-modules-dep-bad) \ +- tst-nodelete-dlclose-dso tst-nodelete-dlclose-plugin \ +- tst-main1mod tst-absolute-sym-lib \ +- tst-absolute-zero-lib tst-big-note-lib tst-unwind-ctor-lib \ +- tst-audit13mod1 tst-sonamemove-linkmod1 \ +- tst-sonamemove-runmod1 tst-sonamemove-runmod2 \ +- tst-auditmanymod1 tst-auditmanymod2 tst-auditmanymod3 \ +- tst-auditmanymod4 tst-auditmanymod5 tst-auditmanymod6 \ +- tst-auditmanymod7 tst-auditmanymod8 tst-auditmanymod9 \ +- tst-initlazyfailmod tst-finilazyfailmod \ +- tst-dlopenfailmod1 tst-dlopenfaillinkmod tst-dlopenfailmod2 \ +- tst-dlopenfailmod3 tst-dlopenfailnodelmod tst-ldconfig-ld-mod \ +- tst-filterobj-flt tst-filterobj-aux tst-filterobj-filtee \ +- tst-auditlogmod-1 tst-auditlogmod-2 tst-auditlogmod-3 \ +- tst-single_threaded-mod1 tst-single_threaded-mod2 \ +- tst-single_threaded-mod3 tst-single_threaded-mod4 \ +- tst-tls-ie-mod0 tst-tls-ie-mod1 tst-tls-ie-mod2 \ +- tst-tls-ie-mod3 tst-tls-ie-mod4 tst-tls-ie-mod5 \ +- tst-tls-ie-mod6 libmarkermod1-1 libmarkermod1-2 libmarkermod1-3 \ +- libmarkermod2-1 libmarkermod2-2 \ +- libmarkermod3-1 libmarkermod3-2 libmarkermod3-3 \ +- libmarkermod4-1 libmarkermod4-2 libmarkermod4-3 libmarkermod4-4 \ +- tst-tls20mod-bad tst-tls21mod tst-dlmopen-dlerror-mod \ +- tst-auxvalmod \ +- tst-dlmopen-gethostbyname-mod tst-ro-dynamic-mod \ ++modules-names = \ ++ circlemod1 \ ++ circlemod1a \ ++ circlemod2 \ ++ circlemod2a \ ++ circlemod3 \ ++ circlemod3a \ ++ constload2 \ ++ constload3 \ ++ dblloadmod1 \ ++ dblloadmod2 \ ++ dblloadmod3 \ ++ dep1 \ ++ dep2 \ ++ dep3 \ ++ dep4 \ ++ failobj \ ++ filtmod1 \ ++ filtmod2 \ ++ firstobj \ ++ globalmod1 \ ++ libmarkermod1-1 \ ++ libmarkermod1-2 \ ++ libmarkermod1-3 \ ++ libmarkermod2-1 \ ++ libmarkermod2-2 \ ++ libmarkermod3-1 \ ++ libmarkermod3-2 \ ++ libmarkermod3-3 \ ++ libmarkermod4-1 \ ++ libmarkermod4-2 \ ++ libmarkermod4-3 \ ++ libmarkermod4-4 \ ++ ltglobmod1 \ ++ ltglobmod2 \ ++ neededobj1 \ ++ neededobj2 \ ++ neededobj3 \ ++ neededobj4 \ ++ neededobj5 \ ++ neededobj6 \ ++ nextmod1 \ ++ nextmod2 \ ++ nodel2mod1 \ ++ nodel2mod2 \ ++ nodel2mod3 \ ++ nodelmod1 \ ++ nodelmod2 \ ++ nodelmod3 \ ++ nodelmod4 \ ++ nodlopenmod \ ++ nodlopenmod2 \ ++ order2mod1 \ ++ order2mod2 \ ++ order2mod3 \ ++ order2mod4 \ ++ pathoptobj \ ++ reldep4mod1 \ ++ reldep4mod2 \ ++ reldep4mod3 \ ++ reldep4mod4 \ ++ reldep6mod0 \ ++ reldep6mod1 \ ++ reldep6mod2 \ ++ reldep6mod3 \ ++ reldep6mod4 \ ++ reldep7mod1 \ ++ reldep7mod2 \ ++ reldep8mod1 \ ++ reldep8mod2 \ ++ reldep8mod3 \ ++ reldep9mod1 \ ++ reldep9mod2 \ ++ reldep9mod3 \ ++ reldepmod1 \ ++ reldepmod2 \ ++ reldepmod3 \ ++ reldepmod4 \ ++ reldepmod5 \ ++ reldepmod6 \ ++ testobj1 \ ++ testobj1_1 \ ++ testobj2 \ ++ testobj3 \ ++ testobj4 \ ++ testobj5 \ ++ testobj6 \ ++ tst-absolute-sym-lib \ ++ tst-absolute-zero-lib \ ++ tst-alignmod \ ++ tst-alignmod2 \ ++ tst-array2dep \ ++ tst-array5dep \ ++ tst-audit11mod1 \ ++ tst-audit11mod2 \ ++ tst-audit12mod1 \ ++ tst-audit12mod2 \ ++ tst-audit12mod3 \ ++ tst-audit13mod1 \ ++ tst-auditlogmod-1 \ ++ tst-auditlogmod-2 \ ++ tst-auditlogmod-3 \ ++ tst-auditmanymod1 \ ++ tst-auditmanymod2 \ ++ tst-auditmanymod3 \ ++ tst-auditmanymod4 \ ++ tst-auditmanymod5 \ ++ tst-auditmanymod6 \ ++ tst-auditmanymod7 \ ++ tst-auditmanymod8 \ ++ tst-auditmanymod9 \ ++ tst-auditmod1 \ ++ tst-auditmod9a \ ++ tst-auditmod9b \ ++ tst-auditmod11 \ ++ tst-auditmod12 \ ++ tst-auxvalmod \ ++ tst-big-note-lib \ ++ tst-deep1mod1 \ ++ tst-deep1mod2 \ ++ tst-deep1mod3 \ ++ tst-dlmopen1mod \ ++ tst-dlmopen-dlerror-mod \ ++ tst-dlmopen-gethostbyname-mod \ ++ tst-dlopenfaillinkmod \ ++ tst-dlopenfailmod1 \ ++ tst-dlopenfailmod2 \ ++ tst-dlopenfailmod3 \ ++ tst-dlopenfailnodelmod \ ++ tst-dlopenrpathmod \ ++ tst-filterobj-aux \ ++ tst-filterobj-filtee \ ++ tst-filterobj-flt \ ++ tst-finilazyfailmod \ ++ tst-initlazyfailmod \ ++ tst-initorder2a \ ++ tst-initorder2b \ ++ tst-initorder2c \ ++ tst-initorder2d \ ++ tst-initordera1 \ ++ tst-initordera2 \ ++ tst-initordera3 \ ++ tst-initordera4 \ ++ tst-initorderb1 \ ++ tst-initorderb2 \ ++ tst-latepthreadmod \ ++ tst-ldconfig-ld-mod \ ++ tst-main1mod \ ++ tst-nodelete2mod \ ++ tst-nodelete-dlclose-dso \ ++ tst-nodelete-dlclose-plugin \ ++ tst-nodelete-opened-lib \ ++ tst-null-argv-lib \ ++ tst-relsort1mod1 \ ++ tst-relsort1mod2 \ ++ tst-ro-dynamic-mod \ ++ tst-single_threaded-mod1 \ ++ tst-single_threaded-mod2 \ ++ tst-single_threaded-mod3 \ ++ tst-single_threaded-mod4 \ ++ tst-sonamemove-linkmod1 \ ++ tst-sonamemove-runmod1 \ ++ tst-sonamemove-runmod2 \ ++ tst-tls19mod1 \ ++ tst-tls19mod2 \ ++ tst-tls19mod3 \ ++ tst-tls20mod-bad \ ++ tst-tls21mod \ ++ tst-tlsalign-lib \ ++ tst-tls-ie-mod0 \ ++ tst-tls-ie-mod1 \ ++ tst-tls-ie-mod2 \ ++ tst-tls-ie-mod3 \ ++ tst-tls-ie-mod4 \ ++ tst-tls-ie-mod5 \ ++ tst-tls-ie-mod6 \ ++ tst-tlsmod1 \ ++ tst-tlsmod10 \ ++ tst-tlsmod11 \ ++ tst-tlsmod12 \ ++ tst-tlsmod13 \ ++ tst-tlsmod13a \ ++ tst-tlsmod14a \ ++ tst-tlsmod14b \ ++ tst-tlsmod15a \ ++ tst-tlsmod15b \ ++ tst-tlsmod16a \ ++ tst-tlsmod16b \ ++ tst-tlsmod17b \ ++ tst-tlsmod2 \ ++ tst-tlsmod3 \ ++ tst-tlsmod4 \ ++ tst-tlsmod5 \ ++ tst-tlsmod6 \ ++ tst-tlsmod7 \ ++ tst-tlsmod8 \ ++ tst-tlsmod9 \ ++ tst-unique1mod1 \ ++ tst-unique1mod2 \ ++ tst-unique2mod1 \ ++ tst-unique2mod2 \ ++ tst-unwind-ctor-lib \ ++ unload2dep \ ++ unload2mod \ ++ unload3mod1 \ ++ unload3mod2 \ ++ unload3mod3 \ ++ unload3mod4 \ ++ unload4mod1 \ ++ unload4mod2 \ ++ unload4mod3 \ ++ unload4mod4 \ ++ unload6mod1 \ ++ unload6mod2 \ ++ unload6mod3 \ ++ unload7mod1 \ ++ unload7mod2 \ ++ unload8mod1 \ ++ unload8mod1x \ ++ unload8mod2 \ ++ unload8mod3 \ ++ unloadmod \ ++ vismod1 \ ++ vismod2 \ ++ vismod3 \ ++ ++modules-names-cxx = \ ++ tst-dlopen-nodelete-reloc-mod1 \ ++ tst-dlopen-nodelete-reloc-mod10 \ ++ tst-dlopen-nodelete-reloc-mod11 \ ++ tst-dlopen-nodelete-reloc-mod12 \ ++ tst-dlopen-nodelete-reloc-mod13 \ ++ tst-dlopen-nodelete-reloc-mod14 \ ++ tst-dlopen-nodelete-reloc-mod15 \ ++ tst-dlopen-nodelete-reloc-mod16 \ ++ tst-dlopen-nodelete-reloc-mod17 \ ++ tst-dlopen-nodelete-reloc-mod2 \ ++ tst-dlopen-nodelete-reloc-mod3 \ ++ tst-dlopen-nodelete-reloc-mod4 \ ++ tst-dlopen-nodelete-reloc-mod5 \ ++ tst-dlopen-nodelete-reloc-mod6 \ ++ tst-dlopen-nodelete-reloc-mod7 \ ++ tst-dlopen-nodelete-reloc-mod8 \ ++ tst-dlopen-nodelete-reloc-mod9 \ ++ tst-nodelete-rtldmod \ ++ tst-nodelete-uniquemod \ ++ tst-nodelete-zmod \ ++ tst-unique3lib \ ++ tst-unique3lib2 \ ++ tst-unique4lib \ ++ ++modules-names += \ ++ $(if $(CXX),$(modules-names-cxx)) \ ++ $(modules-execstack-$(have-z-execstack)) \ ++ $(tst-tls-many-dynamic-modules) \ ++ $(tst-tls-many-dynamic-modules-dep) \ ++ $(tst-tls-many-dynamic-modules-dep-bad) \ ++ $(tlsmod17a-modules) \ ++ $(tlsmod18a-modules) \ + + # Most modules build with _ISOMAC defined, but those filtered out + # depend on internal headers. diff --git a/SOURCES/glibc-rh2040657-10.patch b/SOURCES/glibc-rh2040657-10.patch new file mode 100644 index 0000000..cff581f --- /dev/null +++ b/SOURCES/glibc-rh2040657-10.patch @@ -0,0 +1,73 @@ +commit 990c953bce06d77360d2e933faa9a008e2c55405 +Author: Florian Weimer +Date: Fri Jan 14 20:16:05 2022 +0100 + + x86: Add x86-64-vN check to early startup + + This ISA level covers the glibc build itself. + cannot be used because this check (by design) happens before + DL_PLATFORM_INIT and the x86 CPU flags initialization. + + Reviewed-by: H.J. Lu + +diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile +index 5ee06f94735e5189..36ca1a7126047b86 100644 +--- a/sysdeps/x86/Makefile ++++ b/sysdeps/x86/Makefile +@@ -7,6 +7,7 @@ sysdep_routines += get-cpuid-feature-leaf + sysdep-dl-routines += dl-get-cpu-features + sysdep_headers += sys/platform/x86.h bits/platform/x86.h + ++CFLAGS-dl-get-cpu-features.os += $(rtld-early-cflags) + CFLAGS-get-cpuid-feature-leaf.o += $(no-stack-protector) + + tests += tst-get-cpu-features tst-get-cpu-features-static \ +diff --git a/sysdeps/x86/dl-get-cpu-features.c b/sysdeps/x86/dl-get-cpu-features.c +index 839803c746f408ed..6ccde4404b13a725 100644 +--- a/sysdeps/x86/dl-get-cpu-features.c ++++ b/sysdeps/x86/dl-get-cpu-features.c +@@ -20,6 +20,7 @@ + + #ifdef SHARED + # include ++# include + + /* NB: Normally, DL_PLATFORM_INIT calls init_cpu_features to initialize + CPU features in dynamic executable. But when loading ld.so inside of +@@ -36,7 +37,35 @@ _dl_x86_init_cpu_features (void) + { + struct cpu_features *cpu_features = __get_cpu_features (); + if (cpu_features->basic.kind == arch_kind_unknown) +- init_cpu_features (cpu_features); ++ { ++ init_cpu_features (cpu_features); ++ ++# if IS_IN (rtld) ++ /* See isa-level.c. */ ++# if defined GCCMACRO__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 \ ++ && defined HAVE_X86_LAHF_SAHF && defined GCCMACRO__POPCNT__ \ ++ && defined GCCMACRO__SSE3__ && defined GCCMACRO__SSSE3__ \ ++ && defined GCCMACRO__SSE4_1__ && defined GCCMACRO__SSE4_2__ ++ if (!(cpu_features->isa_1 & GNU_PROPERTY_X86_ISA_1_V2)) ++ _dl_fatal_printf ("\ ++Fatal glibc error: CPU does not support x86-64-v%d\n", 2); ++# if defined GCCMACRO__AVX__ && defined GCCMACRO__AVX2__ \ ++ && defined GCCMACRO__F16C__ && defined GCCMACRO__FMA__ \ ++ && defined GCCMACRO__LZCNT__ && defined HAVE_X86_MOVBE ++ if (!(cpu_features->isa_1 & GNU_PROPERTY_X86_ISA_1_V3)) ++ _dl_fatal_printf ("\ ++Fatal glibc error: CPU does not support x86-64-v%d\n", 3); ++# if defined GCCMACRO__AVX512F__ && defined GCCMACRO__AVX512BW__ \ ++ && defined GCCMACRO__AVX512CD__ && defined GCCMACRO__AVX512DQ__ \ ++ && defined GCCMACRO__AVX512VL__ ++ if (!(cpu_features->isa_1 & GNU_PROPERTY_X86_ISA_1_V4)) ++ _dl_fatal_printf ("\ ++Fatal glibc error: CPU does not support x86-64-v%d\n", 4); ++# endif /* ISA level 4 */ ++# endif /* ISA level 3 */ ++# endif /* ISA level 2 */ ++# endif /* IS_IN (rtld) */ ++ } + } + + __ifunc (__x86_cpu_features, __x86_cpu_features, NULL, void, diff --git a/SOURCES/glibc-rh2040657-11.patch b/SOURCES/glibc-rh2040657-11.patch new file mode 100644 index 0000000..1ca3409 --- /dev/null +++ b/SOURCES/glibc-rh2040657-11.patch @@ -0,0 +1,37 @@ +commit f01d482f0355a7029d0715ace0ccf3323e7e94bc +Author: Florian Weimer +Date: Fri Jan 14 20:16:05 2022 +0100 + + s390x: Use in early HWCAP check + + This is required so that the checks still work if $(early-cflags) + selects a different ISA level. + + Reviewed-by: Carlos O'Donell + Tested-by: Carlos O'Donell + +diff --git a/sysdeps/s390/s390-64/dl-hwcap-check.h b/sysdeps/s390/s390-64/dl-hwcap-check.h +index 87e18be6bd0c512b..27f7e245b1d1a9e9 100644 +--- a/sysdeps/s390/s390-64/dl-hwcap-check.h ++++ b/sysdeps/s390/s390-64/dl-hwcap-check.h +@@ -19,17 +19,18 @@ + #ifndef _DL_HWCAP_CHECK_H + #define _DL_HWCAP_CHECK_H + ++#include + #include + + static inline void + dl_hwcap_check (void) + { + #if defined __ARCH__ +-# if __ARCH__ >= 13 ++# if GCCMACRO__ARCH__ >= 13 + if (!(GLRO(dl_hwcap) & HWCAP_S390_VXRS_EXT2)) + _dl_fatal_printf ("\ + Fatal glibc error: CPU lacks VXRS_EXT2 support (z15 or later required)\n"); +-# elif __ARCH__ >= 12 ++# elif GCCMACRO__ARCH__ >= 12 + if (!(GLRO(dl_hwcap) & HWCAP_S390_VXE)) + _dl_fatal_printf ("\ + Fatal glibc error: CPU lacks VXE support (z14 or later required)\n"); diff --git a/SOURCES/glibc-rh2040657-12.patch b/SOURCES/glibc-rh2040657-12.patch new file mode 100644 index 0000000..592c08c --- /dev/null +++ b/SOURCES/glibc-rh2040657-12.patch @@ -0,0 +1,158 @@ +commit c90363403b57b3b7919061851cb3e6d9c85e784a +Author: Florian Weimer +Date: Tue Jan 18 13:53:11 2022 +0100 + + elf: Move _dl_setup_hash to its own file + + And compile it with the early CFLAGS. _dl_setup_hash is called + very early for the ld.so link map, so it should be compiled + differently. + + Reviewed-by: Stefan Liebler + Tested-by: Stefan Liebler + +diff --git a/elf/Makefile b/elf/Makefile +index 778e393395fc5248..948296dc2437e9a1 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -69,6 +69,7 @@ dl-routines = \ + dl-reloc \ + dl-runtime \ + dl-scope \ ++ dl-setup_hash \ + dl-sort-maps \ + dl-thread_gscope_wait \ + dl-tls \ +@@ -154,6 +155,7 @@ CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines)) + + # Add the requested compiler flags to the early startup code. + CFLAGS-dl-printf.os += $(rtld-early-cflags) ++CFLAGS-dl-setup_hash.os += $(rtld-early-cflags) + CFLAGS-dl-sysdep.os += $(rtld-early-cflags) + CFLAGS-dl-tunables.os += $(rtld-early-cflags) + CFLAGS-dl-write.os += $(rtld-early-cflags) +diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c +index eea217eb2833164c..3391a990c8d288e5 100644 +--- a/elf/dl-lookup.c ++++ b/elf/dl-lookup.c +@@ -948,51 +948,6 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map, + } + + +-/* Cache the location of MAP's hash table. */ +- +-void +-_dl_setup_hash (struct link_map *map) +-{ +- Elf_Symndx *hash; +- +- if (__glibc_likely (map->l_info[ELF_MACHINE_GNU_HASH_ADDRIDX] != NULL)) +- { +- Elf32_Word *hash32 +- = (void *) D_PTR (map, l_info[ELF_MACHINE_GNU_HASH_ADDRIDX]); +- map->l_nbuckets = *hash32++; +- Elf32_Word symbias = *hash32++; +- Elf32_Word bitmask_nwords = *hash32++; +- /* Must be a power of two. */ +- assert ((bitmask_nwords & (bitmask_nwords - 1)) == 0); +- map->l_gnu_bitmask_idxbits = bitmask_nwords - 1; +- map->l_gnu_shift = *hash32++; +- +- map->l_gnu_bitmask = (ElfW(Addr) *) hash32; +- hash32 += __ELF_NATIVE_CLASS / 32 * bitmask_nwords; +- +- map->l_gnu_buckets = hash32; +- hash32 += map->l_nbuckets; +- map->l_gnu_chain_zero = hash32 - symbias; +- +- /* Initialize MIPS xhash translation table. */ +- ELF_MACHINE_XHASH_SETUP (hash32, symbias, map); +- +- return; +- } +- +- if (!map->l_info[DT_HASH]) +- return; +- hash = (void *) D_PTR (map, l_info[DT_HASH]); +- +- map->l_nbuckets = *hash++; +- /* Skip nchain. */ +- hash++; +- map->l_buckets = hash; +- hash += map->l_nbuckets; +- map->l_chain = hash; +-} +- +- + static void + _dl_debug_bindings (const char *undef_name, struct link_map *undef_map, + const ElfW(Sym) **ref, struct sym_val *value, +diff --git a/elf/dl-setup_hash.c b/elf/dl-setup_hash.c +new file mode 100644 +index 0000000000000000..6dd57c5c94e541c2 +--- /dev/null ++++ b/elf/dl-setup_hash.c +@@ -0,0 +1,63 @@ ++/* Cache the location of a link map hash table. ++ Copyright (C) 1995-2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++void ++_dl_setup_hash (struct link_map *map) ++{ ++ Elf_Symndx *hash; ++ ++ if (__glibc_likely (map->l_info[ELF_MACHINE_GNU_HASH_ADDRIDX] != NULL)) ++ { ++ Elf32_Word *hash32 ++ = (void *) D_PTR (map, l_info[ELF_MACHINE_GNU_HASH_ADDRIDX]); ++ map->l_nbuckets = *hash32++; ++ Elf32_Word symbias = *hash32++; ++ Elf32_Word bitmask_nwords = *hash32++; ++ /* Must be a power of two. */ ++ assert ((bitmask_nwords & (bitmask_nwords - 1)) == 0); ++ map->l_gnu_bitmask_idxbits = bitmask_nwords - 1; ++ map->l_gnu_shift = *hash32++; ++ ++ map->l_gnu_bitmask = (ElfW(Addr) *) hash32; ++ hash32 += __ELF_NATIVE_CLASS / 32 * bitmask_nwords; ++ ++ map->l_gnu_buckets = hash32; ++ hash32 += map->l_nbuckets; ++ map->l_gnu_chain_zero = hash32 - symbias; ++ ++ /* Initialize MIPS xhash translation table. */ ++ ELF_MACHINE_XHASH_SETUP (hash32, symbias, map); ++ ++ return; ++ } ++ ++ if (!map->l_info[DT_HASH]) ++ return; ++ hash = (void *) D_PTR (map, l_info[DT_HASH]); ++ ++ map->l_nbuckets = *hash++; ++ /* Skip nchain. */ ++ hash++; ++ map->l_buckets = hash; ++ hash += map->l_nbuckets; ++ map->l_chain = hash; ++} diff --git a/SOURCES/glibc-rh2040657-2.patch b/SOURCES/glibc-rh2040657-2.patch new file mode 100644 index 0000000..02b8953 --- /dev/null +++ b/SOURCES/glibc-rh2040657-2.patch @@ -0,0 +1,42 @@ +commit f4f70c2895e3d325188a42c10eb7bb4335be6773 +Author: H.J. Lu +Date: Tue Jan 4 06:58:34 2022 -0800 + + elf: Add a comment after trailing backslashes + +diff --git a/elf/Makefile b/elf/Makefile +index 0cfcf0a61a442c9f..5b9c36bc6f0a3ee5 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -319,6 +319,7 @@ tests-cxx = \ + tst-nodelete \ + tst-unique3 \ + tst-unique4 \ ++# tests-cxx + + tests += $(if $(CXX),$(tests-cxx)) + tests-internal += loadtest unload unload2 circleload1 \ +@@ -583,6 +584,7 @@ modules-names = \ + vismod1 \ + vismod2 \ + vismod3 \ ++# modules-names + + modules-names-cxx = \ + tst-dlopen-nodelete-reloc-mod1 \ +@@ -608,6 +610,7 @@ modules-names-cxx = \ + tst-unique3lib \ + tst-unique3lib2 \ + tst-unique4lib \ ++# modules-names-cxx + + modules-names += \ + $(if $(CXX),$(modules-names-cxx)) \ +@@ -617,6 +620,7 @@ modules-names += \ + $(tst-tls-many-dynamic-modules-dep-bad) \ + $(tlsmod17a-modules) \ + $(tlsmod18a-modules) \ ++# modules-names + + # Most modules build with _ISOMAC defined, but those filtered out + # depend on internal headers. diff --git a/SOURCES/glibc-rh2040657-3.patch b/SOURCES/glibc-rh2040657-3.patch new file mode 100644 index 0000000..5c63516 --- /dev/null +++ b/SOURCES/glibc-rh2040657-3.patch @@ -0,0 +1,171 @@ +commit 0835c0f0bad351117154b815f34f8af19ea7e325 +Author: Matt Whitlock +Date: Wed Jun 16 23:40:47 2021 -0400 + + x86: fix Autoconf caching of instruction support checks [BZ #27991] + + The Autoconf documentation for the AC_CACHE_CHECK macro states: + + The commands-to-set-it must have no side effects except for setting + the variable cache-id, see below. + + However, the tests for support of -msahf and -mmovbe were embedded in + the commands-to-set-it for lib_cv_include_x86_isa_level. This had the + consequence that libc_cv_have_x86_lahf_sahf and libc_cv_have_x86_movbe + were not defined whenever lib_cv_include_x86_isa_level was read from + cache. These variables' being undefined meant that their unquoted use + in later test expressions led to the 'test' built-in's misparsing its + arguments and emitting errors like "test: =: unexpected operator" or + "test: =: unary operator expected", depending on the particular shell. + + This commit refactors the tests for LAHF/SAHF and MOVBE instruction + support into their own AC_CACHE_CHECK macro invocations to obey the + rule that the commands-to-set-it must have no side effects other than + setting the variable named by cache-id. + + Signed-off-by: Matt Whitlock + Reviewed-by: Adhemerval Zanella + +diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure +index ead1295c38cf5f4e..62676bb686850938 100644 +--- a/sysdeps/x86/configure ++++ b/sysdeps/x86/configure +@@ -126,8 +126,6 @@ cat > conftest2.S <&5 + (eval $ac_try) 2>&5 +@@ -137,9 +135,22 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest c + count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l` + if test "$count" = 1; then + libc_cv_include_x86_isa_level=yes +- cat > conftest.c <&5 ++$as_echo "$libc_cv_include_x86_isa_level" >&6; } ++if test $libc_cv_include_x86_isa_level = yes; then ++ $as_echo "#define INCLUDE_X86_ISA_LEVEL 1" >>confdefs.h ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LAHF/SAHF instruction support" >&5 ++$as_echo_n "checking for LAHF/SAHF instruction support... " >&6; } ++if ${libc_cv_have_x86_lahf_sahf+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ libc_cv_have_x86_lahf_sahf=no ++ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -147,7 +158,20 @@ EOF + test $ac_status = 0; }; } | grep -q "\-msahf"; then + libc_cv_have_x86_lahf_sahf=yes + fi +- if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - conftest.c' ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_x86_lahf_sahf" >&5 ++$as_echo "$libc_cv_have_x86_lahf_sahf" >&6; } ++ if test $libc_cv_have_x86_lahf_sahf = yes; then ++ $as_echo "#define HAVE_X86_LAHF_SAHF 1" >>confdefs.h ++ ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MOVBE instruction support" >&5 ++$as_echo_n "checking for MOVBE instruction support... " >&6; } ++if ${libc_cv_have_x86_movbe+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ libc_cv_have_x86_movbe=no ++ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -155,23 +179,13 @@ EOF + test $ac_status = 0; }; } | grep -q "\-mmovbe"; then + libc_cv_have_x86_movbe=yes + fi +- fi +-fi +-rm -f conftest* +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_include_x86_isa_level" >&5 +-$as_echo "$libc_cv_include_x86_isa_level" >&6; } +-if test $libc_cv_include_x86_isa_level = yes; then +- $as_echo "#define INCLUDE_X86_ISA_LEVEL 1" >>confdefs.h +- + fi +-if test $libc_cv_have_x86_lahf_sahf = yes; then +- $as_echo "#define HAVE_X86_LAHF_SAHF 1" >>confdefs.h +- +-fi +-if test $libc_cv_have_x86_movbe = yes; then +- $as_echo "#define HAVE_X86_MOVBE 1" >>confdefs.h ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_x86_movbe" >&5 ++$as_echo "$libc_cv_have_x86_movbe" >&6; } ++ if test $libc_cv_have_x86_movbe = yes; then ++ $as_echo "#define HAVE_X86_MOVBE 1" >>confdefs.h + ++ fi + fi + config_vars="$config_vars + enable-x86-isa-level = $libc_cv_include_x86_isa_level" +diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac +index bca97fdc2f1ac1a7..04a12ab68048cd66 100644 +--- a/sysdeps/x86/configure.ac ++++ b/sysdeps/x86/configure.ac +@@ -98,30 +98,32 @@ cat > conftest2.S < conftest.c < +Date: Fri Jan 14 16:09:20 2022 +0100 + + x86: HAVE_X86_LAHF_SAHF, HAVE_X86_MOVBE and -march=x86-64-vN (bug 28782) + + HAVE_X86_LAHF_SAHF is implied by x86-64-v2, and HAVE_X86_MOVBE by + x86-64-v3. + + The individual flag does not appear in -fverbose-asm flag output + even if the ISA level implies it. + + Reviewed-by: H.J. Lu + +diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure +index 62676bb686850938..7bdbfdc6dc2ad38f 100644 +--- a/sysdeps/x86/configure ++++ b/sysdeps/x86/configure +@@ -155,7 +155,7 @@ else + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; } | grep -q "\-msahf"; then ++ test $ac_status = 0; }; } | grep -qE '(-msahf\b|-march=x86-64-v)'; then + libc_cv_have_x86_lahf_sahf=yes + fi + fi +@@ -176,7 +176,7 @@ else + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; }; } | grep -q "\-mmovbe"; then ++ test $ac_status = 0; }; } | grep -qE '(-mmovbe\b|-march=x86-64-v([3-9]|[1-9][0-9]))'; then + libc_cv_have_x86_movbe=yes + fi + fi +diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac +index 04a12ab68048cd66..10d5c2e0e555fc79 100644 +--- a/sysdeps/x86/configure.ac ++++ b/sysdeps/x86/configure.ac +@@ -110,7 +110,7 @@ if test $libc_cv_include_x86_isa_level = yes; then + AC_CACHE_CHECK([for LAHF/SAHF instruction support], + libc_cv_have_x86_lahf_sahf, [dnl + libc_cv_have_x86_lahf_sahf=no +- if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -q "\-msahf"; then ++ if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -qE '(-msahf\b|-march=x86-64-v)'; then + libc_cv_have_x86_lahf_sahf=yes + fi]) + if test $libc_cv_have_x86_lahf_sahf = yes; then +@@ -119,7 +119,7 @@ if test $libc_cv_include_x86_isa_level = yes; then + AC_CACHE_CHECK([for MOVBE instruction support], + libc_cv_have_x86_movbe, [dnl + libc_cv_have_x86_movbe=no +- if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -q "\-mmovbe"; then ++ if AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null) | grep -qE '(-mmovbe\b|-march=x86-64-v(@<:@3-9@:>@|@<:@1-9@:>@@<:@0-9@:>@))'; then + libc_cv_have_x86_movbe=yes + fi]) + if test $libc_cv_have_x86_movbe = yes; then diff --git a/SOURCES/glibc-rh2040657-5.patch b/SOURCES/glibc-rh2040657-5.patch new file mode 100644 index 0000000..bf5343e --- /dev/null +++ b/SOURCES/glibc-rh2040657-5.patch @@ -0,0 +1,32 @@ +commit ef7c6d42fe163a5e49a478c43e655ce4633fa5ba +Author: Florian Weimer +Date: Fri Jan 14 16:09:20 2022 +0100 + + Generate gcc-macros.h + + The file can be used to check the effect of the default compiler + flags on code generation even in areas of the build that uses + non-default compiler flags. + + Reviewed-by: H.J. Lu + +diff --git a/Makeconfig b/Makeconfig +index 8bc5540292c7b6fa..99898a632a64be91 100644 +--- a/Makeconfig ++++ b/Makeconfig +@@ -1202,6 +1202,15 @@ $(common-objpfx)dl-tunable-list.stmp: \ + touch $@ + endif + ++# Dump the GCC macros used by the default compiler flags to a header ++# file, so that they can be inspected when using different compiler ++# flags. Add the GCCMACRO prefix to make these macro names unique. ++$(common-objpfx)gcc-macros.h.in: $(common-objpfx)config.status ++ $(CC) $(CFLAGS) $(CPPFLAGS) -E -dM -x c -o $@ /dev/null ++$(common-objpfx)gcc-macros.h: $(common-objpfx)gcc-macros.h.in ++ sed 's/^#define /#define GCCMACRO/' < $< > $@ ++before-compile += $(common-objpfx)gcc-macros.h ++ + # Generate version maps, but wait until sysdep-subdirs is known + ifeq ($(sysd-sorted-done),t) + ifeq ($(build-shared),yes) diff --git a/SOURCES/glibc-rh2040657-6.patch b/SOURCES/glibc-rh2040657-6.patch new file mode 100644 index 0000000..15caf1d --- /dev/null +++ b/SOURCES/glibc-rh2040657-6.patch @@ -0,0 +1,549 @@ +commit 7de01e60c200c431d3469deb784da8fd4508fc15 +Author: Florian Weimer +Date: Fri Jan 14 20:16:05 2022 +0100 + + elf/Makefile: Reflow and sort most variable assignments + + Reviewed-by: H.J. Lu + +Conflicts: + elf/Makefile + (Usual backporting differences. LLD support is missing + downstream.) + +diff --git a/elf/Makefile b/elf/Makefile +index 5b9c36bc6f0a3ee5..124905f96c88ab53 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -21,21 +21,62 @@ subdir := elf + + include ../Makeconfig + +-headers = elf.h bits/elfclass.h link.h bits/link.h +-routines = $(all-dl-routines) dl-support dl-iteratephdr \ +- dl-addr dl-addr-obj enbl-secure dl-profstub \ +- dl-origin dl-libc dl-sym dl-sysdep dl-error \ +- dl-reloc-static-pie libc_early_init rtld_static_init ++headers = \ ++ bits/elfclass.h \ ++ bits/link.h \ ++ elf.h \ ++ link.h \ ++ # headers ++ ++routines = \ ++ $(all-dl-routines) \ ++ dl-addr \ ++ dl-addr-obj \ ++ dl-error \ ++ dl-iteratephdr \ ++ dl-libc \ ++ dl-origin \ ++ dl-profstub \ ++ dl-reloc-static-pie \ ++ dl-support \ ++ dl-sym \ ++ dl-sysdep \ ++ enbl-secure \ ++ libc_early_init \ ++ rtld_static_init \ ++ # routines + + # The core dynamic linking functions are in libc for the static and + # profiled libraries. +-dl-routines = $(addprefix dl-,load lookup object reloc deps \ +- runtime init fini debug misc \ +- version profile tls origin scope \ +- execstack open close trampoline \ +- exception sort-maps lookup-direct \ +- call-libc-early-init write \ +- thread_gscope_wait tls_init_tp) ++dl-routines = \ ++ dl-call-libc-early-init \ ++ dl-close \ ++ dl-debug \ ++ dl-deps \ ++ dl-exception \ ++ dl-execstack \ ++ dl-fini \ ++ dl-init \ ++ dl-load \ ++ dl-lookup \ ++ dl-lookup-direct \ ++ dl-misc \ ++ dl-object \ ++ dl-open \ ++ dl-origin \ ++ dl-profile \ ++ dl-reloc \ ++ dl-runtime \ ++ dl-scope \ ++ dl-sort-maps \ ++ dl-thread_gscope_wait \ ++ dl-tls \ ++ dl-tls_init_tp \ ++ dl-trampoline \ ++ dl-version \ ++ dl-write \ ++ # dl-routines ++ + ifeq (yes,$(use-ldconfig)) + dl-routines += dl-cache + endif +@@ -58,16 +99,38 @@ endif + + all-dl-routines = $(dl-routines) $(sysdep-dl-routines) + # But they are absent from the shared libc, because that code is in ld.so. +-elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin \ +- dl-sysdep dl-exception dl-reloc-static-pie \ +- thread_gscope_wait rtld_static_init ++elide-routines.os = \ ++ $(all-dl-routines) \ ++ dl-exception \ ++ dl-origin \ ++ dl-reloc-static-pie \ ++ dl-support \ ++ dl-sysdep \ ++ enbl-secure \ ++ rtld_static_init \ ++ thread_gscope_wait \ ++ # elide-routines.os + + # ld.so uses those routines, plus some special stuff for being the program + # interpreter and operating independent of libc. +-rtld-routines = rtld $(all-dl-routines) dl-sysdep dl-environ dl-minimal \ +- dl-error-minimal dl-conflict dl-hwcaps dl-hwcaps_split dl-hwcaps-subdirs \ +- dl-usage dl-diagnostics dl-diagnostics-kernel dl-diagnostics-cpu \ +- dl-mutex ++rtld-routines = \ ++ $(all-dl-routines) \ ++ dl-conflict \ ++ dl-diagnostics \ ++ dl-diagnostics-cpu \ ++ dl-diagnostics-kernel \ ++ dl-environ \ ++ dl-error-minimal \ ++ dl-hwcaps \ ++ dl-hwcaps-subdirs \ ++ dl-hwcaps_split \ ++ dl-minimal \ ++ dl-mutex \ ++ dl-sysdep \ ++ dl-usage \ ++ rtld \ ++ # rtld-routines ++ + all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines) + + CFLAGS-dl-runtime.c += -fexceptions -fasynchronous-unwind-tables +@@ -102,8 +165,16 @@ ld-map = $(common-objpfx)ld.map + endif + + ifeq (yes,$(build-shared)) +-extra-objs = $(all-rtld-routines:%=%.os) sofini.os interp.os +-generated += librtld.os dl-allobjs.os ld.so ldd ++extra-objs = \ ++ $(all-rtld-routines:%=%.os) \ ++ sofini.os \ ++ interp.os \ ++ # extra-objs ++generated += \ ++ dl-allobjs.os \ ++ ld.so ldd \ ++ librtld.os \ ++ # generated + install-others = $(inst_rtlddir)/$(rtld-installed-name) $(inst_bindir)/ld.so + install-bin-script = ldd + endif +@@ -121,8 +192,15 @@ others-static += ldconfig + others += ldconfig + install-rootsbin += ldconfig + +-ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon static-stubs \ +- stringtable ++ldconfig-modules := \ ++ cache \ ++ chroot_canon \ ++ readlib \ ++ static-stubs \ ++ stringtable \ ++ xmalloc \ ++ xstrdup \ ++ # ldconfig-modules + extra-objs += $(ldconfig-modules:=.o) + others-extras = $(ldconfig-modules) + endif +@@ -156,23 +234,36 @@ $(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force) + $(do-install-program) + endif + +-tests-static-normal := tst-array1-static tst-array5-static \ +- tst-dl-iter-static \ +- tst-tlsalign-static tst-tlsalign-extern-static \ +- tst-linkall-static tst-env-setuid tst-env-setuid-tunables \ +- tst-single_threaded-static tst-single_threaded-pthread-static \ +- tst-dst-static tst-getauxval-static +- +-tests-static-internal := tst-tls1-static tst-tls2-static \ +- tst-ptrguard1-static tst-stackguard1-static \ +- tst-tls1-static-non-pie ++tests-static-normal := \ ++ tst-array1-static \ ++ tst-array5-static \ ++ tst-dl-iter-static \ ++ tst-dst-static \ ++ tst-env-setuid \ ++ tst-env-setuid-tunables \ ++ tst-getauxval-static \ ++ tst-linkall-static \ ++ tst-single_threaded-pthread-static \ ++ tst-single_threaded-static \ ++ tst-tlsalign-extern-static \ ++ tst-tlsalign-static \ ++ # tests-static-normal ++ ++tests-static-internal := \ ++ tst-ptrguard1-static \ ++ tst-stackguard1-static \ ++ tst-tls1-static \ ++ tst-tls2-static \ ++ tst-tls1-static-non-pie \ ++ # tests-static-internal + + CRT-tst-tls1-static-non-pie := $(csu-objpfx)crt1.o + tst-tls1-static-non-pie-no-pie = yes + + tests-container := \ +- tst-ldconfig-bad-aux-cache \ +- tst-ldconfig-ld_so_conf-update ++ tst-ldconfig-bad-aux-cache \ ++ tst-ldconfig-ld_so_conf-update \ ++ # tests-container + + ifeq (no,$(build-hardcoded-path-in-tests)) + # This is an ld.so.cache test, and RPATH/RUNPATH in the executable +@@ -180,14 +271,32 @@ ifeq (no,$(build-hardcoded-path-in-tests)) + tests-container += tst-glibc-hwcaps-prepend-cache + endif + +-tests := tst-tls9 tst-leaks1 \ +- tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 \ +- tst-auxv tst-stringtable +-tests-internal := tst-tls1 tst-tls2 $(tests-static-internal) ++tests := \ ++ tst-array1 \ ++ tst-array2 \ ++ tst-array3 \ ++ tst-array4 \ ++ tst-array5 \ ++ tst-auxv \ ++ tst-leaks1 \ ++ tst-stringtable \ ++ tst-tls9 \ ++ # tests ++ ++tests-internal := \ ++ $(tests-static-internal) \ ++ tst-tls1 \ ++ tst-tls2 \ ++ # tests-internal ++ + tests-static := $(tests-static-normal) $(tests-static-internal) + + ifeq (yes,$(build-shared)) +-tests-static += tst-tls9-static tst-single_threaded-static-dlopen ++tests-static += \ ++ tst-single_threaded-static-dlopen \ ++ tst-tls9-static \ ++ # tests-static ++ + static-dlopen-environment = \ + LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx)dlfcn + tst-tls9-static-ENV = $(static-dlopen-environment) +@@ -313,33 +422,69 @@ tests += \ + unload6 \ + unload7 \ + unload8 \ +-# reldep9 ++ # tests + tests-cxx = \ + tst-dlopen-nodelete-reloc \ + tst-nodelete \ + tst-unique3 \ + tst-unique4 \ +-# tests-cxx ++ # tests-cxx + + tests += $(if $(CXX),$(tests-cxx)) +-tests-internal += loadtest unload unload2 circleload1 \ +- neededtest neededtest2 neededtest3 neededtest4 \ +- tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \ +- tst-ptrguard1 tst-stackguard1 \ +- tst-create_format1 tst-tls-surplus tst-dl-hwcaps_split +-tests-container += tst-pldd tst-dlopen-tlsmodid-container \ +- tst-dlopen-self-container tst-preload-pthread-libc +-test-srcs = tst-pathopt ++ ++tests-internal += \ ++ circleload1 \ ++ loadtest \ ++ neededtest \ ++ neededtest2 \ ++ neededtest3 \ ++ neededtest4 \ ++ tst-create_format1 \ ++ tst-dl-hwcaps_split \ ++ tst-dlmopen2 \ ++ tst-ptrguard1 \ ++ tst-stackguard1 \ ++ tst-tls-surplus \ ++ tst-tls3 \ ++ tst-tls6 \ ++ tst-tls7 \ ++ tst-tls8 \ ++ unload \ ++ unload2 \ ++ # tests-internal ++ ++tests-container += \ ++ tst-dlopen-self-container \ ++ tst-dlopen-tlsmodid-container \ ++ tst-pldd \ ++ tst-preload-pthread-libc \ ++ # tests-container ++ ++test-srcs = \ ++ tst-pathopt \ ++ # tests-srcs ++ ++ifeq (yes,$(have-fpie)) ++tests-pie += tst-align3 ++endif + selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null) ++ + ifneq ($(selinux-enabled),1) +-tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog ++tests-execstack-yes = \ ++ tst-execstack \ ++ tst-execstack-needed \ ++ tst-execstack-prog \ ++ # tests-execstack-yes + endif + endif + tests += $(tests-execstack-$(have-z-execstack)) + ifeq ($(run-built-tests),yes) +-tests-special += $(objpfx)tst-leaks1-mem.out \ +- $(objpfx)noload-mem.out \ +- $(objpfx)tst-ldconfig-X.out $(objpfx)tst-rtld-help.out ++tests-special += \ ++ $(objpfx)noload-mem.out \ ++ $(objpfx)tst-ldconfig-X.out \ ++ $(objpfx)tst-leaks1-mem.out \ ++ $(objpfx)tst-rtld-help.out \ ++ # tests-special + endif + tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 +@@ -356,9 +501,16 @@ tst-tls-many-dynamic-modules-dep = \ + tst-tls-many-dynamic-modules-dep-bad-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + tst-tls-many-dynamic-modules-dep-bad = \ + $(foreach n,$(tst-tls-many-dynamic-modules-dep-bad-suffixes),tst-tls-manydynamic$(n)mod-dep-bad) +-extra-test-objs += $(tlsmod17a-modules:=.os) $(tlsmod18a-modules:=.os) \ +- tst-tlsalign-vars.o +-test-extras += tst-tlsmod17a tst-tlsmod18a tst-tlsalign-vars ++extra-test-objs += \ ++ $(tlsmod17a-modules:=.os) \ ++ $(tlsmod18a-modules:=.os) \ ++ tst-tlsalign-vars.o \ ++ # extra-test-objs ++test-extras += \ ++ tst-tlsalign-vars \ ++ tst-tlsmod17a \ ++ tst-tlsmod18a \ ++ # test-extras + modules-names = \ + circlemod1 \ + circlemod1a \ +@@ -610,17 +762,17 @@ modules-names-cxx = \ + tst-unique3lib \ + tst-unique3lib2 \ + tst-unique4lib \ +-# modules-names-cxx ++ # modules-names-cxx + + modules-names += \ + $(if $(CXX),$(modules-names-cxx)) \ + $(modules-execstack-$(have-z-execstack)) \ ++ $(tlsmod17a-modules) \ ++ $(tlsmod18a-modules) \ + $(tst-tls-many-dynamic-modules) \ + $(tst-tls-many-dynamic-modules-dep) \ + $(tst-tls-many-dynamic-modules-dep-bad) \ +- $(tlsmod17a-modules) \ +- $(tlsmod18a-modules) \ +-# modules-names ++ # modules-names + + # Most modules build with _ISOMAC defined, but those filtered out + # depend on internal headers. +@@ -669,35 +821,70 @@ modules-names-nobuild := filtmod1 tst-big-note-lib tst-ro-dynamic-mod + tests += $(tests-static) + + ifeq (yes,$(have-ifunc)) +-tests-ifuncstatic := ifuncmain1static ifuncmain1picstatic \ +- ifuncmain2static ifuncmain2picstatic \ +- ifuncmain4static ifuncmain4picstatic \ +- ifuncmain5static ifuncmain5picstatic \ +- ifuncmain7static ifuncmain7picstatic ++tests-ifuncstatic := \ ++ ifuncmain1static \ ++ ifuncmain1picstatic \ ++ ifuncmain2static \ ++ ifuncmain2picstatic \ ++ ifuncmain4static \ ++ ifuncmain4picstatic \ ++ ifuncmain5static \ ++ ifuncmain5picstatic \ ++ ifuncmain7static \ ++ ifuncmain7picstatic \ ++ # tests-ifuncstatic + ifeq (yes,$(have-gcc-ifunc)) + tests-ifuncstatic += ifuncmain9static ifuncmain9picstatic + endif + tests-static += $(tests-ifuncstatic) + tests-internal += $(tests-ifuncstatic) + ifeq (yes,$(build-shared)) +-tests += tst-ifunc-fault-lazy tst-ifunc-fault-bindnow ++tests += \ ++ tst-ifunc-fault-bindnow \ ++ tst-ifunc-fault-lazy \ ++ # tests + # Note: sysdeps/x86_64/ifuncmain8.c uses ifuncmain8. + tests-internal += \ +- ifuncmain1 ifuncmain1pic ifuncmain1vis ifuncmain1vispic \ +- ifuncmain1staticpic \ +- ifuncmain2 ifuncmain2pic ifuncmain3 ifuncmain4 \ +- ifuncmain5 ifuncmain5pic ifuncmain5staticpic \ +- ifuncmain7 ifuncmain7pic ++ ifuncmain1 \ ++ ifuncmain1pic \ ++ ifuncmain1staticpic \ ++ ifuncmain1vis \ ++ ifuncmain1vispic \ ++ ifuncmain2 \ ++ ifuncmain2pic \ ++ ifuncmain3 \ ++ ifuncmain4 \ ++ ifuncmain5 \ ++ ifuncmain5pic \ ++ ifuncmain5staticpic \ ++ ifuncmain7 \ ++ ifuncmain7pic \ ++ # tests-internal + ifeq (yes,$(have-gcc-ifunc)) +-tests-internal += ifuncmain9 ifuncmain9pic ++tests-internal += \ ++ ifuncmain9 \ ++ ifuncmain9pic \ ++ # tests-internal + endif +-ifunc-test-modules = ifuncdep1 ifuncdep1pic ifuncdep2 ifuncdep2pic \ +- ifuncdep5 ifuncdep5pic ++ifunc-test-modules = \ ++ ifuncdep1 \ ++ ifuncdep1pic \ ++ ifuncdep2 \ ++ ifuncdep2pic \ ++ ifuncdep5 \ ++ ifuncdep5pic \ ++ # ifunc-test-modules + extra-test-objs += $(ifunc-test-modules:=.o) + test-internal-extras += $(ifunc-test-modules) + ifeq (yes,$(have-fpie)) +-ifunc-pie-tests = ifuncmain1pie ifuncmain1vispie ifuncmain1staticpie \ +- ifuncmain5pie ifuncmain6pie ifuncmain7pie ++ifunc-pie-tests = \ ++ ifuncmain1pie \ ++ ifuncmain1staticpie \ ++ ifuncmain1vispie \ ++ ifuncmain5pie \ ++ ifuncmain6pie \ ++ ifuncmain7pie \ ++ # ifunc-pie-tests + ifeq (yes,$(have-gcc-ifunc)) + ifunc-pie-tests += ifuncmain9pie + endif +@@ -707,30 +894,50 @@ endif + tests-internal += $(ifunc-pie-tests) + tests-pie += $(ifunc-pie-tests) + endif +-modules-names += ifuncmod1 ifuncmod3 ifuncmod5 ifuncmod6 ++modules-names += \ ++ ifuncmod1 \ ++ ifuncmod3 \ ++ ifuncmod5 \ ++ ifuncmod6 \ ++ # module-names + endif + endif + + ifeq (yes,$(build-shared)) + ifeq ($(run-built-tests),yes) +-tests-special += $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out \ +- $(objpfx)tst-rtld-preload.out $(objpfx)argv0test.out \ +- $(objpfx)tst-rtld-help.out ++tests-special += \ ++ $(objpfx)argv0test.out \ ++ $(objpfx)tst-pathopt.out \ ++ $(objpfx)tst-rtld-help.out \ ++ $(objpfx)tst-rtld-load-self.out \ ++ $(objpfx)tst-rtld-preload.out \ ++ # tests-special + endif +-tests-special += $(objpfx)check-textrel.out $(objpfx)check-execstack.out \ +- $(objpfx)check-wx-segment.out \ +- $(objpfx)check-localplt.out $(objpfx)check-initfini.out ++tests-special += \ ++ $(objpfx)check-execstack.out \ ++ $(objpfx)check-initfini.out \ ++ $(objpfx)check-localplt.out \ ++ $(objpfx)check-textrel.out \ ++ $(objpfx)check-wx-segment.out \ ++ # tests-special + endif + + ifeq ($(run-built-tests),yes) +-tests-special += $(objpfx)order-cmp.out $(objpfx)tst-array1-cmp.out \ +- $(objpfx)tst-array1-static-cmp.out \ +- $(objpfx)tst-array2-cmp.out $(objpfx)tst-array3-cmp.out \ +- $(objpfx)tst-array4-cmp.out $(objpfx)tst-array5-cmp.out \ +- $(objpfx)tst-array5-static-cmp.out $(objpfx)order2-cmp.out \ +- $(objpfx)tst-initorder-cmp.out \ +- $(objpfx)tst-initorder2-cmp.out $(objpfx)tst-unused-dep.out \ +- $(objpfx)tst-unused-dep-cmp.out ++tests-special += \ ++ $(objpfx)order-cmp.out \ ++ $(objpfx)order2-cmp.out \ ++ $(objpfx)tst-array1-cmp.out \ ++ $(objpfx)tst-array1-static-cmp.out \ ++ $(objpfx)tst-array2-cmp.out \ ++ $(objpfx)tst-array3-cmp.out \ ++ $(objpfx)tst-array4-cmp.out \ ++ $(objpfx)tst-array5-cmp.out \ ++ $(objpfx)tst-array5-static-cmp.out \ ++ $(objpfx)tst-initorder-cmp.out \ ++ $(objpfx)tst-initorder2-cmp.out \ ++ $(objpfx)tst-unused-dep-cmp.out \ ++ $(objpfx)tst-unused-dep.out \ ++ # tests-special + endif + + ifndef avoid-generated +@@ -835,6 +1042,7 @@ rtld-stubbed-symbols = \ + free \ + malloc \ + realloc \ ++ # rtld-stubbed-symbols + + ifeq ($(have-ssp),yes) + # rtld is not built with the stack protector, so these references will diff --git a/SOURCES/glibc-rh2040657-7.patch b/SOURCES/glibc-rh2040657-7.patch new file mode 100644 index 0000000..1189326 --- /dev/null +++ b/SOURCES/glibc-rh2040657-7.patch @@ -0,0 +1,633 @@ +commit b693d75f0c611bce9b0ad984bad306121d42c535 +Author: Florian Weimer +Date: Fri Jan 14 20:16:05 2022 +0100 + + elf: Split dl-printf.c from dl-misc.c + + This allows to use different compiler flags for the diagnostics + code. + + Reviewed-by: H.J. Lu + +diff --git a/elf/Makefile b/elf/Makefile +index 124905f96c88ab53..52aafc89cec835ab 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -64,6 +64,7 @@ dl-routines = \ + dl-object \ + dl-open \ + dl-origin \ ++ dl-printf \ + dl-profile \ + dl-reloc \ + dl-runtime \ +diff --git a/elf/dl-misc.c b/elf/dl-misc.c +index b256d792c6198683..f17140b129343f7b 100644 +--- a/elf/dl-misc.c ++++ b/elf/dl-misc.c +@@ -16,24 +16,16 @@ + License along with the GNU C Library; if not, see + . */ + +-#include ++#include <_itoa.h> + #include + #include +-#include + #include +-#include +-#include +-#include +-#include ++#include + #include ++#include + #include +-#include + #include +-#include +-#include +-#include <_itoa.h> +-#include +-#include ++#include + + /* Read the whole contents of FILE into new mmap'd space with given + protections. *SIZEP gets the size of the file. On error MAP_FAILED +@@ -70,270 +62,6 @@ _dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot) + return result; + } + +- +-/* Bare-bones printf implementation. This function only knows about +- the formats and flags needed and can handle only up to 64 stripes in +- the output. */ +-static void +-_dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg) +-{ +-# define NIOVMAX 64 +- struct iovec iov[NIOVMAX]; +- int niov = 0; +- pid_t pid = 0; +- char pidbuf[12]; +- +- while (*fmt != '\0') +- { +- const char *startp = fmt; +- +- if (tag_p > 0) +- { +- /* Generate the tag line once. It consists of the PID and a +- colon followed by a tab. */ +- if (pid == 0) +- { +- char *p; +- pid = __getpid (); +- assert (pid >= 0 && sizeof (pid_t) <= 4); +- p = _itoa (pid, &pidbuf[10], 10, 0); +- while (p > pidbuf) +- *--p = ' '; +- pidbuf[10] = ':'; +- pidbuf[11] = '\t'; +- } +- +- /* Append to the output. */ +- assert (niov < NIOVMAX); +- iov[niov].iov_len = 12; +- iov[niov++].iov_base = pidbuf; +- +- /* No more tags until we see the next newline. */ +- tag_p = -1; +- } +- +- /* Skip everything except % and \n (if tags are needed). */ +- while (*fmt != '\0' && *fmt != '%' && (! tag_p || *fmt != '\n')) +- ++fmt; +- +- /* Append constant string. */ +- assert (niov < NIOVMAX); +- if ((iov[niov].iov_len = fmt - startp) != 0) +- iov[niov++].iov_base = (char *) startp; +- +- if (*fmt == '%') +- { +- /* It is a format specifier. */ +- char fill = ' '; +- int width = -1; +- int prec = -1; +-#if LONG_MAX != INT_MAX +- int long_mod = 0; +-#endif +- +- /* Recognize zero-digit fill flag. */ +- if (*++fmt == '0') +- { +- fill = '0'; +- ++fmt; +- } +- +- /* See whether with comes from a parameter. Note that no other +- way to specify the width is implemented. */ +- if (*fmt == '*') +- { +- width = va_arg (arg, int); +- ++fmt; +- } +- +- /* Handle precision. */ +- if (*fmt == '.' && fmt[1] == '*') +- { +- prec = va_arg (arg, int); +- fmt += 2; +- } +- +- /* Recognize the l modifier. It is only important on some +- platforms where long and int have a different size. We +- can use the same code for size_t. */ +- if (*fmt == 'l' || *fmt == 'Z') +- { +-#if LONG_MAX != INT_MAX +- long_mod = 1; +-#endif +- ++fmt; +- } +- +- switch (*fmt) +- { +- /* Integer formatting. */ +- case 'd': +- case 'u': +- case 'x': +- { +- /* We have to make a difference if long and int have a +- different size. */ +-#if LONG_MAX != INT_MAX +- unsigned long int num = (long_mod +- ? va_arg (arg, unsigned long int) +- : va_arg (arg, unsigned int)); +-#else +- unsigned long int num = va_arg (arg, unsigned int); +-#endif +- bool negative = false; +- if (*fmt == 'd') +- { +-#if LONG_MAX != INT_MAX +- if (long_mod) +- { +- if ((long int) num < 0) +- negative = true; +- } +- else +- { +- if ((int) num < 0) +- { +- num = (unsigned int) num; +- negative = true; +- } +- } +-#else +- if ((int) num < 0) +- negative = true; +-#endif +- } +- +- /* We use alloca() to allocate the buffer with the most +- pessimistic guess for the size. Using alloca() allows +- having more than one integer formatting in a call. */ +- char *buf = (char *) alloca (1 + 3 * sizeof (unsigned long int)); +- char *endp = &buf[1 + 3 * sizeof (unsigned long int)]; +- char *cp = _itoa (num, endp, *fmt == 'x' ? 16 : 10, 0); +- +- /* Pad to the width the user specified. */ +- if (width != -1) +- while (endp - cp < width) +- *--cp = fill; +- +- if (negative) +- *--cp = '-'; +- +- iov[niov].iov_base = cp; +- iov[niov].iov_len = endp - cp; +- ++niov; +- } +- break; +- +- case 's': +- /* Get the string argument. */ +- iov[niov].iov_base = va_arg (arg, char *); +- iov[niov].iov_len = strlen (iov[niov].iov_base); +- if (prec != -1) +- iov[niov].iov_len = MIN ((size_t) prec, iov[niov].iov_len); +- ++niov; +- break; +- +- case '%': +- iov[niov].iov_base = (void *) fmt; +- iov[niov].iov_len = 1; +- ++niov; +- break; +- +- default: +- assert (! "invalid format specifier"); +- } +- ++fmt; +- } +- else if (*fmt == '\n') +- { +- /* See whether we have to print a single newline character. */ +- if (fmt == startp) +- { +- iov[niov].iov_base = (char *) startp; +- iov[niov++].iov_len = 1; +- } +- else +- /* No, just add it to the rest of the string. */ +- ++iov[niov - 1].iov_len; +- +- /* Next line, print a tag again. */ +- tag_p = 1; +- ++fmt; +- } +- } +- +- /* Finally write the result. */ +- _dl_writev (fd, iov, niov); +-} +- +- +-/* Write to debug file. */ +-void +-_dl_debug_printf (const char *fmt, ...) +-{ +- va_list arg; +- +- va_start (arg, fmt); +- _dl_debug_vdprintf (GLRO(dl_debug_fd), 1, fmt, arg); +- va_end (arg); +-} +- +- +-/* Write to debug file but don't start with a tag. */ +-void +-_dl_debug_printf_c (const char *fmt, ...) +-{ +- va_list arg; +- +- va_start (arg, fmt); +- _dl_debug_vdprintf (GLRO(dl_debug_fd), -1, fmt, arg); +- va_end (arg); +-} +- +- +-/* Write the given file descriptor. */ +-void +-_dl_dprintf (int fd, const char *fmt, ...) +-{ +- va_list arg; +- +- va_start (arg, fmt); +- _dl_debug_vdprintf (fd, 0, fmt, arg); +- va_end (arg); +-} +- +-void +-_dl_printf (const char *fmt, ...) +-{ +- va_list arg; +- +- va_start (arg, fmt); +- _dl_debug_vdprintf (STDOUT_FILENO, 0, fmt, arg); +- va_end (arg); +-} +- +-void +-_dl_error_printf (const char *fmt, ...) +-{ +- va_list arg; +- +- va_start (arg, fmt); +- _dl_debug_vdprintf (STDERR_FILENO, 0, fmt, arg); +- va_end (arg); +-} +- +-void +-_dl_fatal_printf (const char *fmt, ...) +-{ +- va_list arg; +- +- va_start (arg, fmt); +- _dl_debug_vdprintf (STDERR_FILENO, 0, fmt, arg); +- va_end (arg); +- _exit (127); +-} +-rtld_hidden_def (_dl_fatal_printf) +- + /* Test whether given NAME matches any of the names of the given object. */ + int + _dl_name_match_p (const char *name, const struct link_map *map) +@@ -354,7 +82,6 @@ _dl_name_match_p (const char *name, const struct link_map *map) + return 0; + } + +- + unsigned long int + _dl_higher_prime_number (unsigned long int n) + { +diff --git a/elf/dl-printf.c b/elf/dl-printf.c +new file mode 100644 +index 0000000000000000..d3264ba96cd959bf +--- /dev/null ++++ b/elf/dl-printf.c +@@ -0,0 +1,292 @@ ++/* printf implementation for the dynamic loader. ++ Copyright (C) 1997-2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include <_itoa.h> ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Bare-bones printf implementation. This function only knows about ++ the formats and flags needed and can handle only up to 64 stripes in ++ the output. */ ++static void ++_dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg) ++{ ++# define NIOVMAX 64 ++ struct iovec iov[NIOVMAX]; ++ int niov = 0; ++ pid_t pid = 0; ++ char pidbuf[12]; ++ ++ while (*fmt != '\0') ++ { ++ const char *startp = fmt; ++ ++ if (tag_p > 0) ++ { ++ /* Generate the tag line once. It consists of the PID and a ++ colon followed by a tab. */ ++ if (pid == 0) ++ { ++ char *p; ++ pid = __getpid (); ++ assert (pid >= 0 && sizeof (pid_t) <= 4); ++ p = _itoa (pid, &pidbuf[10], 10, 0); ++ while (p > pidbuf) ++ *--p = ' '; ++ pidbuf[10] = ':'; ++ pidbuf[11] = '\t'; ++ } ++ ++ /* Append to the output. */ ++ assert (niov < NIOVMAX); ++ iov[niov].iov_len = 12; ++ iov[niov++].iov_base = pidbuf; ++ ++ /* No more tags until we see the next newline. */ ++ tag_p = -1; ++ } ++ ++ /* Skip everything except % and \n (if tags are needed). */ ++ while (*fmt != '\0' && *fmt != '%' && (! tag_p || *fmt != '\n')) ++ ++fmt; ++ ++ /* Append constant string. */ ++ assert (niov < NIOVMAX); ++ if ((iov[niov].iov_len = fmt - startp) != 0) ++ iov[niov++].iov_base = (char *) startp; ++ ++ if (*fmt == '%') ++ { ++ /* It is a format specifier. */ ++ char fill = ' '; ++ int width = -1; ++ int prec = -1; ++#if LONG_MAX != INT_MAX ++ int long_mod = 0; ++#endif ++ ++ /* Recognize zero-digit fill flag. */ ++ if (*++fmt == '0') ++ { ++ fill = '0'; ++ ++fmt; ++ } ++ ++ /* See whether with comes from a parameter. Note that no other ++ way to specify the width is implemented. */ ++ if (*fmt == '*') ++ { ++ width = va_arg (arg, int); ++ ++fmt; ++ } ++ ++ /* Handle precision. */ ++ if (*fmt == '.' && fmt[1] == '*') ++ { ++ prec = va_arg (arg, int); ++ fmt += 2; ++ } ++ ++ /* Recognize the l modifier. It is only important on some ++ platforms where long and int have a different size. We ++ can use the same code for size_t. */ ++ if (*fmt == 'l' || *fmt == 'Z') ++ { ++#if LONG_MAX != INT_MAX ++ long_mod = 1; ++#endif ++ ++fmt; ++ } ++ ++ switch (*fmt) ++ { ++ /* Integer formatting. */ ++ case 'd': ++ case 'u': ++ case 'x': ++ { ++ /* We have to make a difference if long and int have a ++ different size. */ ++#if LONG_MAX != INT_MAX ++ unsigned long int num = (long_mod ++ ? va_arg (arg, unsigned long int) ++ : va_arg (arg, unsigned int)); ++#else ++ unsigned long int num = va_arg (arg, unsigned int); ++#endif ++ bool negative = false; ++ if (*fmt == 'd') ++ { ++#if LONG_MAX != INT_MAX ++ if (long_mod) ++ { ++ if ((long int) num < 0) ++ negative = true; ++ } ++ else ++ { ++ if ((int) num < 0) ++ { ++ num = (unsigned int) num; ++ negative = true; ++ } ++ } ++#else ++ if ((int) num < 0) ++ negative = true; ++#endif ++ } ++ ++ /* We use alloca() to allocate the buffer with the most ++ pessimistic guess for the size. Using alloca() allows ++ having more than one integer formatting in a call. */ ++ char *buf = (char *) alloca (1 + 3 * sizeof (unsigned long int)); ++ char *endp = &buf[1 + 3 * sizeof (unsigned long int)]; ++ char *cp = _itoa (num, endp, *fmt == 'x' ? 16 : 10, 0); ++ ++ /* Pad to the width the user specified. */ ++ if (width != -1) ++ while (endp - cp < width) ++ *--cp = fill; ++ ++ if (negative) ++ *--cp = '-'; ++ ++ iov[niov].iov_base = cp; ++ iov[niov].iov_len = endp - cp; ++ ++niov; ++ } ++ break; ++ ++ case 's': ++ /* Get the string argument. */ ++ iov[niov].iov_base = va_arg (arg, char *); ++ iov[niov].iov_len = strlen (iov[niov].iov_base); ++ if (prec != -1) ++ iov[niov].iov_len = MIN ((size_t) prec, iov[niov].iov_len); ++ ++niov; ++ break; ++ ++ case '%': ++ iov[niov].iov_base = (void *) fmt; ++ iov[niov].iov_len = 1; ++ ++niov; ++ break; ++ ++ default: ++ assert (! "invalid format specifier"); ++ } ++ ++fmt; ++ } ++ else if (*fmt == '\n') ++ { ++ /* See whether we have to print a single newline character. */ ++ if (fmt == startp) ++ { ++ iov[niov].iov_base = (char *) startp; ++ iov[niov++].iov_len = 1; ++ } ++ else ++ /* No, just add it to the rest of the string. */ ++ ++iov[niov - 1].iov_len; ++ ++ /* Next line, print a tag again. */ ++ tag_p = 1; ++ ++fmt; ++ } ++ } ++ ++ /* Finally write the result. */ ++ _dl_writev (fd, iov, niov); ++} ++ ++ ++/* Write to debug file. */ ++void ++_dl_debug_printf (const char *fmt, ...) ++{ ++ va_list arg; ++ ++ va_start (arg, fmt); ++ _dl_debug_vdprintf (GLRO(dl_debug_fd), 1, fmt, arg); ++ va_end (arg); ++} ++ ++ ++/* Write to debug file but don't start with a tag. */ ++void ++_dl_debug_printf_c (const char *fmt, ...) ++{ ++ va_list arg; ++ ++ va_start (arg, fmt); ++ _dl_debug_vdprintf (GLRO(dl_debug_fd), -1, fmt, arg); ++ va_end (arg); ++} ++ ++ ++/* Write the given file descriptor. */ ++void ++_dl_dprintf (int fd, const char *fmt, ...) ++{ ++ va_list arg; ++ ++ va_start (arg, fmt); ++ _dl_debug_vdprintf (fd, 0, fmt, arg); ++ va_end (arg); ++} ++ ++void ++_dl_printf (const char *fmt, ...) ++{ ++ va_list arg; ++ ++ va_start (arg, fmt); ++ _dl_debug_vdprintf (STDOUT_FILENO, 0, fmt, arg); ++ va_end (arg); ++} ++ ++void ++_dl_error_printf (const char *fmt, ...) ++{ ++ va_list arg; ++ ++ va_start (arg, fmt); ++ _dl_debug_vdprintf (STDERR_FILENO, 0, fmt, arg); ++ va_end (arg); ++} ++ ++void ++_dl_fatal_printf (const char *fmt, ...) ++{ ++ va_list arg; ++ ++ va_start (arg, fmt); ++ _dl_debug_vdprintf (STDERR_FILENO, 0, fmt, arg); ++ va_end (arg); ++ _exit (127); ++} ++rtld_hidden_def (_dl_fatal_printf) diff --git a/SOURCES/glibc-rh2040657-8.patch b/SOURCES/glibc-rh2040657-8.patch new file mode 100644 index 0000000..7eabbc4 --- /dev/null +++ b/SOURCES/glibc-rh2040657-8.patch @@ -0,0 +1,146 @@ +commit 9ba202c78f0aa39f49929eee63c367847da72ee4 +Author: Florian Weimer +Date: Fri Jan 14 20:16:05 2022 +0100 + + Add --with-rtld-early-cflags configure option + + Reviewed-by: H.J. Lu + Reviewed-by: Carlos O'Donell + +Conflicts: + INSTALL + configure + manual/install.texi + (Missing --with-timeout-factor downstream.) + +diff --git a/INSTALL b/INSTALL +index d6d93ec9be4262d7..d8d4e9f155f56616 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -106,6 +106,14 @@ if 'CFLAGS' is specified it must enable optimization. For example: + particular case and potentially change debugging information and + metadata only). + ++'--with-rtld-early-cflags=CFLAGS' ++ Use additional compiler flags CFLAGS to build the early startup ++ code of the dynamic linker. These flags can be used to enable ++ early dynamic linker diagnostics to run on CPUs which are not ++ compatible with the rest of the GNU C Library, for example, due to ++ compiler flags which target a later instruction set architecture ++ (ISA). ++ + '--disable-shared' + Don't build shared libraries even if it is possible. Not all + systems support shared libraries; you need ELF support and +diff --git a/config.make.in b/config.make.in +index e8630a8d0ccf874d..6d43e691f7823262 100644 +--- a/config.make.in ++++ b/config.make.in +@@ -110,6 +110,7 @@ CFLAGS = @CFLAGS@ + CPPFLAGS-config = @CPPFLAGS@ + CPPUNDEFS = @CPPUNDEFS@ + extra-nonshared-cflags = @extra_nonshared_cflags@ ++rtld-early-cflags = @rtld_early_cflags@ + ASFLAGS-config = @ASFLAGS_config@ + AR = @AR@ + NM = @NM@ +diff --git a/configure b/configure +index e9d2b1f398c4dba0..03f4e59e754b5463 100755 +--- a/configure ++++ b/configure +@@ -681,6 +681,7 @@ force_install + bindnow + hardcoded_path_in_tests + enable_timezone_tools ++rtld_early_cflags + extra_nonshared_cflags + use_default_link + sysheaders +@@ -761,6 +762,7 @@ with_selinux + with_headers + with_default_link + with_nonshared_cflags ++with_rtld_early_cflags + enable_sanity_checks + enable_shared + enable_profile +@@ -1479,6 +1481,8 @@ Optional Packages: + --with-default-link do not use explicit linker scripts + --with-nonshared-cflags=CFLAGS + build nonshared libraries with additional CFLAGS ++ --with-rtld-early-cflags=CFLAGS ++ build early initialization with additional CFLAGS + --with-cpu=CPU select code for CPU variant + + Some influential environment variables: +@@ -3383,6 +3387,16 @@ fi + + + ++# Check whether --with-rtld-early-cflags was given. ++if test "${with_rtld_early_cflags+set}" = set; then : ++ withval=$with_rtld_early_cflags; rtld_early_cflags=$withval ++else ++ rtld_early_cflags= ++fi ++ ++ ++ ++ + # Check whether --enable-sanity-checks was given. + if test "${enable_sanity_checks+set}" = set; then : + enableval=$enable_sanity_checks; enable_sanity=$enableval +diff --git a/configure.ac b/configure.ac +index 79f6822d29ce21cf..eb9431875fae1b0e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -162,6 +162,12 @@ AC_ARG_WITH([nonshared-cflags], + [extra_nonshared_cflags=$withval], + [extra_nonshared_cflags=]) + AC_SUBST(extra_nonshared_cflags) ++AC_ARG_WITH([rtld-early-cflags], ++ AS_HELP_STRING([--with-rtld-early-cflags=CFLAGS], ++ [build early initialization with additional CFLAGS]), ++ [rtld_early_cflags=$withval], ++ [rtld_early_cflags=]) ++AC_SUBST(rtld_early_cflags) + + AC_ARG_ENABLE([sanity-checks], + AS_HELP_STRING([--disable-sanity-checks], +diff --git a/elf/Makefile b/elf/Makefile +index 52aafc89cec835ab..778e393395fc5248 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -152,6 +152,14 @@ CFLAGS-.o += $(call elide-stack-protector,.o,$(elide-routines.os)) + CFLAGS-.op += $(call elide-stack-protector,.op,$(elide-routines.os)) + CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines)) + ++# Add the requested compiler flags to the early startup code. ++CFLAGS-dl-printf.os += $(rtld-early-cflags) ++CFLAGS-dl-sysdep.os += $(rtld-early-cflags) ++CFLAGS-dl-tunables.os += $(rtld-early-cflags) ++CFLAGS-dl-write.os += $(rtld-early-cflags) ++CFLAGS-dl-writev.os += $(rtld-early-cflags) ++CFLAGS-rtld.os += $(rtld-early-cflags) ++ + ifeq ($(unwind-find-fde),yes) + routines += unwind-dw2-fde-glibc + shared-only-routines += unwind-dw2-fde-glibc +diff --git a/manual/install.texi b/manual/install.texi +index 1320ac69b3c645f2..816b77a0a25a88a7 100644 +--- a/manual/install.texi ++++ b/manual/install.texi +@@ -131,6 +131,13 @@ that the objects in @file{libc_nonshared.a} are compiled with this flag + (although this will not affect the generated code in this particular + case and potentially change debugging information and metadata only). + ++@item --with-rtld-early-cflags=@var{cflags} ++Use additional compiler flags @var{cflags} to build the early startup ++code of the dynamic linker. These flags can be used to enable early ++dynamic linker diagnostics to run on CPUs which are not compatible with ++the rest of @theglibc{}, for example, due to compiler flags which target ++a later instruction set architecture (ISA). ++ + @c disable static doesn't work currently + @c @item --disable-static + @c Don't build static libraries. Static libraries aren't that useful these diff --git a/SOURCES/glibc-rh2040657-9.patch b/SOURCES/glibc-rh2040657-9.patch new file mode 100644 index 0000000..1908c6f --- /dev/null +++ b/SOURCES/glibc-rh2040657-9.patch @@ -0,0 +1,52 @@ +commit 550116486692efc394d03befee19f7e9c17d5044 +Author: Florian Weimer +Date: Fri Jan 14 20:16:05 2022 +0100 + + powerpc64le: Use in early HWCAP check + + This is required so that the checks still work if $(early-cflags) + selects a different ISA level. + + Reviewed-by: Carlos O'Donell + Tested-by: Carlos O'Donell + +diff --git a/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h b/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h +index 0437ae4d522fb36d..899c74f880e6f5f0 100644 +--- a/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h ++++ b/sysdeps/powerpc/powerpc64/le/dl-hwcap-check.h +@@ -19,17 +19,18 @@ + #ifndef _DL_HWCAP_CHECK_H + #define _DL_HWCAP_CHECK_H + ++#include + #include + + static inline void + dl_hwcap_check (void) + { +-#ifdef _ARCH_PWR9 ++#ifdef GCCMACRO_ARCH_PWR9 + if ((GLRO (dl_hwcap2) & PPC_FEATURE2_ARCH_3_00) == 0) + _dl_fatal_printf ("\ + Fatal glibc error: CPU lacks ISA 3.00 support (POWER9 or later required)\n"); + #endif +-#ifdef __FLOAT128_HARDWARE__ ++#ifdef GCCMACRO__FLOAT128_HARDWARE__ + if ((GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_IEEE128) == 0) + _dl_fatal_printf ("\ + Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)\n"); +@@ -37,12 +38,12 @@ Fatal glibc error: CPU lacks float128 support (POWER 9 or later required)\n"); + /* This check is not actually reached when building for POWER10 and + running on POWER9 because there are faulting PCREL instructions + before this point. */ +-#if defined _ARCH_PWR10 || defined __PCREL__ ++#if defined GCCMACRO_ARCH_PWR10 || defined GCCMACRO__PCREL__ + if ((GLRO (dl_hwcap2) & PPC_FEATURE2_ARCH_3_1) == 0) + _dl_fatal_printf ("\ + Fatal glibc error: CPU lacks ISA 3.10 support (POWER10 or later required)\n"); + #endif +-#ifdef __MMA__ ++#ifdef GCCMACRO__MMA__ + if ((GLRO (dl_hwcap2) & PPC_FEATURE2_MMA) == 0) + _dl_fatal_printf ("\ + Fatal glibc error: CPU lacks MMA support (POWER10 or later required)\n"); diff --git a/SOURCES/glibc-rh2058224-1.patch b/SOURCES/glibc-rh2058224-1.patch new file mode 100644 index 0000000..fd6cacc --- /dev/null +++ b/SOURCES/glibc-rh2058224-1.patch @@ -0,0 +1,296 @@ +commit 2ab8b74567dc0a9a3c98696e6444881997dd6c49 +Author: Carlos O'Donell +Date: Thu Feb 3 16:51:59 2022 -0500 + + localedef: Update LC_MONETARY handling (Bug 28845) + + ISO C17, POSIX Issue 7, and ISO 30112 all allow the char* + types to be empty strings i.e. "", integer or char values to + be -1 or CHAR_MAX respectively, with the exception of + decimal_point which must be non-empty in ISO C. Note that + the defaults for mon_grouping vary, but are functionaly + equivalent e.g. "\177" (no further grouping reuqired) vs. + "" (no grouping defined for all groups). + + We include a broad comment talking about harmonizing ISO C, + POSIX, ISO 30112, and the default C/POSIX locale for glibc. + + We reorder all setting based on locale/categories.def order. + + We soften all missing definitions from errors to warnings when + defaults exist. + + Given that ISO C, POSIX and ISO 30112 allow the empty string + we change LC_MONETARY handling of mon_decimal_point to allow + the empty string. If mon_decimal_point is not defined at all + then we pick the existing legacy glibc default value of + i.e. ".". + + We also set the default for mon_thousands_sep_wc at the + same time as mon_thousands_sep, but this is not a change in + behaviour, it is always either a matching value or L'\0', + but if in the future we change the default to a non-empty + string we would need to update both at the same time. + + Tested on x86_64 and i686 without regressions. + Tested with install-locale-archive target. + Tested with install-locale-files target. + + Reviewed-by: DJ Delorie + +diff --git a/locale/programs/ld-monetary.c b/locale/programs/ld-monetary.c +index 9b9a55bb4766dfcf..17a972e1a7516aa5 100644 +--- a/locale/programs/ld-monetary.c ++++ b/locale/programs/ld-monetary.c +@@ -197,21 +197,105 @@ No definition for %s category found"), "LC_MONETARY"); + } + } + ++ /* Generally speaking there are 3 standards the define the default, ++ warning, and error behaviour of LC_MONETARY. They are ISO/IEC TR 30112, ++ ISO/IEC 9899:2018 (ISO C17), and POSIX.1-2017. Within 30112 we have the ++ definition of a standard i18n FDCC-set, which for LC_MONETARY has the ++ following default values: ++ int_curr_symbol "" ++ currency_symbol "" ++ mon_decimal_point "" i.e. "," ++ mon_thousand_sep "" ++ mon_grouping "\177" i.e. CHAR_MAX ++ positive_sign "" ++ negative_sign "" i.e. "." ++ int_frac_digits -1 ++ frac_digits -1 ++ p_cs_precedes -1 ++ p_sep_by_space -1 ++ n_cs_precedes -1 ++ n_sep_by_space -1 ++ p_sign_posn -1 ++ n_sign_posn -1 ++ Under 30112 a keyword that is not provided implies an empty string "" ++ for string values or a -1 for integer values, and indicates the value ++ is unspecified with no default implied. No errors are considered. ++ The exception is mon_grouping which is a string with a terminating ++ CHAR_MAX. ++ For POSIX Issue 7 we have: ++ https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html ++ and again values not provided default to "" or -1, and indicate the value ++ is not available to the locale. The exception is mon_grouping which is ++ a string with a terminating CHAR_MAX. For the POSIX locale the values of ++ LC_MONETARY should be: ++ int_curr_symbol "" ++ currency_symbol "" ++ mon_decimal_point "" ++ mon_thousands_sep "" ++ mon_grouping "\177" i.e. CHAR_MAX ++ positive_sign "" ++ negative_sign "" ++ int_frac_digits -1 ++ frac_digits -1 ++ p_cs_precedes -1 ++ p_sep_by_space -1 ++ n_cs_precedes -1 ++ n_sep_by_space -1 ++ p_sign_posn -1 ++ n_sign_posn -1 ++ int_p_cs_precedes -1 ++ int_p_sep_by_space -1 ++ int_n_cs_precedes -1 ++ int_n_sep_by_space -1 ++ int_p_sign_posn -1 ++ int_n_sign_posn -1 ++ Like with 30112, POSIX also considers no error if the keywords are ++ missing, only that if the cateory as a whole is missing the referencing ++ of the category results in unspecified behaviour. ++ For ISO C17 there is no default value provided, but the localeconv ++ specification in 7.11.2.1 admits that members of char * type may point ++ to "" to indicate a value is not available or is of length zero. ++ The exception is decimal_point (not mon_decimal_point) which must be a ++ defined non-empty string. The values of char, which are generally ++ mapped to integer values in 30112 and POSIX, must be non-negative ++ numbers that map to CHAR_MAX when a value is not available in the ++ locale. ++ In ISO C17 for the "C" locale all values are empty strings "", or ++ CHAR_MAX, with the exception of decimal_point which is "." (defined ++ in LC_NUMERIC). ISO C17 makes no exception for mon_grouping like ++ 30112 and POSIX, but a value of "" is functionally equivalent to ++ "\177" since neither defines a grouping (though the latter terminates ++ the grouping). ++ ++ Lastly, we must consider the legacy C/POSIX locale that implemented ++ as a builtin in glibc and wether a default value mapping to the ++ C/POSIX locale may benefit the user from a compatibility perspective. ++ ++ Thus given 30112, POSIX, ISO C, and the builtin C/POSIX locale we ++ need to pick appropriate defaults below. */ ++ ++ /* The members of LC_MONETARY are handled in the order of their definition ++ in locale/categories.def. Please keep them in that order. */ ++ ++ /* The purpose of TEST_ELEM is to define a default value for the fields ++ in the category if the field was not defined in the cateory. If the ++ category was present but we didn't see a definition for the field then ++ we also issue a warning, otherwise the only warning you get is the one ++ earlier when a default category is created (completely missing category). ++ This missing field warning is glibc-specific since no standard requires ++ this warning, but we consider it valuable to print a warning for all ++ missing fields in the category. */ + #define TEST_ELEM(cat, initval) \ + if (monetary->cat == NULL) \ + { \ + if (! nothing) \ +- record_error (0, 0, _("%s: field `%s' not defined"), \ +- "LC_MONETARY", #cat); \ ++ record_warning (_("%s: field `%s' not defined"), \ ++ "LC_MONETARY", #cat); \ + monetary->cat = initval; \ + } + ++ /* Keyword: int_curr_symbol. */ + TEST_ELEM (int_curr_symbol, ""); +- TEST_ELEM (currency_symbol, ""); +- TEST_ELEM (mon_thousands_sep, ""); +- TEST_ELEM (positive_sign, ""); +- TEST_ELEM (negative_sign, ""); +- + /* The international currency symbol must come from ISO 4217. */ + if (monetary->int_curr_symbol != NULL) + { +@@ -248,41 +332,63 @@ not correspond to a valid name in ISO 4217 [--no-warnings=intcurrsym]"), + } + } + +- /* The decimal point must not be empty. This is not said explicitly +- in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be +- != "". */ ++ /* Keyword: currency_symbol */ ++ TEST_ELEM (currency_symbol, ""); ++ ++ /* Keyword: mon_decimal_point */ ++ /* ISO C17 7.11.2.1.3 explicitly allows mon_decimal_point to be the ++ empty string e.g. "". This indicates the value is not available in the ++ current locale or is of zero length. However, if the value was never ++ defined then we issue a warning and use a glibc-specific default. ISO ++ 30112 in the i18n FDCC-Set uses ",", and POSIX Issue 7 in the ++ POSIX locale uses "". It is specific to glibc that the default is ++ "."; we retain this existing behaviour for backwards compatibility. */ + if (monetary->mon_decimal_point == NULL) + { + if (! nothing) +- record_error (0, 0, _("%s: field `%s' not defined"), +- "LC_MONETARY", "mon_decimal_point"); ++ record_warning (_("%s: field `%s' not defined, using defaults"), ++ "LC_MONETARY", "mon_decimal_point"); + monetary->mon_decimal_point = "."; + monetary->mon_decimal_point_wc = L'.'; + } +- else if (monetary->mon_decimal_point[0] == '\0' && ! be_quiet && ! nothing) ++ ++ /* Keyword: mon_thousands_sep */ ++ if (monetary->mon_thousands_sep == NULL) + { +- record_error (0, 0, _("\ +-%s: value for field `%s' must not be an empty string"), +- "LC_MONETARY", "mon_decimal_point"); ++ if (! nothing) ++ record_warning (_("%s: field `%s' not defined, using defaults"), ++ "LC_MONETARY", "mon_thousands_sep"); ++ monetary->mon_thousands_sep = ""; ++ monetary->mon_thousands_sep_wc = L'\0'; + } + ++ /* Keyword: mon_grouping */ + if (monetary->mon_grouping_len == 0) + { + if (! nothing) +- record_error (0, 0, _("%s: field `%s' not defined"), +- "LC_MONETARY", "mon_grouping"); +- ++ record_warning (_("%s: field `%s' not defined"), ++ "LC_MONETARY", "mon_grouping"); ++ /* Missing entries are given 1 element in their bytearray with ++ a value of CHAR_MAX which indicates that "No further grouping ++ is to be performed" (functionally equivalent to ISO C's "C" ++ locale default of ""). */ + monetary->mon_grouping = (char *) "\177"; + monetary->mon_grouping_len = 1; + } + ++ /* Keyword: positive_sign */ ++ TEST_ELEM (positive_sign, ""); ++ ++ /* Keyword: negative_sign */ ++ TEST_ELEM (negative_sign, ""); ++ + #undef TEST_ELEM + #define TEST_ELEM(cat, min, max, initval) \ + if (monetary->cat == -2) \ + { \ + if (! nothing) \ +- record_error (0, 0, _("%s: field `%s' not defined"), \ +- "LC_MONETARY", #cat); \ ++ record_warning (_("%s: field `%s' not defined"), \ ++ "LC_MONETARY", #cat); \ + monetary->cat = initval; \ + } \ + else if ((monetary->cat < min || monetary->cat > max) \ +@@ -301,16 +407,11 @@ not correspond to a valid name in ISO 4217 [--no-warnings=intcurrsym]"), + TEST_ELEM (p_sign_posn, -1, 4, -1); + TEST_ELEM (n_sign_posn, -1, 4, -1); + +- /* The non-POSIX.2 extensions are optional. */ +- if (monetary->duo_int_curr_symbol == NULL) +- monetary->duo_int_curr_symbol = monetary->int_curr_symbol; +- if (monetary->duo_currency_symbol == NULL) +- monetary->duo_currency_symbol = monetary->currency_symbol; +- +- if (monetary->duo_int_frac_digits == -2) +- monetary->duo_int_frac_digits = monetary->int_frac_digits; +- if (monetary->duo_frac_digits == -2) +- monetary->duo_frac_digits = monetary->frac_digits; ++ /* Keyword: crncystr */ ++ monetary->crncystr = (char *) xmalloc (strlen (monetary->currency_symbol) ++ + 2); ++ monetary->crncystr[0] = monetary->p_cs_precedes ? '-' : '+'; ++ strcpy (&monetary->crncystr[1], monetary->currency_symbol); + + #undef TEST_ELEM + #define TEST_ELEM(cat, alt, min, max) \ +@@ -328,6 +429,17 @@ not correspond to a valid name in ISO 4217 [--no-warnings=intcurrsym]"), + TEST_ELEM (int_p_sign_posn, p_sign_posn, -1, 4); + TEST_ELEM (int_n_sign_posn, n_sign_posn, -1, 4); + ++ /* The non-POSIX.2 extensions are optional. */ ++ if (monetary->duo_int_curr_symbol == NULL) ++ monetary->duo_int_curr_symbol = monetary->int_curr_symbol; ++ if (monetary->duo_currency_symbol == NULL) ++ monetary->duo_currency_symbol = monetary->currency_symbol; ++ ++ if (monetary->duo_int_frac_digits == -2) ++ monetary->duo_int_frac_digits = monetary->int_frac_digits; ++ if (monetary->duo_frac_digits == -2) ++ monetary->duo_frac_digits = monetary->frac_digits; ++ + TEST_ELEM (duo_p_cs_precedes, p_cs_precedes, -1, 1); + TEST_ELEM (duo_p_sep_by_space, p_sep_by_space, -1, 2); + TEST_ELEM (duo_n_cs_precedes, n_cs_precedes, -1, 1); +@@ -350,17 +462,15 @@ not correspond to a valid name in ISO 4217 [--no-warnings=intcurrsym]"), + if (monetary->duo_valid_to == 0) + monetary->duo_valid_to = 99991231; + ++ /* Keyword: conversion_rate */ + if (monetary->conversion_rate[0] == 0) + { + monetary->conversion_rate[0] = 1; + monetary->conversion_rate[1] = 1; + } + +- /* Create the crncystr entry. */ +- monetary->crncystr = (char *) xmalloc (strlen (monetary->currency_symbol) +- + 2); +- monetary->crncystr[0] = monetary->p_cs_precedes ? '-' : '+'; +- strcpy (&monetary->crncystr[1], monetary->currency_symbol); ++ /* A value for monetary-decimal-point-wc was set when ++ monetary_decimal_point was set, likewise for monetary-thousands-sep-wc. */ + } + + diff --git a/SOURCES/glibc-rh2058224-2.patch b/SOURCES/glibc-rh2058224-2.patch new file mode 100644 index 0000000..ee6e4cc --- /dev/null +++ b/SOURCES/glibc-rh2058224-2.patch @@ -0,0 +1,62 @@ +commit 1c7a34567d21fbd3b706c77cd794956b43daefe7 +Author: Carlos O'Donell +Date: Thu Feb 3 16:01:52 2022 -0500 + + localedata: Do not generate output if warnings were present. + + With LC_MONETARY parsing fixed we can now generate locales + without forcing output with '-c'. + + Removing '-c' from localedef invocation is the equivalent of + using -Werror for localedef. The glibc locale sources should + always be clean and free from warnings. + + We remove '-c' from both test locale generation and the targets + used for installing locales e.g. install-locale-archive, and + install-locale-files. + + Tested on x86_64 and i686 without regressions. + Tested with install-locale-archive target. + Tested with install-locale-files target. + + Reviewed-by: DJ Delorie + +diff --git a/localedata/Makefile b/localedata/Makefile +index 5830b9d05141cccd..a46da8a9311b00b0 100644 +--- a/localedata/Makefile ++++ b/localedata/Makefile +@@ -469,11 +469,11 @@ define build-one-locale + endef + + $(INSTALL-SUPPORTED-LOCALE-ARCHIVE): install-locales-dir +- @flags="-c"; \ ++ @flags=""; \ + $(build-one-locale) + + $(INSTALL-SUPPORTED-LOCALE-FILES): install-locales-dir +- @flags="-c --no-archive --no-hard-links"; \ ++ @flags="--no-archive --no-hard-links"; \ + $(build-one-locale) + + tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP +diff --git a/localedata/gen-locale.sh b/localedata/gen-locale.sh +index c7e2e160ae1506f8..a25d27f3e6986675 100644 +--- a/localedata/gen-locale.sh ++++ b/localedata/gen-locale.sh +@@ -54,8 +54,14 @@ modifier=`echo $locfile|sed 's|[^.]*[.]\([^@ ]*\)\(@[^ ]*\)\?/LC_CTYPE|\2|'` + + echo "Generating locale $locale.$charmap: this might take a while..." + +-# Run quietly and force output. +-flags="--quiet -c" ++# Do not force output with '-c', all locales should compile without ++# warning or errors. There is likewise no need to run quietly with ++# '--quiet' since all locales should compile without additional ++# diagnostics. If there are messages printed then we want to see ++# them, fix them, and the associated error or warning. During ++# development it may be beneficialy to put '--quiet -c' here to allow ++# you to develop in-progress locales. ++flags="" + + # For SJIS the charmap is SHIFT_JIS. We just want the locale to have + # a slightly nicer name instead of using "*.SHIFT_SJIS", but that diff --git a/SOURCES/glibc-rh2058230.patch b/SOURCES/glibc-rh2058230.patch new file mode 100644 index 0000000..5d7ab3f --- /dev/null +++ b/SOURCES/glibc-rh2058230.patch @@ -0,0 +1,37 @@ +Early backport of upstream patch under discussion: + + [PATCH v3] elf: Fix DFS sorting algorithm for LD_TRACE_LOADED_OBJECTS + with missing libraries (BZ #28868) + + +The tests are still being discussed upstream and are not backported +here. + +diff --git a/elf/dl-deps.c b/elf/dl-deps.c +index 237d9636c5be780c..9e30c6c3f6c58783 100644 +--- a/elf/dl-deps.c ++++ b/elf/dl-deps.c +@@ -489,6 +489,8 @@ _dl_map_object_deps (struct link_map *map, + + for (nlist = 0, runp = known; runp; runp = runp->next) + { ++ /* _dl_sort_maps ignores l_faked object, so it is save to not considere ++ them for nlist. */ + if (__builtin_expect (trace_mode, 0) && runp->map->l_faked) + /* This can happen when we trace the loading. */ + --map->l_searchlist.r_nlist; +diff --git a/elf/dl-sort-maps.c b/elf/dl-sort-maps.c +index a274ed66cc987735..72f4ff0e6eda3377 100644 +--- a/elf/dl-sort-maps.c ++++ b/elf/dl-sort-maps.c +@@ -140,7 +140,9 @@ static void + dfs_traversal (struct link_map ***rpo, struct link_map *map, + bool *do_reldeps) + { +- if (map->l_visited) ++ /* _dl_map_object_deps filter l_faked objects when calculating the ++ number of maps before calling _dl_sort_maps, ignore them as well. */ ++ if (map->l_visited || map->l_faked) + return; + + map->l_visited = 1; diff --git a/SOURCES/glibc-rh827510.patch b/SOURCES/glibc-rh827510.patch new file mode 100644 index 0000000..6115891 --- /dev/null +++ b/SOURCES/glibc-rh827510.patch @@ -0,0 +1,37 @@ +Short description: Fix newlocale error return. +Author(s): Fedora glibc team +Origin: PATCH +Bug-RHEL: #832516 +Bug-Fedora: #827510 +Bug-Upstream: #14247 +Upstream status: not-submitted + +This needs to go upstream right away to fix the error case for +newlocale not correctly returning an error. + +2012-06-14 Jeff Law + + * locale/loadlocale.c (_nl_load_locale): Delay setting + file->decided until we have successfully loaded the file's + data. + +diff --git a/locale/loadlocale.c b/locale/loadlocale.c +index e3fa187..9fd9216 100644 +--- a/locale/loadlocale.c ++++ b/locale/loadlocale.c +@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) + int save_err; + int alloc = ld_mapped; + +- file->decided = 1; + file->data = NULL; + + fd = __open_nocancel (file->filename, O_RDONLY | O_CLOEXEC); +@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category) + newdata->alloc = alloc; + + file->data = newdata; ++ file->decided = 1; + } + + void diff --git a/SOURCES/glibc-upstream-2.34-1.patch b/SOURCES/glibc-upstream-2.34-1.patch new file mode 100644 index 0000000..c161318 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-1.patch @@ -0,0 +1,26 @@ +commit 0b03996304f86d6dba8f0d4b7048b9bb7186f17d +Author: Siddhesh Poyarekar +Date: Tue Aug 3 21:10:10 2021 +0530 + + ldconfig: avoid leak on empty paths in config file + + Reviewed-by: Arjun Shankar + (cherry picked from commit b0234d79e7d82475d1666f25326ec045c045b3ed) + +diff --git a/elf/ldconfig.c b/elf/ldconfig.c +index 1037e8d0cf8d28b6..b8893637f8aaea8d 100644 +--- a/elf/ldconfig.c ++++ b/elf/ldconfig.c +@@ -503,7 +503,11 @@ add_dir_1 (const char *line, const char *from_file, int from_line) + entry->path[--i] = '\0'; + + if (i == 0) +- return; ++ { ++ free (entry->path); ++ free (entry); ++ return; ++ } + + char *path = entry->path; + if (opt_chroot != NULL) diff --git a/SOURCES/glibc-upstream-2.34-10.patch b/SOURCES/glibc-upstream-2.34-10.patch new file mode 100644 index 0000000..023ea30 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-10.patch @@ -0,0 +1,34 @@ +commit f2413f2710d5d5cc884b413b83fcf8198e3717fa +Author: H.J. Lu +Date: Sat Aug 28 06:10:38 2021 -0700 + + x86-64: Use testl to check __x86_string_control + + Use testl, instead of andl, to check __x86_string_control to avoid + updating __x86_string_control. + + Reviewed-by: Carlos O'Donell + (cherry picked from commit 3c8b9879cab6d41787bc5b14c1748f62fd6d0e5f) + +diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S +index 9f02624375c07b26..abde8438d41f2320 100644 +--- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S ++++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S +@@ -325,7 +325,7 @@ L(movsb): + /* Avoid slow backward REP MOVSB. */ + jb L(more_8x_vec_backward) + # if AVOID_SHORT_DISTANCE_REP_MOVSB +- andl $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip) ++ testl $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip) + jz 3f + movq %rdi, %rcx + subq %rsi, %rcx +@@ -333,7 +333,7 @@ L(movsb): + # endif + 1: + # if AVOID_SHORT_DISTANCE_REP_MOVSB +- andl $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip) ++ testl $X86_STRING_CONTROL_AVOID_SHORT_DISTANCE_REP_MOVSB, __x86_string_control(%rip) + jz 3f + movq %rsi, %rcx + subq %rdi, %rcx diff --git a/SOURCES/glibc-upstream-2.34-100.patch b/SOURCES/glibc-upstream-2.34-100.patch new file mode 100644 index 0000000..d797f77 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-100.patch @@ -0,0 +1,95 @@ +commit e09e7b1492b2d5c2f68ddf81f8f58e093dd4df6d +Author: Adhemerval Zanella +Date: Mon Dec 13 11:36:42 2021 -0300 + + support: Add support_socket_so_timestamp_time64 + + Check if the socket support 64-bit network packages timestamps + (SO_TIMESTAMP and SO_TIMESTAMPNS). This will be used on recvmsg + and recvmmsg tests to check if the timestamp should be generated. + + Reviewed-by: Florian Weimer + + (cherry picked from 38bc0f4e78934aab455b31af05cefcbf3c22bece) + +diff --git a/support/Makefile b/support/Makefile +index 3c941e1ba9e29aa4..6a5fc9faf2ca2e2d 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -79,6 +79,7 @@ libsupport-routines = \ + support_set_small_thread_stack_size \ + support_shared_allocate \ + support_small_stack_thread_attribute \ ++ support_socket_so_timestamp_time64 \ + support_stat_nanoseconds \ + support_subprocess \ + support_test_compare_blob \ +diff --git a/support/support.h b/support/support.h +index 29d56c7c891ee34b..ecfc9a336d272a30 100644 +--- a/support/support.h ++++ b/support/support.h +@@ -170,6 +170,10 @@ extern bool support_select_modifies_timeout (void); + tv_usec larger than 1000000. */ + extern bool support_select_normalizes_timeout (void); + ++/* Return true if socket FD supports 64-bit timestamps with the SOL_SOCKET ++ and SO_TIMESTAMP/SO_TIMESTAMPNS. */ ++extern bool support_socket_so_timestamp_time64 (int fd); ++ + /* Create a timer that trigger after SEC seconds and NSEC nanoseconds. If + REPEAT is true the timer will repeat indefinitely. If CALLBACK is not + NULL, the function will be called when the timer expires; otherwise a +diff --git a/support/support_socket_so_timestamp_time64.c b/support/support_socket_so_timestamp_time64.c +new file mode 100644 +index 0000000000000000..54bf3f42724566f5 +--- /dev/null ++++ b/support/support_socket_so_timestamp_time64.c +@@ -0,0 +1,48 @@ ++/* Return whether socket supports 64-bit timestamps. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#ifdef __linux__ ++# include ++#endif ++ ++bool ++support_socket_so_timestamp_time64 (int fd) ++{ ++#ifdef __linux__ ++# if __LINUX_KERNEL_VERSION >= 0x050100 \ ++ || __WORDSIZE == 64 \ ++ || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) ++ return true; ++# else ++ int level = SOL_SOCKET; ++ int optname = COMPAT_SO_TIMESTAMP_NEW; ++ int optval; ++ socklen_t len = sizeof (optval); ++ ++ int r = syscall (__NR_getsockopt, fd, level, optname, &optval, &len); ++ return r != -1; ++# endif ++#else ++ return false; ++#endif ++} diff --git a/SOURCES/glibc-upstream-2.34-101.patch b/SOURCES/glibc-upstream-2.34-101.patch new file mode 100644 index 0000000..b318a81 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-101.patch @@ -0,0 +1,431 @@ +commit e098446037da532d4a250efac9a813bc22f3669f +Author: Adhemerval Zanella +Date: Mon Jan 24 08:55:53 2022 -0300 + + linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350) + + The __convert_scm_timestamps only updates the control message last + pointer for SOL_SOCKET type, so if the message control buffer contains + multiple ancillary message types the converted timestamp one might + overwrite a valid message. + + The test checks if the extra ancillary space is correctly handled + by recvmsg/recvmmsg, where if there is no extra space for the 64-bit + time_t converted message the control buffer should be marked with + MSG_TRUNC. It also check if recvmsg/recvmmsg handle correctly multiple + ancillary data. + + Checked on x86_64-linux and on i686-linux-gnu on both 5.11 and + 4.15 kernel. + + Co-authored-by: Fabian Vogt + + Reviewed-by: Florian Weimer + + (cherry picked from commit 8fba672472ae0055387e9315fc2eddfa6775ca79) + +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +index cdc01a3f023ec09a..7c75e22c6d0e9ff5 100644 +--- a/sysdeps/unix/sysv/linux/Makefile ++++ b/sysdeps/unix/sysv/linux/Makefile +@@ -273,6 +273,9 @@ sysdep_routines += cmsg_nxthdr + CFLAGS-recvmmsg.c = -fexceptions -fasynchronous-unwind-tables + CFLAGS-sendmmsg.c = -fexceptions -fasynchronous-unwind-tables + ++tests += tst-socket-timestamp ++tests-time64 += tst-socket-timestamp-time64 ++ + tests-special += $(objpfx)tst-socket-consts.out + $(objpfx)tst-socket-consts.out: ../sysdeps/unix/sysv/linux/tst-socket-consts.py + PYTHONPATH=../scripts \ +diff --git a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c +index 00c934c4135f0d42..5d3c4199e0b32944 100644 +--- a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c ++++ b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c +@@ -54,6 +54,8 @@ __convert_scm_timestamps (struct msghdr *msg, socklen_t msgsize) + cmsg != NULL; + cmsg = CMSG_NXTHDR (msg, cmsg)) + { ++ last = cmsg; ++ + if (cmsg->cmsg_level != SOL_SOCKET) + continue; + +@@ -75,11 +77,9 @@ __convert_scm_timestamps (struct msghdr *msg, socklen_t msgsize) + tvts[1] = tmp[1]; + break; + } +- +- last = cmsg; + } + +- if (last == NULL || type == 0) ++ if (type == 0) + return; + + if (CMSG_SPACE (sizeof tvts) > msgsize - msg->msg_controllen) +@@ -88,10 +88,12 @@ __convert_scm_timestamps (struct msghdr *msg, socklen_t msgsize) + return; + } + ++ /* Zero memory for the new cmsghdr, so reading cmsg_len field ++ by CMSG_NXTHDR does not trigger UB. */ ++ memset (msg->msg_control + msg->msg_controllen, 0, ++ CMSG_SPACE (sizeof tvts)); + msg->msg_controllen += CMSG_SPACE (sizeof tvts); +- cmsg = CMSG_NXTHDR(msg, last); +- if (cmsg == NULL) +- return; ++ cmsg = CMSG_NXTHDR (msg, last); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = type; + cmsg->cmsg_len = CMSG_LEN (sizeof tvts); +diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c +new file mode 100644 +index 0000000000000000..ae424c2a70026cf5 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-socket-timestamp-time64.c +@@ -0,0 +1 @@ ++#include "tst-socket-timestamp.c" +diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp.c +new file mode 100644 +index 0000000000000000..9c2e76f7e27bd312 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-socket-timestamp.c +@@ -0,0 +1,336 @@ ++/* Check recvmsg/recvmmsg 64-bit timestamp support. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Some extra space added for ancillary data, it might be used to convert ++ 32-bit timestamp to 64-bit for _TIME_BITS=64. */ ++enum { slack_max_size = 64 }; ++static const int slack[] = { 0, 4, 8, 16, 32, slack_max_size }; ++ ++static bool support_64_timestamp; ++/* AF_INET socket and address used to receive data. */ ++static int srv; ++static struct sockaddr_in srv_addr; ++ ++static int ++do_sendto (const struct sockaddr_in *addr, int nmsgs) ++{ ++ int s = xsocket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); ++ xconnect (s, (const struct sockaddr *) addr, sizeof (*addr)); ++ ++ for (int i = 0; i < nmsgs; i++) ++ xsendto (s, &i, sizeof (i), 0, (const struct sockaddr *) addr, ++ sizeof (*addr)); ++ ++ xclose (s); ++ ++ return 0; ++} ++ ++static void ++do_recvmsg_slack_ancillary (bool use_multi_call, int s, void *cmsg, ++ size_t slack, size_t tsize, int exp_payload) ++{ ++ int payload; ++ struct iovec iov = ++ { ++ .iov_base = &payload, ++ .iov_len = sizeof (payload) ++ }; ++ size_t msg_controllen = CMSG_SPACE (tsize) + slack; ++ char *msg_control = cmsg - msg_controllen; ++ memset (msg_control, 0x55, msg_controllen); ++ struct mmsghdr mmhdr = ++ { ++ .msg_hdr = ++ { ++ .msg_name = NULL, ++ .msg_namelen = 0, ++ .msg_iov = &iov, ++ .msg_iovlen = 1, ++ .msg_control = msg_control, ++ .msg_controllen = msg_controllen ++ }, ++ }; ++ ++ int r; ++ if (use_multi_call) ++ { ++ r = recvmmsg (s, &mmhdr, 1, 0, NULL); ++ if (r >= 0) ++ r = mmhdr.msg_len; ++ } ++ else ++ r = recvmsg (s, &mmhdr.msg_hdr, 0); ++ TEST_COMPARE (r, sizeof (int)); ++ TEST_COMPARE (payload, exp_payload); ++ ++ if (cmsg == NULL) ++ return; ++ ++ /* A timestamp is expected if 32-bit timestamp are used (support in every ++ configuration) or if underlying kernel support 64-bit timestamps. ++ Otherwise recvmsg will need extra space do add the 64-bit timestamp. */ ++ bool exp_timestamp; ++ if (sizeof (time_t) == 4 || support_64_timestamp) ++ exp_timestamp = true; ++ else ++ exp_timestamp = slack >= CMSG_SPACE (tsize); ++ ++ bool timestamp = false; ++ for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); ++ cmsg != NULL; ++ cmsg = CMSG_NXTHDR (&mmhdr.msg_hdr, cmsg)) ++ { ++ if (cmsg->cmsg_level != SOL_SOCKET) ++ continue; ++ if (cmsg->cmsg_type == SCM_TIMESTAMP ++ && cmsg->cmsg_len == CMSG_LEN (sizeof (struct timeval))) ++ { ++ struct timeval tv; ++ memcpy (&tv, CMSG_DATA (cmsg), sizeof (tv)); ++ if (test_verbose) ++ printf ("SCM_TIMESTAMP: {%jd, %jd}\n", (intmax_t)tv.tv_sec, ++ (intmax_t)tv.tv_usec); ++ timestamp = true; ++ } ++ else if (cmsg->cmsg_type == SCM_TIMESTAMPNS ++ && cmsg->cmsg_len == CMSG_LEN (sizeof (struct timespec))) ++ { ++ struct timespec ts; ++ memcpy (&ts, CMSG_DATA (cmsg), sizeof (ts)); ++ if (test_verbose) ++ printf ("SCM_TIMESTAMPNS: {%jd, %jd}\n", (intmax_t)ts.tv_sec, ++ (intmax_t)ts.tv_nsec); ++ timestamp = true; ++ } ++ } ++ ++ TEST_COMPARE (timestamp, exp_timestamp); ++} ++ ++/* Check if the extra ancillary space is correctly handled by recvmsg and ++ recvmmsg with different extra space for the ancillaty buffer. */ ++static void ++do_test_slack_space (void) ++{ ++ /* Setup the ancillary data buffer with an extra page with PROT_NONE to ++ check the possible timestamp conversion on some systems. */ ++ struct support_next_to_fault nf = ++ support_next_to_fault_allocate (slack_max_size); ++ void *msgbuf = nf.buffer + slack_max_size; ++ ++ /* Enable the timestamp using struct timeval precision. */ ++ { ++ int r = setsockopt (srv, SOL_SOCKET, SO_TIMESTAMP, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ } ++ /* Check recvmsg. */ ++ do_sendto (&srv_addr, array_length (slack)); ++ for (int s = 0; s < array_length (slack); s++) ++ { ++ memset (nf.buffer, 0x55, nf.length); ++ do_recvmsg_slack_ancillary (false, srv, msgbuf, slack[s], ++ sizeof (struct timeval), s); ++ } ++ /* Check recvmmsg. */ ++ do_sendto (&srv_addr, array_length (slack)); ++ for (int s = 0; s < array_length (slack); s++) ++ { ++ memset (nf.buffer, 0x55, nf.length); ++ do_recvmsg_slack_ancillary (true, srv, msgbuf, slack[s], ++ sizeof (struct timeval), s); ++ } ++ ++ /* Now enable timestamp using a higher precision, it overwrites the previous ++ precision. */ ++ { ++ int r = setsockopt (srv, SOL_SOCKET, SO_TIMESTAMPNS, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ } ++ /* Check recvmsg. */ ++ do_sendto (&srv_addr, array_length (slack)); ++ for (int s = 0; s < array_length (slack); s++) ++ do_recvmsg_slack_ancillary (false, srv, msgbuf, slack[s], ++ sizeof (struct timespec), s); ++ /* Check recvmmsg. */ ++ do_sendto (&srv_addr, array_length (slack)); ++ for (int s = 0; s < array_length (slack); s++) ++ do_recvmsg_slack_ancillary (true, srv, msgbuf, slack[s], ++ sizeof (struct timespec), s); ++ ++ support_next_to_fault_free (&nf); ++} ++ ++/* Check if the converted 64-bit timestamp is correctly appended when there ++ are multiple ancillary messages. */ ++static void ++do_recvmsg_multiple_ancillary (bool use_multi_call, int s, void *cmsg, ++ size_t cmsgsize, int exp_msg) ++{ ++ int msg; ++ struct iovec iov = ++ { ++ .iov_base = &msg, ++ .iov_len = sizeof (msg) ++ }; ++ size_t msgs = cmsgsize; ++ struct mmsghdr mmhdr = ++ { ++ .msg_hdr = ++ { ++ .msg_name = NULL, ++ .msg_namelen = 0, ++ .msg_iov = &iov, ++ .msg_iovlen = 1, ++ .msg_controllen = msgs, ++ .msg_control = cmsg, ++ }, ++ }; ++ ++ int r; ++ if (use_multi_call) ++ { ++ r = recvmmsg (s, &mmhdr, 1, 0, NULL); ++ if (r >= 0) ++ r = mmhdr.msg_len; ++ } ++ else ++ r = recvmsg (s, &mmhdr.msg_hdr, 0); ++ TEST_COMPARE (r, sizeof (int)); ++ TEST_COMPARE (msg, exp_msg); ++ ++ if (cmsg == NULL) ++ return; ++ ++ bool timestamp = false; ++ bool origdstaddr = false; ++ for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); ++ cmsg != NULL; ++ cmsg = CMSG_NXTHDR (&mmhdr.msg_hdr, cmsg)) ++ { ++ if (cmsg->cmsg_level == SOL_IP ++ && cmsg->cmsg_type == IP_ORIGDSTADDR ++ && cmsg->cmsg_len >= CMSG_LEN (sizeof (struct sockaddr_in))) ++ { ++ struct sockaddr_in sa; ++ memcpy (&sa, CMSG_DATA (cmsg), sizeof (sa)); ++ if (test_verbose) ++ { ++ char str[INET_ADDRSTRLEN]; ++ inet_ntop (AF_INET, &sa.sin_addr, str, INET_ADDRSTRLEN); ++ printf ("IP_ORIGDSTADDR: %s:%d\n", str, ntohs (sa.sin_port)); ++ } ++ origdstaddr = sa.sin_addr.s_addr == srv_addr.sin_addr.s_addr ++ && sa.sin_port == srv_addr.sin_port; ++ } ++ if (cmsg->cmsg_level == SOL_SOCKET ++ && cmsg->cmsg_type == SCM_TIMESTAMP ++ && cmsg->cmsg_len >= CMSG_LEN (sizeof (struct timeval))) ++ { ++ struct timeval tv; ++ memcpy (&tv, CMSG_DATA (cmsg), sizeof (tv)); ++ if (test_verbose) ++ printf ("SCM_TIMESTAMP: {%jd, %jd}\n", (intmax_t)tv.tv_sec, ++ (intmax_t)tv.tv_usec); ++ timestamp = true; ++ } ++ } ++ ++ TEST_COMPARE (timestamp, true); ++ TEST_COMPARE (origdstaddr, true); ++} ++ ++static void ++do_test_multiple_ancillary (void) ++{ ++ { ++ int r = setsockopt (srv, SOL_SOCKET, SO_TIMESTAMP, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ } ++ { ++ int r = setsockopt (srv, IPPROTO_IP, IP_RECVORIGDSTADDR, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ } ++ ++ /* Enougth data for default SO_TIMESTAMP, the IP_RECVORIGDSTADDR, and the ++ extra 64-bit SO_TIMESTAMP. */ ++ enum { msgbuflen = CMSG_SPACE (2 * sizeof (uint64_t)) ++ + CMSG_SPACE (sizeof (struct sockaddr_in)) ++ + CMSG_SPACE (2 * sizeof (uint64_t)) }; ++ char msgbuf[msgbuflen]; ++ ++ enum { nmsgs = 8 }; ++ /* Check recvmsg. */ ++ do_sendto (&srv_addr, nmsgs); ++ for (int s = 0; s < nmsgs; s++) ++ do_recvmsg_multiple_ancillary (false, srv, msgbuf, msgbuflen, s); ++ /* Check recvmmsg. */ ++ do_sendto (&srv_addr, nmsgs); ++ for (int s = 0; s < nmsgs; s++) ++ do_recvmsg_multiple_ancillary (true, srv, msgbuf, msgbuflen, s); ++} ++ ++static int ++do_test (void) ++{ ++ srv = xsocket (AF_INET, SOCK_DGRAM, 0); ++ srv_addr = (struct sockaddr_in) { ++ .sin_family = AF_INET, ++ .sin_addr = {.s_addr = htonl (INADDR_LOOPBACK) }, ++ }; ++ xbind (srv, (struct sockaddr *) &srv_addr, sizeof (srv_addr)); ++ { ++ socklen_t sa_len = sizeof (srv_addr); ++ xgetsockname (srv, (struct sockaddr *) &srv_addr, &sa_len); ++ TEST_VERIFY (sa_len == sizeof (srv_addr)); ++ } ++ ++ TEST_COMPARE (recvmsg (-1, NULL, 0), -1); ++ TEST_COMPARE (errno, EBADF); ++ TEST_COMPARE (recvmmsg (-1, NULL, 0, 0, NULL), -1); ++ TEST_COMPARE (errno, EBADF); ++ ++ /* If underlying kernel does not support */ ++ support_64_timestamp = support_socket_so_timestamp_time64 (srv); ++ ++ do_test_slack_space (); ++ do_test_multiple_ancillary (); ++ ++ xclose (srv); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-102.patch b/SOURCES/glibc-upstream-2.34-102.patch new file mode 100644 index 0000000..928856e --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-102.patch @@ -0,0 +1,485 @@ +commit 489d0b8b32548bc569cd3067aebf98b030720753 +Author: Adhemerval Zanella +Date: Thu Jan 27 16:45:18 2022 -0300 + + Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg + + The timestamps created by __convert_scm_timestamps only make sense for + 64 bit time_t programs, 32 bit time_t programs will ignore 64 bit time_t + timestamps since SO_TIMESTAMP will be defined to old values (either by + glibc or kernel headers). + + Worse, if the buffer is not suffice MSG_CTRUNC is set to indicate it + (which breaks some programs [1]). + + This patch makes only 64 bit time_t recvmsg and recvmmsg to call + __convert_scm_timestamps. Also, the assumption to called it is changed + from __ASSUME_TIME64_SYSCALLS to __TIMESIZE != 64 since the setsockopt + might be called by libraries built without __TIME_BITS=64. The + MSG_CTRUNC is only set for the 64 bit symbols, it should happen only + if 64 bit time_t programs run older kernels. + + Checked on x86_64-linux-gnu and i686-linux-gnu. + + [1] https://github.com/systemd/systemd/pull/20567 + + Reviewed-by: Florian Weimer + + (cherry picked from commit 948ce73b31fdb0860bcec4b8e62b14e88234f98a) + +diff --git a/include/sys/socket.h b/include/sys/socket.h +index a1d749f9fa7b9257..6e4cf5077fb885a9 100644 +--- a/include/sys/socket.h ++++ b/include/sys/socket.h +@@ -98,15 +98,21 @@ extern int __sendmmsg (int __fd, struct mmsghdr *__vmessages, + libc_hidden_proto (__sendmmsg) + #endif + +-/* Receive a message as described by MESSAGE from socket FD. +- Returns the number of bytes read or -1 for errors. */ + extern ssize_t __libc_recvmsg (int __fd, struct msghdr *__message, + int __flags); + extern ssize_t __recvmsg (int __fd, struct msghdr *__message, + int __flags) attribute_hidden; + #if __TIMESIZE == 64 ++# define __libc_recvmsg64 __libc_recvmsg ++# define __recvmsg64 __recvmsg + # define __recvmmsg64 __recvmmsg + #else ++extern ssize_t __libc_recvmsg64 (int __fd, struct msghdr *__message, ++ int __flags); ++extern ssize_t __recvmsg64 (int __fd, struct msghdr *__message, ++ int __flags); ++/* Receive a message as described by MESSAGE from socket FD. ++ Returns the number of bytes read or -1 for errors. */ + extern int __recvmmsg64 (int __fd, struct mmsghdr *vmessages, + unsigned int vlen, int flags, + struct __timespec64 *timeout); +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +index 7c75e22c6d0e9ff5..0657f4003e7116c6 100644 +--- a/sysdeps/unix/sysv/linux/Makefile ++++ b/sysdeps/unix/sysv/linux/Makefile +@@ -273,8 +273,14 @@ sysdep_routines += cmsg_nxthdr + CFLAGS-recvmmsg.c = -fexceptions -fasynchronous-unwind-tables + CFLAGS-sendmmsg.c = -fexceptions -fasynchronous-unwind-tables + +-tests += tst-socket-timestamp +-tests-time64 += tst-socket-timestamp-time64 ++tests += \ ++ tst-socket-timestamp \ ++ tst-socket-timestamp-compat \ ++ # tests ++tests-time64 += \ ++ tst-socket-timestamp-time64 \ ++ tst-socket-timestamp-compat-time64 ++ # tests-time64 + + tests-special += $(objpfx)tst-socket-consts.out + $(objpfx)tst-socket-consts.out: ../sysdeps/unix/sysv/linux/tst-socket-consts.py +diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c +index 5cd107ffa9be0699..fca9f6582db67fd7 100644 +--- a/sysdeps/unix/sysv/linux/recvmmsg.c ++++ b/sysdeps/unix/sysv/linux/recvmmsg.c +@@ -20,9 +20,9 @@ + #include + #include + +-int +-__recvmmsg64 (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, +- struct __timespec64 *timeout) ++static int ++recvmmsg_syscall (int fd, struct mmsghdr *vmessages, unsigned int vlen, ++ int flags, struct __timespec64 *timeout) + { + #ifndef __NR_recvmmsg_time64 + # define __NR_recvmmsg_time64 __NR_recvmmsg +@@ -45,12 +45,6 @@ __recvmmsg64 (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, + pts32 = &ts32; + } + +- socklen_t csize[IOV_MAX]; +- if (vlen > IOV_MAX) +- vlen = IOV_MAX; +- for (int i = 0; i < vlen; i++) +- csize[i] = vmessages[i].msg_hdr.msg_controllen; +- + # ifdef __ASSUME_RECVMMSG_SYSCALL + r = SYSCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags, pts32); + # else +@@ -60,11 +54,31 @@ __recvmmsg64 (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, + { + if (timeout != NULL) + *timeout = valid_timespec_to_timespec64 (ts32); ++ } ++#endif ++ return r; ++} ++ ++int ++__recvmmsg64 (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, ++ struct __timespec64 *timeout) ++{ ++#if __TIMESIZE != 64 ++ socklen_t csize[IOV_MAX]; ++ if (vlen > IOV_MAX) ++ vlen = IOV_MAX; ++ for (int i = 0; i < vlen; i++) ++ csize[i] = vmessages[i].msg_hdr.msg_controllen; ++#endif + ++ int r = recvmmsg_syscall (fd, vmessages, vlen, flags, timeout); ++#if __TIMESIZE != 64 ++ if (r > 0) ++ { + for (int i=0; i < r; i++) + __convert_scm_timestamps (&vmessages[i].msg_hdr, csize[i]); + } +-#endif /* __ASSUME_TIME64_SYSCALLS */ ++#endif + return r; + } + #if __TIMESIZE != 64 +@@ -80,7 +94,7 @@ __recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags, + ts64 = valid_timespec_to_timespec64 (*timeout); + pts64 = &ts64; + } +- int r = __recvmmsg64 (fd, vmessages, vlen, flags, pts64); ++ int r = recvmmsg_syscall (fd, vmessages, vlen, flags, pts64); + if (r >= 0 && timeout != NULL) + /* The remanining timeout will be always less the input TIMEOUT. */ + *timeout = valid_timespec64_to_timespec (ts64); +diff --git a/sysdeps/unix/sysv/linux/recvmsg.c b/sysdeps/unix/sysv/linux/recvmsg.c +index 07212f7c8641a921..c4b4704fd65d80c1 100644 +--- a/sysdeps/unix/sysv/linux/recvmsg.c ++++ b/sysdeps/unix/sysv/linux/recvmsg.c +@@ -20,29 +20,41 @@ + #include + #include + ++static int ++__recvmsg_syscall (int fd, struct msghdr *msg, int flags) ++{ ++#ifdef __ASSUME_RECVMSG_SYSCALL ++ return SYSCALL_CANCEL (recvmsg, fd, msg, flags); ++#else ++ return SOCKETCALL_CANCEL (recvmsg, fd, msg, flags); ++#endif ++} ++ + ssize_t +-__libc_recvmsg (int fd, struct msghdr *msg, int flags) ++__libc_recvmsg64 (int fd, struct msghdr *msg, int flags) + { + ssize_t r; +-#ifndef __ASSUME_TIME64_SYSCALLS ++#if __TIMESIZE != 64 + socklen_t orig_controllen = msg != NULL ? msg->msg_controllen : 0; + #endif + +-#ifdef __ASSUME_RECVMSG_SYSCALL +- r = SYSCALL_CANCEL (recvmsg, fd, msg, flags); +-#else +- r = SOCKETCALL_CANCEL (recvmsg, fd, msg, flags); +-#endif ++ r = __recvmsg_syscall (fd, msg, flags); + +-#ifndef __ASSUME_TIME64_SYSCALLS ++#if __TIMESIZE != 64 + if (r >= 0 && orig_controllen != 0) + __convert_scm_timestamps (msg, orig_controllen); + #endif + + return r; + } +-weak_alias (__libc_recvmsg, recvmsg) +-weak_alias (__libc_recvmsg, __recvmsg) + #if __TIMESIZE != 64 +-weak_alias (__recvmsg, __recvmsg64) ++weak_alias (__libc_recvmsg64, __recvmsg64) ++ ++ssize_t ++__libc_recvmsg (int fd, struct msghdr *msg, int flags) ++{ ++ return __recvmsg_syscall (fd, msg, flags); ++} + #endif ++weak_alias (__libc_recvmsg, recvmsg) ++weak_alias (__libc_recvmsg, __recvmsg) +diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat-time64.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat-time64.c +new file mode 100644 +index 0000000000000000..96a0bef0bf4a908b +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat-time64.c +@@ -0,0 +1 @@ ++#include "tst-socket-timestamp-compat.c" +diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c +new file mode 100644 +index 0000000000000000..de261dae5a6385cf +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c +@@ -0,0 +1,265 @@ ++/* Check recvmsg/recvmmsg 64-bit timestamp support. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* AF_INET socket and address used to receive data. */ ++static int srv; ++static struct sockaddr_in srv_addr; ++ ++static int ++do_sendto (const struct sockaddr_in *addr, int payload) ++{ ++ int s = xsocket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); ++ xconnect (s, (const struct sockaddr *) addr, sizeof (*addr)); ++ ++ xsendto (s, &payload, sizeof (payload), 0, (const struct sockaddr *) addr, ++ sizeof (*addr)); ++ ++ xclose (s); ++ ++ return 0; ++} ++ ++static void ++do_recvmsg_ancillary (bool use_multi_call, struct mmsghdr *mmhdr, ++ void *msgbuf, size_t msgbuflen, int exp_payload) ++{ ++ int payload; ++ struct iovec iov = ++ { ++ .iov_base = &payload, ++ .iov_len = sizeof (payload) ++ }; ++ mmhdr->msg_hdr.msg_name = NULL; ++ mmhdr->msg_hdr.msg_iov = &iov; ++ mmhdr->msg_hdr.msg_iovlen = 1; ++ mmhdr->msg_hdr.msg_control = msgbuf; ++ mmhdr->msg_hdr.msg_controllen = msgbuflen; ++ ++ int r; ++ if (use_multi_call) ++ { ++ r = recvmmsg (srv, mmhdr, 1, 0, NULL); ++ if (r >= 0) ++ r = mmhdr->msg_len; ++ } ++ else ++ r = recvmsg (srv, &mmhdr->msg_hdr, 0); ++ TEST_COMPARE (r, sizeof (int)); ++ TEST_COMPARE (payload, exp_payload); ++} ++ ++/* Check if recvmsg create the additional 64 bit timestamp if only 32 bit ++ is enabled for 64 bit recvmsg symbol. */ ++static void ++do_test_large_buffer (bool mc) ++{ ++ struct mmsghdr mmhdr = { 0 }; ++ /* It should be large enought for either timeval/timespec and the ++ 64 time type as well. */ ++ ++ union ++ { ++ struct cmsghdr cmsghdr; ++ char msgbuf[512]; ++ } control; ++ ++ /* Enable 32 bit timeval precision and check if no 64 bit timeval stamp ++ is created. */ ++ { ++ int r = setsockopt (srv, SOL_SOCKET, SO_TIMESTAMP_OLD, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ ++ do_sendto (&srv_addr, 42); ++ do_recvmsg_ancillary (mc, &mmhdr, &control, sizeof control, 42); ++ ++ bool found_timestamp = false; ++ for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); ++ cmsg != NULL; ++ cmsg = CMSG_NXTHDR (&mmhdr.msg_hdr, cmsg)) ++ { ++ if (cmsg->cmsg_level != SOL_SOCKET) ++ continue; ++ ++ if (sizeof (time_t) > 4 && cmsg->cmsg_type == SO_TIMESTAMP_NEW) ++ found_timestamp = true; ++ else ++ TEST_VERIFY (cmsg->cmsg_type != SO_TIMESTAMP_NEW); ++ } ++ ++ TEST_COMPARE (found_timestamp, sizeof (time_t) > 4); ++ } ++ ++ /* Same as before, but for timespec. */ ++ { ++ int r = setsockopt (srv, SOL_SOCKET, SO_TIMESTAMPNS_OLD, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ ++ do_sendto (&srv_addr, 42); ++ do_recvmsg_ancillary (mc, &mmhdr, &control, sizeof control, 42); ++ ++ bool found_timestamp = false; ++ for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); ++ cmsg != NULL; ++ cmsg = CMSG_NXTHDR (&mmhdr.msg_hdr, cmsg)) ++ { ++ if (cmsg->cmsg_level != SOL_SOCKET) ++ continue; ++ ++ if (sizeof (time_t) > 4 && cmsg->cmsg_type == SO_TIMESTAMPNS_NEW) ++ found_timestamp = true; ++ else ++ TEST_VERIFY (cmsg->cmsg_type != SO_TIMESTAMPNS_NEW); ++ } ++ ++ TEST_COMPARE (found_timestamp, sizeof (time_t) > 4); ++ } ++} ++ ++/* Check if recvmsg does not create the additional 64 bit timestamp if ++ only 32 bit timestamp is enabled if the ancillary buffer is not large ++ enought. Also checks if MSG_CTRUNC is set iff for 64 bit recvmsg ++ symbol. */ ++static void ++do_test_small_buffer (bool mc) ++{ ++ struct mmsghdr mmhdr = { 0 }; ++ ++ /* Enable 32 bit timeval precision and check if no 64 bit timeval stamp ++ is created. */ ++ { ++ int r = setsockopt (srv, SOL_SOCKET, SO_TIMESTAMP_OLD, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ ++ union ++ { ++ struct cmsghdr cmsghdr; ++ char msgbuf[CMSG_SPACE (sizeof (struct timeval))]; ++ } control; ++ ++ do_sendto (&srv_addr, 42); ++ do_recvmsg_ancillary (mc, &mmhdr, &control, sizeof control, 42); ++ ++ bool found_timestamp = false; ++ for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); ++ cmsg != NULL; ++ cmsg = CMSG_NXTHDR (&mmhdr.msg_hdr, cmsg)) ++ { ++ if (cmsg->cmsg_level != SOL_SOCKET) ++ continue; ++ ++ if (sizeof (time_t) > 4 && cmsg->cmsg_type == SO_TIMESTAMP_NEW) ++ found_timestamp = true; ++ else ++ TEST_VERIFY (cmsg->cmsg_type != SO_TIMESTAMP_NEW); ++ } ++ ++ if (sizeof (time_t) > 4) ++ { ++ TEST_VERIFY ((mmhdr.msg_hdr.msg_flags & MSG_CTRUNC)); ++ TEST_COMPARE (found_timestamp, 0); ++ } ++ else ++ { ++ TEST_VERIFY (!(mmhdr.msg_hdr.msg_flags & MSG_CTRUNC)); ++ TEST_COMPARE (found_timestamp, 0); ++ } ++ } ++ ++ /* Same as before, but for timespec. */ ++ { ++ int r = setsockopt (srv, SOL_SOCKET, SO_TIMESTAMPNS_OLD, &(int){1}, ++ sizeof (int)); ++ TEST_VERIFY_EXIT (r != -1); ++ ++ union ++ { ++ struct cmsghdr cmsghdr; ++ char msgbuf[CMSG_SPACE (sizeof (struct timespec))]; ++ } control; ++ ++ do_sendto (&srv_addr, 42); ++ do_recvmsg_ancillary (mc, &mmhdr, &control, sizeof control, 42); ++ ++ bool found_timestamp = false; ++ for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); ++ cmsg != NULL; ++ cmsg = CMSG_NXTHDR (&mmhdr.msg_hdr, cmsg)) ++ { ++ if (cmsg->cmsg_level != SOL_SOCKET) ++ continue; ++ ++ if (sizeof (time_t) > 4 && cmsg->cmsg_type == SO_TIMESTAMPNS_NEW) ++ found_timestamp = true; ++ else ++ TEST_VERIFY (cmsg->cmsg_type != SO_TIMESTAMPNS_NEW); ++ } ++ ++ if (sizeof (time_t) > 4) ++ { ++ TEST_VERIFY ((mmhdr.msg_hdr.msg_flags & MSG_CTRUNC)); ++ TEST_COMPARE (found_timestamp, 0); ++ } ++ else ++ { ++ TEST_VERIFY ((mmhdr.msg_hdr.msg_flags & MSG_CTRUNC) == 0); ++ TEST_COMPARE (found_timestamp, 0); ++ } ++ } ++} ++ ++static int ++do_test (void) ++{ ++ /* This test only make sense for ABIs that support 32 bit time_t socket ++ timestampss. */ ++ if (sizeof (time_t) > 4 && __WORDSIZE == 64) ++ return 0; ++ ++ srv = xsocket (AF_INET, SOCK_DGRAM, 0); ++ srv_addr = (struct sockaddr_in) { ++ .sin_family = AF_INET, ++ .sin_addr = {.s_addr = htonl (INADDR_LOOPBACK) }, ++ }; ++ xbind (srv, (struct sockaddr *) &srv_addr, sizeof (srv_addr)); ++ { ++ socklen_t sa_len = sizeof (srv_addr); ++ xgetsockname (srv, (struct sockaddr *) &srv_addr, &sa_len); ++ TEST_VERIFY (sa_len == sizeof (srv_addr)); ++ } ++ ++ /* Check recvmsg; */ ++ do_test_large_buffer (false); ++ do_test_small_buffer (false); ++ /* Check recvmmsg. */ ++ do_test_large_buffer (true); ++ do_test_small_buffer (true); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-103.patch b/SOURCES/glibc-upstream-2.34-103.patch new file mode 100644 index 0000000..1605e95 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-103.patch @@ -0,0 +1,24 @@ +commit 008003dc6e83439c5e04a744b7fd8197df19096e +Author: H.J. Lu +Date: Sat Jan 29 05:22:31 2022 -0800 + + tst-socket-timestamp-compat.c: Check __TIMESIZE [BZ #28837] + + time_t size is defined by __TIMESIZE, not __WORDSIZE. Check __TIMESIZE, + instead of __WORDSIZE, for time_t size. This fixes BZ #28837. + + (cherry pick from commit 77a602ebb0769e7ccc5f9f8e06f7fffe66f69dfc) + +diff --git a/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c +index de261dae5a6385cf..0ff1a214e605105b 100644 +--- a/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c ++++ b/sysdeps/unix/sysv/linux/tst-socket-timestamp-compat.c +@@ -237,7 +237,7 @@ do_test (void) + { + /* This test only make sense for ABIs that support 32 bit time_t socket + timestampss. */ +- if (sizeof (time_t) > 4 && __WORDSIZE == 64) ++ if (sizeof (time_t) > 4 && __TIMESIZE == 64) + return 0; + + srv = xsocket (AF_INET, SOCK_DGRAM, 0); diff --git a/SOURCES/glibc-upstream-2.34-104.patch b/SOURCES/glibc-upstream-2.34-104.patch new file mode 100644 index 0000000..4ae7486 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-104.patch @@ -0,0 +1,26 @@ +commit 05c83ccaf50aef2dd30d92cbb814383f6bddea2c +Author: Gleb Fotengauer-Malinovskiy +Date: Tue Feb 1 22:39:02 2022 +0000 + + linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850] + + Pass the actual number of bytes returned by the kernel. + + Fixes: 33099d72e41c ("linux: Simplify get_nprocs") + Reviewed-by: Dmitry V. Levin + + (cherry picked from commit 97ba273b505763325efd802dc3a9562dbba79579) + +diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c +index 7fc6521942e87293..7babd947aa902e77 100644 +--- a/sysdeps/unix/sysv/linux/getsysstats.c ++++ b/sysdeps/unix/sysv/linux/getsysstats.c +@@ -45,7 +45,7 @@ __get_nprocs_sched (void) + int r = INTERNAL_SYSCALL_CALL (sched_getaffinity, 0, cpu_bits_size, + cpu_bits); + if (r > 0) +- return CPU_COUNT_S (cpu_bits_size, (cpu_set_t*) cpu_bits); ++ return CPU_COUNT_S (r, (cpu_set_t*) cpu_bits); + else if (r == -EINVAL) + /* The input buffer is still not enough to store the number of cpus. This + is an arbitrary values assuming such systems should be rare and there diff --git a/SOURCES/glibc-upstream-2.34-105.patch b/SOURCES/glibc-upstream-2.34-105.patch new file mode 100644 index 0000000..423f65f --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-105.patch @@ -0,0 +1,234 @@ +commit ad615b59c78d6d37fee921fb2b2ae6b72c930625 +Author: Florian Weimer +Date: Tue Sep 28 18:55:49 2021 +0200 + + Linux: Simplify __opensock and fix race condition [BZ #28353] + + AF_NETLINK support is not quite optional on modern Linux systems + anymore, so it is likely that the first attempt will always succeed. + Consequently, there is no need to cache the result. Keep AF_UNIX + and the Internet address families as a fallback, for the rare case + that AF_NETLINK is missing. The other address families previously + probed are totally obsolete be now, so remove them. + + Use this simplified version as the generic implementation, disabling + Netlink support as needed. + + (cherry picked from commit 5bf07e1b3a74232bfb8332275110be1a5da50f83) + +diff --git a/socket/opensock.c b/socket/opensock.c +index 37148d4743343ff4..ff94d27a61bd3889 100644 +--- a/socket/opensock.c ++++ b/socket/opensock.c +@@ -1,4 +1,5 @@ +-/* Copyright (C) 1999-2021 Free Software Foundation, Inc. ++/* Create socket with an unspecified address family for use with ioctl. ++ Copyright (C) 1999-2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -15,56 +16,34 @@ + License along with the GNU C Library; if not, see + . */ + +-#include ++#include + #include +-#include + + /* Return a socket of any type. The socket can be used in subsequent + ioctl calls to talk to the kernel. */ + int + __opensock (void) + { +- /* Cache the last AF that worked, to avoid many redundant calls to +- socket(). */ +- static int sock_af = -1; +- int fd = -1; +- __libc_lock_define_initialized (static, lock); +- +- if (sock_af != -1) +- { +- fd = __socket (sock_af, SOCK_DGRAM, 0); +- if (fd != -1) +- return fd; +- } +- +- __libc_lock_lock (lock); +- +- if (sock_af != -1) +- fd = __socket (sock_af, SOCK_DGRAM, 0); +- +- if (fd == -1) +- { +-#ifdef AF_INET +- fd = __socket (sock_af = AF_INET, SOCK_DGRAM, 0); +-#endif +-#ifdef AF_INET6 +- if (fd < 0) +- fd = __socket (sock_af = AF_INET6, SOCK_DGRAM, 0); +-#endif +-#ifdef AF_IPX +- if (fd < 0) +- fd = __socket (sock_af = AF_IPX, SOCK_DGRAM, 0); +-#endif +-#ifdef AF_AX25 +- if (fd < 0) +- fd = __socket (sock_af = AF_AX25, SOCK_DGRAM, 0); +-#endif +-#ifdef AF_APPLETALK +- if (fd < 0) +- fd = __socket (sock_af = AF_APPLETALK, SOCK_DGRAM, 0); ++ /* SOCK_DGRAM is supported by all address families. (Netlink does ++ not support SOCK_STREAM.) */ ++ int type = SOCK_DGRAM | SOCK_CLOEXEC; ++ int fd; ++ ++#ifdef AF_NETLINK ++ fd = __socket (AF_NETLINK, type, 0); ++ if (fd >= 0) ++ return fd; + #endif +- } + +- __libc_lock_unlock (lock); ++ fd = __socket (AF_UNIX, type, 0); ++ if (fd >= 0) ++ return fd; ++ fd = __socket (AF_INET, type, 0); ++ if (fd >= 0) ++ return fd; ++ fd = __socket (AF_INET6, type, 0); ++ if (fd >= 0) ++ return fd; ++ __set_errno (ENOENT); + return fd; + } +diff --git a/sysdeps/unix/sysv/linux/opensock.c b/sysdeps/unix/sysv/linux/opensock.c +deleted file mode 100644 +index e87d6e58b0b84f82..0000000000000000 +--- a/sysdeps/unix/sysv/linux/opensock.c ++++ /dev/null +@@ -1,114 +0,0 @@ +-/* Copyright (C) 1999-2021 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-/* Return a socket of any type. The socket can be used in subsequent +- ioctl calls to talk to the kernel. */ +-int +-__opensock (void) +-{ +- static int last_family; /* Available socket family we will use. */ +- static int last_type; +- static const struct +- { +- int family; +- const char procname[15]; +- } afs[] = +- { +- { AF_UNIX, "net/unix" }, +- { AF_INET, "" }, +- { AF_INET6, "net/if_inet6" }, +- { AF_AX25, "net/ax25" }, +- { AF_NETROM, "net/nr" }, +- { AF_ROSE, "net/rose" }, +- { AF_IPX, "net/ipx" }, +- { AF_APPLETALK, "net/appletalk" }, +- { AF_ECONET, "sys/net/econet" }, +- { AF_ASH, "sys/net/ash" }, +- { AF_X25, "net/x25" }, +-#ifdef NEED_AF_IUCV +- { AF_IUCV, "net/iucv" } +-#endif +- }; +-#define nafs (sizeof (afs) / sizeof (afs[0])) +- char fname[sizeof "/proc/" + 14]; +- int result; +- int has_proc; +- size_t cnt; +- +- /* We already know which family to use from the last call. Use it +- again. */ +- if (last_family != 0) +- { +- assert (last_type != 0); +- +- result = __socket (last_family, last_type | SOCK_CLOEXEC, 0); +- if (result != -1 || errno != EAFNOSUPPORT) +- /* Maybe the socket type isn't supported anymore (module is +- unloaded). In this case again try to find the type. */ +- return result; +- +- /* Reset the values. They seem not valid anymore. */ +- last_family = 0; +- last_type = 0; +- } +- +- /* Check whether the /proc filesystem is available. */ +- has_proc = __access ("/proc/net", R_OK) != -1; +- strcpy (fname, "/proc/"); +- +- /* Iterate over the interface families and find one which is +- available. */ +- for (cnt = 0; cnt < nafs; ++cnt) +- { +- int type = SOCK_DGRAM; +- +- if (has_proc && afs[cnt].procname[0] != '\0') +- { +- strcpy (fname + 6, afs[cnt].procname); +- if (__access (fname, R_OK) == -1) +- /* The /proc entry is not available. I.e., we cannot +- create a socket of this type (without loading the +- module). Don't look for it since this might trigger +- loading the module. */ +- continue; +- } +- +- if (afs[cnt].family == AF_NETROM || afs[cnt].family == AF_X25) +- type = SOCK_SEQPACKET; +- +- result = __socket (afs[cnt].family, type | SOCK_CLOEXEC, 0); +- if (result != -1) +- { +- /* Found an available family. */ +- last_type = type; +- last_family = afs[cnt].family; +- return result; +- } +- } +- +- /* None of the protocol families is available. It is unclear what kind +- of error is returned. ENOENT seems like a reasonable choice. */ +- __set_errno (ENOENT); +- return -1; +-} +diff --git a/sysdeps/unix/sysv/linux/s390/opensock.c b/sysdeps/unix/sysv/linux/s390/opensock.c +deleted file mode 100644 +index f099d651ff04d211..0000000000000000 +--- a/sysdeps/unix/sysv/linux/s390/opensock.c ++++ /dev/null +@@ -1,2 +0,0 @@ +-#define NEED_AF_IUCV 1 +-#include "../opensock.c" diff --git a/SOURCES/glibc-upstream-2.34-106.patch b/SOURCES/glibc-upstream-2.34-106.patch new file mode 100644 index 0000000..296f32a --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-106.patch @@ -0,0 +1,44 @@ +commit d8302ba2da1e5ac59a1c4dc1c1207a10fdafdb08 +Author: Samuel Thibault +Date: Mon Oct 18 01:39:02 2021 +0200 + + hurd if_index: Explicitly use AF_INET for if index discovery + + 5bf07e1b3a74 ("Linux: Simplify __opensock and fix race condition [BZ #28353]") + made __opensock try NETLINK then UNIX then INET. On the Hurd, only INET + knows about network interfaces, so better actually specify that in + if_index. + + (cherry picked from commit 1d3decee997ba2fc24af81803299b2f4f3c47063) + +diff --git a/sysdeps/mach/hurd/if_index.c b/sysdeps/mach/hurd/if_index.c +index 0eab510453c9e861..e785ac15aa6a1002 100644 +--- a/sysdeps/mach/hurd/if_index.c ++++ b/sysdeps/mach/hurd/if_index.c +@@ -32,7 +32,7 @@ unsigned int + __if_nametoindex (const char *ifname) + { + struct ifreq ifr; +- int fd = __opensock (); ++ int fd = __socket (AF_INET, SOCK_DGRAM, 0); + + if (fd < 0) + return 0; +@@ -84,7 +84,7 @@ __if_nameindex (void) + error_t err = 0; + char data[2048]; + file_t server; +- int fd = __opensock (); ++ int fd = __socket (AF_INET, SOCK_DGRAM, 0); + struct ifconf ifc; + unsigned int nifs, i; + struct if_nameindex *idx = NULL; +@@ -169,7 +169,7 @@ char * + __if_indextoname (unsigned int ifindex, char ifname[IF_NAMESIZE]) + { + struct ifreq ifr; +- int fd = __opensock (); ++ int fd = __socket (AF_INET, SOCK_DGRAM, 0); + + if (fd < 0) + return NULL; diff --git a/SOURCES/glibc-upstream-2.34-107.patch b/SOURCES/glibc-upstream-2.34-107.patch new file mode 100644 index 0000000..650aa2b --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-107.patch @@ -0,0 +1,35 @@ +commit 6eaf10cbb78d22eae7999d9de55f6b93999e0860 +Author: Florian Weimer +Date: Mon Nov 22 14:41:14 2021 +0100 + + socket: Do not use AF_NETLINK in __opensock + + It is not possible to use interface ioctls with netlink sockets + on all Linux kernels. + + Reviewed-by: Adhemerval Zanella + (cherry picked from commit 3d981795cd00cc9b73c3ee5087c308361acd62e5) + +diff --git a/socket/opensock.c b/socket/opensock.c +index ff94d27a61bd3889..3e35821f91643456 100644 +--- a/socket/opensock.c ++++ b/socket/opensock.c +@@ -24,17 +24,10 @@ + int + __opensock (void) + { +- /* SOCK_DGRAM is supported by all address families. (Netlink does +- not support SOCK_STREAM.) */ ++ /* SOCK_DGRAM is supported by all address families. */ + int type = SOCK_DGRAM | SOCK_CLOEXEC; + int fd; + +-#ifdef AF_NETLINK +- fd = __socket (AF_NETLINK, type, 0); +- if (fd >= 0) +- return fd; +-#endif +- + fd = __socket (AF_UNIX, type, 0); + if (fd >= 0) + return fd; diff --git a/SOURCES/glibc-upstream-2.34-11.patch b/SOURCES/glibc-upstream-2.34-11.patch new file mode 100644 index 0000000..47849fb --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-11.patch @@ -0,0 +1,62 @@ +commit 52d0119743180164d1664b6773ac5d873f224608 +Author: Jiaxun Yang +Date: Tue Sep 7 13:31:42 2021 +0800 + + MIPS: Setup errno for {f,l,}xstat + + {f,l,}xstat stub for MIPS is using INTERNAL_SYSCALL + to do xstat syscall for glibc ver, However it leaves + errno untouched and thus giving bad errno output. + + Setup errno properly when syscall returns non-zero. + + Signed-off-by: Jiaxun Yang + Reviewed-by: Adhemerval Zanella + + (cherry picked from commit 66016ec8aeefd40e016d7040d966484c764b0e9c) + +diff --git a/sysdeps/unix/sysv/linux/mips/fxstat.c b/sysdeps/unix/sysv/linux/mips/fxstat.c +index 11511d30b38708ce..4a6016ff123e8dd9 100644 +--- a/sysdeps/unix/sysv/linux/mips/fxstat.c ++++ b/sysdeps/unix/sysv/linux/mips/fxstat.c +@@ -35,7 +35,9 @@ __fxstat (int vers, int fd, struct stat *buf) + { + struct kernel_stat kbuf; + int r = INTERNAL_SYSCALL_CALL (fstat, fd, &kbuf); +- return r ?: __xstat_conv (vers, &kbuf, buf); ++ if (r == 0) ++ return __xstat_conv (vers, &kbuf, buf); ++ return INLINE_SYSCALL_ERROR_RETURN_VALUE (-r); + } + } + } +diff --git a/sysdeps/unix/sysv/linux/mips/lxstat.c b/sysdeps/unix/sysv/linux/mips/lxstat.c +index 871fb6c6c5886665..54f990a250677091 100644 +--- a/sysdeps/unix/sysv/linux/mips/lxstat.c ++++ b/sysdeps/unix/sysv/linux/mips/lxstat.c +@@ -35,7 +35,9 @@ __lxstat (int vers, const char *name, struct stat *buf) + { + struct kernel_stat kbuf; + int r = INTERNAL_SYSCALL_CALL (lstat, name, &kbuf); +- return r ?: __xstat_conv (vers, &kbuf, buf); ++ if (r == 0) ++ return __xstat_conv (vers, &kbuf, buf); ++ return INLINE_SYSCALL_ERROR_RETURN_VALUE (-r); + } + } + } +diff --git a/sysdeps/unix/sysv/linux/mips/xstat.c b/sysdeps/unix/sysv/linux/mips/xstat.c +index 9d810b6f653b964b..86f4dc31a82ff1bb 100644 +--- a/sysdeps/unix/sysv/linux/mips/xstat.c ++++ b/sysdeps/unix/sysv/linux/mips/xstat.c +@@ -35,7 +35,9 @@ __xstat (int vers, const char *name, struct stat *buf) + { + struct kernel_stat kbuf; + int r = INTERNAL_SYSCALL_CALL (stat, name, &kbuf); +- return r ?: __xstat_conv (vers, &kbuf, buf); ++ if (r == 0) ++ return __xstat_conv (vers, &kbuf, buf); ++ return INLINE_SYSCALL_ERROR_RETURN_VALUE (-r); + } + } + } diff --git a/SOURCES/glibc-upstream-2.34-12.patch b/SOURCES/glibc-upstream-2.34-12.patch new file mode 100644 index 0000000..ef0ec20 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-12.patch @@ -0,0 +1,117 @@ +commit addc9d62d61eea790a35328cbfce53333a07bd3e +Author: Florian Weimer +Date: Mon Aug 30 13:43:56 2021 +0200 + + support: Add support_wait_for_thread_exit + + (cherry picked from commit 032d74eaf6179100048a5bf0ce942e97dc8b9a60) + +diff --git a/support/Makefile b/support/Makefile +index a462781718426d35..ef2b1a980a407f8f 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -82,9 +82,10 @@ libsupport-routines = \ + support_test_compare_blob \ + support_test_compare_failure \ + support_test_compare_string \ +- support_write_file_string \ + support_test_main \ + support_test_verify_impl \ ++ support_wait_for_thread_exit \ ++ support_write_file_string \ + temp_file \ + timespec \ + timespec-time64 \ +diff --git a/support/support.h b/support/support.h +index 834dba909770a992..a5978b939af2fb41 100644 +--- a/support/support.h ++++ b/support/support.h +@@ -174,6 +174,10 @@ timer_t support_create_timer (uint64_t sec, long int nsec, bool repeat, + /* Disable the timer TIMER. */ + void support_delete_timer (timer_t timer); + ++/* Wait until all threads except the current thread have exited (as ++ far as the kernel is concerned). */ ++void support_wait_for_thread_exit (void); ++ + struct support_stack + { + void *stack; +diff --git a/support/support_wait_for_thread_exit.c b/support/support_wait_for_thread_exit.c +new file mode 100644 +index 0000000000000000..658a81381006ea62 +--- /dev/null ++++ b/support/support_wait_for_thread_exit.c +@@ -0,0 +1,72 @@ ++/* Wait until all threads except the current thread has exited. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++void ++support_wait_for_thread_exit (void) ++{ ++#ifdef __linux__ ++ DIR *proc_self_task = opendir ("/proc/self/task"); ++ TEST_VERIFY_EXIT (proc_self_task != NULL); ++ ++ while (true) ++ { ++ errno = 0; ++ struct dirent *e = readdir (proc_self_task); ++ if (e == NULL && errno != 0) ++ FAIL_EXIT1 ("readdir: %m"); ++ if (e == NULL) ++ { ++ /* Only the main thread remains. Testing may continue. */ ++ closedir (proc_self_task); ++ return; ++ } ++ ++ if (strcmp (e->d_name, ".") == 0 || strcmp (e->d_name, "..") == 0) ++ continue; ++ ++ int task_tid = atoi (e->d_name); ++ if (task_tid <= 0) ++ FAIL_EXIT1 ("Invalid /proc/self/task entry: %s", e->d_name); ++ ++ if (task_tid == gettid ()) ++ /* The current thread. Keep scanning for other ++ threads. */ ++ continue; ++ ++ /* task_tid does not refer to this thread here, i.e., there is ++ another running thread. */ ++ ++ /* Small timeout to give the thread a chance to exit. */ ++ usleep (50 * 1000); ++ ++ /* Start scanning the directory from the start. */ ++ rewinddir (proc_self_task); ++ } ++#else ++ /* Use a large timeout because we cannot verify that the thread has ++ exited. */ ++ usleep (5 * 1000 * 1000); ++#endif ++} diff --git a/SOURCES/glibc-upstream-2.34-13.patch b/SOURCES/glibc-upstream-2.34-13.patch new file mode 100644 index 0000000..8f0acc6 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-13.patch @@ -0,0 +1,279 @@ +commit 3abf3bd4edc86fb28c099cc85203cb46a811e0b8 +Author: Florian Weimer +Date: Mon Sep 13 11:06:08 2021 +0200 + + nptl: pthread_kill, pthread_cancel should not fail after exit (bug 19193) + + This closes one remaining race condition related to bug 12889: if + the thread already exited on the kernel side, returning ESRCH + is not correct because that error is reserved for the thread IDs + (pthread_t values) whose lifetime has ended. In case of a + kernel-side exit and a valid thread ID, no signal needs to be sent + and cancellation does not have an effect, so just return 0. + + sysdeps/pthread/tst-kill4.c triggers undefined behavior and is + removed with this commit. + + Reviewed-by: Adhemerval Zanella + (cherry picked from commit 8af8456004edbab71f8903a60a3cae442cf6fe69) + +diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c +index cc25ff21f364e8a4..9bac6e3b76a20312 100644 +--- a/nptl/pthread_cancel.c ++++ b/nptl/pthread_cancel.c +@@ -62,10 +62,11 @@ __pthread_cancel (pthread_t th) + { + volatile struct pthread *pd = (volatile struct pthread *) th; + +- /* Make sure the descriptor is valid. */ +- if (INVALID_TD_P (pd)) +- /* Not a valid thread handle. */ +- return ESRCH; ++ if (pd->tid == 0) ++ /* The thread has already exited on the kernel side. Its outcome ++ (regular exit, other cancelation) has already been ++ determined. */ ++ return 0; + + static int init_sigcancel = 0; + if (atomic_load_relaxed (&init_sigcancel) == 0) +diff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c +index f79a2b26fc7f72e5..5d4c86f9205a6fb5 100644 +--- a/nptl/pthread_kill.c ++++ b/nptl/pthread_kill.c +@@ -46,7 +46,12 @@ __pthread_kill_internal (pthread_t threadid, int signo) + ? INTERNAL_SYSCALL_ERRNO (val) : 0); + } + else +- val = ESRCH; ++ /* The kernel reports that the thread has exited. POSIX specifies ++ the ESRCH error only for the case when the lifetime of a thread ++ ID has ended, but calling pthread_kill on such a thread ID is ++ undefined in glibc. Therefore, do not treat kernel thread exit ++ as an error. */ ++ val = 0; + + return val; + } +diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile +index 42f9fc507263657d..dedfa0d290da4949 100644 +--- a/sysdeps/pthread/Makefile ++++ b/sysdeps/pthread/Makefile +@@ -89,7 +89,7 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ + tst-join8 tst-join9 tst-join10 tst-join11 tst-join12 tst-join13 \ + tst-join14 tst-join15 \ + tst-key1 tst-key2 tst-key3 tst-key4 \ +- tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \ ++ tst-kill1 tst-kill2 tst-kill3 tst-kill5 tst-kill6 \ + tst-locale1 tst-locale2 \ + tst-memstream \ + tst-mutex-errorcheck tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 \ +@@ -118,6 +118,9 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ + tst-unload \ + tst-unwind-thread \ + tst-pt-vfork1 tst-pt-vfork2 tst-vfork1x tst-vfork2x \ ++ tst-pthread_cancel-exited \ ++ tst-pthread_kill-exited \ ++ # tests + + tests-time64 := \ + tst-abstime-time64 \ +diff --git a/sysdeps/pthread/tst-kill4.c b/sysdeps/pthread/tst-kill4.c +deleted file mode 100644 +index 9563939792b96ebd..0000000000000000 +--- a/sysdeps/pthread/tst-kill4.c ++++ /dev/null +@@ -1,90 +0,0 @@ +-/* Copyright (C) 2003-2021 Free Software Foundation, Inc. +- This file is part of the GNU C Library. +- Contributed by Ulrich Drepper , 2003. +- +- The GNU C Library is free software; you can redistribute it and/or +- modify it under the terms of the GNU Lesser General Public +- License as published by the Free Software Foundation; either +- version 2.1 of the License, or (at your option) any later version. +- +- The GNU C Library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +- Lesser General Public License for more details. +- +- You should have received a copy of the GNU Lesser General Public +- License along with the GNU C Library; if not, see +- . */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +- +-static void * +-tf (void *a) +-{ +- return NULL; +-} +- +- +-int +-do_test (void) +-{ +- pthread_attr_t at; +- if (pthread_attr_init (&at) != 0) +- { +- puts ("attr_create failed"); +- exit (1); +- } +- +- /* Limit thread stack size, because if it is too large, pthread_join +- will free it immediately rather than put it into stack cache. */ +- if (pthread_attr_setstacksize (&at, 2 * 1024 * 1024) != 0) +- { +- puts ("setstacksize failed"); +- exit (1); +- } +- +- pthread_t th; +- if (pthread_create (&th, &at, tf, NULL) != 0) +- { +- puts ("create failed"); +- exit (1); +- } +- +- pthread_attr_destroy (&at); +- +- if (pthread_join (th, NULL) != 0) +- { +- puts ("join failed"); +- exit (1); +- } +- +- /* The following only works because we assume here something about +- the implementation. Namely, that the memory allocated for the +- thread descriptor is not going away, that the TID field is +- cleared and therefore the signal is sent to process 0, and that +- we can savely assume there is no other process with this ID at +- that time. */ +- int e = pthread_kill (th, 0); +- if (e == 0) +- { +- puts ("pthread_kill succeeded"); +- exit (1); +- } +- if (e != ESRCH) +- { +- puts ("pthread_kill didn't return ESRCH"); +- exit (1); +- } +- +- return 0; +-} +- +- +-#define TEST_FUNCTION do_test () +-#include "../test-skeleton.c" +diff --git a/sysdeps/pthread/tst-pthread_cancel-exited.c b/sysdeps/pthread/tst-pthread_cancel-exited.c +new file mode 100644 +index 0000000000000000..811c9bee07ab2638 +--- /dev/null ++++ b/sysdeps/pthread/tst-pthread_cancel-exited.c +@@ -0,0 +1,45 @@ ++/* Test that pthread_kill succeeds for an exited thread. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This test verifies that pthread_kill returns 0 (and not ESRCH) for ++ a thread that has exited on the kernel side. */ ++ ++#include ++#include ++#include ++ ++static void * ++noop_thread (void *closure) ++{ ++ return NULL; ++} ++ ++static int ++do_test (void) ++{ ++ pthread_t thr = xpthread_create (NULL, noop_thread, NULL); ++ ++ support_wait_for_thread_exit (); ++ ++ xpthread_cancel (thr); ++ xpthread_join (thr); ++ ++ return 0; ++} ++ ++#include +diff --git a/sysdeps/pthread/tst-pthread_kill-exited.c b/sysdeps/pthread/tst-pthread_kill-exited.c +new file mode 100644 +index 0000000000000000..7575fb6d58cae99c +--- /dev/null ++++ b/sysdeps/pthread/tst-pthread_kill-exited.c +@@ -0,0 +1,46 @@ ++/* Test that pthread_kill succeeds for an exited thread. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This test verifies that pthread_kill returns 0 (and not ESRCH) for ++ a thread that has exited on the kernel side. */ ++ ++#include ++#include ++#include ++#include ++ ++static void * ++noop_thread (void *closure) ++{ ++ return NULL; ++} ++ ++static int ++do_test (void) ++{ ++ pthread_t thr = xpthread_create (NULL, noop_thread, NULL); ++ ++ support_wait_for_thread_exit (); ++ ++ xpthread_kill (thr, SIGUSR1); ++ xpthread_join (thr); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-14.patch b/SOURCES/glibc-upstream-2.34-14.patch new file mode 100644 index 0000000..9d9c1c5 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-14.patch @@ -0,0 +1,411 @@ +commit a8ac8c4725ddb1119764126a8674a04c9dd5aea8 +Author: Florian Weimer +Date: Mon Sep 13 11:06:08 2021 +0200 + + nptl: Fix race between pthread_kill and thread exit (bug 12889) + + A new thread exit lock and flag are introduced. They are used to + detect that the thread is about to exit or has exited in + __pthread_kill_internal, and the signal is not sent in this case. + + The test sysdeps/pthread/tst-pthread_cancel-select-loop.c is derived + from a downstream test originally written by Marek Polacek. + + Reviewed-by: Adhemerval Zanella + (cherry picked from commit 526c3cf11ee9367344b6b15d669e4c3cb461a2be) + +diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c +index cfe37a3443b69454..50065bc9bd8a28e5 100644 +--- a/nptl/allocatestack.c ++++ b/nptl/allocatestack.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + /* Default alignment of stack. */ + #ifndef STACK_ALIGN +@@ -127,6 +128,8 @@ get_cached_stack (size_t *sizep, void **memp) + /* No pending event. */ + result->nextevent = NULL; + ++ result->exiting = false; ++ __libc_lock_init (result->exit_lock); + result->tls_state = (struct tls_internal_t) { 0 }; + + /* Clear the DTV. */ +diff --git a/nptl/descr.h b/nptl/descr.h +index c85778d44941a42f..4de84138fb960fa4 100644 +--- a/nptl/descr.h ++++ b/nptl/descr.h +@@ -396,6 +396,12 @@ struct pthread + PTHREAD_CANCEL_ASYNCHRONOUS). */ + unsigned char canceltype; + ++ /* Used in __pthread_kill_internal to detected a thread that has ++ exited or is about to exit. exit_lock must only be acquired ++ after blocking signals. */ ++ bool exiting; ++ int exit_lock; /* A low-level lock (for use with __libc_lock_init etc). */ ++ + /* Used on strsignal. */ + struct tls_internal_t tls_state; + +diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c +index d8ec299cb1661e82..33b426fc682300dc 100644 +--- a/nptl/pthread_create.c ++++ b/nptl/pthread_create.c +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + +@@ -485,6 +486,19 @@ start_thread (void *arg) + /* This was the last thread. */ + exit (0); + ++ /* This prevents sending a signal from this thread to itself during ++ its final stages. This must come after the exit call above ++ because atexit handlers must not run with signals blocked. */ ++ __libc_signal_block_all (NULL); ++ ++ /* Tell __pthread_kill_internal that this thread is about to exit. ++ If there is a __pthread_kill_internal in progress, this delays ++ the thread exit until the signal has been queued by the kernel ++ (so that the TID used to send it remains valid). */ ++ __libc_lock_lock (pd->exit_lock); ++ pd->exiting = true; ++ __libc_lock_unlock (pd->exit_lock); ++ + #ifndef __ASSUME_SET_ROBUST_LIST + /* If this thread has any robust mutexes locked, handle them now. */ + # if __PTHREAD_MUTEX_HAVE_PREV +diff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c +index 5d4c86f9205a6fb5..fb7862eff787a94f 100644 +--- a/nptl/pthread_kill.c ++++ b/nptl/pthread_kill.c +@@ -16,6 +16,7 @@ + License along with the GNU C Library; if not, see + . */ + ++#include + #include + #include + #include +@@ -23,37 +24,51 @@ + int + __pthread_kill_internal (pthread_t threadid, int signo) + { +- pid_t tid; + struct pthread *pd = (struct pthread *) threadid; +- + if (pd == THREAD_SELF) +- /* It is a special case to handle raise() implementation after a vfork +- call (which does not update the PD tid field). */ +- tid = INLINE_SYSCALL_CALL (gettid); +- else +- /* Force load of pd->tid into local variable or register. Otherwise +- if a thread exits between ESRCH test and tgkill, we might return +- EINVAL, because pd->tid would be cleared by the kernel. */ +- tid = atomic_forced_read (pd->tid); +- +- int val; +- if (__glibc_likely (tid > 0)) + { +- pid_t pid = __getpid (); +- +- val = INTERNAL_SYSCALL_CALL (tgkill, pid, tid, signo); +- val = (INTERNAL_SYSCALL_ERROR_P (val) +- ? INTERNAL_SYSCALL_ERRNO (val) : 0); ++ /* Use the actual TID from the kernel, so that it refers to the ++ current thread even if called after vfork. There is no ++ signal blocking in this case, so that the signal is delivered ++ immediately, before __pthread_kill_internal returns: a signal ++ sent to the thread itself needs to be delivered ++ synchronously. (It is unclear if Linux guarantees the ++ delivery of all pending signals after unblocking in the code ++ below. POSIX only guarantees delivery of a single signal, ++ which may not be the right one.) */ ++ pid_t tid = INTERNAL_SYSCALL_CALL (gettid); ++ int ret = INTERNAL_SYSCALL_CALL (kill, tid, signo); ++ return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; + } ++ ++ /* Block all signals, as required by pd->exit_lock. */ ++ sigset_t old_mask; ++ __libc_signal_block_all (&old_mask); ++ __libc_lock_lock (pd->exit_lock); ++ ++ int ret; ++ if (pd->exiting) ++ /* The thread is about to exit (or has exited). Sending the ++ signal is either not observable (the target thread has already ++ blocked signals at this point), or it will fail, or it might be ++ delivered to a new, unrelated thread that has reused the TID. ++ So do not actually send the signal. Do not report an error ++ because the threadid argument is still valid (the thread ID ++ lifetime has not ended), and ESRCH (for example) would be ++ misleading. */ ++ ret = 0; + else +- /* The kernel reports that the thread has exited. POSIX specifies +- the ESRCH error only for the case when the lifetime of a thread +- ID has ended, but calling pthread_kill on such a thread ID is +- undefined in glibc. Therefore, do not treat kernel thread exit +- as an error. */ +- val = 0; ++ { ++ /* Using tgkill is a safety measure. pd->exit_lock ensures that ++ the target thread cannot exit. */ ++ ret = INTERNAL_SYSCALL_CALL (tgkill, __getpid (), pd->tid, signo); ++ ret = INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; ++ } ++ ++ __libc_lock_unlock (pd->exit_lock); ++ __libc_signal_restore_set (&old_mask); + +- return val; ++ return ret; + } + + int +diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile +index dedfa0d290da4949..48dba717a1cdc20a 100644 +--- a/sysdeps/pthread/Makefile ++++ b/sysdeps/pthread/Makefile +@@ -119,7 +119,9 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ + tst-unwind-thread \ + tst-pt-vfork1 tst-pt-vfork2 tst-vfork1x tst-vfork2x \ + tst-pthread_cancel-exited \ ++ tst-pthread_cancel-select-loop \ + tst-pthread_kill-exited \ ++ tst-pthread_kill-exiting \ + # tests + + tests-time64 := \ +diff --git a/sysdeps/pthread/tst-pthread_cancel-select-loop.c b/sysdeps/pthread/tst-pthread_cancel-select-loop.c +new file mode 100644 +index 0000000000000000..a62087589cee24b5 +--- /dev/null ++++ b/sysdeps/pthread/tst-pthread_cancel-select-loop.c +@@ -0,0 +1,87 @@ ++/* Test that pthread_cancel succeeds during thread exit. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This test tries to trigger an internal race condition in ++ pthread_cancel, where the cancellation signal is sent after the ++ thread has begun the cancellation process. This can result in a ++ spurious ESRCH error. For the original bug 12889, the window is ++ quite small, so the bug was not reproduced in every run. */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Set to true by timeout_thread_function when the test should ++ terminate. */ ++static bool timeout; ++ ++static void * ++timeout_thread_function (void *unused) ++{ ++ usleep (5 * 1000 * 1000); ++ __atomic_store_n (&timeout, true, __ATOMIC_RELAXED); ++ return NULL; ++} ++ ++/* Used for blocking the select function below. */ ++static int pipe_fds[2]; ++ ++static void * ++canceled_thread_function (void *unused) ++{ ++ while (true) ++ { ++ fd_set rfs; ++ fd_set wfs; ++ fd_set efs; ++ FD_ZERO (&rfs); ++ FD_ZERO (&wfs); ++ FD_ZERO (&efs); ++ FD_SET (pipe_fds[0], &rfs); ++ ++ /* If the cancellation request is recognized early, the thread ++ begins exiting while the cancellation signal arrives. */ ++ select (FD_SETSIZE, &rfs, &wfs, &efs, NULL); ++ } ++ return NULL; ++} ++ ++static int ++do_test (void) ++{ ++ xpipe (pipe_fds); ++ pthread_t thr_timeout = xpthread_create (NULL, timeout_thread_function, NULL); ++ ++ while (!__atomic_load_n (&timeout, __ATOMIC_RELAXED)) ++ { ++ pthread_t thr = xpthread_create (NULL, canceled_thread_function, NULL); ++ xpthread_cancel (thr); ++ TEST_VERIFY (xpthread_join (thr) == PTHREAD_CANCELED); ++ } ++ ++ xpthread_join (thr_timeout); ++ xclose (pipe_fds[0]); ++ xclose (pipe_fds[1]); ++ return 0; ++} ++ ++#include +diff --git a/sysdeps/pthread/tst-pthread_kill-exiting.c b/sysdeps/pthread/tst-pthread_kill-exiting.c +new file mode 100644 +index 0000000000000000..f803e94f1195f204 +--- /dev/null ++++ b/sysdeps/pthread/tst-pthread_kill-exiting.c +@@ -0,0 +1,123 @@ ++/* Test that pthread_kill succeeds during thread exit. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* This test verifies that pthread_kill for a thread that is exiting ++ succeeds (with or without actually delivering the signal). */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Set to true by timeout_thread_function when the test should ++ terminate. */ ++static bool timeout; ++ ++static void * ++timeout_thread_function (void *unused) ++{ ++ usleep (1000 * 1000); ++ __atomic_store_n (&timeout, true, __ATOMIC_RELAXED); ++ return NULL; ++} ++ ++/* Used to synchronize the sending threads with the target thread and ++ main thread. */ ++static pthread_barrier_t barrier_1; ++static pthread_barrier_t barrier_2; ++ ++/* The target thread to which signals are to be sent. */ ++static pthread_t target_thread; ++ ++/* Set by the main thread to true after timeout has been set to ++ true. */ ++static bool exiting; ++ ++static void * ++sender_thread_function (void *unused) ++{ ++ while (true) ++ { ++ /* Wait until target_thread has been initialized. The target ++ thread and main thread participate in this barrier. */ ++ xpthread_barrier_wait (&barrier_1); ++ ++ if (exiting) ++ break; ++ ++ xpthread_kill (target_thread, SIGUSR1); ++ ++ /* Communicate that the signal has been sent. The main thread ++ participates in this barrier. */ ++ xpthread_barrier_wait (&barrier_2); ++ } ++ return NULL; ++} ++ ++static void * ++target_thread_function (void *unused) ++{ ++ target_thread = pthread_self (); ++ xpthread_barrier_wait (&barrier_1); ++ return NULL; ++} ++ ++static int ++do_test (void) ++{ ++ xsignal (SIGUSR1, SIG_IGN); ++ ++ pthread_t thr_timeout = xpthread_create (NULL, timeout_thread_function, NULL); ++ ++ pthread_t threads[4]; ++ xpthread_barrier_init (&barrier_1, NULL, array_length (threads) + 2); ++ xpthread_barrier_init (&barrier_2, NULL, array_length (threads) + 1); ++ ++ for (int i = 0; i < array_length (threads); ++i) ++ threads[i] = xpthread_create (NULL, sender_thread_function, NULL); ++ ++ while (!__atomic_load_n (&timeout, __ATOMIC_RELAXED)) ++ { ++ xpthread_create (NULL, target_thread_function, NULL); ++ ++ /* Wait for the target thread to be set up and signal sending to ++ start. */ ++ xpthread_barrier_wait (&barrier_1); ++ ++ /* Wait for signal sending to complete. */ ++ xpthread_barrier_wait (&barrier_2); ++ ++ xpthread_join (target_thread); ++ } ++ ++ exiting = true; ++ ++ /* Signal the sending threads to exit. */ ++ xpthread_create (NULL, target_thread_function, NULL); ++ xpthread_barrier_wait (&barrier_1); ++ ++ for (int i = 0; i < array_length (threads); ++i) ++ xpthread_join (threads[i]); ++ xpthread_join (thr_timeout); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-15.patch b/SOURCES/glibc-upstream-2.34-15.patch new file mode 100644 index 0000000..a2275fb --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-15.patch @@ -0,0 +1,117 @@ +commit 3fc51f35b4f32e1bb99d85c1578e930e725ff929 +Author: Siddhesh Poyarekar +Date: Mon Sep 13 20:48:35 2021 +0530 + + iconvconfig: Fix behaviour with --prefix [BZ #28199] + + The consolidation of configuration parsing broke behaviour with + --prefix, where the prefix bled into the modules cache. Accept a + prefix which, when non-NULL, is prepended to the path when looking for + configuration files but only the original directory is added to the + modules cache. + + This has no effect on the codegen of gconv_conf since it passes NULL. + + Reported-by: Patrick McCarty + Reported-by: Michael Hudson-Doyle + Reviewed-by: Andreas Schwab + (cherry picked from commit 43cea6d5652b6b9e61ac6ecc69419c909b504f47) + +diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c +index 62bee28769deb979..cc391d8f936687f3 100644 +--- a/iconv/gconv_conf.c ++++ b/iconv/gconv_conf.c +@@ -478,7 +478,7 @@ __gconv_read_conf (void) + __gconv_get_path (); + + for (cnt = 0; __gconv_path_elem[cnt].name != NULL; ++cnt) +- gconv_parseconfdir (__gconv_path_elem[cnt].name, ++ gconv_parseconfdir (NULL, __gconv_path_elem[cnt].name, + __gconv_path_elem[cnt].len); + #endif + +diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h +index 2f062689ecc72749..a586268abc103abd 100644 +--- a/iconv/gconv_parseconfdir.h ++++ b/iconv/gconv_parseconfdir.h +@@ -39,7 +39,6 @@ + /* Name of the file containing the module information in the directories + along the path. */ + static const char gconv_conf_filename[] = "gconv-modules"; +-static const char gconv_conf_dirname[] = "gconv-modules.d"; + + static void add_alias (char *); + static void add_module (char *, const char *, size_t, int); +@@ -110,19 +109,28 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len) + return true; + } + ++/* Prefix DIR (with length DIR_LEN) with PREFIX if the latter is non-NULL and ++ parse configuration in it. */ ++ + static __always_inline bool +-gconv_parseconfdir (const char *dir, size_t dir_len) ++gconv_parseconfdir (const char *prefix, const char *dir, size_t dir_len) + { +- /* No slash needs to be inserted between dir and gconv_conf_filename; +- dir already ends in a slash. */ +- char *buf = malloc (dir_len + sizeof (gconv_conf_dirname)); ++ /* No slash needs to be inserted between dir and gconv_conf_filename; dir ++ already ends in a slash. The additional 2 is to accommodate the ".d" ++ when looking for configuration files in gconv-modules.d. */ ++ size_t buflen = dir_len + sizeof (gconv_conf_filename) + 2; ++ char *buf = malloc (buflen + (prefix != NULL ? strlen (prefix) : 0)); ++ char *cp = buf; + bool found = false; + + if (buf == NULL) + return false; + +- char *cp = mempcpy (mempcpy (buf, dir, dir_len), gconv_conf_filename, +- sizeof (gconv_conf_filename)); ++ if (prefix != NULL) ++ cp = stpcpy (cp, prefix); ++ ++ cp = mempcpy (mempcpy (cp, dir, dir_len), gconv_conf_filename, ++ sizeof (gconv_conf_filename)); + + /* Read the gconv-modules configuration file first. */ + found = read_conf_file (buf, dir, dir_len); +diff --git a/iconv/iconvconfig.c b/iconv/iconvconfig.c +index 783b2bbdbb684ac6..273a71f67315f670 100644 +--- a/iconv/iconvconfig.c ++++ b/iconv/iconvconfig.c +@@ -653,13 +653,21 @@ add_module (char *rp, const char *directory, + static int + handle_dir (const char *dir) + { ++ char *newp = NULL; + size_t dirlen = strlen (dir); + bool found = false; + +- char *fulldir = xasprintf ("%s%s%s", dir[0] == '/' ? prefix : "", +- dir, dir[dirlen - 1] != '/' ? "/" : ""); ++ /* End directory path with a '/' if it doesn't already. */ ++ if (dir[dirlen - 1] != '/') ++ { ++ newp = xmalloc (dirlen + 2); ++ memcpy (newp, dir, dirlen); ++ newp[dirlen++] = '/'; ++ newp[dirlen] = '\0'; ++ dir = newp; ++ } + +- found = gconv_parseconfdir (fulldir, strlen (fulldir)); ++ found = gconv_parseconfdir (dir[0] == '/' ? prefix : NULL, dir, dirlen); + + if (!found) + { +@@ -671,7 +679,7 @@ handle_dir (const char *dir) + "configuration files with names ending in .conf."); + } + +- free (fulldir); ++ free (newp); + + return found ? 0 : 1; + } diff --git a/SOURCES/glibc-upstream-2.34-16.patch b/SOURCES/glibc-upstream-2.34-16.patch new file mode 100644 index 0000000..3d8a568 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-16.patch @@ -0,0 +1,31 @@ +commit ae925404a10bf0ea63d6e8d41e3821f68b4d776c +Author: Aurelien Jarno +Date: Fri Sep 3 00:28:14 2021 +0200 + + Fix failing nss/tst-nss-files-hosts-long with local resolver + + When a local resolver like unbound is listening on the IPv4 loopback + address 127.0.0.1, the nss/tst-nss-files-hosts-long test fails. This is + due to: + - the default resolver in the absence of resolv.conf being 127.0.0.1 + - the default DNS NSS database configuration in the absence of + nsswitch.conf being 'hosts: dns [!UNAVAIL=return] file' + + This causes the requests for 'test4' and 'test6' to first be sent to the + local resolver, which responds with NXDOMAIN in the likely case those + records do no exist. In turn that causes the access to /etc/hosts to be + skipped, which is the purpose of that test. + + Fix that by providing a simple nsswitch.conf file forcing access to + /etc/hosts for that test. I have tested that the only changed result in + the testsuite is that test. + + (cherry picked from commit 2738480a4b0866723fb8c633f36bdd34a8767581) + +diff --git a/nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf b/nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf +new file mode 100644 +index 0000000000000000..5b0c6a419937a013 +--- /dev/null ++++ b/nss/tst-nss-files-hosts-long.root/etc/nsswitch.conf +@@ -0,0 +1 @@ ++hosts: files diff --git a/SOURCES/glibc-upstream-2.34-17.patch b/SOURCES/glibc-upstream-2.34-17.patch new file mode 100644 index 0000000..ca37faa --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-17.patch @@ -0,0 +1,26 @@ +commit 007d699d0e0d0957eead78ad252ad592656284de +Author: Joseph Myers +Date: Tue Sep 7 13:08:38 2021 +0000 + + Use Linux 5.14 in build-many-glibcs.py + + This patch makes build-many-glibcs.py use Linux 5.14. + + Tested with build-many-glibcs.py (host-libraries, compilers and glibcs + builds). + + (cherry picked from commit 4e04a47208e1712fcf202a6d9831f0900d575225) + +diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py +index 5a77af90a6b49909..86537fa8005cfd3d 100755 +--- a/scripts/build-many-glibcs.py ++++ b/scripts/build-many-glibcs.py +@@ -782,7 +782,7 @@ class Context(object): + 'gcc': 'vcs-11', + 'glibc': 'vcs-mainline', + 'gmp': '6.2.1', +- 'linux': '5.13', ++ 'linux': '5.14', + 'mpc': '1.2.1', + 'mpfr': '4.1.0', + 'mig': 'vcs-mainline', diff --git a/SOURCES/glibc-upstream-2.34-18.patch b/SOURCES/glibc-upstream-2.34-18.patch new file mode 100644 index 0000000..017225a --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-18.patch @@ -0,0 +1,377 @@ +commit 005bafcf5b8a85d4c82831401f052747e160a7e8 +Author: Joseph Myers +Date: Wed Sep 8 12:42:06 2021 +0000 + + Update syscall lists for Linux 5.14 + + Linux 5.14 has two new syscalls, memfd_secret (on some architectures + only) and quotactl_fd. Update syscall-names.list and regenerate the + arch-syscall.h headers with build-many-glibcs.py update-syscalls. + + Tested with build-many-glibcs.py. + + (cherry picked from commit 89dc0372a9055e7ef86fe19be6201fa0b16b2f0e) + +diff --git a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h +index e9eb707d0ac022ed..bedab1abbac7f6c1 100644 +--- a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h +@@ -126,6 +126,7 @@ + #define __NR_mbind 235 + #define __NR_membarrier 283 + #define __NR_memfd_create 279 ++#define __NR_memfd_secret 447 + #define __NR_migrate_pages 238 + #define __NR_mincore 232 + #define __NR_mkdirat 34 +@@ -187,6 +188,7 @@ + #define __NR_pwritev 70 + #define __NR_pwritev2 287 + #define __NR_quotactl 60 ++#define __NR_quotactl_fd 443 + #define __NR_read 63 + #define __NR_readahead 213 + #define __NR_readlinkat 78 +diff --git a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h +index bd6b7d4003a252be..91354ed9e29b8d15 100644 +--- a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h +@@ -337,6 +337,7 @@ + #define __NR_pwritev2 521 + #define __NR_query_module 347 + #define __NR_quotactl 148 ++#define __NR_quotactl_fd 553 + #define __NR_read 3 + #define __NR_readahead 379 + #define __NR_readlink 58 +diff --git a/sysdeps/unix/sysv/linux/arc/arch-syscall.h b/sysdeps/unix/sysv/linux/arc/arch-syscall.h +index 10650549c1dcd100..ff5c7eb36db89494 100644 +--- a/sysdeps/unix/sysv/linux/arc/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/arc/arch-syscall.h +@@ -190,6 +190,7 @@ + #define __NR_pwritev 70 + #define __NR_pwritev2 287 + #define __NR_quotactl 60 ++#define __NR_quotactl_fd 443 + #define __NR_read 63 + #define __NR_readahead 213 + #define __NR_readlinkat 78 +diff --git a/sysdeps/unix/sysv/linux/arm/arch-syscall.h b/sysdeps/unix/sysv/linux/arm/arch-syscall.h +index 85c9b236ce7862b6..5772333ceef6ce59 100644 +--- a/sysdeps/unix/sysv/linux/arm/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/arm/arch-syscall.h +@@ -244,6 +244,7 @@ + #define __NR_pwritev 362 + #define __NR_pwritev2 393 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 225 + #define __NR_readlink 85 +diff --git a/sysdeps/unix/sysv/linux/csky/arch-syscall.h b/sysdeps/unix/sysv/linux/csky/arch-syscall.h +index 24b0d1f94e5f99da..4af6d6202f6df7ae 100644 +--- a/sysdeps/unix/sysv/linux/csky/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/csky/arch-syscall.h +@@ -199,6 +199,7 @@ + #define __NR_pwritev 70 + #define __NR_pwritev2 287 + #define __NR_quotactl 60 ++#define __NR_quotactl_fd 443 + #define __NR_read 63 + #define __NR_readahead 213 + #define __NR_readlinkat 78 +diff --git a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h +index feb70abc3e1eb486..b07fc8549de34157 100644 +--- a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h +@@ -231,6 +231,7 @@ + #define __NR_pwritev 316 + #define __NR_pwritev2 348 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 207 + #define __NR_readlink 85 +diff --git a/sysdeps/unix/sysv/linux/i386/arch-syscall.h b/sysdeps/unix/sysv/linux/i386/arch-syscall.h +index 3b1894a79b6fcfaf..6e4264698b5ce480 100644 +--- a/sysdeps/unix/sysv/linux/i386/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/i386/arch-syscall.h +@@ -183,6 +183,7 @@ + #define __NR_mbind 274 + #define __NR_membarrier 375 + #define __NR_memfd_create 356 ++#define __NR_memfd_secret 447 + #define __NR_migrate_pages 294 + #define __NR_mincore 218 + #define __NR_mkdir 39 +@@ -266,6 +267,7 @@ + #define __NR_pwritev2 379 + #define __NR_query_module 167 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 225 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h +index fb388a5fa4e9b28e..1ca706d7216a3902 100644 +--- a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h +@@ -218,6 +218,7 @@ + #define __NR_pwritev 1320 + #define __NR_pwritev2 1349 + #define __NR_quotactl 1137 ++#define __NR_quotactl_fd 1467 + #define __NR_read 1026 + #define __NR_readahead 1216 + #define __NR_readlink 1092 +diff --git a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h +index 7bc8c4af92cf2bd3..2f10f71f90d225ff 100644 +--- a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h +@@ -254,6 +254,7 @@ + #define __NR_pwritev2 378 + #define __NR_query_module 167 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 240 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h +index cf560d3af47f19c5..0607a4dfa6adaa23 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h +@@ -266,6 +266,7 @@ + #define __NR_pwritev2 394 + #define __NR_query_module 167 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 225 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h +index f346460f4880f10e..0055eec0b169ba96 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h +@@ -251,6 +251,7 @@ + #define __NR_pwritev2 4362 + #define __NR_query_module 4187 + #define __NR_quotactl 4131 ++#define __NR_quotactl_fd 4443 + #define __NR_read 4003 + #define __NR_readahead 4223 + #define __NR_readdir 4089 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h +index 38ed84997a2fa3d1..8e8e9f91ccfebfab 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h +@@ -232,6 +232,7 @@ + #define __NR_pwritev2 6326 + #define __NR_query_module 6171 + #define __NR_quotactl 6172 ++#define __NR_quotactl_fd 6443 + #define __NR_read 6000 + #define __NR_readahead 6179 + #define __NR_readlink 6087 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h +index e6a10c842178168c..ebd1545f806564bb 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h +@@ -219,6 +219,7 @@ + #define __NR_pwritev2 5322 + #define __NR_query_module 5171 + #define __NR_quotactl 5172 ++#define __NR_quotactl_fd 5443 + #define __NR_read 5000 + #define __NR_readahead 5179 + #define __NR_readlink 5087 +diff --git a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h +index 5314890289a1723f..2b530b1f88e4c52a 100644 +--- a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h +@@ -198,6 +198,7 @@ + #define __NR_pwritev 70 + #define __NR_pwritev2 287 + #define __NR_quotactl 60 ++#define __NR_quotactl_fd 443 + #define __NR_read 63 + #define __NR_readahead 213 + #define __NR_readlinkat 78 +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h +index b5b075853297cf2e..a32984a9c17315ee 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h +@@ -260,6 +260,7 @@ + #define __NR_pwritev2 381 + #define __NR_query_module 166 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 191 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h +index c77435ca61aba109..b01e464fb906d632 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h +@@ -243,6 +243,7 @@ + #define __NR_pwritev2 381 + #define __NR_query_module 166 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 191 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h +index 70854bb9e360b40a..24d0a2c455caa630 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h +@@ -179,6 +179,7 @@ + #define __NR_pwritev 70 + #define __NR_pwritev2 287 + #define __NR_quotactl 60 ++#define __NR_quotactl_fd 443 + #define __NR_read 63 + #define __NR_readahead 213 + #define __NR_readlinkat 78 +diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h +index 83b9f31abaee9d52..e526c89ae7b285cc 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h +@@ -187,6 +187,7 @@ + #define __NR_pwritev 70 + #define __NR_pwritev2 287 + #define __NR_quotactl 60 ++#define __NR_quotactl_fd 443 + #define __NR_read 63 + #define __NR_readahead 213 + #define __NR_readlinkat 78 +diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h +index b224c4aad4c9b1b1..d4c7b101b64c010f 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h +@@ -251,6 +251,7 @@ + #define __NR_pwritev2 377 + #define __NR_query_module 167 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 222 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h +index 59864af125b437e4..bd8c78d7059a0f31 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h +@@ -221,6 +221,7 @@ + #define __NR_pwritev2 377 + #define __NR_query_module 167 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 222 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/sh/arch-syscall.h b/sysdeps/unix/sysv/linux/sh/arch-syscall.h +index 23612c9092b9c2ee..3b6ac3d084d74638 100644 +--- a/sysdeps/unix/sysv/linux/sh/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sh/arch-syscall.h +@@ -246,6 +246,7 @@ + #define __NR_pwritev 334 + #define __NR_pwritev2 382 + #define __NR_quotactl 131 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 225 + #define __NR_readdir 89 +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h +index 380cddb2d8f9f443..35221a707e4d4a7c 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h +@@ -252,6 +252,7 @@ + #define __NR_pwritev2 359 + #define __NR_query_module 184 + #define __NR_quotactl 165 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 205 + #define __NR_readdir 204 +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h +index 2175eeb6edcf7c34..5ba2b2050924df1c 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h +@@ -231,6 +231,7 @@ + #define __NR_pwritev2 359 + #define __NR_query_module 184 + #define __NR_quotactl 165 ++#define __NR_quotactl_fd 443 + #define __NR_read 3 + #define __NR_readahead 205 + #define __NR_readdir 204 +diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list +index 89c5895b9b6845ff..fd98893b0e44a606 100644 +--- a/sysdeps/unix/sysv/linux/syscall-names.list ++++ b/sysdeps/unix/sysv/linux/syscall-names.list +@@ -21,8 +21,8 @@ + # This file can list all potential system calls. The names are only + # used if the installed kernel headers also provide them. + +-# The list of system calls is current as of Linux 5.13. +-kernel 5.13 ++# The list of system calls is current as of Linux 5.14. ++kernel 5.14 + + FAST_atomic_update + FAST_cmpxchg +@@ -247,6 +247,7 @@ madvise + mbind + membarrier + memfd_create ++memfd_secret + memory_ordering + migrate_pages + mincore +@@ -452,6 +453,7 @@ pwritev + pwritev2 + query_module + quotactl ++quotactl_fd + read + readahead + readdir +diff --git a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h +index 8e028eb62be2041d..26d6ac68a651ec98 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h +@@ -154,6 +154,7 @@ + #define __NR_mbind 237 + #define __NR_membarrier 324 + #define __NR_memfd_create 319 ++#define __NR_memfd_secret 447 + #define __NR_migrate_pages 256 + #define __NR_mincore 27 + #define __NR_mkdir 83 +@@ -224,6 +225,7 @@ + #define __NR_pwritev2 328 + #define __NR_query_module 178 + #define __NR_quotactl 179 ++#define __NR_quotactl_fd 443 + #define __NR_read 0 + #define __NR_readahead 187 + #define __NR_readlink 89 +diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h +index 004feb53f1f38ced..36847783f6b91d5e 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h +@@ -148,6 +148,7 @@ + #define __NR_mbind 1073742061 + #define __NR_membarrier 1073742148 + #define __NR_memfd_create 1073742143 ++#define __NR_memfd_secret 1073742271 + #define __NR_migrate_pages 1073742080 + #define __NR_mincore 1073741851 + #define __NR_mkdir 1073741907 +@@ -216,6 +217,7 @@ + #define __NR_pwritev 1073742359 + #define __NR_pwritev2 1073742371 + #define __NR_quotactl 1073742003 ++#define __NR_quotactl_fd 1073742267 + #define __NR_read 1073741824 + #define __NR_readahead 1073742011 + #define __NR_readlink 1073741913 diff --git a/SOURCES/glibc-upstream-2.34-19.patch b/SOURCES/glibc-upstream-2.34-19.patch new file mode 100644 index 0000000..b0f0b9a --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-19.patch @@ -0,0 +1,27 @@ +commit 114581bf53864aaee562ee237461fc394bc61963 +Author: Joseph Myers +Date: Tue Sep 14 13:51:58 2021 +0000 + + Update kernel version to 5.14 in tst-mman-consts.py + + This patch updates the kernel version in the test tst-mman-consts.py + to 5.14. (There are no new MAP_* constants covered by this test in + 5.14 that need any other header changes.) + + Tested with build-many-glibcs.py. + + (cherry picked from commit 4b39e3498324d1aea802fea8d4b8764f5ddb4fd1) + +diff --git a/sysdeps/unix/sysv/linux/tst-mman-consts.py b/sysdeps/unix/sysv/linux/tst-mman-consts.py +index ee5b13ee1232fdf5..810433c238f31c25 100644 +--- a/sysdeps/unix/sysv/linux/tst-mman-consts.py ++++ b/sysdeps/unix/sysv/linux/tst-mman-consts.py +@@ -33,7 +33,7 @@ def main(): + help='C compiler (including options) to use') + args = parser.parse_args() + linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc) +- linux_version_glibc = (5, 13) ++ linux_version_glibc = (5, 14) + sys.exit(glibcextract.compare_macro_consts( + '#define _GNU_SOURCE 1\n' + '#include \n', diff --git a/SOURCES/glibc-upstream-2.34-2.patch b/SOURCES/glibc-upstream-2.34-2.patch new file mode 100644 index 0000000..fbddab3 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-2.patch @@ -0,0 +1,33 @@ +commit 3a48da47a91ccc6f5de260574809e7a44551b876 +Author: Siddhesh Poyarekar +Date: Tue Aug 3 21:10:20 2021 +0530 + + gconv_parseconfdir: Fix memory leak + + The allocated `conf` would leak if we have to skip over the file due + to the underlying filesystem not supporting dt_type. + + Reviewed-by: Arjun Shankar + (cherry picked from commit 5f9b78fe35d08739b6da1e5b356786d41116c108) + +diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h +index a4153e54c6d43797..2f062689ecc72749 100644 +--- a/iconv/gconv_parseconfdir.h ++++ b/iconv/gconv_parseconfdir.h +@@ -153,12 +153,11 @@ gconv_parseconfdir (const char *dir, size_t dir_len) + struct stat64 st; + if (asprintf (&conf, "%s/%s", buf, ent->d_name) < 0) + continue; +- if (ent->d_type == DT_UNKNOWN +- && (lstat64 (conf, &st) == -1 +- || !S_ISREG (st.st_mode))) +- continue; + +- found |= read_conf_file (conf, dir, dir_len); ++ if (ent->d_type != DT_UNKNOWN ++ || (lstat64 (conf, &st) != -1 && S_ISREG (st.st_mode))) ++ found |= read_conf_file (conf, dir, dir_len); ++ + free (conf); + } + } diff --git a/SOURCES/glibc-upstream-2.34-20.patch b/SOURCES/glibc-upstream-2.34-20.patch new file mode 100644 index 0000000..f4b1aed --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-20.patch @@ -0,0 +1,29 @@ +commit 4ed990e5b97a61f29f929bdeb36c5b2abb547a64 +Author: Joseph Myers +Date: Tue Sep 14 14:19:24 2021 +0000 + + Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to bits/mman-linux.h + + Linux 5.14 adds constants MADV_POPULATE_READ and MADV_POPULATE_WRITE + (with the same values on all architectures). Add these to glibc's + bits/mman-linux.h. + + Tested for x86_64. + + (cherry picked from commit 3561106278cddd2f007bd27fd4c3e90caaf14b43) + +diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h +index 3b1ae418e073c122..31451c28d93f9f72 100644 +--- a/sysdeps/unix/sysv/linux/bits/mman-linux.h ++++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h +@@ -89,6 +89,10 @@ + # define MADV_KEEPONFORK 19 /* Undo MADV_WIPEONFORK. */ + # define MADV_COLD 20 /* Deactivate these pages. */ + # define MADV_PAGEOUT 21 /* Reclaim these pages. */ ++# define MADV_POPULATE_READ 22 /* Populate (prefault) page tables ++ readable. */ ++# define MADV_POPULATE_WRITE 23 /* Populate (prefault) page tables ++ writable. */ + # define MADV_HWPOISON 100 /* Poison a page for testing. */ + #endif + diff --git a/SOURCES/glibc-upstream-2.34-21.patch b/SOURCES/glibc-upstream-2.34-21.patch new file mode 100644 index 0000000..16ddaef --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-21.patch @@ -0,0 +1,44 @@ +commit 433ec4f14a5753c7689c83c20c9972915c53c204 +Author: Aurelien Jarno +Date: Fri Sep 10 19:39:35 2021 +0200 + + posix: Fix attribute access mode on getcwd [BZ #27476] + + There is a GNU extension that allows to call getcwd(NULL, >0). It is + described in the documentation, but also directly in the unistd.h + header, just above the declaration. + + Therefore the attribute access mode added in commit 06febd8c6705 + is not correct. Drop it. + +diff --git a/posix/bits/unistd.h b/posix/bits/unistd.h +index f0831386c7ddb574..622adeb2b28ed298 100644 +--- a/posix/bits/unistd.h ++++ b/posix/bits/unistd.h +@@ -199,10 +199,9 @@ __NTH (readlinkat (int __fd, const char *__restrict __path, + #endif + + extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) +- __THROW __wur __attr_access ((__write_only__, 1, 2)); ++ __THROW __wur; + extern char *__REDIRECT_NTH (__getcwd_alias, +- (char *__buf, size_t __size), getcwd) +- __wur __attr_access ((__write_only__, 1, 2)); ++ (char *__buf, size_t __size), getcwd) __wur; + extern char *__REDIRECT_NTH (__getcwd_chk_warn, + (char *__buf, size_t __size, size_t __buflen), + __getcwd_chk) +diff --git a/posix/unistd.h b/posix/unistd.h +index 3dca65732fdde52f..8224c5fbc956306f 100644 +--- a/posix/unistd.h ++++ b/posix/unistd.h +@@ -528,8 +528,7 @@ extern int fchdir (int __fd) __THROW __wur; + an array is allocated with `malloc'; the array is SIZE + bytes long, unless SIZE == 0, in which case it is as + big as necessary. */ +-extern char *getcwd (char *__buf, size_t __size) __THROW __wur +- __attr_access ((__write_only__, 1, 2)); ++extern char *getcwd (char *__buf, size_t __size) __THROW __wur; + + #ifdef __USE_GNU + /* Return a malloc'd string containing the current directory name. diff --git a/SOURCES/glibc-upstream-2.34-22.patch b/SOURCES/glibc-upstream-2.34-22.patch new file mode 100644 index 0000000..bdcd19c --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-22.patch @@ -0,0 +1,137 @@ +commit 73c7f5a87971de2797f261e1a447f68dce09284b +Author: Florian Weimer +Date: Mon Sep 20 14:56:08 2021 +0200 + + nptl: pthread_kill needs to return ESRCH for old programs (bug 19193) + + The fix for bug 19193 breaks some old applications which appear + to use pthread_kill to probe if a thread is still running, something + that is not supported by POSIX. + + (cherry picked from commit 95dba35bf05e4a5d69dfae5e9c9d4df3646a7f93) + +diff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c +index fb7862eff787a94f..a44dc8f2d9baa925 100644 +--- a/nptl/pthread_kill.c ++++ b/nptl/pthread_kill.c +@@ -21,8 +21,11 @@ + #include + #include + +-int +-__pthread_kill_internal (pthread_t threadid, int signo) ++/* Sends SIGNO to THREADID. If the thread is about to exit or has ++ already exited on the kernel side, return NO_TID. Otherwise return ++ 0 or an error code. */ ++static int ++__pthread_kill_implementation (pthread_t threadid, int signo, int no_tid) + { + struct pthread *pd = (struct pthread *) threadid; + if (pd == THREAD_SELF) +@@ -52,11 +55,8 @@ __pthread_kill_internal (pthread_t threadid, int signo) + signal is either not observable (the target thread has already + blocked signals at this point), or it will fail, or it might be + delivered to a new, unrelated thread that has reused the TID. +- So do not actually send the signal. Do not report an error +- because the threadid argument is still valid (the thread ID +- lifetime has not ended), and ESRCH (for example) would be +- misleading. */ +- ret = 0; ++ So do not actually send the signal. */ ++ ret = no_tid; + else + { + /* Using tgkill is a safety measure. pd->exit_lock ensures that +@@ -71,6 +71,15 @@ __pthread_kill_internal (pthread_t threadid, int signo) + return ret; + } + ++int ++__pthread_kill_internal (pthread_t threadid, int signo) ++{ ++ /* Do not report an error in the no-tid case because the threadid ++ argument is still valid (the thread ID lifetime has not ended), ++ and ESRCH (for example) would be misleading. */ ++ return __pthread_kill_implementation (threadid, signo, 0); ++} ++ + int + __pthread_kill (pthread_t threadid, int signo) + { +@@ -81,6 +90,7 @@ __pthread_kill (pthread_t threadid, int signo) + + return __pthread_kill_internal (threadid, signo); + } ++ + /* Some architectures (for instance arm) might pull raise through libgcc, so + avoid the symbol version if it ends up being used on ld.so. */ + #if !IS_IN(rtld) +@@ -88,6 +98,17 @@ libc_hidden_def (__pthread_kill) + versioned_symbol (libc, __pthread_kill, pthread_kill, GLIBC_2_34); + + # if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34) +-compat_symbol (libc, __pthread_kill, pthread_kill, GLIBC_2_0); ++/* Variant which returns ESRCH in the no-TID case, for backwards ++ compatibility. */ ++int ++attribute_compat_text_section ++__pthread_kill_esrch (pthread_t threadid, int signo) ++{ ++ if (__is_internal_signal (signo)) ++ return EINVAL; ++ ++ return __pthread_kill_implementation (threadid, signo, ESRCH); ++} ++compat_symbol (libc, __pthread_kill_esrch, pthread_kill, GLIBC_2_0); + # endif + #endif +diff --git a/sysdeps/pthread/tst-pthread_kill-exited.c b/sysdeps/pthread/tst-pthread_kill-exited.c +index 7575fb6d58cae99c..a2fddad526666c8c 100644 +--- a/sysdeps/pthread/tst-pthread_kill-exited.c ++++ b/sysdeps/pthread/tst-pthread_kill-exited.c +@@ -16,11 +16,15 @@ + License along with the GNU C Library; if not, see + . */ + +-/* This test verifies that pthread_kill returns 0 (and not ESRCH) for +- a thread that has exited on the kernel side. */ ++/* This test verifies that the default pthread_kill returns 0 (and not ++ ESRCH) for a thread that has exited on the kernel side. */ + ++#include ++#include ++#include + #include + #include ++#include + #include + #include + +@@ -30,6 +34,12 @@ noop_thread (void *closure) + return NULL; + } + ++#if TEST_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34) && PTHREAD_IN_LIBC ++extern __typeof (pthread_kill) compat_pthread_kill; ++compat_symbol_reference (libpthread, compat_pthread_kill, pthread_kill, ++ GLIBC_2_0); ++#endif ++ + static int + do_test (void) + { +@@ -37,7 +47,14 @@ do_test (void) + + support_wait_for_thread_exit (); + ++ /* NB: Always uses the default symbol due to separate compilation. */ + xpthread_kill (thr, SIGUSR1); ++ ++#if TEST_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34) && PTHREAD_IN_LIBC ++ /* Old binaries need the non-conforming ESRCH error code. */ ++ TEST_COMPARE (compat_pthread_kill (thr, SIGUSR1), ESRCH); ++#endif ++ + xpthread_join (thr); + + return 0; diff --git a/SOURCES/glibc-upstream-2.34-23.patch b/SOURCES/glibc-upstream-2.34-23.patch new file mode 100644 index 0000000..67d7d88 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-23.patch @@ -0,0 +1,32 @@ +commit 8b8a1d0b7375c547ae905917a03743ed6759c5bc +Author: Florian Weimer +Date: Tue Sep 21 07:12:56 2021 +0200 + + nptl: Fix type of pthread_mutexattr_getrobust_np, pthread_mutexattr_setrobust_np (bug 28036) + + Reviewed-by: Carlos O'Donell + Tested-by: Carlos O'Donell + (cherry picked from commit f3e664563361dc17530113b3205998d1f19dc4d9) + +diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h +index f1b7f2bdc6062c3e..43146e91c9d9579b 100644 +--- a/sysdeps/nptl/pthread.h ++++ b/sysdeps/nptl/pthread.h +@@ -933,7 +933,7 @@ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, + # ifdef __USE_GNU + # ifdef __REDIRECT_NTH + extern int __REDIRECT_NTH (pthread_mutexattr_getrobust_np, +- (pthread_mutex_t *, int *), ++ (pthread_mutexattr_t *, int *), + pthread_mutexattr_getrobust) __nonnull ((1)) + __attribute_deprecated_msg__ ("\ + pthread_mutexattr_getrobust_np is deprecated, use pthread_mutexattr_getrobust"); +@@ -949,7 +949,7 @@ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + # ifdef __USE_GNU + # ifdef __REDIRECT_NTH + extern int __REDIRECT_NTH (pthread_mutexattr_setrobust_np, +- (pthread_mutex_t *, int), ++ (pthread_mutexattr_t *, int), + pthread_mutexattr_setrobust) __nonnull ((1)) + __attribute_deprecated_msg__ ("\ + pthread_mutexattr_setrobust_np is deprecated, use pthread_mutexattr_setrobust"); diff --git a/SOURCES/glibc-upstream-2.34-24.patch b/SOURCES/glibc-upstream-2.34-24.patch new file mode 100644 index 0000000..4c4a4c0 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-24.patch @@ -0,0 +1,355 @@ +commit 5ad589d63bc2d9b1fc3d9f32144acaebb85e0803 +Author: Adhemerval Zanella +Date: Tue Aug 24 16:12:24 2021 -0300 + + support: Add support_open_dev_null_range + + It returns a range of file descriptor referring to the '/dev/null' + pathname. The function takes care of restarting the open range + if a file descriptor is found within the specified range and + also increases RLIMIT_NOFILE if required. + + Checked on x86_64-linux-gnu. + + (cherry picked from commit e814f4b04ee413a7bb3dfa43e74c8fb4abf58359) + +diff --git a/support/Makefile b/support/Makefile +index ef2b1a980a407f8f..2a0731796fdb3f2d 100644 +--- a/support/Makefile ++++ b/support/Makefile +@@ -66,6 +66,7 @@ libsupport-routines = \ + support_path_support_time64 \ + support_process_state \ + support_ptrace \ ++ support-open-dev-null-range \ + support_openpty \ + support_paths \ + support_quote_blob \ +@@ -265,6 +266,7 @@ tests = \ + tst-support_capture_subprocess \ + tst-support_descriptors \ + tst-support_format_dns_packet \ ++ tst-support-open-dev-null-range \ + tst-support-process_state \ + tst-support_quote_blob \ + tst-support_quote_string \ +diff --git a/support/support-open-dev-null-range.c b/support/support-open-dev-null-range.c +new file mode 100644 +index 0000000000000000..80d9dba50402ce12 +--- /dev/null ++++ b/support/support-open-dev-null-range.c +@@ -0,0 +1,134 @@ ++/* Return a range of open file descriptors. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static void ++increase_nofile (void) ++{ ++ struct rlimit rl; ++ if (getrlimit (RLIMIT_NOFILE, &rl) == -1) ++ FAIL_EXIT1 ("getrlimit (RLIMIT_NOFILE): %m"); ++ ++ rl.rlim_cur += 128; ++ ++ if (setrlimit (RLIMIT_NOFILE, &rl) == 1) ++ FAIL_EXIT1 ("setrlimit (RLIMIT_NOFILE): %m"); ++} ++ ++static int ++open_dev_null (int flags, mode_t mode) ++{ ++ int fd = open64 ("/dev/null", flags, mode); ++ if (fd > 0) ++ return fd; ++ ++ if (fd < 0 && errno != EMFILE) ++ FAIL_EXIT1 ("open64 (\"/dev/null\", 0x%x, 0%o): %m", flags, mode); ++ ++ increase_nofile (); ++ ++ return xopen ("/dev/null", flags, mode); ++} ++ ++struct range ++{ ++ int lowfd; ++ size_t len; ++}; ++ ++struct range_list ++{ ++ size_t total; ++ size_t used; ++ struct range *ranges; ++}; ++ ++static void ++range_init (struct range_list *r) ++{ ++ r->total = 8; ++ r->used = 0; ++ r->ranges = xmalloc (r->total * sizeof (struct range)); ++} ++ ++static void ++range_add (struct range_list *r, int lowfd, size_t len) ++{ ++ if (r->used == r->total) ++ { ++ r->total *= 2; ++ r->ranges = xrealloc (r->ranges, r->total * sizeof (struct range)); ++ } ++ r->ranges[r->used].lowfd = lowfd; ++ r->ranges[r->used].len = len; ++ r->used++; ++} ++ ++static void ++range_close (struct range_list *r) ++{ ++ for (size_t i = 0; i < r->used; i++) ++ { ++ int minfd = r->ranges[i].lowfd; ++ int maxfd = r->ranges[i].lowfd + r->ranges[i].len; ++ for (int fd = minfd; fd < maxfd; fd++) ++ xclose (fd); ++ } ++ free (r->ranges); ++} ++ ++int ++support_open_dev_null_range (int num, int flags, mode_t mode) ++{ ++ /* We keep track of the ranges that hit an already opened descriptor, so ++ we close them after we get a working range. */ ++ struct range_list rl; ++ range_init (&rl); ++ ++ int lowfd = open_dev_null (flags, mode); ++ int prevfd = lowfd; ++ while (true) ++ { ++ int i = 1; ++ for (; i < num; i++) ++ { ++ int fd = open_dev_null (flags, mode); ++ if (fd != lowfd + i) ++ { ++ range_add (&rl, lowfd, prevfd - lowfd + 1); ++ ++ prevfd = lowfd = fd; ++ break; ++ } ++ prevfd = fd; ++ } ++ if (i == num) ++ break; ++ } ++ ++ range_close (&rl); ++ ++ return lowfd; ++} +diff --git a/support/support.h b/support/support.h +index a5978b939af2fb41..c219e0d9d1aef046 100644 +--- a/support/support.h ++++ b/support/support.h +@@ -197,6 +197,14 @@ struct support_stack support_stack_alloc (size_t size); + /* Deallocate the STACK. */ + void support_stack_free (struct support_stack *stack); + ++ ++/* Create a range of NUM opened '/dev/null' file descriptors using FLAGS and ++ MODE. The function takes care of restarting the open range if a file ++ descriptor is found within the specified range and also increases ++ RLIMIT_NOFILE if required. ++ The returned value is the lowest file descriptor number. */ ++int support_open_dev_null_range (int num, int flags, mode_t mode); ++ + __END_DECLS + + #endif /* SUPPORT_H */ +diff --git a/support/tst-support-open-dev-null-range.c b/support/tst-support-open-dev-null-range.c +new file mode 100644 +index 0000000000000000..8e29def1ce780629 +--- /dev/null ++++ b/support/tst-support-open-dev-null-range.c +@@ -0,0 +1,155 @@ ++/* Tests for support_open_dev_null_range. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifndef PATH_MAX ++# define PATH_MAX 1024 ++#endif ++ ++#include ++ ++static void ++check_path (int fd) ++{ ++ char *proc_fd_path = xasprintf ("/proc/self/fd/%d", fd); ++ char file_path[PATH_MAX]; ++ ssize_t file_path_length ++ = readlink (proc_fd_path, file_path, sizeof (file_path)); ++ free (proc_fd_path); ++ if (file_path_length < 0) ++ FAIL_EXIT1 ("readlink (%s, %p, %zu)", proc_fd_path, file_path, ++ sizeof (file_path)); ++ file_path[file_path_length] = '\0'; ++ TEST_COMPARE_STRING (file_path, "/dev/null"); ++} ++ ++static int ++number_of_opened_files (void) ++{ ++ DIR *fds = opendir ("/proc/self/fd"); ++ if (fds == NULL) ++ FAIL_EXIT1 ("opendir (\"/proc/self/fd\"): %m"); ++ ++ int r = 0; ++ while (true) ++ { ++ errno = 0; ++ struct dirent64 *e = readdir64 (fds); ++ if (e == NULL) ++ { ++ if (errno != 0) ++ FAIL_EXIT1 ("readdir: %m"); ++ break; ++ } ++ ++ if (e->d_name[0] == '.') ++ continue; ++ ++ char *endptr; ++ long int fd = strtol (e->d_name, &endptr, 10); ++ if (*endptr != '\0' || fd < 0 || fd > INT_MAX) ++ FAIL_EXIT1 ("readdir: invalid file descriptor name: /proc/self/fd/%s", ++ e->d_name); ++ ++ /* Skip the descriptor which is used to enumerate the ++ descriptors. */ ++ if (fd == dirfd (fds)) ++ continue; ++ ++ r = r + 1; ++ } ++ ++ closedir (fds); ++ ++ return r; ++} ++ ++static int ++do_test (void) ++{ ++ const int nfds1 = 8; ++ int lowfd = support_open_dev_null_range (nfds1, O_RDONLY, 0600); ++ for (int i = 0; i < nfds1; i++) ++ { ++ TEST_VERIFY (fcntl (lowfd + i, F_GETFL) > -1); ++ check_path (lowfd + i); ++ } ++ ++ /* create some gaps. */ ++ xclose (lowfd + 1); ++ xclose (lowfd + 5); ++ xclose (lowfd + 6); ++ ++ const int nfds2 = 16; ++ int lowfd2 = support_open_dev_null_range (nfds2, O_RDONLY, 0600); ++ for (int i = 0; i < nfds2; i++) ++ { ++ TEST_VERIFY (fcntl (lowfd2 + i, F_GETFL) > -1); ++ check_path (lowfd2 + i); ++ } ++ ++ /* Decrease the maximum number of files. */ ++ { ++ struct rlimit rl; ++ if (getrlimit (RLIMIT_NOFILE, &rl) == -1) ++ FAIL_EXIT1 ("getrlimit (RLIMIT_NOFILE): %m"); ++ ++ rl.rlim_cur = number_of_opened_files (); ++ ++ if (setrlimit (RLIMIT_NOFILE, &rl) == 1) ++ FAIL_EXIT1 ("setrlimit (RLIMIT_NOFILE): %m"); ++ } ++ ++ const int nfds3 = 16; ++ int lowfd3 = support_open_dev_null_range (nfds3, O_RDONLY, 0600); ++ for (int i = 0; i < nfds3; i++) ++ { ++ TEST_VERIFY (fcntl (lowfd3 + i, F_GETFL) > -1); ++ check_path (lowfd3 + i); ++ } ++ ++ /* create a lot of gaps to trigger the range extension. */ ++ xclose (lowfd3 + 1); ++ xclose (lowfd3 + 3); ++ xclose (lowfd3 + 5); ++ xclose (lowfd3 + 7); ++ xclose (lowfd3 + 9); ++ xclose (lowfd3 + 11); ++ xclose (lowfd3 + 13); ++ ++ const int nfds4 = 16; ++ int lowfd4 = support_open_dev_null_range (nfds4, O_RDONLY, 0600); ++ for (int i = 0; i < nfds4; i++) ++ { ++ TEST_VERIFY (fcntl (lowfd4 + i, F_GETFL) > -1); ++ check_path (lowfd4 + i); ++ } ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-25.patch b/SOURCES/glibc-upstream-2.34-25.patch new file mode 100644 index 0000000..8899335 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-25.patch @@ -0,0 +1,204 @@ +commit 772e33411bc730f832f415f93eb3e7c67e4d5488 +Author: Adhemerval Zanella +Date: Tue Aug 24 16:15:50 2021 -0300 + + Use support_open_dev_null_range io/tst-closefrom, misc/tst-close_range, and posix/tst-spawn5 (BZ #28260) + + It ensures a continuous range of file descriptor and avoid hitting + the RLIMIT_NOFILE. + + Checked on x86_64-linux-gnu. + + (cherry picked from commit 6b20880b22d1d0fce7e9f506baa6fe2d5c7fcfdc) + +diff --git a/io/tst-closefrom.c b/io/tst-closefrom.c +index d4c187073c7280e9..395ec0d894101a47 100644 +--- a/io/tst-closefrom.c ++++ b/io/tst-closefrom.c +@@ -24,31 +24,22 @@ + #include + #include + #include ++#include + + #include + + #define NFDS 100 + +-static int +-open_multiple_temp_files (void) +-{ +- /* Check if the temporary file descriptor has no no gaps. */ +- int lowfd = xopen ("/dev/null", O_RDONLY, 0600); +- for (int i = 1; i <= NFDS; i++) +- TEST_COMPARE (xopen ("/dev/null", O_RDONLY, 0600), lowfd + i); +- return lowfd; +-} +- + static int + closefrom_test (void) + { + struct support_descriptors *descrs = support_descriptors_list (); + +- int lowfd = open_multiple_temp_files (); ++ int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); + +- const int maximum_fd = lowfd + NFDS; ++ const int maximum_fd = lowfd + NFDS - 1; + const int half_fd = lowfd + NFDS / 2; +- const int gap = maximum_fd / 4; ++ const int gap = lowfd + NFDS / 4; + + /* Close half of the descriptors and check result. */ + closefrom (half_fd); +@@ -58,7 +49,7 @@ closefrom_test (void) + TEST_COMPARE (fcntl (i, F_GETFL), -1); + TEST_COMPARE (errno, EBADF); + } +- for (int i = 0; i < half_fd; i++) ++ for (int i = lowfd; i < half_fd; i++) + TEST_VERIFY (fcntl (i, F_GETFL) > -1); + + /* Create some gaps, close up to a threshold, and check result. */ +@@ -74,7 +65,7 @@ closefrom_test (void) + TEST_COMPARE (fcntl (i, F_GETFL), -1); + TEST_COMPARE (errno, EBADF); + } +- for (int i = 0; i < gap; i++) ++ for (int i = lowfd; i < gap; i++) + TEST_VERIFY (fcntl (i, F_GETFL) > -1); + + /* Close the remmaining but the last one. */ +diff --git a/posix/tst-spawn5.c b/posix/tst-spawn5.c +index ac6673800464ce72..a95199af6b3b7c9a 100644 +--- a/posix/tst-spawn5.c ++++ b/posix/tst-spawn5.c +@@ -47,17 +47,6 @@ static int initial_argv_count; + + #define NFDS 100 + +-static int +-open_multiple_temp_files (void) +-{ +- /* Check if the temporary file descriptor has no no gaps. */ +- int lowfd = xopen ("/dev/null", O_RDONLY, 0600); +- for (int i = 1; i <= NFDS; i++) +- TEST_COMPARE (xopen ("/dev/null", O_RDONLY, 0600), +- lowfd + i); +- return lowfd; +-} +- + static int + parse_fd (const char *str) + { +@@ -185,7 +174,7 @@ spawn_closefrom_test (posix_spawn_file_actions_t *fa, int lowfd, int highfd, + static void + do_test_closefrom (void) + { +- int lowfd = open_multiple_temp_files (); ++ int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); + const int half_fd = lowfd + NFDS / 2; + + /* Close half of the descriptors and check result. */ +diff --git a/sysdeps/unix/sysv/linux/tst-close_range.c b/sysdeps/unix/sysv/linux/tst-close_range.c +index dccb6189c53fcb90..f5069d1b8a067241 100644 +--- a/sysdeps/unix/sysv/linux/tst-close_range.c ++++ b/sysdeps/unix/sysv/linux/tst-close_range.c +@@ -36,23 +36,12 @@ + + #define NFDS 100 + +-static int +-open_multiple_temp_files (void) +-{ +- /* Check if the temporary file descriptor has no no gaps. */ +- int lowfd = xopen ("/dev/null", O_RDONLY, 0600); +- for (int i = 1; i <= NFDS; i++) +- TEST_COMPARE (xopen ("/dev/null", O_RDONLY, 0600), +- lowfd + i); +- return lowfd; +-} +- + static void + close_range_test_max_upper_limit (void) + { + struct support_descriptors *descrs = support_descriptors_list (); + +- int lowfd = open_multiple_temp_files (); ++ int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); + + { + int r = close_range (lowfd, ~0U, 0); +@@ -68,7 +57,7 @@ close_range_test_max_upper_limit (void) + static void + close_range_test_common (int lowfd, unsigned int flags) + { +- const int maximum_fd = lowfd + NFDS; ++ const int maximum_fd = lowfd + NFDS - 1; + const int half_fd = lowfd + NFDS / 2; + const int gap_1 = maximum_fd - 8; + +@@ -121,7 +110,7 @@ close_range_test (void) + struct support_descriptors *descrs = support_descriptors_list (); + + /* Check if the temporary file descriptor has no no gaps. */ +- int lowfd = open_multiple_temp_files (); ++ int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); + + close_range_test_common (lowfd, 0); + +@@ -146,7 +135,7 @@ close_range_test_subprocess (void) + struct support_descriptors *descrs = support_descriptors_list (); + + /* Check if the temporary file descriptor has no no gaps. */ +- int lowfd = open_multiple_temp_files (); ++ int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); + + struct support_stack stack = support_stack_alloc (4096); + +@@ -184,7 +173,7 @@ close_range_unshare_test (void) + struct support_descriptors *descrs1 = support_descriptors_list (); + + /* Check if the temporary file descriptor has no no gaps. */ +- int lowfd = open_multiple_temp_files (); ++ int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); + + struct support_descriptors *descrs2 = support_descriptors_list (); + +@@ -200,7 +189,7 @@ close_range_unshare_test (void) + + support_stack_free (&stack); + +- for (int i = 0; i < NFDS; i++) ++ for (int i = lowfd; i < lowfd + NFDS; i++) + TEST_VERIFY (fcntl (i, F_GETFL) > -1); + + support_descriptors_check (descrs2); +@@ -226,9 +215,9 @@ static void + close_range_cloexec_test (void) + { + /* Check if the temporary file descriptor has no no gaps. */ +- const int lowfd = open_multiple_temp_files (); ++ int lowfd = support_open_dev_null_range (NFDS, O_RDONLY, 0600); + +- const int maximum_fd = lowfd + NFDS; ++ const int maximum_fd = lowfd + NFDS - 1; + const int half_fd = lowfd + NFDS / 2; + const int gap_1 = maximum_fd - 8; + +@@ -251,13 +240,13 @@ close_range_cloexec_test (void) + /* Create some gaps, close up to a threshold, and check result. */ + static int gap_close[] = { 57, 78, 81, 82, 84, 90 }; + for (int i = 0; i < array_length (gap_close); i++) +- xclose (gap_close[i]); ++ xclose (lowfd + gap_close[i]); + + TEST_COMPARE (close_range (half_fd + 1, gap_1, CLOSE_RANGE_CLOEXEC), 0); + for (int i = half_fd + 1; i < gap_1; i++) + { + int flags = fcntl (i, F_GETFD); +- if (is_in_array (gap_close, array_length (gap_close), i)) ++ if (is_in_array (gap_close, array_length (gap_close), i - lowfd)) + TEST_COMPARE (flags, -1); + else + { diff --git a/SOURCES/glibc-upstream-2.34-26.patch b/SOURCES/glibc-upstream-2.34-26.patch new file mode 100644 index 0000000..4366808 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-26.patch @@ -0,0 +1,129 @@ +commit 33adeaa3e2b9143c38884bc5aa65ded222ed274e +Author: Florian Weimer +Date: Thu Sep 23 09:55:54 2021 +0200 + + nptl: Avoid setxid deadlock with blocked signals in thread exit [BZ #28361] + + As part of the fix for bug 12889, signals are blocked during + thread exit, so that application code cannot run on the thread that + is about to exit. This would cause problems if the application + expected signals to be delivered after the signal handler revealed + the thread to still exist, despite pthread_kill can no longer be used + to send signals to it. However, glibc internally uses the SIGSETXID + signal in a way that is incompatible with signal blocking, due to the + way the setxid handshake delays thread exit until the setxid operation + has completed. With a blocked SIGSETXID, the handshake can never + complete, causing a deadlock. + + As a band-aid, restore the previous handshake protocol by not blocking + SIGSETXID during thread exit. + + The new test sysdeps/pthread/tst-pthread-setuid-loop.c is based on + a downstream test by Martin Osvald. + + Reviewed-by: Carlos O'Donell + Tested-by: Carlos O'Donell + (cherry picked from commit 2849e2f53311b66853cb5159b64cba2bddbfb854) + +diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c +index 33b426fc682300dc..bc213f0bc4e948bd 100644 +--- a/nptl/pthread_create.c ++++ b/nptl/pthread_create.c +@@ -488,8 +488,16 @@ start_thread (void *arg) + + /* This prevents sending a signal from this thread to itself during + its final stages. This must come after the exit call above +- because atexit handlers must not run with signals blocked. */ +- __libc_signal_block_all (NULL); ++ because atexit handlers must not run with signals blocked. ++ ++ Do not block SIGSETXID. The setxid handshake below expects the ++ signal to be delivered. (SIGSETXID cannot run application code, ++ nor does it use pthread_kill.) Reuse the pd->sigmask space for ++ computing the signal mask, to save stack space. */ ++ __sigfillset (&pd->sigmask); ++ __sigdelset (&pd->sigmask, SIGSETXID); ++ INTERNAL_SYSCALL_CALL (rt_sigprocmask, SIG_BLOCK, &pd->sigmask, NULL, ++ __NSIG_BYTES); + + /* Tell __pthread_kill_internal that this thread is about to exit. + If there is a __pthread_kill_internal in progress, this delays +diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile +index 48dba717a1cdc20a..d4bd2d4e3ee6a496 100644 +--- a/sysdeps/pthread/Makefile ++++ b/sysdeps/pthread/Makefile +@@ -118,6 +118,7 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ + tst-unload \ + tst-unwind-thread \ + tst-pt-vfork1 tst-pt-vfork2 tst-vfork1x tst-vfork2x \ ++ tst-pthread-setuid-loop \ + tst-pthread_cancel-exited \ + tst-pthread_cancel-select-loop \ + tst-pthread_kill-exited \ +diff --git a/sysdeps/pthread/tst-pthread-setuid-loop.c b/sysdeps/pthread/tst-pthread-setuid-loop.c +new file mode 100644 +index 0000000000000000..fda2a49b7f0ccf81 +--- /dev/null ++++ b/sysdeps/pthread/tst-pthread-setuid-loop.c +@@ -0,0 +1,61 @@ ++/* Test that setuid, pthread_create, thread exit do not deadlock (bug 28361). ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++/* How many threads to launch during each iteration. */ ++enum { threads = 4 }; ++ ++/* How many iterations to perform. This value seems to reproduce ++ bug 28361 in a bout one in three runs. */ ++enum { iterations = 5000 }; ++ ++/* Cache of the real user ID used by setuid_thread. */ ++static uid_t uid; ++ ++/* Start routine for the threads. */ ++static void * ++setuid_thread (void *closure) ++{ ++ TEST_COMPARE (setuid (uid), 0); ++ return NULL; ++} ++ ++static int ++do_test (void) ++{ ++ /* The setxid machinery is still invoked even if the UID is ++ unchanged. (The kernel might reset other credentials as part of ++ the system call.) */ ++ uid = getuid (); ++ ++ for (int i = 0; i < iterations; ++i) ++ { ++ pthread_t thread_ids[threads]; ++ for (int j = 0; j < threads; ++j) ++ thread_ids[j] = xpthread_create (NULL, setuid_thread, NULL); ++ for (int j = 0; j < threads; ++j) ++ xpthread_join (thread_ids[j]); ++ } ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-27.patch b/SOURCES/glibc-upstream-2.34-27.patch new file mode 100644 index 0000000..e166aa2 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-27.patch @@ -0,0 +1,37 @@ +commit 4bf72519987ebc2be4a2058c670379040fae90ea +Author: Florian Weimer +Date: Fri Oct 1 18:16:41 2021 +0200 + + support: Add check for TID zero in support_wait_for_thread_exit + + Some kernel versions (observed with kernel 5.14 and earlier) can list + "0" entries in /proc/self/task. This happens when a thread exits + while the task list is being constructed. Treat this entry as not + present, like the proposed kernel patch does: + + [PATCH] procfs: Do not list TID 0 in /proc//task + + + Fixes commit 032d74eaf6179100048a5bf0ce942e97dc8b9a60 ("support: Add + support_wait_for_thread_exit"). + + Reviewed-by: Carlos O'Donell + Tested-by: Carlos O'Donell + (cherry picked from commit 176c88f5214d8107d330971cbbfbbba5186a111f) + +diff --git a/support/support_wait_for_thread_exit.c b/support/support_wait_for_thread_exit.c +index 658a81381006ea62..5e3be421a78a4c78 100644 +--- a/support/support_wait_for_thread_exit.c ++++ b/support/support_wait_for_thread_exit.c +@@ -43,7 +43,10 @@ support_wait_for_thread_exit (void) + return; + } + +- if (strcmp (e->d_name, ".") == 0 || strcmp (e->d_name, "..") == 0) ++ /* In some kernels, "0" entries denote a thread that has just ++ exited. */ ++ if (strcmp (e->d_name, ".") == 0 || strcmp (e->d_name, "..") == 0 ++ || strcmp (e->d_name, "0") == 0) + continue; + + int task_tid = atoi (e->d_name); diff --git a/SOURCES/glibc-upstream-2.34-28.patch b/SOURCES/glibc-upstream-2.34-28.patch new file mode 100644 index 0000000..7becfe9 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-28.patch @@ -0,0 +1,154 @@ +commit 40bade26d5bcbda3d21fb598c5063d9df62de966 +Author: Florian Weimer +Date: Fri Oct 1 18:16:41 2021 +0200 + + nptl: pthread_kill must send signals to a specific thread [BZ #28407] + + The choice between the kill vs tgkill system calls is not just about + the TID reuse race, but also about whether the signal is sent to the + whole process (and any thread in it) or to a specific thread. + + This was caught by the openposix test suite: + + LTP: openposix test suite - FAIL: SIGUSR1 is member of new thread pendingset. + + + Fixes commit 526c3cf11ee9367344b6b15d669e4c3cb461a2be ("nptl: Fix race + between pthread_kill and thread exit (bug 12889)"). + + Reviewed-by: Carlos O'Donell + Tested-by: Carlos O'Donell + (cherry picked from commit eae81d70574e923ce3c59078b8df857ae192efa6) + +diff --git a/nptl/pthread_kill.c b/nptl/pthread_kill.c +index a44dc8f2d9baa925..35bf1f973eaeda90 100644 +--- a/nptl/pthread_kill.c ++++ b/nptl/pthread_kill.c +@@ -40,7 +40,7 @@ __pthread_kill_implementation (pthread_t threadid, int signo, int no_tid) + below. POSIX only guarantees delivery of a single signal, + which may not be the right one.) */ + pid_t tid = INTERNAL_SYSCALL_CALL (gettid); +- int ret = INTERNAL_SYSCALL_CALL (kill, tid, signo); ++ int ret = INTERNAL_SYSCALL_CALL (tgkill, __getpid (), tid, signo); + return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; + } + +@@ -59,8 +59,6 @@ __pthread_kill_implementation (pthread_t threadid, int signo, int no_tid) + ret = no_tid; + else + { +- /* Using tgkill is a safety measure. pd->exit_lock ensures that +- the target thread cannot exit. */ + ret = INTERNAL_SYSCALL_CALL (tgkill, __getpid (), pd->tid, signo); + ret = INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0; + } +diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile +index d4bd2d4e3ee6a496..0af9c59b425aefb1 100644 +--- a/sysdeps/pthread/Makefile ++++ b/sysdeps/pthread/Makefile +@@ -121,6 +121,7 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ + tst-pthread-setuid-loop \ + tst-pthread_cancel-exited \ + tst-pthread_cancel-select-loop \ ++ tst-pthread-raise-blocked-self \ + tst-pthread_kill-exited \ + tst-pthread_kill-exiting \ + # tests +diff --git a/sysdeps/pthread/tst-pthread-raise-blocked-self.c b/sysdeps/pthread/tst-pthread-raise-blocked-self.c +new file mode 100644 +index 0000000000000000..128e1a6071c0b15f +--- /dev/null ++++ b/sysdeps/pthread/tst-pthread-raise-blocked-self.c +@@ -0,0 +1,92 @@ ++/* Test that raise sends signal to current thread even if blocked. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* Used to create a dummy thread ID distinct from all other thread ++ IDs. */ ++static void * ++noop (void *ignored) ++{ ++ return NULL; ++} ++ ++static volatile pthread_t signal_thread; ++ ++static void ++signal_handler (int signo) ++{ ++ signal_thread = pthread_self (); ++} ++ ++/* Used to ensure that waiting_thread has launched and can accept ++ signals. */ ++static pthread_barrier_t barrier; ++ ++static void * ++waiting_thread (void *ignored) ++{ ++ xpthread_barrier_wait (&barrier); ++ pause (); ++ return NULL; ++} ++ ++static int ++do_test (void) ++{ ++ xsignal (SIGUSR1, signal_handler); ++ xpthread_barrier_init (&barrier, NULL, 2); ++ ++ /* Distinct thread ID value to */ ++ pthread_t dummy = xpthread_create (NULL, noop, NULL); ++ signal_thread = dummy; ++ ++ pthread_t helper = xpthread_create (NULL, waiting_thread, NULL); ++ ++ /* Make sure that the thread is running. */ ++ xpthread_barrier_wait (&barrier); ++ ++ /* Block signals on this thread. */ ++ sigset_t set; ++ sigfillset (&set); ++ xpthread_sigmask (SIG_BLOCK, &set, NULL); ++ ++ /* Send the signal to this thread. It must not be delivered. */ ++ raise (SIGUSR1); ++ TEST_VERIFY (signal_thread == dummy); ++ ++ /* Wait a bit to give a chance for signal delivery (increases ++ chances of failure with bug 28407). */ ++ usleep (50 * 1000); ++ ++ /* Unblocking should cause synchronous delivery of the signal. */ ++ xpthread_sigmask (SIG_UNBLOCK, &set, NULL); ++ TEST_VERIFY (signal_thread == pthread_self ()); ++ ++ xpthread_cancel (helper); ++ xpthread_join (helper); ++ xpthread_join (dummy); ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-29.patch b/SOURCES/glibc-upstream-2.34-29.patch new file mode 100644 index 0000000..2a35ad6 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-29.patch @@ -0,0 +1,101 @@ +commit e870aac8974cda746157a5a3c9f452ccd70da29b +Author: Adhemerval Zanella +Date: Mon Sep 6 12:22:54 2021 -0300 + + misc: Add __get_nprocs_sched + + This is an internal function meant to return the number of avaliable + processor where the process can scheduled, different than the + __get_nprocs which returns a the system available online CPU. + + The Linux implementation currently only calls __get_nprocs(), which + in tuns calls sched_getaffinity. + + Reviewed-by: Florian Weimer + (cherry picked from commit 11a02b035b464ab6813676adfd19c4a59c36d907) + +diff --git a/include/sys/sysinfo.h b/include/sys/sysinfo.h +index 7388356a19269335..c490561581733038 100644 +--- a/include/sys/sysinfo.h ++++ b/include/sys/sysinfo.h +@@ -9,10 +9,15 @@ + extern int __get_nprocs_conf (void); + libc_hidden_proto (__get_nprocs_conf) + +-/* Return number of available processors. */ ++/* Return number of available processors (not all of them will be ++ available to the caller process). */ + extern int __get_nprocs (void); + libc_hidden_proto (__get_nprocs) + ++/* Return the number of available processors which the process can ++ be scheduled. */ ++extern int __get_nprocs_sched (void) attribute_hidden; ++ + /* Return number of physical pages of memory in the system. */ + extern long int __get_phys_pages (void); + libc_hidden_proto (__get_phys_pages) +diff --git a/malloc/arena.c b/malloc/arena.c +index 667484630ed0afa5..f1f0af86489d0063 100644 +--- a/malloc/arena.c ++++ b/malloc/arena.c +@@ -879,7 +879,7 @@ arena_get2 (size_t size, mstate avoid_arena) + narenas_limit = mp_.arena_max; + else if (narenas > mp_.arena_test) + { +- int n = __get_nprocs (); ++ int n = __get_nprocs_sched (); + + if (n >= 1) + narenas_limit = NARENAS_FROM_NCORES (n); +diff --git a/misc/getsysstats.c b/misc/getsysstats.c +index 0eedface6d2b0f75..57d93601e21265d7 100644 +--- a/misc/getsysstats.c ++++ b/misc/getsysstats.c +@@ -45,6 +45,12 @@ weak_alias (__get_nprocs, get_nprocs) + link_warning (get_nprocs, "warning: get_nprocs will always return 1") + + ++int ++__get_nprocs_sched (void) ++{ ++ return 1; ++} ++ + long int + __get_phys_pages (void) + { +diff --git a/sysdeps/mach/getsysstats.c b/sysdeps/mach/getsysstats.c +index 1267f39da26aee38..cc8023f979bf6f74 100644 +--- a/sysdeps/mach/getsysstats.c ++++ b/sysdeps/mach/getsysstats.c +@@ -62,6 +62,12 @@ __get_nprocs (void) + libc_hidden_def (__get_nprocs) + weak_alias (__get_nprocs, get_nprocs) + ++int ++__get_nprocs_sched (void) ++{ ++ return __get_nprocs (); ++} ++ + /* Return the number of physical pages on the system. */ + long int + __get_phys_pages (void) +diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c +index 1391e360b8f8e86c..120ce1bb756b09cc 100644 +--- a/sysdeps/unix/sysv/linux/getsysstats.c ++++ b/sysdeps/unix/sysv/linux/getsysstats.c +@@ -88,6 +88,12 @@ __get_nprocs (void) + libc_hidden_def (__get_nprocs) + weak_alias (__get_nprocs, get_nprocs) + ++int ++__get_nprocs_sched (void) ++{ ++ return __get_nprocs (); ++} ++ + + /* On some architectures it is possible to distinguish between configured + and active cpus. */ diff --git a/SOURCES/glibc-upstream-2.34-3.patch b/SOURCES/glibc-upstream-2.34-3.patch new file mode 100644 index 0000000..136cbf2 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-3.patch @@ -0,0 +1,32 @@ +commit a5bd2e10e0c25b80286dc36068e22a4cb4893af0 +Author: Siddhesh Poyarekar +Date: Tue Aug 3 21:11:03 2021 +0530 + + gaiconf_init: Avoid double-free in label and precedence lists + + labellist and precedencelist could get freed a second time if there + are allocation failures, so set them to NULL to avoid a double-free. + + Reviewed-by: Arjun Shankar + (cherry picked from commit 77a34079d8f3d63b61543bf3af93043f8674e4c4) + +diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c +index 838a68f0229b5aa8..43dfc6739e350a58 100644 +--- a/sysdeps/posix/getaddrinfo.c ++++ b/sysdeps/posix/getaddrinfo.c +@@ -2008,6 +2008,7 @@ gaiconf_init (void) + l = l->next; + } + free_prefixlist (labellist); ++ labellist = NULL; + + /* Sort the entries so that the most specific ones are at + the beginning. */ +@@ -2046,6 +2047,7 @@ gaiconf_init (void) + l = l->next; + } + free_prefixlist (precedencelist); ++ precedencelist = NULL; + + /* Sort the entries so that the most specific ones are at + the beginning. */ diff --git a/SOURCES/glibc-upstream-2.34-30.patch b/SOURCES/glibc-upstream-2.34-30.patch new file mode 100644 index 0000000..7255a98 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-30.patch @@ -0,0 +1,208 @@ +commit cda99af14e82b4bb6abaecd717ebe3b57c0aa534 +Author: Adhemerval Zanella +Date: Mon Sep 6 12:28:24 2021 -0300 + + linux: Simplify get_nprocs + + This patch simplifies the memory allocation code and uses the sched + routines instead of reimplement it. This still uses a stack + allocation buffer, so it can be used on malloc initialization code. + + Linux currently supports at maximum of 4096 cpus for most architectures: + + $ find -iname Kconfig | xargs git grep -A10 -w NR_CPUS | grep -w range + arch/alpha/Kconfig- range 2 32 + arch/arc/Kconfig- range 2 4096 + arch/arm/Kconfig- range 2 16 if DEBUG_KMAP_LOCAL + arch/arm/Kconfig- range 2 32 if !DEBUG_KMAP_LOCAL + arch/arm64/Kconfig- range 2 4096 + arch/csky/Kconfig- range 2 32 + arch/hexagon/Kconfig- range 2 6 if SMP + arch/ia64/Kconfig- range 2 4096 + arch/mips/Kconfig- range 2 256 + arch/openrisc/Kconfig- range 2 32 + arch/parisc/Kconfig- range 2 32 + arch/riscv/Kconfig- range 2 32 + arch/s390/Kconfig- range 2 512 + arch/sh/Kconfig- range 2 32 + arch/sparc/Kconfig- range 2 32 if SPARC32 + arch/sparc/Kconfig- range 2 4096 if SPARC64 + arch/um/Kconfig- range 1 1 + arch/x86/Kconfig-# [NR_CPUS_RANGE_BEGIN ... NR_CPUS_RANGE_END] range. + arch/x86/Kconfig- range NR_CPUS_RANGE_BEGIN NR_CPUS_RANGE_END + arch/xtensa/Kconfig- range 2 32 + + With x86 supporting 8192: + + arch/x86/Kconfig + 976 config NR_CPUS_RANGE_END + 977 int + 978 depends on X86_64 + 979 default 8192 if SMP && CPUMASK_OFFSTACK + 980 default 512 if SMP && !CPUMASK_OFFSTACK + 981 default 1 if !SMP + + So using a maximum of 32k cpu should cover all cases (and I would + expect once we start to have many more CPUs that Linux would provide + a more straightforward way to query for such information). + + A test is added to check if sched_getaffinity can successfully return + with large buffers. + + Checked on x86_64-linux-gnu and i686-linux-gnu. + + Reviewed-by: Florian Weimer + (cherry picked from commit 33099d72e41cf8a129b362e9709eb2be9372d844) + +diff --git a/posix/Makefile b/posix/Makefile +index a5229777eeb0e067..61fcdf015b4ec83b 100644 +--- a/posix/Makefile ++++ b/posix/Makefile +@@ -107,7 +107,8 @@ tests := test-errno tstgetopt testfnm runtests runptests \ + tst-sysconf-empty-chroot tst-glob_symlinks tst-fexecve \ + tst-glob-tilde test-ssize-max tst-spawn4 bug-regex37 \ + bug-regex38 tst-regcomp-truncated tst-spawn-chdir \ +- tst-wordexp-nocmd tst-execveat tst-spawn5 ++ tst-wordexp-nocmd tst-execveat tst-spawn5 \ ++ tst-sched_getaffinity + + # Test for the glob symbol version that was replaced in glibc 2.27. + ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes) +diff --git a/posix/tst-sched_getaffinity.c b/posix/tst-sched_getaffinity.c +new file mode 100644 +index 0000000000000000..db9d517a96fdd99e +--- /dev/null ++++ b/posix/tst-sched_getaffinity.c +@@ -0,0 +1,48 @@ ++/* Tests for sched_getaffinity with large buffers. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++/* NB: this test may fail on system with more than 32k cpus. */ ++ ++static int ++do_test (void) ++{ ++ /* The values are larger than the default cpu_set_t. */ ++ const int bufsize[] = { 1<<11, 1<<12, 1<<13, 1<<14, 1<<15, 1<<16, 1<<17 }; ++ int cpucount[array_length (bufsize)]; ++ ++ for (int i = 0; i < array_length (bufsize); i++) ++ { ++ cpu_set_t *cpuset = CPU_ALLOC (bufsize[i]); ++ TEST_VERIFY (cpuset != NULL); ++ size_t size = CPU_ALLOC_SIZE (bufsize[i]); ++ TEST_COMPARE (sched_getaffinity (0, size, cpuset), 0); ++ cpucount[i] = CPU_COUNT_S (size, cpuset); ++ CPU_FREE (cpuset); ++ } ++ ++ for (int i = 0; i < array_length (cpucount) - 1; i++) ++ TEST_COMPARE (cpucount[i], cpucount[i + 1]); ++ ++ return 0; ++} ++ ++#include +diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c +index 120ce1bb756b09cc..61d20e7bab8640f2 100644 +--- a/sysdeps/unix/sysv/linux/getsysstats.c ++++ b/sysdeps/unix/sysv/linux/getsysstats.c +@@ -29,61 +29,29 @@ + #include + #include + +-/* Compute the population count of the entire array. */ +-static int +-__get_nprocs_count (const unsigned long int *array, size_t length) +-{ +- int count = 0; +- for (size_t i = 0; i < length; ++i) +- if (__builtin_add_overflow (count, __builtin_popcountl (array[i]), +- &count)) +- return INT_MAX; +- return count; +-} +- +-/* __get_nprocs with a large buffer. */ +-static int +-__get_nprocs_large (void) +-{ +- /* This code cannot use scratch_buffer because it is used during +- malloc initialization. */ +- size_t pagesize = GLRO (dl_pagesize); +- unsigned long int *page = __mmap (0, pagesize, PROT_READ | PROT_WRITE, +- MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); +- if (page == MAP_FAILED) +- return 2; +- int r = INTERNAL_SYSCALL_CALL (sched_getaffinity, 0, pagesize, page); +- int count; +- if (r > 0) +- count = __get_nprocs_count (page, pagesize / sizeof (unsigned long int)); +- else if (r == -EINVAL) +- /* One page is still not enough to store the bits. A more-or-less +- arbitrary value. This assumes t hat such large systems never +- happen in practice. */ +- count = GLRO (dl_pagesize) * CHAR_BIT; +- else +- count = 2; +- __munmap (page, GLRO (dl_pagesize)); +- return count; +-} +- + int + __get_nprocs (void) + { +- /* Fast path for most systems. The kernel expects a buffer size +- that is a multiple of 8. */ +- unsigned long int small_buffer[1024 / CHAR_BIT / sizeof (unsigned long int)]; +- int r = INTERNAL_SYSCALL_CALL (sched_getaffinity, 0, +- sizeof (small_buffer), small_buffer); ++ enum ++ { ++ max_num_cpus = 32768, ++ cpu_bits_size = CPU_ALLOC_SIZE (32768) ++ }; ++ ++ /* This cannot use malloc because it is used on malloc initialization. */ ++ __cpu_mask cpu_bits[cpu_bits_size / sizeof (__cpu_mask)]; ++ int r = INTERNAL_SYSCALL_CALL (sched_getaffinity, 0, cpu_bits_size, ++ cpu_bits); + if (r > 0) +- return __get_nprocs_count (small_buffer, r / sizeof (unsigned long int)); ++ return CPU_COUNT_S (cpu_bits_size, (cpu_set_t*) cpu_bits); + else if (r == -EINVAL) +- /* The kernel requests a larger buffer to store the data. */ +- return __get_nprocs_large (); +- else +- /* Some other error. 2 is conservative (not a uniprocessor +- system, so atomics are needed). */ +- return 2; ++ /* The input buffer is still not enough to store the number of cpus. This ++ is an arbitrary values assuming such systems should be rare and there ++ is no offline cpus. */ ++ return max_num_cpus; ++ /* Some other error. 2 is conservative (not a uniprocessor system, so ++ atomics are needed). */ ++ return 2; + } + libc_hidden_def (__get_nprocs) + weak_alias (__get_nprocs, get_nprocs) diff --git a/SOURCES/glibc-upstream-2.34-31.patch b/SOURCES/glibc-upstream-2.34-31.patch new file mode 100644 index 0000000..cb04843 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-31.patch @@ -0,0 +1,201 @@ +commit 822662cf2a4b170ade4c5342f035d68815a03276 +Author: Adhemerval Zanella +Date: Mon Sep 6 14:19:51 2021 -0300 + + linux: Revert the use of sched_getaffinity on get_nproc (BZ #28310) + + The use of sched_getaffinity on get_nproc and + sysconf (_SC_NPROCESSORS_ONLN) done in 903bc7dcc2acafc40 (BZ #27645) + breaks the top command in common hypervisor configurations and also + other monitoring tools. + + The main issue using sched_getaffinity changed the symbols semantic + from system-wide scope of online CPUs to per-process one (which can + be changed with kernel cpusets or book parameters in VM). + + This patch reverts mostly of the 903bc7dcc2acafc40, with the + exceptions: + + * No more cached values and atomic updates, since they are inherent + racy. + + * No /proc/cpuinfo fallback, since /proc/stat is already used and + it would require to revert more arch-specific code. + + * The alloca is replace with a static buffer of 1024 bytes. + + So the implementation first consult the sysfs, and fallbacks to procfs. + + Checked on x86_64-linux-gnu. + + Reviewed-by: Florian Weimer + (cherry picked from commit 342298278eabc75baabcaced110a11a02c3d3580) + +diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c +index 61d20e7bab8640f2..d70ed9586950615c 100644 +--- a/sysdeps/unix/sysv/linux/getsysstats.c ++++ b/sysdeps/unix/sysv/linux/getsysstats.c +@@ -18,6 +18,8 @@ + . */ + + #include ++#include ++#include + #include + #include + #include +@@ -30,7 +32,7 @@ + #include + + int +-__get_nprocs (void) ++__get_nprocs_sched (void) + { + enum + { +@@ -53,14 +55,141 @@ __get_nprocs (void) + atomics are needed). */ + return 2; + } +-libc_hidden_def (__get_nprocs) +-weak_alias (__get_nprocs, get_nprocs) ++ ++static char * ++next_line (int fd, char *const buffer, char **cp, char **re, ++ char *const buffer_end) ++{ ++ char *res = *cp; ++ char *nl = memchr (*cp, '\n', *re - *cp); ++ if (nl == NULL) ++ { ++ if (*cp != buffer) ++ { ++ if (*re == buffer_end) ++ { ++ memmove (buffer, *cp, *re - *cp); ++ *re = buffer + (*re - *cp); ++ *cp = buffer; ++ ++ ssize_t n = __read_nocancel (fd, *re, buffer_end - *re); ++ if (n < 0) ++ return NULL; ++ ++ *re += n; ++ ++ nl = memchr (*cp, '\n', *re - *cp); ++ while (nl == NULL && *re == buffer_end) ++ { ++ /* Truncate too long lines. */ ++ *re = buffer + 3 * (buffer_end - buffer) / 4; ++ n = __read_nocancel (fd, *re, buffer_end - *re); ++ if (n < 0) ++ return NULL; ++ ++ nl = memchr (*re, '\n', n); ++ **re = '\n'; ++ *re += n; ++ } ++ } ++ else ++ nl = memchr (*cp, '\n', *re - *cp); ++ ++ res = *cp; ++ } ++ ++ if (nl == NULL) ++ nl = *re - 1; ++ } ++ ++ *cp = nl + 1; ++ assert (*cp <= *re); ++ ++ return res == *re ? NULL : res; ++} ++ + + int +-__get_nprocs_sched (void) ++__get_nprocs (void) + { +- return __get_nprocs (); ++ enum { buffer_size = 1024 }; ++ char buffer[buffer_size]; ++ char *buffer_end = buffer + buffer_size; ++ char *cp = buffer_end; ++ char *re = buffer_end; ++ ++ const int flags = O_RDONLY | O_CLOEXEC; ++ /* This file contains comma-separated ranges. */ ++ int fd = __open_nocancel ("/sys/devices/system/cpu/online", flags); ++ char *l; ++ int result = 0; ++ if (fd != -1) ++ { ++ l = next_line (fd, buffer, &cp, &re, buffer_end); ++ if (l != NULL) ++ do ++ { ++ char *endp; ++ unsigned long int n = strtoul (l, &endp, 10); ++ if (l == endp) ++ { ++ result = 0; ++ break; ++ } ++ ++ unsigned long int m = n; ++ if (*endp == '-') ++ { ++ l = endp + 1; ++ m = strtoul (l, &endp, 10); ++ if (l == endp) ++ { ++ result = 0; ++ break; ++ } ++ } ++ ++ result += m - n + 1; ++ ++ l = endp; ++ if (l < re && *l == ',') ++ ++l; ++ } ++ while (l < re && *l != '\n'); ++ ++ __close_nocancel_nostatus (fd); ++ ++ if (result > 0) ++ return result; ++ } ++ ++ cp = buffer_end; ++ re = buffer_end; ++ ++ /* Default to an SMP system in case we cannot obtain an accurate ++ number. */ ++ result = 2; ++ ++ fd = __open_nocancel ("/proc/stat", flags); ++ if (fd != -1) ++ { ++ result = 0; ++ ++ while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL) ++ /* The current format of /proc/stat has all the cpu* entries ++ at the front. We assume here that stays this way. */ ++ if (strncmp (l, "cpu", 3) != 0) ++ break; ++ else if (isdigit (l[3])) ++ ++result; ++ ++ __close_nocancel_nostatus (fd); ++ } ++ ++ return result; + } ++libc_hidden_def (__get_nprocs) ++weak_alias (__get_nprocs, get_nprocs) + + + /* On some architectures it is possible to distinguish between configured diff --git a/SOURCES/glibc-upstream-2.34-32.patch b/SOURCES/glibc-upstream-2.34-32.patch new file mode 100644 index 0000000..d5fddc0 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-32.patch @@ -0,0 +1,42 @@ +commit 80a009119ba2330768120476aaad63767b81d543 +Author: Jonathan Wakely +Date: Wed May 19 16:48:19 2021 +0100 + + Suppress -Wcast-qual warnings in bsearch + + The first cast to (void *) is redundant but should be (const void *) + anyway, because that's the type of the lvalue being assigned to. + + The second cast is necessary and intentionally not const-correct, so + tell the compiler not to warn about it. + + Reviewed-by: Florian Weimer + (cherry picked from commit a725ff1de965f4cc4f36a7e8ae795d40ca0350d7) + +diff --git a/bits/stdlib-bsearch.h b/bits/stdlib-bsearch.h +index 4132dc6af0077f31..d688ed2e15678e9c 100644 +--- a/bits/stdlib-bsearch.h ++++ b/bits/stdlib-bsearch.h +@@ -29,14 +29,21 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, + while (__l < __u) + { + __idx = (__l + __u) / 2; +- __p = (void *) (((const char *) __base) + (__idx * __size)); ++ __p = (const void *) (((const char *) __base) + (__idx * __size)); + __comparison = (*__compar) (__key, __p); + if (__comparison < 0) + __u = __idx; + else if (__comparison > 0) + __l = __idx + 1; + else ++#if __GNUC_PREREQ(4, 6) ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wcast-qual" ++#endif + return (void *) __p; ++#if __GNUC_PREREQ(4, 6) ++# pragma GCC diagnostic pop ++#endif + } + + return NULL; diff --git a/SOURCES/glibc-upstream-2.34-33.patch b/SOURCES/glibc-upstream-2.34-33.patch new file mode 100644 index 0000000..f7f9ca9 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-33.patch @@ -0,0 +1,37 @@ +commit a996d13b8a2e101bedbb1bdaa7ffcfea3b959bb2 +Author: Florian Weimer +Date: Thu Sep 30 18:44:06 2021 +0200 + + Add missing braces to bsearch inline implementation [BZ #28400] + + GCC treats the pragma as a statement, so that the else branch only + consists of the pragma, not the return statement. + + Fixes commit a725ff1de965f4cc4f36a7e8ae795d40ca0350d7 ("Suppress + -Wcast-qual warnings in bsearch"). + + Reviewed-by: H.J. Lu + (cherry picked from commit 32b96d0dec0294465d2221a8f049703599d9d8e4) + +diff --git a/bits/stdlib-bsearch.h b/bits/stdlib-bsearch.h +index d688ed2e15678e9c..e2fcea6e172af72c 100644 +--- a/bits/stdlib-bsearch.h ++++ b/bits/stdlib-bsearch.h +@@ -36,14 +36,16 @@ bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, + else if (__comparison > 0) + __l = __idx + 1; + else ++ { + #if __GNUC_PREREQ(4, 6) + # pragma GCC diagnostic push + # pragma GCC diagnostic ignored "-Wcast-qual" + #endif +- return (void *) __p; ++ return (void *) __p; + #if __GNUC_PREREQ(4, 6) + # pragma GCC diagnostic pop + #endif ++ } + } + + return NULL; diff --git a/SOURCES/glibc-upstream-2.34-34.patch b/SOURCES/glibc-upstream-2.34-34.patch new file mode 100644 index 0000000..1828ac7 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-34.patch @@ -0,0 +1,41 @@ +commit 558168c78ea1eb8efb33959c1da9d6b5a997fd7b +Author: Siddhesh Poyarekar +Date: Wed Oct 6 21:48:35 2021 +0530 + + support: Also return fd when it is 0 + + The fd validity check in open_dev_null checks if fd > 0, which would + lead to a leaked fd if it is == 0. + + Signed-off-by: Siddhesh Poyarekar + Reviewed-by: Adhemerval Zanella + (cherry picked from commit 27b6edbb090f736b101f569620d8ad0e7217ddf8) + +diff --git a/support/support-open-dev-null-range.c b/support/support-open-dev-null-range.c +index 80d9dba50402ce12..66a850410557351b 100644 +--- a/support/support-open-dev-null-range.c ++++ b/support/support-open-dev-null-range.c +@@ -40,16 +40,16 @@ increase_nofile (void) + static int + open_dev_null (int flags, mode_t mode) + { +- int fd = open64 ("/dev/null", flags, mode); +- if (fd > 0) +- return fd; ++ int fd = open64 ("/dev/null", flags, mode); ++ if (fd >= 0) ++ return fd; + +- if (fd < 0 && errno != EMFILE) +- FAIL_EXIT1 ("open64 (\"/dev/null\", 0x%x, 0%o): %m", flags, mode); ++ if (fd < 0 && errno != EMFILE) ++ FAIL_EXIT1 ("open64 (\"/dev/null\", 0x%x, 0%o): %m", flags, mode); + +- increase_nofile (); ++ increase_nofile (); + +- return xopen ("/dev/null", flags, mode); ++ return xopen ("/dev/null", flags, mode); + } + + struct range diff --git a/SOURCES/glibc-upstream-2.34-35.patch b/SOURCES/glibc-upstream-2.34-35.patch new file mode 100644 index 0000000..cdee1af --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-35.patch @@ -0,0 +1,83 @@ +commit cb44a620ef2336449af60694b6696efced161774 +Author: Stefan Liebler +Date: Tue Oct 5 16:14:10 2021 +0200 + + S390: Add PCI_MIO and SIE HWCAPs + + Both new HWCAPs were introduced in these kernel commits: + - 7e8403ecaf884f307b627f3c371475913dd29292 + "s390: add HWCAP_S390_PCI_MIO to ELF hwcaps" + - 7e82523f2583e9813e4109df3656707162541297 + "s390/hwcaps: make sie capability regular hwcap" + + Also note that the kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e + "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros + from "HWCAP_S390_" to "HWCAP_". For compatibility reasons, we do not + change the prefix in public glibc header file. + + (cherry picked from commit f2e06656d04a9fcb0603802a4f8ce7aa3a1f055e) + +diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c +index c174e27b3559c57c..155f0bd99eccb3f9 100644 +--- a/sysdeps/s390/dl-procinfo.c ++++ b/sysdeps/s390/dl-procinfo.c +@@ -46,13 +46,13 @@ + #if !defined PROCINFO_DECL && defined SHARED + ._dl_s390_cap_flags + #else +-PROCINFO_CLASS const char _dl_s390_cap_flags[21][9] ++PROCINFO_CLASS const char _dl_s390_cap_flags[23][9] + #endif + #ifndef PROCINFO_DECL + = { + "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh", + "highgprs", "te", "vx", "vxd", "vxe", "gs", "vxe2", "vxp", "sort", "dflt", +- "vxp2", "nnpa" ++ "vxp2", "nnpa", "pcimio", "sie" + } + #endif + #if !defined SHARED || defined PROCINFO_DECL +diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h +index 2d9c3058083e5dda..e4e3e334a5b3d47c 100644 +--- a/sysdeps/s390/dl-procinfo.h ++++ b/sysdeps/s390/dl-procinfo.h +@@ -21,7 +21,7 @@ + #define _DL_PROCINFO_H 1 + #include + +-#define _DL_HWCAP_COUNT 21 ++#define _DL_HWCAP_COUNT 23 + + #define _DL_PLATFORMS_COUNT 10 + +@@ -63,6 +63,8 @@ enum + HWCAP_S390_DFLT = 1 << 18, + HWCAP_S390_VXRS_PDE2 = 1 << 19, + HWCAP_S390_NNPA = 1 << 20, ++ HWCAP_S390_PCI_MIO = 1 << 21, ++ HWCAP_S390_SIE = 1 << 22, + }; + + #define HWCAP_IMPORTANT (HWCAP_S390_ZARCH | HWCAP_S390_LDISP \ +diff --git a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h +index e9bd3684db862d1b..00e73a3e3bfdb711 100644 +--- a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h ++++ b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h +@@ -22,6 +22,11 @@ + + /* + * The following must match the kernels asm/elf.h. ++ * Note: The kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e ++ * "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros ++ * from "HWCAP_S390_" to "HWCAP_". For compatibility reasons, we do not ++ * change the prefix in public glibc header file. ++ * + * Note that these are *not* the same as the STORE FACILITY LIST bits. + */ + #define HWCAP_S390_ESAN3 1 +@@ -48,3 +53,5 @@ + #define HWCAP_S390_DFLT 262144 + #define HWCAP_S390_VXRS_PDE2 524288 + #define HWCAP_S390_NNPA 1048576 ++#define HWCAP_S390_PCI_MIO 2097152 ++#define HWCAP_S390_SIE 4194304 diff --git a/SOURCES/glibc-upstream-2.34-36.patch b/SOURCES/glibc-upstream-2.34-36.patch new file mode 100644 index 0000000..76a5844 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-36.patch @@ -0,0 +1,47 @@ +commit 79528414dc1578800cbf1fba2fbdb6335f4f39bf +Author: H.J. Lu +Date: Thu Sep 30 10:29:17 2021 -0700 + + elf: Replace nsid with args.nsid [BZ #27609] + + commit ec935dea6332cb22f9881cd1162bad156173f4b0 + Author: Florian Weimer + Date: Fri Apr 24 22:31:15 2020 +0200 + + elf: Implement __libc_early_init + + has + + @@ -856,6 +876,11 @@ no more namespaces available for dlmopen()")); + /* See if an error occurred during loading. */ + if (__glibc_unlikely (exception.errstring != NULL)) + { + + /* Avoid keeping around a dangling reference to the libc.so link + + map in case it has been cached in libc_map. */ + + if (!args.libc_already_loaded) + + GL(dl_ns)[nsid].libc_map = NULL; + + + + do_dlopen calls _dl_open with nsid == __LM_ID_CALLER (-2), which calls + dl_open_worker with args.nsid = nsid. dl_open_worker updates args.nsid + if it is __LM_ID_CALLER. After dl_open_worker returns, it is wrong to + use nsid. + + Replace nsid with args.nsid after dl_open_worker returns. This fixes + BZ #27609. + + (cherry picked from commit 1e1ecea62e899acb58c3fdf3b320a0833ddd0dff) + +diff --git a/elf/dl-open.c b/elf/dl-open.c +index ec386626f96e17f7..41c7250bf630f978 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -886,7 +886,7 @@ no more namespaces available for dlmopen()")); + /* Avoid keeping around a dangling reference to the libc.so link + map in case it has been cached in libc_map. */ + if (!args.libc_already_loaded) +- GL(dl_ns)[nsid].libc_map = NULL; ++ GL(dl_ns)[args.nsid].libc_map = NULL; + + /* Remove the object from memory. It may be in an inconsistent + state if relocation failed, for example. */ diff --git a/SOURCES/glibc-upstream-2.34-37.patch b/SOURCES/glibc-upstream-2.34-37.patch new file mode 100644 index 0000000..5a7eea7 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-37.patch @@ -0,0 +1,137 @@ +commit 76843f3b3ecb886b8d300220e6ec378e0fd09a8b +Author: Adhemerval Zanella +Date: Wed Oct 6 08:10:13 2021 -0300 + + y2038: Use a common definition for stat for sparc32 + + The sparc32 misses support for support done by 4e8521333bea6. + + Checked on sparcv9-linux-gnu. + + (cherry picked from commit d2b1254db208b35ff060f00a15f22a1eed5306d2) + +diff --git a/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h b/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h +index b481b4f9f80a94f4..45db6b6ffbb19b8b 100644 +--- a/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h ++++ b/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h +@@ -28,32 +28,35 @@ + + struct stat + { ++#ifdef __USE_TIME_BITS64 ++# include ++#else + __dev_t st_dev; /* Device. */ +-#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 ++# if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 + unsigned short int __pad1; + __ino_t st_ino; /* File serial number. */ +-#else ++# else + __ino64_t st_ino; /* File serial number. */ +-#endif ++# endif + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ + __uid_t st_uid; /* User ID of the file's owner. */ + __gid_t st_gid; /* Group ID of the file's group.*/ + __dev_t st_rdev; /* Device number, if device. */ + unsigned short int __pad2; +-#ifndef __USE_FILE_OFFSET64 ++# ifndef __USE_FILE_OFFSET64 + __off_t st_size; /* Size of file, in bytes. */ +-#else ++# else + __off64_t st_size; /* Size of file, in bytes. */ +-#endif ++# endif + __blksize_t st_blksize; /* Optimal block size for I/O. */ + +-#ifndef __USE_FILE_OFFSET64 ++# ifndef __USE_FILE_OFFSET64 + __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ +-#else ++# else + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +-#endif +-#ifdef __USE_XOPEN2K8 ++# endif ++# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the +@@ -63,28 +66,32 @@ struct stat + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +-# define st_atime st_atim.tv_sec /* Backward compatibility. */ +-# define st_mtime st_mtim.tv_sec +-# define st_ctime st_ctim.tv_sec +-#else ++# define st_atime st_atim.tv_sec /* Backward compatibility. */ ++# define st_mtime st_mtim.tv_sec ++# define st_ctime st_ctim.tv_sec ++# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +-#endif ++# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; ++#endif /* __USE_TIME_BITS64 */ + }; + + #ifdef __USE_LARGEFILE64 + struct stat64 + { ++# ifdef __USE_TIME_BITS64 ++# include ++# else + __dev_t st_dev; /* Device. */ +-# if __WORDSIZE == 64 ++# if __WORDSIZE == 64 + unsigned short int __pad1; +-# endif ++# endif + __ino64_t st_ino; /* File serial number. */ + __mode_t st_mode; /* File mode. */ + __nlink_t st_nlink; /* Link count. */ +@@ -96,7 +103,7 @@ struct stat64 + __blksize_t st_blksize; /* Optimal block size for I/O. */ + + __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ +-# ifdef __USE_XOPEN2K8 ++# ifdef __USE_XOPEN2K8 + /* Nanosecond resolution timestamps are stored in a format + equivalent to 'struct timespec'. This is the type used + whenever possible but the Unix namespace rules do not allow the +@@ -106,19 +113,20 @@ struct stat64 + struct timespec st_atim; /* Time of last access. */ + struct timespec st_mtim; /* Time of last modification. */ + struct timespec st_ctim; /* Time of last status change. */ +-# define st_atime st_atim.tv_sec /* Backward compatibility. */ +-# define st_mtime st_mtim.tv_sec +-# define st_ctime st_ctim.tv_sec +-# else ++# define st_atime st_atim.tv_sec /* Backward compatibility. */ ++# define st_mtime st_mtim.tv_sec ++# define st_ctime st_ctim.tv_sec ++# else + __time_t st_atime; /* Time of last access. */ + unsigned long int st_atimensec; /* Nscecs of last access. */ + __time_t st_mtime; /* Time of last modification. */ + unsigned long int st_mtimensec; /* Nsecs of last modification. */ + __time_t st_ctime; /* Time of last status change. */ + unsigned long int st_ctimensec; /* Nsecs of last status change. */ +-# endif ++# endif + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; ++# endif /* __USE_TIME_BITS64 */ + }; + #endif + diff --git a/SOURCES/glibc-upstream-2.34-38.patch b/SOURCES/glibc-upstream-2.34-38.patch new file mode 100644 index 0000000..7cdb50c --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-38.patch @@ -0,0 +1,41 @@ +commit cb9b8b5d7670df1a13544857640efd86a299d0e4 +Author: Stafford Horne +Date: Fri Oct 15 06:17:41 2021 +0900 + + timex: Use 64-bit fields on 32-bit TIMESIZE=64 systems (BZ #28469) + + This was found when testing the OpenRISC port I am working on. These + two tests fail with SIGSEGV: + + FAIL: misc/tst-ntp_gettime + FAIL: misc/tst-ntp_gettimex + + This was found to be due to the kernel overwriting the stack space + allocated by the timex structure. The reason for the overwrite being + that the kernel timex has 64-bit fields and user space code only + allocates enough stack space for timex with 32-bit fields. + + On 32-bit systems with TIMESIZE=64 __USE_TIME_BITS64 is not defined. + This causes the timex structure to use 32-bit fields with type + __syscall_slong_t. + + This patch adjusts the ifdef condition to allow 32-bit systems with + TIMESIZE=64 to use the 64-bit long long timex definition. + + Reviewed-by: Adhemerval Zanella + + (Cherry picked from commit 1d550265a75b412cea4889a50b101395f6a8e025) + +diff --git a/sysdeps/unix/sysv/linux/bits/timex.h b/sysdeps/unix/sysv/linux/bits/timex.h +index ee37694e8f09a8e4..4a5db6deca10de58 100644 +--- a/sysdeps/unix/sysv/linux/bits/timex.h ++++ b/sysdeps/unix/sysv/linux/bits/timex.h +@@ -25,7 +25,7 @@ + + struct timex + { +-# ifdef __USE_TIME_BITS64 ++# if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32) + unsigned int modes; /* mode selector */ + int :32; /* pad */ + long long offset; /* time offset (usec) */ diff --git a/SOURCES/glibc-upstream-2.34-39.patch b/SOURCES/glibc-upstream-2.34-39.patch new file mode 100644 index 0000000..9b0b380 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-39.patch @@ -0,0 +1,466 @@ +commit 024a7640ab9ecea80e527f4e4d7f7a1868e952c5 +Author: Szabolcs Nagy +Date: Wed Sep 15 15:16:19 2021 +0100 + + elf: Avoid deadlock between pthread_create and ctors [BZ #28357] + + The fix for bug 19329 caused a regression such that pthread_create can + deadlock when concurrent ctors from dlopen are waiting for it to finish. + Use a new GL(dl_load_tls_lock) in pthread_create that is not taken + around ctors in dlopen. + + The new lock is also used in __tls_get_addr instead of GL(dl_load_lock). + + The new lock is held in _dl_open_worker and _dl_close_worker around + most of the logic before/after the init/fini routines. When init/fini + routines are running then TLS is in a consistent, usable state. + In _dl_open_worker the new lock requires catching and reraising dlopen + failures that happen in the critical section. + + The new lock is reinitialized in a fork child, to keep the existing + behaviour and it is kept recursive in case malloc interposition or TLS + access from signal handlers can retake it. It is not obvious if this + is necessary or helps, but avoids changing the preexisting behaviour. + + The new lock may be more appropriate for dl_iterate_phdr too than + GL(dl_load_write_lock), since TLS state of an incompletely loaded + module may be accessed. If the new lock can replace the old one, + that can be a separate change. + + Fixes bug 28357. + + Reviewed-by: Adhemerval Zanella + (cherry picked from commit 83b5323261bb72313bffcf37476c1b8f0847c736) + +diff --git a/elf/dl-close.c b/elf/dl-close.c +index f39001cab981b723..cd7b9c9fe83a1a44 100644 +--- a/elf/dl-close.c ++++ b/elf/dl-close.c +@@ -549,6 +549,9 @@ _dl_close_worker (struct link_map *map, bool force) + size_t tls_free_end; + tls_free_start = tls_free_end = NO_TLS_OFFSET; + ++ /* Protects global and module specitic TLS state. */ ++ __rtld_lock_lock_recursive (GL(dl_load_tls_lock)); ++ + /* We modify the list of loaded objects. */ + __rtld_lock_lock_recursive (GL(dl_load_write_lock)); + +@@ -784,6 +787,9 @@ _dl_close_worker (struct link_map *map, bool force) + GL(dl_tls_static_used) = tls_free_start; + } + ++ /* TLS is cleaned up for the unloaded modules. */ ++ __rtld_lock_unlock_recursive (GL(dl_load_tls_lock)); ++ + #ifdef SHARED + /* Auditing checkpoint: we have deleted all objects. */ + if (__glibc_unlikely (do_audit)) +diff --git a/elf/dl-open.c b/elf/dl-open.c +index 41c7250bf630f978..bc68e2c376debd71 100644 +--- a/elf/dl-open.c ++++ b/elf/dl-open.c +@@ -66,6 +66,9 @@ struct dl_open_args + libc_map value in the namespace in case of a dlopen failure. */ + bool libc_already_loaded; + ++ /* Set to true if the end of dl_open_worker_begin was reached. */ ++ bool worker_continue; ++ + /* Original parameters to the program and the current environment. */ + int argc; + char **argv; +@@ -482,7 +485,7 @@ call_dl_init (void *closure) + } + + static void +-dl_open_worker (void *a) ++dl_open_worker_begin (void *a) + { + struct dl_open_args *args = a; + const char *file = args->file; +@@ -774,6 +777,36 @@ dl_open_worker (void *a) + _dl_call_libc_early_init (libc_map, false); + } + ++ args->worker_continue = true; ++} ++ ++static void ++dl_open_worker (void *a) ++{ ++ struct dl_open_args *args = a; ++ ++ args->worker_continue = false; ++ ++ { ++ /* Protects global and module specific TLS state. */ ++ __rtld_lock_lock_recursive (GL(dl_load_tls_lock)); ++ ++ struct dl_exception ex; ++ int err = _dl_catch_exception (&ex, dl_open_worker_begin, args); ++ ++ __rtld_lock_unlock_recursive (GL(dl_load_tls_lock)); ++ ++ if (__glibc_unlikely (ex.errstring != NULL)) ++ /* Reraise the error. */ ++ _dl_signal_exception (err, &ex, NULL); ++ } ++ ++ if (!args->worker_continue) ++ return; ++ ++ int mode = args->mode; ++ struct link_map *new = args->map; ++ + /* Run the initializer functions of new objects. Temporarily + disable the exception handler, so that lazy binding failures are + fatal. */ +diff --git a/elf/dl-support.c b/elf/dl-support.c +index 01557181753fb38d..d8c06ba7eb4c76ea 100644 +--- a/elf/dl-support.c ++++ b/elf/dl-support.c +@@ -229,6 +229,13 @@ __rtld_lock_define_initialized_recursive (, _dl_load_lock) + list of loaded objects while an object is added to or removed from + that list. */ + __rtld_lock_define_initialized_recursive (, _dl_load_write_lock) ++ /* This lock protects global and module specific TLS related data. ++ E.g. it is held in dlopen and dlclose when GL(dl_tls_generation), ++ GL(dl_tls_max_dtv_idx) or GL(dl_tls_dtv_slotinfo_list) are ++ accessed and when TLS related relocations are processed for a ++ module. It was introduced to keep pthread_create accessing TLS ++ state that is being set up. */ ++__rtld_lock_define_initialized_recursive (, _dl_load_tls_lock) + + + #ifdef HAVE_AUX_VECTOR +diff --git a/elf/dl-tls.c b/elf/dl-tls.c +index 423e380f7ca654fe..40263cf586e74c64 100644 +--- a/elf/dl-tls.c ++++ b/elf/dl-tls.c +@@ -532,7 +532,7 @@ _dl_allocate_tls_init (void *result) + size_t maxgen = 0; + + /* Protects global dynamic TLS related state. */ +- __rtld_lock_lock_recursive (GL(dl_load_lock)); ++ __rtld_lock_lock_recursive (GL(dl_load_tls_lock)); + + /* Check if the current dtv is big enough. */ + if (dtv[-1].counter < GL(dl_tls_max_dtv_idx)) +@@ -606,7 +606,7 @@ _dl_allocate_tls_init (void *result) + listp = listp->next; + assert (listp != NULL); + } +- __rtld_lock_unlock_recursive (GL(dl_load_lock)); ++ __rtld_lock_unlock_recursive (GL(dl_load_tls_lock)); + + /* The DTV version is up-to-date now. */ + dtv[0].counter = maxgen; +@@ -745,7 +745,7 @@ _dl_update_slotinfo (unsigned long int req_modid) + + Here the dtv needs to be updated to new_gen generation count. + +- This code may be called during TLS access when GL(dl_load_lock) ++ This code may be called during TLS access when GL(dl_load_tls_lock) + is not held. In that case the user code has to synchronize with + dlopen and dlclose calls of relevant modules. A module m is + relevant if the generation of m <= new_gen and dlclose of m is +@@ -867,11 +867,11 @@ tls_get_addr_tail (GET_ADDR_ARGS, dtv_t *dtv, struct link_map *the_map) + if (__glibc_unlikely (the_map->l_tls_offset + != FORCED_DYNAMIC_TLS_OFFSET)) + { +- __rtld_lock_lock_recursive (GL(dl_load_lock)); ++ __rtld_lock_lock_recursive (GL(dl_load_tls_lock)); + if (__glibc_likely (the_map->l_tls_offset == NO_TLS_OFFSET)) + { + the_map->l_tls_offset = FORCED_DYNAMIC_TLS_OFFSET; +- __rtld_lock_unlock_recursive (GL(dl_load_lock)); ++ __rtld_lock_unlock_recursive (GL(dl_load_tls_lock)); + } + else if (__glibc_likely (the_map->l_tls_offset + != FORCED_DYNAMIC_TLS_OFFSET)) +@@ -883,7 +883,7 @@ tls_get_addr_tail (GET_ADDR_ARGS, dtv_t *dtv, struct link_map *the_map) + #else + # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined" + #endif +- __rtld_lock_unlock_recursive (GL(dl_load_lock)); ++ __rtld_lock_unlock_recursive (GL(dl_load_tls_lock)); + + dtv[GET_ADDR_MODULE].pointer.to_free = NULL; + dtv[GET_ADDR_MODULE].pointer.val = p; +@@ -891,7 +891,7 @@ tls_get_addr_tail (GET_ADDR_ARGS, dtv_t *dtv, struct link_map *the_map) + return (char *) p + GET_ADDR_OFFSET; + } + else +- __rtld_lock_unlock_recursive (GL(dl_load_lock)); ++ __rtld_lock_unlock_recursive (GL(dl_load_tls_lock)); + } + struct dtv_pointer result = allocate_and_init (the_map); + dtv[GET_ADDR_MODULE].pointer = result; +@@ -962,7 +962,7 @@ _dl_tls_get_addr_soft (struct link_map *l) + return NULL; + + dtv_t *dtv = THREAD_DTV (); +- /* This may be called without holding the GL(dl_load_lock). Reading ++ /* This may be called without holding the GL(dl_load_tls_lock). Reading + arbitrary gen value is fine since this is best effort code. */ + size_t gen = atomic_load_relaxed (&GL(dl_tls_generation)); + if (__glibc_unlikely (dtv[0].counter != gen)) +diff --git a/elf/rtld.c b/elf/rtld.c +index d733359eaf808b8a..08cf50145a1c01ce 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -322,6 +322,7 @@ struct rtld_global _rtld_global = + #ifdef _LIBC_REENTRANT + ._dl_load_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER, + ._dl_load_write_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER, ++ ._dl_load_tls_lock = _RTLD_LOCK_RECURSIVE_INITIALIZER, + #endif + ._dl_nns = 1, + ._dl_ns = +diff --git a/posix/fork.c b/posix/fork.c +index c471f7b15fe4290d..021691b9b7441f15 100644 +--- a/posix/fork.c ++++ b/posix/fork.c +@@ -99,6 +99,9 @@ __libc_fork (void) + /* Reset the lock the dynamic loader uses to protect its data. */ + __rtld_lock_initialize (GL(dl_load_lock)); + ++ /* Reset the lock protecting dynamic TLS related data. */ ++ __rtld_lock_initialize (GL(dl_load_tls_lock)); ++ + reclaim_stacks (); + + /* Run the handlers registered for the child. */ +diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h +index 9c15259236adab43..1ceb9c3212c148ba 100644 +--- a/sysdeps/generic/ldsodefs.h ++++ b/sysdeps/generic/ldsodefs.h +@@ -372,6 +372,13 @@ struct rtld_global + list of loaded objects while an object is added to or removed + from that list. */ + __rtld_lock_define_recursive (EXTERN, _dl_load_write_lock) ++ /* This lock protects global and module specific TLS related data. ++ E.g. it is held in dlopen and dlclose when GL(dl_tls_generation), ++ GL(dl_tls_max_dtv_idx) or GL(dl_tls_dtv_slotinfo_list) are ++ accessed and when TLS related relocations are processed for a ++ module. It was introduced to keep pthread_create accessing TLS ++ state that is being set up. */ ++ __rtld_lock_define_recursive (EXTERN, _dl_load_tls_lock) + + /* Incremented whenever something may have been added to dl_loaded. */ + EXTERN unsigned long long _dl_load_adds; +@@ -1261,7 +1268,7 @@ extern int _dl_scope_free (void *) attribute_hidden; + + /* Add module to slot information data. If DO_ADD is false, only the + required memory is allocated. Must be called with GL +- (dl_load_lock) acquired. If the function has already been called ++ (dl_load_tls_lock) acquired. If the function has already been called + for the link map L with !do_add, then this function will not raise + an exception, otherwise it is possible that it encounters a memory + allocation failure. */ +diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile +index 0af9c59b425aefb1..df8943f4860a39d8 100644 +--- a/sysdeps/pthread/Makefile ++++ b/sysdeps/pthread/Makefile +@@ -152,15 +152,17 @@ tests += tst-cancelx2 tst-cancelx3 tst-cancelx6 tst-cancelx8 tst-cancelx9 \ + tst-cleanupx0 tst-cleanupx1 tst-cleanupx2 tst-cleanupx3 + + ifeq ($(build-shared),yes) +-tests += tst-atfork2 tst-pt-tls4 tst-_res1 tst-fini1 ++tests += tst-atfork2 tst-pt-tls4 tst-_res1 tst-fini1 tst-create1 + tests-nolibpthread += tst-fini1 + endif + + modules-names += tst-atfork2mod tst-tls4moda tst-tls4modb \ +- tst-_res1mod1 tst-_res1mod2 tst-fini1mod ++ tst-_res1mod1 tst-_res1mod2 tst-fini1mod \ ++ tst-create1mod + test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names))) + + tst-atfork2mod.so-no-z-defs = yes ++tst-create1mod.so-no-z-defs = yes + + ifeq ($(build-shared),yes) + # Build all the modules even when not actually running test programs. +@@ -279,4 +281,8 @@ LDFLAGS-tst-join7mod.so = -Wl,-soname,tst-join7mod.so + + CFLAGS-tst-unwind-thread.c += -funwind-tables + ++LDFLAGS-tst-create1 = -Wl,-export-dynamic ++$(objpfx)tst-create1: $(shared-thread-library) ++$(objpfx)tst-create1.out: $(objpfx)tst-create1mod.so ++ + endif +diff --git a/sysdeps/pthread/tst-create1.c b/sysdeps/pthread/tst-create1.c +new file mode 100644 +index 0000000000000000..932586c30990d1d4 +--- /dev/null ++++ b/sysdeps/pthread/tst-create1.c +@@ -0,0 +1,119 @@ ++/* Verify that pthread_create does not deadlock when ctors take locks. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++/* ++Check if ctor and pthread_create deadlocks in ++ ++thread 1: dlopen -> ctor -> lock(user_lock) ++thread 2: lock(user_lock) -> pthread_create ++ ++or in ++ ++thread 1: dlclose -> dtor -> lock(user_lock) ++thread 2: lock(user_lock) -> pthread_create ++*/ ++ ++static pthread_barrier_t bar_ctor; ++static pthread_barrier_t bar_dtor; ++static pthread_mutex_t user_lock = PTHREAD_MUTEX_INITIALIZER; ++ ++void ++ctor (void) ++{ ++ xpthread_barrier_wait (&bar_ctor); ++ dprintf (1, "thread 1: in ctor: started.\n"); ++ xpthread_mutex_lock (&user_lock); ++ dprintf (1, "thread 1: in ctor: locked user_lock.\n"); ++ xpthread_mutex_unlock (&user_lock); ++ dprintf (1, "thread 1: in ctor: unlocked user_lock.\n"); ++ dprintf (1, "thread 1: in ctor: done.\n"); ++} ++ ++void ++dtor (void) ++{ ++ xpthread_barrier_wait (&bar_dtor); ++ dprintf (1, "thread 1: in dtor: started.\n"); ++ xpthread_mutex_lock (&user_lock); ++ dprintf (1, "thread 1: in dtor: locked user_lock.\n"); ++ xpthread_mutex_unlock (&user_lock); ++ dprintf (1, "thread 1: in dtor: unlocked user_lock.\n"); ++ dprintf (1, "thread 1: in dtor: done.\n"); ++} ++ ++static void * ++thread3 (void *a) ++{ ++ dprintf (1, "thread 3: started.\n"); ++ dprintf (1, "thread 3: done.\n"); ++ return 0; ++} ++ ++static void * ++thread2 (void *a) ++{ ++ pthread_t t3; ++ dprintf (1, "thread 2: started.\n"); ++ ++ xpthread_mutex_lock (&user_lock); ++ dprintf (1, "thread 2: locked user_lock.\n"); ++ xpthread_barrier_wait (&bar_ctor); ++ t3 = xpthread_create (0, thread3, 0); ++ xpthread_mutex_unlock (&user_lock); ++ dprintf (1, "thread 2: unlocked user_lock.\n"); ++ xpthread_join (t3); ++ ++ xpthread_mutex_lock (&user_lock); ++ dprintf (1, "thread 2: locked user_lock.\n"); ++ xpthread_barrier_wait (&bar_dtor); ++ t3 = xpthread_create (0, thread3, 0); ++ xpthread_mutex_unlock (&user_lock); ++ dprintf (1, "thread 2: unlocked user_lock.\n"); ++ xpthread_join (t3); ++ ++ dprintf (1, "thread 2: done.\n"); ++ return 0; ++} ++ ++static void ++thread1 (void) ++{ ++ dprintf (1, "thread 1: started.\n"); ++ xpthread_barrier_init (&bar_ctor, NULL, 2); ++ xpthread_barrier_init (&bar_dtor, NULL, 2); ++ pthread_t t2 = xpthread_create (0, thread2, 0); ++ void *p = xdlopen ("tst-create1mod.so", RTLD_NOW | RTLD_GLOBAL); ++ dprintf (1, "thread 1: dlopen done.\n"); ++ xdlclose (p); ++ dprintf (1, "thread 1: dlclose done.\n"); ++ xpthread_join (t2); ++ dprintf (1, "thread 1: done.\n"); ++} ++ ++static int ++do_test (void) ++{ ++ thread1 (); ++ return 0; ++} ++ ++#include +diff --git a/sysdeps/pthread/tst-create1mod.c b/sysdeps/pthread/tst-create1mod.c +new file mode 100644 +index 0000000000000000..62c9006961683177 +--- /dev/null ++++ b/sysdeps/pthread/tst-create1mod.c +@@ -0,0 +1,41 @@ ++/* Verify that pthread_create does not deadlock when ctors take locks. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++ ++/* Require TLS setup for the module. */ ++__thread int tlsvar; ++ ++void ctor (void); ++void dtor (void); ++ ++static void __attribute__ ((constructor)) ++do_init (void) ++{ ++ dprintf (1, "constructor started: %d.\n", tlsvar++); ++ ctor (); ++ dprintf (1, "constructor done: %d.\n", tlsvar++); ++} ++ ++static void __attribute__ ((destructor)) ++do_end (void) ++{ ++ dprintf (1, "destructor started: %d.\n", tlsvar++); ++ dtor (); ++ dprintf (1, "destructor done: %d.\n", tlsvar++); ++} diff --git a/SOURCES/glibc-upstream-2.34-4.patch b/SOURCES/glibc-upstream-2.34-4.patch new file mode 100644 index 0000000..12ce5e6 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-4.patch @@ -0,0 +1,24 @@ +commit 7ff4da3dc26de351a5abe7c2905038cbe55c8041 +Author: Siddhesh Poyarekar +Date: Tue Aug 3 21:10:53 2021 +0530 + + copy_and_spawn_sgid: Avoid double calls to close() + + If close() on infd and outfd succeeded, reset the fd numbers so that + we don't attempt to close them again. + + Reviewed-by: Arjun Shankar + (cherry picked from commit 45caed9d67a00af917d8b5b88d4b5eb1225b7aef) + +diff --git a/support/support_capture_subprocess.c b/support/support_capture_subprocess.c +index 27bfd19c9374a183..0bacf6dbc23b0732 100644 +--- a/support/support_capture_subprocess.c ++++ b/support/support_capture_subprocess.c +@@ -170,6 +170,7 @@ copy_and_spawn_sgid (char *child_id, gid_t gid) + support_subprogram because we only want the program exit status, not the + contents. */ + ret = 0; ++ infd = outfd = -1; + + char * const args[] = {execname, child_id, NULL}; + diff --git a/SOURCES/glibc-upstream-2.34-40.patch b/SOURCES/glibc-upstream-2.34-40.patch new file mode 100644 index 0000000..40655b6 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-40.patch @@ -0,0 +1,151 @@ +commit 01bffc013cdad1e0c45db7aa57efb2bee61f3338 +Author: Siddhesh Poyarekar +Date: Fri Oct 29 14:53:55 2021 +0530 + + Handle NULL input to malloc_usable_size [BZ #28506] + + Hoist the NULL check for malloc_usable_size into its entry points in + malloc-debug and malloc and assume non-NULL in all callees. This fixes + BZ #28506 + + Signed-off-by: Siddhesh Poyarekar + Reviewed-by: Florian Weimer + Reviewed-by: Richard W.M. Jones + (cherry picked from commit 88e316b06414ee7c944cd6f8b30b07a972b78499) + +diff --git a/malloc/malloc-debug.c b/malloc/malloc-debug.c +index 9922ef5f25d2e018..3d7e6d44fdc9e17b 100644 +--- a/malloc/malloc-debug.c ++++ b/malloc/malloc-debug.c +@@ -1,5 +1,6 @@ + /* Malloc debug DSO. + Copyright (C) 2021 Free Software Foundation, Inc. ++ Copyright The GNU Toolchain Authors. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -399,17 +400,17 @@ strong_alias (__debug_calloc, calloc) + size_t + malloc_usable_size (void *mem) + { ++ if (mem == NULL) ++ return 0; ++ + if (__is_malloc_debug_enabled (MALLOC_MCHECK_HOOK)) + return mcheck_usable_size (mem); + if (__is_malloc_debug_enabled (MALLOC_CHECK_HOOK)) + return malloc_check_get_size (mem); + +- if (mem != NULL) +- { +- mchunkptr p = mem2chunk (mem); +- if (DUMPED_MAIN_ARENA_CHUNK (p)) +- return chunksize (p) - SIZE_SZ; +- } ++ mchunkptr p = mem2chunk (mem); ++ if (DUMPED_MAIN_ARENA_CHUNK (p)) ++ return chunksize (p) - SIZE_SZ; + + return musable (mem); + } +diff --git a/malloc/malloc.c b/malloc/malloc.c +index e065785af77af72c..7882c70f0a0312d1 100644 +--- a/malloc/malloc.c ++++ b/malloc/malloc.c +@@ -1,5 +1,6 @@ + /* Malloc implementation for multiple threads without lock contention. + Copyright (C) 1996-2021 Free Software Foundation, Inc. ++ Copyright The GNU Toolchain Authors. + This file is part of the GNU C Library. + Contributed by Wolfram Gloger + and Doug Lea , 2001. +@@ -5009,20 +5010,13 @@ __malloc_trim (size_t s) + static size_t + musable (void *mem) + { +- mchunkptr p; +- if (mem != 0) +- { +- size_t result = 0; +- +- p = mem2chunk (mem); ++ mchunkptr p = mem2chunk (mem); + +- if (chunk_is_mmapped (p)) +- result = chunksize (p) - CHUNK_HDR_SZ; +- else if (inuse (p)) +- result = memsize (p); ++ if (chunk_is_mmapped (p)) ++ return chunksize (p) - CHUNK_HDR_SZ; ++ else if (inuse (p)) ++ return memsize (p); + +- return result; +- } + return 0; + } + +@@ -5030,10 +5024,9 @@ musable (void *mem) + size_t + __malloc_usable_size (void *m) + { +- size_t result; +- +- result = musable (m); +- return result; ++ if (m == NULL) ++ return 0; ++ return musable (m); + } + #endif + +diff --git a/malloc/tst-malloc-usable.c b/malloc/tst-malloc-usable.c +index a1074b782a0de96c..b0d702be10ba1610 100644 +--- a/malloc/tst-malloc-usable.c ++++ b/malloc/tst-malloc-usable.c +@@ -2,6 +2,7 @@ + MALLOC_CHECK_ exported to a positive value. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. ++ Copyright The GNU Toolchain Authors. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -21,29 +22,24 @@ + #include + #include + #include ++#include ++#include + + static int + do_test (void) + { + size_t usable_size; + void *p = malloc (7); +- if (!p) +- { +- printf ("memory allocation failed\n"); +- return 1; +- } + ++ TEST_VERIFY_EXIT (p != NULL); + usable_size = malloc_usable_size (p); +- if (usable_size != 7) +- { +- printf ("malloc_usable_size: expected 7 but got %zu\n", usable_size); +- return 1; +- } +- ++ TEST_COMPARE (usable_size, 7); + memset (p, 0, usable_size); + free (p); ++ ++ TEST_COMPARE (malloc_usable_size (NULL), 0); ++ + return 0; + } + +-#define TEST_FUNCTION do_test () +-#include "../test-skeleton.c" ++#include "support/test-driver.c" diff --git a/SOURCES/glibc-upstream-2.34-41.patch b/SOURCES/glibc-upstream-2.34-41.patch new file mode 100644 index 0000000..770fa6c --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-41.patch @@ -0,0 +1,489 @@ +commit f42373f911a28d34325a5bfc1ed5a962c89da7eb +Author: H.J. Lu +Date: Thu Sep 16 08:15:29 2021 -0700 + + ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340] + + We can't relocate entries in dynamic section if it is readonly: + + 1. Add a l_ld_readonly field to struct link_map to indicate if dynamic + section is readonly and set it based on p_flags of PT_DYNAMIC segment. + 2. Replace DL_RO_DYN_SECTION with dl_relocate_ld to decide if dynamic + section should be relocated. + 3. Remove DL_RO_DYN_TEMP_CNT. + 4. Don't use a static dynamic section to make readonly dynamic section + in vDSO writable. + 5. Remove the temp argument from elf_get_dynamic_info. + + This fixes BZ #28340. + + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit b413280cfb16834450f66f554bc0d618bb513851) + +diff --git a/elf/Makefile b/elf/Makefile +index d05f410592723f09..de854b4d1a815bd3 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -224,7 +224,7 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \ + tst-tls-ie tst-tls-ie-dlmopen argv0test \ + tst-glibc-hwcaps tst-glibc-hwcaps-prepend tst-glibc-hwcaps-mask \ + tst-tls20 tst-tls21 tst-dlmopen-dlerror tst-dlmopen-gethostbyname \ +- tst-dl-is_dso ++ tst-dl-is_dso tst-ro-dynamic + # reldep9 + tests-internal += loadtest unload unload2 circleload1 \ + neededtest neededtest2 neededtest3 neededtest4 \ +@@ -357,7 +357,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ + libmarkermod4-1 libmarkermod4-2 libmarkermod4-3 libmarkermod4-4 \ + tst-tls20mod-bad tst-tls21mod tst-dlmopen-dlerror-mod \ + tst-auxvalmod \ +- tst-dlmopen-gethostbyname-mod \ ++ tst-dlmopen-gethostbyname-mod tst-ro-dynamic-mod \ + + # Most modules build with _ISOMAC defined, but those filtered out + # depend on internal headers. +@@ -1906,3 +1906,10 @@ $(objpfx)tst-getauxval-static.out: $(objpfx)tst-auxvalmod.so + tst-getauxval-static-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx) + + $(objpfx)tst-dlmopen-gethostbyname.out: $(objpfx)tst-dlmopen-gethostbyname-mod.so ++ ++$(objpfx)tst-ro-dynamic: $(objpfx)tst-ro-dynamic-mod.so ++$(objpfx)tst-ro-dynamic-mod.so: $(objpfx)tst-ro-dynamic-mod.os \ ++ tst-ro-dynamic-mod.map ++ $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \ ++ -Wl,--script=tst-ro-dynamic-mod.map \ ++ $(objpfx)tst-ro-dynamic-mod.os +diff --git a/elf/dl-load.c b/elf/dl-load.c +index 650e4edc35e5e582..4445c28ef3fb4a7e 100644 +--- a/elf/dl-load.c ++++ b/elf/dl-load.c +@@ -1149,6 +1149,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, + such a segment to avoid a crash later. */ + l->l_ld = (void *) ph->p_vaddr; + l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn)); ++ l->l_ld_readonly = (ph->p_flags & PF_W) == 0; + } + break; + +@@ -1292,7 +1293,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, + else + l->l_ld = (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr); + +- elf_get_dynamic_info (l, NULL); ++ elf_get_dynamic_info (l); + + /* Make sure we are not dlopen'ing an object that has the + DF_1_NOOPEN flag set, or a PIE object. */ +diff --git a/elf/dl-reloc-static-pie.c b/elf/dl-reloc-static-pie.c +index d5bd2f31e9ca50ce..2fb02d727654c87d 100644 +--- a/elf/dl-reloc-static-pie.c ++++ b/elf/dl-reloc-static-pie.c +@@ -40,7 +40,17 @@ _dl_relocate_static_pie (void) + + /* Read our own dynamic section and fill in the info array. */ + main_map->l_ld = ((void *) main_map->l_addr + elf_machine_dynamic ()); +- elf_get_dynamic_info (main_map, NULL); ++ ++ const ElfW(Phdr) *ph, *phdr = GL(dl_phdr); ++ size_t phnum = GL(dl_phnum); ++ for (ph = phdr; ph < &phdr[phnum]; ++ph) ++ if (ph->p_type == PT_DYNAMIC) ++ { ++ main_map->l_ld_readonly = (ph->p_flags & PF_W) == 0; ++ break; ++ } ++ ++ elf_get_dynamic_info (main_map); + + # ifdef ELF_MACHINE_BEFORE_RTLD_RELOC + ELF_MACHINE_BEFORE_RTLD_RELOC (main_map->l_info); +diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h +index d8ec32377d37635c..4aa2058abf6443c9 100644 +--- a/elf/get-dynamic-info.h ++++ b/elf/get-dynamic-info.h +@@ -28,7 +28,7 @@ static + auto + #endif + inline void __attribute__ ((unused, always_inline)) +-elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) ++elf_get_dynamic_info (struct link_map *l) + { + #if __ELF_NATIVE_CLASS == 32 + typedef Elf32_Word d_tag_utype; +@@ -69,28 +69,15 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) + info[i] = dyn; + } + +-#define DL_RO_DYN_TEMP_CNT 8 +- +-#ifndef DL_RO_DYN_SECTION + /* Don't adjust .dynamic unnecessarily. */ +- if (l->l_addr != 0) ++ if (l->l_addr != 0 && dl_relocate_ld (l)) + { + ElfW(Addr) l_addr = l->l_addr; +- int cnt = 0; + + # define ADJUST_DYN_INFO(tag) \ + do \ + if (info[tag] != NULL) \ +- { \ +- if (temp) \ +- { \ +- temp[cnt].d_tag = info[tag]->d_tag; \ +- temp[cnt].d_un.d_ptr = info[tag]->d_un.d_ptr + l_addr; \ +- info[tag] = temp + cnt++; \ +- } \ +- else \ +- info[tag]->d_un.d_ptr += l_addr; \ +- } \ ++ info[tag]->d_un.d_ptr += l_addr; \ + while (0) + + ADJUST_DYN_INFO (DT_HASH); +@@ -107,9 +94,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) + ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM)); + ADJUST_DYN_INFO (ADDRIDX (DT_GNU_HASH)); + # undef ADJUST_DYN_INFO +- assert (cnt <= DL_RO_DYN_TEMP_CNT); + } +-#endif + if (info[DT_PLTREL] != NULL) + { + #if ELF_MACHINE_NO_RELA +diff --git a/elf/rtld.c b/elf/rtld.c +index 08cf50145a1c01ce..405166d62b34847c 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -464,6 +464,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) + #ifndef DONT_USE_BOOTSTRAP_MAP + GL(dl_rtld_map).l_addr = info->l.l_addr; + GL(dl_rtld_map).l_ld = info->l.l_ld; ++ GL(dl_rtld_map).l_ld_readonly = info->l.l_ld_readonly; + memcpy (GL(dl_rtld_map).l_info, info->l.l_info, + sizeof GL(dl_rtld_map).l_info); + GL(dl_rtld_map).l_mach = info->l.l_mach; +@@ -547,7 +548,7 @@ _dl_start (void *arg) + + /* Read our own dynamic section and fill in the info array. */ + bootstrap_map.l_ld = (void *) bootstrap_map.l_addr + elf_machine_dynamic (); +- elf_get_dynamic_info (&bootstrap_map, NULL); ++ elf_get_dynamic_info (&bootstrap_map); + + #if NO_TLS_OFFSET != 0 + bootstrap_map.l_tls_offset = NO_TLS_OFFSET; +@@ -1469,6 +1470,7 @@ dl_main (const ElfW(Phdr) *phdr, + /* This tells us where to find the dynamic section, + which tells us everything we need to do. */ + main_map->l_ld = (void *) main_map->l_addr + ph->p_vaddr; ++ main_map->l_ld_readonly = (ph->p_flags & PF_W) == 0; + break; + case PT_INTERP: + /* This "interpreter segment" was used by the program loader to +@@ -1614,7 +1616,7 @@ dl_main (const ElfW(Phdr) *phdr, + if (! rtld_is_main) + { + /* Extract the contents of the dynamic section for easy access. */ +- elf_get_dynamic_info (main_map, NULL); ++ elf_get_dynamic_info (main_map); + + /* If the main map is libc.so, update the base namespace to + refer to this map. If libc.so is loaded later, this happens +diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h +index 86c491e49c98345d..f44748bc9858e5fd 100644 +--- a/elf/setup-vdso.h ++++ b/elf/setup-vdso.h +@@ -33,8 +33,6 @@ setup_vdso (struct link_map *main_map __attribute__ ((unused)), + 0, LM_ID_BASE); + if (__glibc_likely (l != NULL)) + { +- static ElfW(Dyn) dyn_temp[DL_RO_DYN_TEMP_CNT] attribute_relro; +- + l->l_phdr = ((const void *) GLRO(dl_sysinfo_dso) + + GLRO(dl_sysinfo_dso)->e_phoff); + l->l_phnum = GLRO(dl_sysinfo_dso)->e_phnum; +@@ -45,6 +43,7 @@ setup_vdso (struct link_map *main_map __attribute__ ((unused)), + { + l->l_ld = (void *) ph->p_vaddr; + l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn)); ++ l->l_ld_readonly = (ph->p_flags & PF_W) == 0; + } + else if (ph->p_type == PT_LOAD) + { +@@ -65,7 +64,7 @@ setup_vdso (struct link_map *main_map __attribute__ ((unused)), + l->l_map_end += l->l_addr; + l->l_text_end += l->l_addr; + l->l_ld = (void *) ((ElfW(Addr)) l->l_ld + l->l_addr); +- elf_get_dynamic_info (l, dyn_temp); ++ elf_get_dynamic_info (l); + _dl_setup_hash (l); + l->l_relocated = 1; + +diff --git a/elf/tst-ro-dynamic-mod.c b/elf/tst-ro-dynamic-mod.c +new file mode 100644 +index 0000000000000000..6d99925964c50caf +--- /dev/null ++++ b/elf/tst-ro-dynamic-mod.c +@@ -0,0 +1,19 @@ ++/* Test case for DSO with readonly dynamic section. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++int foo = -1; +diff --git a/elf/tst-ro-dynamic-mod.map b/elf/tst-ro-dynamic-mod.map +new file mode 100644 +index 0000000000000000..2fe4a2998cddd587 +--- /dev/null ++++ b/elf/tst-ro-dynamic-mod.map +@@ -0,0 +1,16 @@ ++SECTIONS ++{ ++ . = SIZEOF_HEADERS; ++ .dynamic : { *(.dynamic) } :text :dynamic ++ .rodata : { *(.data*) *(.bss*) } :text ++ /DISCARD/ : { ++ *(.note.gnu.property) ++ } ++ .note : { *(.note.*) } :text :note ++} ++PHDRS ++{ ++ text PT_LOAD FLAGS(5) FILEHDR PHDRS; ++ dynamic PT_DYNAMIC FLAGS(4); ++ note PT_NOTE FLAGS(4); ++} +diff --git a/elf/tst-ro-dynamic.c b/elf/tst-ro-dynamic.c +new file mode 100644 +index 0000000000000000..3a18f8789ad386bb +--- /dev/null ++++ b/elf/tst-ro-dynamic.c +@@ -0,0 +1,31 @@ ++/* Test case for DSO with readonly dynamic section. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++ ++extern int foo; ++ ++static int ++do_test (void) ++{ ++ TEST_COMPARE (foo, -1); ++ return 0; ++} ++ ++#include +diff --git a/include/link.h b/include/link.h +index 4af16cb59639a077..c46aced9f7b43ba0 100644 +--- a/include/link.h ++++ b/include/link.h +@@ -205,6 +205,7 @@ struct link_map + unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be + freed, ie. not allocated with + the dummy malloc in ld.so. */ ++ unsigned int l_ld_readonly:1; /* Nonzero if dynamic section is readonly. */ + + /* NODELETE status of the map. Only valid for maps of type + lt_loaded. Lazy binding sets l_nodelete_active directly, +@@ -342,6 +343,8 @@ struct link_map + unsigned long long int l_serial; + }; + ++#include ++ + /* Information used by audit modules. For most link maps, this data + immediate follows the link map in memory. For the dynamic linker, + it is allocated separately. See link_map_audit_state in +diff --git a/sysdeps/generic/dl-relocate-ld.h b/sysdeps/generic/dl-relocate-ld.h +new file mode 100644 +index 0000000000000000..5fae206db9941e97 +--- /dev/null ++++ b/sysdeps/generic/dl-relocate-ld.h +@@ -0,0 +1,32 @@ ++/* Check if dynamic section should be relocated. Generic version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _DL_RELOCATE_LD_H ++#define _DL_RELOCATE_LD_H ++ ++/* Return true if dynamic section in the shared library L should be ++ relocated. */ ++ ++static inline bool ++dl_relocate_ld (const struct link_map *l) ++{ ++ /* Don't relocate dynamic section if it is readonly */ ++ return !l->l_ld_readonly; ++} ++ ++#endif /* _DL_RELOCATE_LD_H */ +diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h +index 1ceb9c3212c148ba..ed10953f34b96c49 100644 +--- a/sysdeps/generic/ldsodefs.h ++++ b/sysdeps/generic/ldsodefs.h +@@ -75,11 +75,8 @@ __BEGIN_DECLS + have to be accessed via the D_PTR macro. The macro is needed since for + most architectures the entry is already relocated - but for some not + and we need to relocate at access time. */ +-#ifdef DL_RO_DYN_SECTION +-# define D_PTR(map, i) ((map)->i->d_un.d_ptr + (map)->l_addr) +-#else +-# define D_PTR(map, i) (map)->i->d_un.d_ptr +-#endif ++#define D_PTR(map, i) \ ++ ((map)->i->d_un.d_ptr + (dl_relocate_ld (map) ? 0 : (map)->l_addr)) + + /* Result of the lookup functions and how to retrieve the base address. */ + typedef struct link_map *lookup_t; +diff --git a/sysdeps/mips/dl-relocate-ld.h b/sysdeps/mips/dl-relocate-ld.h +new file mode 100644 +index 0000000000000000..0c18d9a567cad54f +--- /dev/null ++++ b/sysdeps/mips/dl-relocate-ld.h +@@ -0,0 +1,32 @@ ++/* Check if dynamic section should be relocated. MIPS version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _DL_RELOCATE_LD_H ++#define _DL_RELOCATE_LD_H ++ ++/* Return true if dynamic section in the shared library L should be ++ relocated. */ ++ ++static inline bool ++dl_relocate_ld (const struct link_map *l) ++{ ++ /* Never relocate dynamic section. */ ++ return false; ++} ++ ++#endif /* _DL_RELOCATE_LD_H */ +diff --git a/sysdeps/mips/ldsodefs.h b/sysdeps/mips/ldsodefs.h +index 4db7c60e38e42ef2..36fd09a8bdb4cacf 100644 +--- a/sysdeps/mips/ldsodefs.h ++++ b/sysdeps/mips/ldsodefs.h +@@ -75,10 +75,6 @@ struct La_mips_64_retval; + struct La_mips_64_retval *, \ + const char *); + +-/* The MIPS ABI specifies that the dynamic section has to be read-only. */ +- +-#define DL_RO_DYN_SECTION 1 +- + #include_next + + /* The 64-bit MIPS ELF ABI uses an unusual reloc format. Each +diff --git a/sysdeps/riscv/dl-relocate-ld.h b/sysdeps/riscv/dl-relocate-ld.h +new file mode 100644 +index 0000000000000000..10327454b17a7097 +--- /dev/null ++++ b/sysdeps/riscv/dl-relocate-ld.h +@@ -0,0 +1,32 @@ ++/* Check if dynamic section should be relocated. RISC-V version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#ifndef _DL_RELOCATE_LD_H ++#define _DL_RELOCATE_LD_H ++ ++/* Return true if dynamic section in the shared library L should be ++ relocated. */ ++ ++static inline bool ++dl_relocate_ld (const struct link_map *l) ++{ ++ /* Never relocate dynamic section for ABI compatibility. */ ++ return false; ++} ++ ++#endif /* _DL_RELOCATE_LD_H */ +diff --git a/sysdeps/riscv/ldsodefs.h b/sysdeps/riscv/ldsodefs.h +index 0c696714a7a93cff..8947ffe4b5026a2e 100644 +--- a/sysdeps/riscv/ldsodefs.h ++++ b/sysdeps/riscv/ldsodefs.h +@@ -38,11 +38,6 @@ struct La_riscv_retval; + struct La_riscv_retval *, \ + const char *); + +-/* Although the RISC-V ABI does not specify that the dynamic section has +- to be read-only, it needs to be kept for ABI compatibility. */ +- +-#define DL_RO_DYN_SECTION 1 +- + #include_next + + #endif diff --git a/SOURCES/glibc-upstream-2.34-42.patch b/SOURCES/glibc-upstream-2.34-42.patch new file mode 100644 index 0000000..51bc4fb --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-42.patch @@ -0,0 +1,117 @@ +commit 5f36e5c70107ecb59281ef57f9f1c0e37ec3076d +Author: H.J. Lu +Date: Thu Sep 23 09:06:49 2021 -0700 + + ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340] + + 1. Define DL_RO_DYN_SECTION to initalize bootstrap_map.l_ld_readonly + before calling elf_get_dynamic_info to get dynamic info in bootstrap_map, + 2. Define a single + + static inline bool + dl_relocate_ld (const struct link_map *l) + { + /* Don't relocate dynamic section if it is readonly */ + return !(l->l_ld_readonly || DL_RO_DYN_SECTION); + } + + This updates BZ #28340 fix. + + (cherry picked from commit 2ec99d8c42b2ff1a1231e4df462a0910a9b7fdef) + +diff --git a/elf/rtld.c b/elf/rtld.c +index 405166d62b34847c..d83ac1bdc40a6081 100644 +--- a/elf/rtld.c ++++ b/elf/rtld.c +@@ -548,6 +548,7 @@ _dl_start (void *arg) + + /* Read our own dynamic section and fill in the info array. */ + bootstrap_map.l_ld = (void *) bootstrap_map.l_addr + elf_machine_dynamic (); ++ bootstrap_map.l_ld_readonly = DL_RO_DYN_SECTION; + elf_get_dynamic_info (&bootstrap_map); + + #if NO_TLS_OFFSET != 0 +diff --git a/sysdeps/generic/dl-relocate-ld.h b/sysdeps/generic/dl-relocate-ld.h +index 5fae206db9941e97..cfb86c2d6a2394c1 100644 +--- a/sysdeps/generic/dl-relocate-ld.h ++++ b/sysdeps/generic/dl-relocate-ld.h +@@ -19,14 +19,7 @@ + #ifndef _DL_RELOCATE_LD_H + #define _DL_RELOCATE_LD_H + +-/* Return true if dynamic section in the shared library L should be +- relocated. */ +- +-static inline bool +-dl_relocate_ld (const struct link_map *l) +-{ +- /* Don't relocate dynamic section if it is readonly */ +- return !l->l_ld_readonly; +-} ++/* The dynamic section is writable. */ ++#define DL_RO_DYN_SECTION 0 + + #endif /* _DL_RELOCATE_LD_H */ +diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h +index ed10953f34b96c49..fcbbf6974827cdf1 100644 +--- a/sysdeps/generic/ldsodefs.h ++++ b/sysdeps/generic/ldsodefs.h +@@ -69,6 +69,16 @@ __BEGIN_DECLS + `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */ + #define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type) + ++/* Return true if dynamic section in the shared library L should be ++ relocated. */ ++ ++static inline bool ++dl_relocate_ld (const struct link_map *l) ++{ ++ /* Don't relocate dynamic section if it is readonly */ ++ return !(l->l_ld_readonly || DL_RO_DYN_SECTION); ++} ++ + /* All references to the value of l_info[DT_PLTGOT], + l_info[DT_STRTAB], l_info[DT_SYMTAB], l_info[DT_RELA], + l_info[DT_REL], l_info[DT_JMPREL], and l_info[VERSYMIDX (DT_VERSYM)] +diff --git a/sysdeps/mips/dl-relocate-ld.h b/sysdeps/mips/dl-relocate-ld.h +index 0c18d9a567cad54f..376ad75dd1695fe3 100644 +--- a/sysdeps/mips/dl-relocate-ld.h ++++ b/sysdeps/mips/dl-relocate-ld.h +@@ -19,14 +19,7 @@ + #ifndef _DL_RELOCATE_LD_H + #define _DL_RELOCATE_LD_H + +-/* Return true if dynamic section in the shared library L should be +- relocated. */ +- +-static inline bool +-dl_relocate_ld (const struct link_map *l) +-{ +- /* Never relocate dynamic section. */ +- return false; +-} ++/* The dynamic section is readonly. */ ++#define DL_RO_DYN_SECTION 1 + + #endif /* _DL_RELOCATE_LD_H */ +diff --git a/sysdeps/riscv/dl-relocate-ld.h b/sysdeps/riscv/dl-relocate-ld.h +index 10327454b17a7097..2ab2b8ac6c09af82 100644 +--- a/sysdeps/riscv/dl-relocate-ld.h ++++ b/sysdeps/riscv/dl-relocate-ld.h +@@ -19,14 +19,7 @@ + #ifndef _DL_RELOCATE_LD_H + #define _DL_RELOCATE_LD_H + +-/* Return true if dynamic section in the shared library L should be +- relocated. */ +- +-static inline bool +-dl_relocate_ld (const struct link_map *l) +-{ +- /* Never relocate dynamic section for ABI compatibility. */ +- return false; +-} ++/* The dynamic section is readonly for ABI compatibility. */ ++#define DL_RO_DYN_SECTION 1 + + #endif /* _DL_RELOCATE_LD_H */ diff --git a/SOURCES/glibc-upstream-2.34-43.patch b/SOURCES/glibc-upstream-2.34-43.patch new file mode 100644 index 0000000..9c5ea97 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-43.patch @@ -0,0 +1,30 @@ +commit 6548a9bdba95b3e1fcdbd85445342467e4b0cd4f +Author: H.J. Lu +Date: Fri Sep 24 08:56:42 2021 -0700 + + Avoid warning: overriding recipe for .../tst-ro-dynamic-mod.so + + Add tst-ro-dynamic-mod to modules-names-nobuild to avoid + + ../Makerules:767: warning: ignoring old recipe for target '.../elf/tst-ro-dynamic-mod.so' + + This updates BZ #28340 fix. + + (cherry picked from commit 15e6d6785ac2935bb963506b47a37b3d1f728952) + +diff --git a/elf/Makefile b/elf/Makefile +index de854b4d1a815bd3..118d579c42c38110 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -399,8 +399,9 @@ endif + modules-execstack-yes = tst-execstack-mod + extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) + +-# filtmod1.so, tst-big-note-lib.so have special rules. +-modules-names-nobuild := filtmod1 tst-big-note-lib ++# filtmod1.so, tst-big-note-lib.so, tst-ro-dynamic-mod.so have special ++# rules. ++modules-names-nobuild := filtmod1 tst-big-note-lib tst-ro-dynamic-mod + + tests += $(tests-static) + diff --git a/SOURCES/glibc-upstream-2.34-44.patch b/SOURCES/glibc-upstream-2.34-44.patch new file mode 100644 index 0000000..547da51 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-44.patch @@ -0,0 +1,177 @@ +commit f411207a833d0c49578ebe7062aee3660813ed5f +Author: Nikita Popov +Date: Tue Nov 2 13:21:42 2021 +0500 + + gconv: Do not emit spurious NUL character in ISO-2022-JP-3 (bug 28524) + + Bugfix 27256 has introduced another issue: + In conversion from ISO-2022-JP-3 encoding, it is possible + to force iconv to emit extra NUL character on internal state reset. + To do this, it is sufficient to feed iconv with escape sequence + which switches active character set. + The simplified check 'data->__statep->__count != ASCII_set' + introduced by the aforementioned bugfix picks that case and + behaves as if '\0' character has been queued thus emitting it. + + To eliminate this issue, these steps are taken: + * Restore original condition + '(data->__statep->__count & ~7) != ASCII_set'. + It is necessary since bits 0-2 may contain + number of buffered input characters. + * Check that queued character is not NUL. + Similar step is taken for main conversion loop. + + Bundled test case follows following logic: + * Try to convert ISO-2022-JP-3 escape sequence + switching active character set + * Reset internal state by providing NULL as input buffer + * Ensure that nothing has been converted. + + Signed-off-by: Nikita Popov + (cherry picked from commit ff012870b2c02a62598c04daa1e54632e020fd7d) + +diff --git a/iconvdata/Makefile b/iconvdata/Makefile +index c216f959df1413f8..d5507a048c6a6508 100644 +--- a/iconvdata/Makefile ++++ b/iconvdata/Makefile +@@ -1,4 +1,5 @@ + # Copyright (C) 1997-2021 Free Software Foundation, Inc. ++# Copyright (C) The GNU Toolchain Authors. + # This file is part of the GNU C Library. + + # The GNU C Library is free software; you can redistribute it and/or +@@ -74,7 +75,7 @@ ifeq (yes,$(build-shared)) + tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \ + tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \ + bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \ +- bug-iconv13 bug-iconv14 ++ bug-iconv13 bug-iconv14 bug-iconv15 + ifeq ($(have-thread-library),yes) + tests += bug-iconv3 + endif +@@ -327,6 +328,8 @@ $(objpfx)bug-iconv12.out: $(addprefix $(objpfx), $(gconv-modules)) \ + $(addprefix $(objpfx),$(modules.so)) + $(objpfx)bug-iconv14.out: $(addprefix $(objpfx), $(gconv-modules)) \ + $(addprefix $(objpfx),$(modules.so)) ++$(objpfx)bug-iconv15.out: $(addprefix $(objpfx), $(gconv-modules)) \ ++ $(addprefix $(objpfx),$(modules.so)) + + $(objpfx)iconv-test.out: run-iconv-test.sh \ + $(addprefix $(objpfx), $(gconv-modules)) \ +diff --git a/iconvdata/bug-iconv15.c b/iconvdata/bug-iconv15.c +new file mode 100644 +index 0000000000000000..cc04bd0313a68786 +--- /dev/null ++++ b/iconvdata/bug-iconv15.c +@@ -0,0 +1,60 @@ ++/* Bug 28524: Conversion from ISO-2022-JP-3 with iconv ++ may emit spurious NUL character on state reset. ++ Copyright (C) The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ char in[] = "\x1b(I"; ++ char *inbuf = in; ++ size_t inleft = sizeof (in) - 1; ++ char out[1]; ++ char *outbuf = out; ++ size_t outleft = sizeof (out); ++ iconv_t cd; ++ ++ cd = iconv_open ("UTF8", "ISO-2022-JP-3"); ++ TEST_VERIFY_EXIT (cd != (iconv_t) -1); ++ ++ /* First call to iconv should alter internal state. ++ Now, JISX0201_Kana_set is selected and ++ state value != ASCII_set. */ ++ TEST_VERIFY (iconv (cd, &inbuf, &inleft, &outbuf, &outleft) != (size_t) -1); ++ ++ /* No bytes should have been added to ++ the output buffer at this point. */ ++ TEST_VERIFY (outbuf == out); ++ TEST_VERIFY (outleft == sizeof (out)); ++ ++ /* Second call shall emit spurious NUL character in unpatched glibc. */ ++ TEST_VERIFY (iconv (cd, NULL, NULL, &outbuf, &outleft) != (size_t) -1); ++ ++ /* No characters are expected to be produced. */ ++ TEST_VERIFY (outbuf == out); ++ TEST_VERIFY (outleft == sizeof (out)); ++ ++ TEST_VERIFY_EXIT (iconv_close (cd) != -1); ++ ++ return 0; ++} ++ ++#include +diff --git a/iconvdata/iso-2022-jp-3.c b/iconvdata/iso-2022-jp-3.c +index c8ba88cdc9fe9200..5fc0c0f7397935fe 100644 +--- a/iconvdata/iso-2022-jp-3.c ++++ b/iconvdata/iso-2022-jp-3.c +@@ -1,5 +1,6 @@ + /* Conversion module for ISO-2022-JP-3. + Copyright (C) 1998-2021 Free Software Foundation, Inc. ++ Copyright (C) The GNU Toolchain Authors. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1998, + and Bruno Haible , 2002. +@@ -81,20 +82,31 @@ enum + the output state to the initial state. This has to be done during the + flushing. */ + #define EMIT_SHIFT_TO_INIT \ +- if (data->__statep->__count != ASCII_set) \ ++ if ((data->__statep->__count & ~7) != ASCII_set) \ + { \ + if (FROM_DIRECTION) \ + { \ +- if (__glibc_likely (outbuf + 4 <= outend)) \ ++ uint32_t ch = data->__statep->__count >> 6; \ ++ \ ++ if (__glibc_unlikely (ch != 0)) \ + { \ +- /* Write out the last character. */ \ +- *((uint32_t *) outbuf) = data->__statep->__count >> 6; \ +- outbuf += sizeof (uint32_t); \ +- data->__statep->__count = ASCII_set; \ ++ if (__glibc_likely (outbuf + 4 <= outend)) \ ++ { \ ++ /* Write out the last character. */ \ ++ put32u (outbuf, ch); \ ++ outbuf += 4; \ ++ data->__statep->__count &= 7; \ ++ data->__statep->__count |= ASCII_set; \ ++ } \ ++ else \ ++ /* We don't have enough room in the output buffer. */ \ ++ status = __GCONV_FULL_OUTPUT; \ + } \ + else \ +- /* We don't have enough room in the output buffer. */ \ +- status = __GCONV_FULL_OUTPUT; \ ++ { \ ++ data->__statep->__count &= 7; \ ++ data->__statep->__count |= ASCII_set; \ ++ } \ + } \ + else \ + { \ diff --git a/SOURCES/glibc-upstream-2.34-45.patch b/SOURCES/glibc-upstream-2.34-45.patch new file mode 100644 index 0000000..b2c69d5 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-45.patch @@ -0,0 +1,68 @@ +commit cf8c6a634c0a04a9f5d198ef05310f85f7338839 +Author: Florian Weimer +Date: Fri Nov 5 17:01:24 2021 +0100 + + elf: Earlier missing dynamic segment check in _dl_map_object_from_fd + + Separated debuginfo files have PT_DYNAMIC with p_filesz == 0. We + need to check for that before the _dl_map_segments call because + that could attempt to write to mappings that extend beyond the end + of the file, resulting in SIGBUS. + + Reviewed-by: H.J. Lu + (cherry picked from commit ea32ec354c65ddad11b82ca9d057010df13a9cea) + +diff --git a/elf/dl-load.c b/elf/dl-load.c +index 4445c28ef3fb4a7e..0976977fbdf21902 100644 +--- a/elf/dl-load.c ++++ b/elf/dl-load.c +@@ -1130,6 +1130,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, + struct loadcmd loadcmds[l->l_phnum]; + size_t nloadcmds = 0; + bool has_holes = false; ++ bool empty_dynamic = false; + + /* The struct is initialized to zero so this is not necessary: + l->l_ld = 0; +@@ -1142,7 +1143,9 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, + segments are mapped in. We record the addresses it says + verbatim, and later correct for the run-time load address. */ + case PT_DYNAMIC: +- if (ph->p_filesz) ++ if (ph->p_filesz == 0) ++ empty_dynamic = true; /* Usually separate debuginfo. */ ++ else + { + /* Debuginfo only files from "objcopy --only-keep-debug" + contain a PT_DYNAMIC segment with p_filesz == 0. Skip +@@ -1265,6 +1268,13 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, + goto lose; + } + ++ /* This check recognizes most separate debuginfo files. */ ++ if (__glibc_unlikely ((l->l_ld == 0 && type == ET_DYN) || empty_dynamic)) ++ { ++ errstring = N_("object file has no dynamic section"); ++ goto lose; ++ } ++ + /* Length of the sections to be loaded. */ + maplength = loadcmds[nloadcmds - 1].allocend - loadcmds[0].mapstart; + +@@ -1282,15 +1292,7 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, + } + } + +- if (l->l_ld == 0) +- { +- if (__glibc_unlikely (type == ET_DYN)) +- { +- errstring = N_("object file has no dynamic section"); +- goto lose; +- } +- } +- else ++ if (l->l_ld != 0) + l->l_ld = (ElfW(Dyn) *) ((ElfW(Addr)) l->l_ld + l->l_addr); + + elf_get_dynamic_info (l); diff --git a/SOURCES/glibc-upstream-2.34-46.patch b/SOURCES/glibc-upstream-2.34-46.patch new file mode 100644 index 0000000..fa16e48 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-46.patch @@ -0,0 +1,41 @@ +commit a4f3bc23461e3f9f6053e827715984ba0d2e589a +Author: Florian Weimer +Date: Wed Nov 10 15:21:37 2021 +0100 + + s390: Use long branches across object boundaries (jgh instead of jh) + + Depending on the layout chosen by the linker, the 16-bit displacement + of the jh instruction is insufficient to reach the target label. + + Analysis of the linker failure was carried out by Nick Clifton. + + Reviewed-by: Carlos O'Donell + Reviewed-by: Stefan Liebler + (cherry picked from commit 98966749f2b418825ff2ea496a0ee89fe63d2cc8) + +diff --git a/sysdeps/s390/memmem-arch13.S b/sysdeps/s390/memmem-arch13.S +index c5c8d8c97efb3b9f..58df8cdb142a6b25 100644 +--- a/sysdeps/s390/memmem-arch13.S ++++ b/sysdeps/s390/memmem-arch13.S +@@ -41,7 +41,7 @@ ENTRY(MEMMEM_ARCH13) + # error The arch13 variant of memmem needs the z13 variant of memmem! + # endif + clgfi %r5,9 +- jh MEMMEM_Z13 ++ jgh MEMMEM_Z13 + + aghik %r0,%r5,-1 /* vll needs highest index. */ + bc 4,0(%r14) /* cc==1: return if needle-len == 0. */ +diff --git a/sysdeps/s390/strstr-arch13.S b/sysdeps/s390/strstr-arch13.S +index c7183e627c9fa986..222a6de91abb3fc6 100644 +--- a/sysdeps/s390/strstr-arch13.S ++++ b/sysdeps/s390/strstr-arch13.S +@@ -49,7 +49,7 @@ ENTRY(STRSTR_ARCH13) + # error The arch13 variant of strstr needs the z13 variant of strstr! + # endif + clgfi %r4,9 +- jh STRSTR_Z13 ++ jgh STRSTR_Z13 + + /* In case of a partial match, the vstrs instruction returns the index + of the partial match in a vector-register. Then we have to diff --git a/SOURCES/glibc-upstream-2.34-47.patch b/SOURCES/glibc-upstream-2.34-47.patch new file mode 100644 index 0000000..f23193a --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-47.patch @@ -0,0 +1,102 @@ +commit bfe68fe3c475fe34bed4e017d6e63196c305c934 +Author: Florian Weimer +Date: Wed Nov 24 08:59:54 2021 +0100 + + nptl: Do not set signal mask on second setjmp return [BZ #28607] + + __libc_signal_restore_set was in the wrong place: It also ran + when setjmp returned the second time (after pthread_exit or + pthread_cancel). This is observable with blocked pending + signals during thread exit. + + Fixes commit b3cae39dcbfa2432b3f3aa28854d8ac57f0de1b8 + ("nptl: Start new threads with all signals blocked [BZ #25098]"). + + Reviewed-by: Adhemerval Zanella + (cherry picked from commit e186fc5a31e46f2cbf5ea1a75223b4412907f3d8) + +diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c +index bc213f0bc4e948bd..3db0c9fdf40ae2bf 100644 +--- a/nptl/pthread_create.c ++++ b/nptl/pthread_create.c +@@ -407,8 +407,6 @@ start_thread (void *arg) + unwind_buf.priv.data.prev = NULL; + unwind_buf.priv.data.cleanup = NULL; + +- __libc_signal_restore_set (&pd->sigmask); +- + /* Allow setxid from now onwards. */ + if (__glibc_unlikely (atomic_exchange_acq (&pd->setxid_futex, 0) == -2)) + futex_wake (&pd->setxid_futex, 1, FUTEX_PRIVATE); +@@ -418,6 +416,8 @@ start_thread (void *arg) + /* Store the new cleanup handler info. */ + THREAD_SETMEM (pd, cleanup_jmp_buf, &unwind_buf); + ++ __libc_signal_restore_set (&pd->sigmask); ++ + LIBC_PROBE (pthread_start, 3, (pthread_t) pd, pd->start_routine, pd->arg); + + /* Run the code the user provided. */ +diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile +index df8943f4860a39d8..c65710169697ad95 100644 +--- a/sysdeps/pthread/Makefile ++++ b/sysdeps/pthread/Makefile +@@ -118,6 +118,7 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ + tst-unload \ + tst-unwind-thread \ + tst-pt-vfork1 tst-pt-vfork2 tst-vfork1x tst-vfork2x \ ++ tst-pthread-exit-signal \ + tst-pthread-setuid-loop \ + tst-pthread_cancel-exited \ + tst-pthread_cancel-select-loop \ +diff --git a/sysdeps/pthread/tst-pthread-exit-signal.c b/sysdeps/pthread/tst-pthread-exit-signal.c +new file mode 100644 +index 0000000000000000..b4526fe663671068 +--- /dev/null ++++ b/sysdeps/pthread/tst-pthread-exit-signal.c +@@ -0,0 +1,45 @@ ++/* Test that pending signals are not delivered on thread exit (bug 28607). ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Due to bug 28607, pthread_kill (or pthread_cancel) restored the ++ signal mask during during thread exit, triggering the delivery of a ++ blocked pending signal (SIGUSR1 in this test). */ ++ ++#include ++#include ++ ++static void * ++threadfunc (void *closure) ++{ ++ sigset_t sigmask; ++ sigfillset (&sigmask); ++ xpthread_sigmask (SIG_SETMASK, &sigmask, NULL); ++ xpthread_kill (pthread_self (), SIGUSR1); ++ pthread_exit (NULL); ++ return NULL; ++} ++ ++static int ++do_test (void) ++{ ++ pthread_t thr = xpthread_create (NULL, threadfunc, NULL); ++ xpthread_join (thr); ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-48.patch b/SOURCES/glibc-upstream-2.34-48.patch new file mode 100644 index 0000000..31f08db --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-48.patch @@ -0,0 +1,97 @@ +commit f988b7f228851370d1faa1e8f28d02f4b4e6dc46 +Author: Adhemerval Zanella +Date: Thu Nov 25 09:12:00 2021 -0300 + + linux: Use /proc/stat fallback for __get_nprocs_conf (BZ #28624) + + The /proc/statm fallback was removed by f13fb81ad3159 if sysfs is + not available, reinstate it. + + Checked on x86_64-linux-gnu. + (cherry-picked from commit 137ed5ac440a4d3cf4178ce97f349b349a9c2c66) + +diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c +index d70ed9586950615c..7fc6521942e87293 100644 +--- a/sysdeps/unix/sysv/linux/getsysstats.c ++++ b/sysdeps/unix/sysv/linux/getsysstats.c +@@ -108,6 +108,37 @@ next_line (int fd, char *const buffer, char **cp, char **re, + return res == *re ? NULL : res; + } + ++static int ++get_nproc_stat (char *buffer, size_t buffer_size) ++{ ++ char *buffer_end = buffer + buffer_size; ++ char *cp = buffer_end; ++ char *re = buffer_end; ++ ++ /* Default to an SMP system in case we cannot obtain an accurate ++ number. */ ++ int result = 2; ++ ++ const int flags = O_RDONLY | O_CLOEXEC; ++ int fd = __open_nocancel ("/proc/stat", flags); ++ if (fd != -1) ++ { ++ result = 0; ++ ++ char *l; ++ while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL) ++ /* The current format of /proc/stat has all the cpu* entries ++ at the front. We assume here that stays this way. */ ++ if (strncmp (l, "cpu", 3) != 0) ++ break; ++ else if (isdigit (l[3])) ++ ++result; ++ ++ __close_nocancel_nostatus (fd); ++ } ++ ++ return result; ++} + + int + __get_nprocs (void) +@@ -163,30 +194,7 @@ __get_nprocs (void) + return result; + } + +- cp = buffer_end; +- re = buffer_end; +- +- /* Default to an SMP system in case we cannot obtain an accurate +- number. */ +- result = 2; +- +- fd = __open_nocancel ("/proc/stat", flags); +- if (fd != -1) +- { +- result = 0; +- +- while ((l = next_line (fd, buffer, &cp, &re, buffer_end)) != NULL) +- /* The current format of /proc/stat has all the cpu* entries +- at the front. We assume here that stays this way. */ +- if (strncmp (l, "cpu", 3) != 0) +- break; +- else if (isdigit (l[3])) +- ++result; +- +- __close_nocancel_nostatus (fd); +- } +- +- return result; ++ return get_nproc_stat (buffer, buffer_size); + } + libc_hidden_def (__get_nprocs) + weak_alias (__get_nprocs, get_nprocs) +@@ -220,7 +228,9 @@ __get_nprocs_conf (void) + return count; + } + +- return 1; ++ enum { buffer_size = 1024 }; ++ char buffer[buffer_size]; ++ return get_nproc_stat (buffer, buffer_size); + } + libc_hidden_def (__get_nprocs_conf) + weak_alias (__get_nprocs_conf, get_nprocs_conf) diff --git a/SOURCES/glibc-upstream-2.34-49.patch b/SOURCES/glibc-upstream-2.34-49.patch new file mode 100644 index 0000000..e4cd827 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-49.patch @@ -0,0 +1,101 @@ +commit 387bff63dc2dccd62b09aa26dccf8cdc5f3c985c +Author: Matheus Castanho +Date: Tue Oct 26 10:44:59 2021 -0300 + + powerpc64[le]: Fix CFI and LR save address for asm syscalls [BZ #28532] + + Syscalls based on the assembly templates are missing CFI for r31, which gets + clobbered when scv is used, and info for LR is inaccurate, placed in the wrong + LOC and not using the proper offset. LR was also being saved to the callee's + frame, while the ABI mandates it to be saved to the caller's frame. These are + fixed by this commit. + + After this change: + + $ readelf -wF libc.so.6 | grep 0004b9d4.. -A 7 && objdump --disassemble=kill libc.so.6 + 00004a48 0000000000000020 00004a4c FDE cie=00000000 pc=000000000004b9d4..000000000004ba3c + LOC CFA r31 ra + 000000000004b9d4 r1+0 u u + 000000000004b9e4 r1+48 u u + 000000000004b9e8 r1+48 c-16 u + 000000000004b9fc r1+48 c-16 c+16 + 000000000004ba08 r1+48 c-16 + 000000000004ba18 r1+48 u + 000000000004ba1c r1+0 u + + libc.so.6: file format elf64-powerpcle + + Disassembly of section .text: + + 000000000004b9d4 : + 4b9d4: 1f 00 4c 3c addis r2,r12,31 + 4b9d8: 2c c3 42 38 addi r2,r2,-15572 + 4b9dc: 25 00 00 38 li r0,37 + 4b9e0: d1 ff 21 f8 stdu r1,-48(r1) + 4b9e4: 20 00 e1 fb std r31,32(r1) + 4b9e8: 98 8f ed eb ld r31,-28776(r13) + 4b9ec: 10 00 ff 77 andis. r31,r31,16 + 4b9f0: 1c 00 82 41 beq 4ba0c + 4b9f4: a6 02 28 7d mflr r9 + 4b9f8: 40 00 21 f9 std r9,64(r1) + 4b9fc: 01 00 00 44 scv 0 + 4ba00: 40 00 21 e9 ld r9,64(r1) + 4ba04: a6 03 28 7d mtlr r9 + 4ba08: 08 00 00 48 b 4ba10 + 4ba0c: 02 00 00 44 sc + 4ba10: 00 00 bf 2e cmpdi cr5,r31,0 + 4ba14: 20 00 e1 eb ld r31,32(r1) + 4ba18: 30 00 21 38 addi r1,r1,48 + 4ba1c: 18 00 96 41 beq cr5,4ba34 + 4ba20: 01 f0 20 39 li r9,-4095 + 4ba24: 40 48 23 7c cmpld r3,r9 + 4ba28: 20 00 e0 4d bltlr+ + 4ba2c: d0 00 63 7c neg r3,r3 + 4ba30: 08 00 00 48 b 4ba38 + 4ba34: 20 00 e3 4c bnslr+ + 4ba38: c8 32 fe 4b b 2ed00 <__syscall_error> + ... + 4ba44: 40 20 0c 00 .long 0xc2040 + 4ba48: 68 00 00 00 .long 0x68 + 4ba4c: 06 00 5f 5f rlwnm r31,r26,r0,0,3 + 4ba50: 6b 69 6c 6c xoris r12,r3,26987 + + (cherry picked from commit d120fb9941be1fb1934f0b50c6ad64e4c5e404fb) + +diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h +index 589f7c8d18814ee9..cfcfa69f91f1773d 100644 +--- a/sysdeps/powerpc/powerpc64/sysdep.h ++++ b/sysdeps/powerpc/powerpc64/sysdep.h +@@ -275,12 +275,14 @@ LT_LABELSUFFIX(name,_name_end): ; \ + /* Allocate frame and save register */ + #define NVOLREG_SAVE \ + stdu r1,-SCV_FRAME_SIZE(r1); \ ++ cfi_adjust_cfa_offset(SCV_FRAME_SIZE); \ + std r31,SCV_FRAME_NVOLREG_SAVE(r1); \ +- cfi_adjust_cfa_offset(SCV_FRAME_SIZE); ++ cfi_rel_offset(r31,SCV_FRAME_NVOLREG_SAVE); + + /* Restore register and destroy frame */ + #define NVOLREG_RESTORE \ + ld r31,SCV_FRAME_NVOLREG_SAVE(r1); \ ++ cfi_restore(r31); \ + addi r1,r1,SCV_FRAME_SIZE; \ + cfi_adjust_cfa_offset(-SCV_FRAME_SIZE); + +@@ -331,13 +333,13 @@ LT_LABELSUFFIX(name,_name_end): ; \ + + #define DO_CALL_SCV \ + mflr r9; \ +- std r9,FRAME_LR_SAVE(r1); \ +- cfi_offset(lr,FRAME_LR_SAVE); \ ++ std r9,SCV_FRAME_SIZE+FRAME_LR_SAVE(r1); \ ++ cfi_rel_offset(lr,SCV_FRAME_SIZE+FRAME_LR_SAVE); \ + .machine "push"; \ + .machine "power9"; \ + scv 0; \ + .machine "pop"; \ +- ld r9,FRAME_LR_SAVE(r1); \ ++ ld r9,SCV_FRAME_SIZE+FRAME_LR_SAVE(r1); \ + mtlr r9; \ + cfi_restore(lr); + diff --git a/SOURCES/glibc-upstream-2.34-5.patch b/SOURCES/glibc-upstream-2.34-5.patch new file mode 100644 index 0000000..fe8b853 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-5.patch @@ -0,0 +1,22 @@ +commit 9995d0588f4f9adc68419224d2b3698e2ca4f77e +Author: Siddhesh Poyarekar +Date: Tue Aug 3 21:10:29 2021 +0530 + + iconv_charmap: Close output file when done + + Reviewed-by: Arjun Shankar + (cherry picked from commit 1e0e6d656db9dfa12ef7eb67976385d3deb0d4ff) + +diff --git a/iconv/iconv_charmap.c b/iconv/iconv_charmap.c +index e2d53fee3cbfbb7a..a8b6b56124909f6c 100644 +--- a/iconv/iconv_charmap.c ++++ b/iconv/iconv_charmap.c +@@ -234,6 +234,8 @@ charmap_conversion (const char *from_code, struct charmap_t *from_charmap, + while (++remaining < argc); + + /* All done. */ ++ if (output != stdout) ++ fclose (output); + free_table (cvtbl); + return status; + } diff --git a/SOURCES/glibc-upstream-2.34-50.patch b/SOURCES/glibc-upstream-2.34-50.patch new file mode 100644 index 0000000..91a274f --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-50.patch @@ -0,0 +1,63 @@ +commit e9f81c261a2ca74d31d07ff9c8e780ac8a25993c +Author: Florian Weimer +Date: Fri Dec 10 05:14:24 2021 +0100 + + nptl: Add one more barrier to nptl/tst-create1 + + Without the bar_ctor_finish barrier, it was possible that thread2 + re-locked user_lock before ctor had a chance to lock it. ctor then + blocked in its locking operation, xdlopen from the main thread + did not return, and thread2 was stuck waiting in bar_dtor: + + thread 1: started. + thread 2: started. + thread 2: locked user_lock. + constructor started: 0. + thread 1: in ctor: started. + thread 3: started. + thread 3: done. + thread 2: unlocked user_lock. + thread 2: locked user_lock. + + Fixes the test in commit 83b5323261bb72313bffcf37476c1b8f0847c736 + ("elf: Avoid deadlock between pthread_create and ctors [BZ #28357]"). + + Reviewed-by: Szabolcs Nagy + (cherry picked from commit 5cc338565479a620244c2f8ff35956629c4dbf81) + +diff --git a/sysdeps/pthread/tst-create1.c b/sysdeps/pthread/tst-create1.c +index 932586c30990d1d4..763ded8d7956f943 100644 +--- a/sysdeps/pthread/tst-create1.c ++++ b/sysdeps/pthread/tst-create1.c +@@ -33,6 +33,7 @@ thread 2: lock(user_lock) -> pthread_create + */ + + static pthread_barrier_t bar_ctor; ++static pthread_barrier_t bar_ctor_finish; + static pthread_barrier_t bar_dtor; + static pthread_mutex_t user_lock = PTHREAD_MUTEX_INITIALIZER; + +@@ -46,6 +47,7 @@ ctor (void) + xpthread_mutex_unlock (&user_lock); + dprintf (1, "thread 1: in ctor: unlocked user_lock.\n"); + dprintf (1, "thread 1: in ctor: done.\n"); ++ xpthread_barrier_wait (&bar_ctor_finish); + } + + void +@@ -81,6 +83,7 @@ thread2 (void *a) + xpthread_mutex_unlock (&user_lock); + dprintf (1, "thread 2: unlocked user_lock.\n"); + xpthread_join (t3); ++ xpthread_barrier_wait (&bar_ctor_finish); + + xpthread_mutex_lock (&user_lock); + dprintf (1, "thread 2: locked user_lock.\n"); +@@ -99,6 +102,7 @@ thread1 (void) + { + dprintf (1, "thread 1: started.\n"); + xpthread_barrier_init (&bar_ctor, NULL, 2); ++ xpthread_barrier_init (&bar_ctor_finish, NULL, 2); + xpthread_barrier_init (&bar_dtor, NULL, 2); + pthread_t t2 = xpthread_create (0, thread2, 0); + void *p = xdlopen ("tst-create1mod.so", RTLD_NOW | RTLD_GLOBAL); diff --git a/SOURCES/glibc-upstream-2.34-51.patch b/SOURCES/glibc-upstream-2.34-51.patch new file mode 100644 index 0000000..2b179be --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-51.patch @@ -0,0 +1,191 @@ +commit 0dcbf4c8705309af8c8c1620491c60539901a3b0 +Author: Joseph Myers +Date: Fri Sep 17 13:12:10 2021 +0000 + + Run conform/ tests using newly built libc + + Although the conform/ header tests are built using the headers of the + glibc under test, the execution tests from conformtest (a few tests of + the values of macros evaluating to string constants) are linked and + run with system libc, not the newly built libc. + + Apart from preventing testing in cross environments, this can be a + problem even for native testing. Specifically, it can be useful to do + native testing when building with a cross compiler that links with a + libc that is not the system libc; for example, on x86_64, you can test + all three ABIs that way if the kernel support is present, even if the + host OS lacks 32-bit or x32 libraries or they are older than the + libraries in the sysroot used by the compiler used to build glibc. + This works for almost all tests, but not for these conformtest tests. + + Arrange for conformtest to link and run test programs similarly to + other tests, with consequent refactoring of various variables in + Makeconfig to allow passing relevant parts of the link-time command + lines down to conformtest. In general, the parts of the link command + involving $@ or $^ are separated out from the parts that should be + passed to conformtest (the variables passed to conformtest still + involve various variables whose names involve $(@F), but those + variables simply won't be defined for the conformtest makefile rules + and I think their presence there is harmless). + + This is also most of the support that would be needed to allow running + those tests of string constants for cross testing when test-wrapper is + defined. That will also need changes to where conformtest.py puts the + test executables, so it puts them in the main object directory + (expected to be shared with a test system in cross testing) rather + than /tmp (not expected to be shared) as at present. + + Tested for x86_64. + + (cherry picked from commit f3eef963902d0f54f68cffc74f79b97f4d6154b7) + +diff --git a/Makeconfig b/Makeconfig +index 68663d984e6a1264..2fa0884b4eee5e53 100644 +--- a/Makeconfig ++++ b/Makeconfig +@@ -412,12 +412,13 @@ link-extra-libs-tests = $(libsupport) + + # Command for linking PIE programs with the C library. + ifndef +link-pie +-+link-pie-before-libc = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \ +- -Wl,-O1 -nostdlib -nostartfiles -o $@ \ +++link-pie-before-inputs = $(if $($(@F)-no-pie),$(no-pie-ldflag),-pie) \ ++ -Wl,-O1 -nostdlib -nostartfiles \ + $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ + $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ + $(firstword $(CRT-$(@F)) $(csu-objpfx)S$(start-installed-name)) \ +- $(+preinit) $(+prectorS) \ ++ $(+preinit) $(+prectorS) +++link-pie-before-libc = -o $@ $(+link-pie-before-inputs) \ + $(filter-out $(addprefix $(csu-objpfx),start.o \ + S$(start-installed-name))\ + $(+preinit) $(link-extra-libs) \ +@@ -442,11 +443,12 @@ endef + endif + # Command for statically linking programs with the C library. + ifndef +link-static +-+link-static-before-libc = -nostdlib -nostartfiles -static -o $@ \ +++link-static-before-inputs = -nostdlib -nostartfiles -static \ + $(if $($(@F)-no-pie),$(no-pie-ldflag),$(default-pie-ldflag)) \ + $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ + $(firstword $(CRT-$(@F)) $(csu-objpfx)$(real-static-start-installed-name)) \ +- $(+preinit) $(+prectorT) \ ++ $(+preinit) $(+prectorT) +++link-static-before-libc = -o $@ $(+link-static-before-inputs) \ + $(filter-out $(addprefix $(csu-objpfx),start.o \ + $(start-installed-name))\ + $(+preinit) $(link-extra-libs-static) \ +@@ -473,13 +475,16 @@ endif + ifeq (yes,$(build-pie-default)) + +link = $(+link-pie) + +link-tests = $(+link-pie-tests) +++link-tests-before-inputs = $(+link-pie-before-inputs) $(rtld-tests-LDFLAGS) +++link-tests-after-inputs = $(link-libc-tests) $(+link-pie-after-libc) + +link-printers-tests = $(+link-pie-printers-tests) + else # not build-pie-default +-+link-before-libc = -nostdlib -nostartfiles -o $@ \ +++link-before-inputs = -nostdlib -nostartfiles \ + $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ + $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ + $(firstword $(CRT-$(@F)) $(csu-objpfx)$(start-installed-name)) \ +- $(+preinit) $(+prector) \ ++ $(+preinit) $(+prector) +++link-before-libc = -o $@ $(+link-before-inputs) \ + $(filter-out $(addprefix $(csu-objpfx),start.o \ + $(start-installed-name))\ + $(+preinit) $(link-extra-libs) \ +@@ -491,6 +496,8 @@ $(CC) $(link-libc-rpath-link) $(+link-before-libc) $(rtld-LDFLAGS) \ + $(link-extra-flags) $(link-libc) $(+link-after-libc) + $(call after-link,$@) + endef +++link-tests-before-inputs = $(+link-before-inputs) $(rtld-tests-LDFLAGS) +++link-tests-after-inputs = $(link-libc-tests) $(+link-after-libc) + define +link-tests + $(CC) $(+link-before-libc) $(rtld-tests-LDFLAGS) $(link-libc-tests) \ + $(+link-after-libc) +@@ -505,6 +512,8 @@ endif # build-pie-default + else # build-static + +link = $(+link-static) + +link-tests = $(+link-static-tests) +++link-tests-before-inputs = $(+link-static-before-inputs) +++link-tests-after-inputs = $(link-libc-static-tests) $(+link-static-after-libc) + +link-printers-tests = $(+link-static-tests) + endif # build-shared + endif # +link +diff --git a/conform/Makefile b/conform/Makefile +index c64a83a905b991cc..296db818f0a72253 100644 +--- a/conform/Makefile ++++ b/conform/Makefile +@@ -176,6 +176,9 @@ $(conformtest-header-tests): $(objpfx)%/conform.out: \ + (set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \ + mkdir -p $(@D); \ + $(PYTHON) $< --cc='$(CC)' --flags='$(conformtest-cc-flags)' \ ++ --ldflags='$(+link-tests-before-inputs)' \ ++ --libs='$(+link-tests-after-inputs)' \ ++ --run-program-prefix='$(run-program-prefix)' \ + --standard=$$std --header=$$hdr $(conformtest-xfail) \ + $(conformtest-cross) \ + > $@ 2>&1); \ +diff --git a/conform/conformtest.py b/conform/conformtest.py +index f0405b71869831f9..4898e16c9fb96503 100644 +--- a/conform/conformtest.py ++++ b/conform/conformtest.py +@@ -381,12 +381,16 @@ class MacroStrTest(object): + class HeaderTests(object): + """The set of tests run for a header.""" + +- def __init__(self, header, standard, cc, flags, cross, xfail): ++ def __init__(self, header, standard, cc, flags, ldflags, libs, ++ run_program_prefix, cross, xfail): + """Initialize a HeaderTests object.""" + self.header = header + self.standard = standard + self.cc = cc + self.flags = flags ++ self.ldflags = ldflags ++ self.libs = libs ++ self.run_program_prefix = run_program_prefix + self.cross = cross + self.xfail_str = xfail + self.cflags_namespace = ('%s -fno-builtin %s -D_ISOMAC' +@@ -590,7 +594,8 @@ class HeaderTests(object): + exe_file = os.path.join(self.temp_dir, 'test') + with open(c_file, 'w') as c_file_out: + c_file_out.write('#include <%s>\n%s' % (self.header, text)) +- cmd = ('%s %s %s -o %s' % (self.cc, self.cflags, c_file, exe_file)) ++ cmd = ('%s %s %s %s %s -o %s' % (self.cc, self.cflags, self.ldflags, ++ c_file, self.libs, exe_file)) + try: + subprocess.check_call(cmd, shell=True) + except subprocess.CalledProcessError: +@@ -600,7 +605,9 @@ class HeaderTests(object): + self.note_skip(name) + return + try: +- subprocess.check_call(exe_file, shell=True) ++ subprocess.check_call('%s %s' % (self.run_program_prefix, ++ exe_file), ++ shell=True) + except subprocess.CalledProcessError: + self.note_error(name, self.group_xfail) + return +@@ -719,12 +726,19 @@ def main(): + help='C compiler to use') + parser.add_argument('--flags', metavar='CFLAGS', + help='Compiler flags to use with CC') ++ parser.add_argument('--ldflags', metavar='LDFLAGS', ++ help='Compiler arguments for linking before inputs') ++ parser.add_argument('--libs', metavar='LIBS', ++ help='Compiler arguments for linking after inputs') ++ parser.add_argument('--run-program-prefix', metavar='RUN-PROGRAM-PREFIX', ++ help='Wrapper for running newly built program') + parser.add_argument('--cross', action='store_true', + help='Do not run compiled test programs') + parser.add_argument('--xfail', metavar='COND', + help='Name of condition for XFAILs') + args = parser.parse_args() + tests = HeaderTests(args.header, args.standard, args.cc, args.flags, ++ args.ldflags, args.libs, args.run_program_prefix, + args.cross, args.xfail) + tests.run() + diff --git a/SOURCES/glibc-upstream-2.34-52.patch b/SOURCES/glibc-upstream-2.34-52.patch new file mode 100644 index 0000000..10d9393 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-52.patch @@ -0,0 +1,37 @@ +commit 1fe4b8d6937139faa47410552d4e21b356810d67 +Author: Joseph Myers +Date: Fri Sep 17 19:24:14 2021 +0000 + + Use $(pie-default) with conformtest + + My glibc bot showed that my conformtest changes fail the build of the + conformtest execution tests for x86_64-linux-gnu-static-pie, because + linking the newly built object with the newly built libc and the + associated options normally used for linking requires it to be built + as PIE. Add $(pie-default) to the compiler command used so that PIE + options are used when required. + + There's a case for using the whole of $(CFLAGS-.o) (which includes + $(pie-default)), but that raises questions of any impact from using + optimization flags from CFLAGS in these tests. So for now just use + $(pie-default) as the key part of $(CFLAGS-.o) that's definitely + needed. + + Tested with build-many-glibcs.py for x86_64-linux-gnu-static-pie. + + (cherry picked from commit 885762aa31d75de8b9fea4c0e2e372b582d4c548) + +diff --git a/conform/Makefile b/conform/Makefile +index 296db818f0a72253..27ad98caf866879f 100644 +--- a/conform/Makefile ++++ b/conform/Makefile +@@ -175,7 +175,8 @@ $(conformtest-header-tests): $(objpfx)%/conform.out: \ + conformtest.py $(conformtest-headers-data) + (set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \ + mkdir -p $(@D); \ +- $(PYTHON) $< --cc='$(CC)' --flags='$(conformtest-cc-flags)' \ ++ $(PYTHON) $< --cc='$(CC) $(pie-default)' \ ++ --flags='$(conformtest-cc-flags)' \ + --ldflags='$(+link-tests-before-inputs)' \ + --libs='$(+link-tests-after-inputs)' \ + --run-program-prefix='$(run-program-prefix)' \ diff --git a/SOURCES/glibc-upstream-2.34-53.patch b/SOURCES/glibc-upstream-2.34-53.patch new file mode 100644 index 0000000..9e3453a --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-53.patch @@ -0,0 +1,37 @@ +commit 06865865151579d1aa17d38110060a68b85c5d90 +Author: Stafford Horne +Date: Sat Sep 25 17:02:06 2021 +0900 + + pthread/tst-cancel28: Fix barrier re-init race condition + + When running this test on the OpenRISC port I am working on this test + fails with a timeout. The test passes when being straced or debugged. + Looking at the code there seems to be a race condition in that: + + 1 main thread: calls xpthread_cancel + 2 sub thread : receives cancel signal + 3 sub thread : cleanup routine waits on barrier + 4 main thread: re-inits barrier + 5 main thread: waits on barrier + + After getting to 5 the main thread and sub thread wait forever as the 2 + barriers are no longer the same. + + Removing the barrier re-init seems to fix this issue. Also, the barrier + does not need to be reinitialized as that is done by default. + + Reviewed-by: Adhemerval Zanella + (cherry picked from commit 9874ca536b1d0662b1cea46af3ce09a4d42aeb32) + +diff --git a/sysdeps/pthread/tst-cancel28.c b/sysdeps/pthread/tst-cancel28.c +index 627cbc8160191c5c..9286c159b3be5e8a 100644 +--- a/sysdeps/pthread/tst-cancel28.c ++++ b/sysdeps/pthread/tst-cancel28.c +@@ -69,7 +69,6 @@ do_test (void) + + xpthread_cancel (timer_thread); + +- xpthread_barrier_init (&barrier, NULL, 2); + xpthread_barrier_wait (&barrier); + + return 0; diff --git a/SOURCES/glibc-upstream-2.34-54.patch b/SOURCES/glibc-upstream-2.34-54.patch new file mode 100644 index 0000000..fec14bf --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-54.patch @@ -0,0 +1,32 @@ +commit 7af07fe795f43e53d31be1c6f9adba7e05f87b0b +Author: Xi Ruoyao +Date: Thu Aug 12 20:31:59 2021 +0000 + + mips: align stack in clone [BZ #28223] + + The MIPS O32 ABI requires 4 byte aligned stack, and the MIPS N64 and N32 + ABI require 8 byte aligned stack. Previously if the caller passed an + unaligned stack to clone the the child misbehaved. + + Fixes bug 28223. + + (cherry picked from commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe) + +diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S +index 71d9dba8bd9e8f9e..43a5ad3a400d9504 100644 +--- a/sysdeps/unix/sysv/linux/mips/clone.S ++++ b/sysdeps/unix/sysv/linux/mips/clone.S +@@ -55,6 +55,13 @@ NESTED(__clone,4*SZREG,sp) + .set at + #endif + ++ /* Align stack to 4/8 bytes per the ABI. */ ++#if _MIPS_SIM == _ABIO32 ++ li t0,-4 ++#else ++ li t0,-8 ++#endif ++ and a1,a1,t0 + + /* Sanity check arguments. */ + li v0,EINVAL diff --git a/SOURCES/glibc-upstream-2.34-55.patch b/SOURCES/glibc-upstream-2.34-55.patch new file mode 100644 index 0000000..9746705 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-55.patch @@ -0,0 +1,37 @@ +commit 4db172a54d43f9b7fd17e66fc44a34efb3cab1e1 +Author: Xi Ruoyao +Date: Fri Aug 13 16:01:14 2021 +0000 + + mips: increase stack alignment in clone to match the ABI + + In "mips: align stack in clone [BZ #28223]" + (commit 1f51cd9a860ee45eee8a56fb2ba925267a2a7bfe) I made a mistake: I + misbelieved one "word" was 2-byte and "doubleword" should be 4-byte. + But in MIPS ABI one "word" is defined 32-bit (4-byte), so "doubleword" is + 8-byte [1], and "quadword" is 16-byte [2]. + + [1]: "System V Application Binary Interface: MIPS(R) RISC Processor + Supplement, 3rd edition", page 3-31 + [2]: "MIPSpro(TM) 64-Bit Porting and Transition Guide", page 23 + + (cherry picked from commit 0f62fe053273ff6c62ac95c59b7687c964737b00) + +diff --git a/sysdeps/unix/sysv/linux/mips/clone.S b/sysdeps/unix/sysv/linux/mips/clone.S +index 43a5ad3a400d9504..fd71b5ca2eb86089 100644 +--- a/sysdeps/unix/sysv/linux/mips/clone.S ++++ b/sysdeps/unix/sysv/linux/mips/clone.S +@@ -55,11 +55,11 @@ NESTED(__clone,4*SZREG,sp) + .set at + #endif + +- /* Align stack to 4/8 bytes per the ABI. */ ++ /* Align stack to 8/16 bytes per the ABI. */ + #if _MIPS_SIM == _ABIO32 +- li t0,-4 +-#else + li t0,-8 ++#else ++ li t0,-16 + #endif + and a1,a1,t0 + diff --git a/SOURCES/glibc-upstream-2.34-56.patch b/SOURCES/glibc-upstream-2.34-56.patch new file mode 100644 index 0000000..ee2ad63 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-56.patch @@ -0,0 +1,65 @@ +commit 93aabf891e96e93f100081ee07989c23d7107d17 +Author: Florian Weimer +Date: Fri Dec 17 11:48:41 2021 +0100 + + arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro + + Due to PIE-by-default, PIC is now defined in more cases. libc.a + does not have _rtld_global_ro, and statically linking setcontext + fails. SHARED is the right condition to use, so that libc.a + references _dl_hwcap instead of _rtld_global_ro. + + For static PIE support, the !SHARED case would still have to be made + PIC. This patch does not achieve that. + + Fixes commit 23645707f12f2dd9d80b51effb2d9618a7b65565 + ("Replace --enable-static-pie with --disable-default-pie"). + + Reviewed-by: Siddhesh Poyarekar + Reviewed-by: Szabolcs Nagy + (cherry picked from commit ce1e5b11229f19820b86f8b19d651f16009552b0) + +diff --git a/sysdeps/unix/sysv/linux/arm/getcontext.S b/sysdeps/unix/sysv/linux/arm/getcontext.S +index 3aa581c4da6d1166..11bfcbe5f53afc6e 100644 +--- a/sysdeps/unix/sysv/linux/arm/getcontext.S ++++ b/sysdeps/unix/sysv/linux/arm/getcontext.S +@@ -50,7 +50,7 @@ ENTRY(__getcontext) + + /* Store FP regs. Much of the FP code is copied from arm/setjmp.S. */ + +-#ifdef PIC ++#ifdef SHARED + ldr r2, 1f + ldr r1, .Lrtld_global_ro + 0: add r2, pc, r2 +@@ -102,7 +102,7 @@ ENTRY(__getcontext) + + END(__getcontext) + +-#ifdef PIC ++#ifdef SHARED + 1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS + .Lrtld_global_ro: + .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) +diff --git a/sysdeps/unix/sysv/linux/arm/setcontext.S b/sysdeps/unix/sysv/linux/arm/setcontext.S +index 8be8beefea13883e..4c7c6e550944138c 100644 +--- a/sysdeps/unix/sysv/linux/arm/setcontext.S ++++ b/sysdeps/unix/sysv/linux/arm/setcontext.S +@@ -32,7 +32,7 @@ ENTRY(__setcontext) + add r0, r0, #UCONTEXT_REGSPACE + + /* Restore the VFP registers. Copied from arm/__longjmp.S. */ +-#ifdef PIC ++#ifdef SHARED + ldr r2, 1f + ldr r1, .Lrtld_global_ro + 0: add r2, pc, r2 +@@ -101,7 +101,7 @@ ENTRY(__startcontext) + .fnend + END(__startcontext) + +-#ifdef PIC ++#ifdef SHARED + 1: .long _GLOBAL_OFFSET_TABLE_ - 0b - PC_OFS + .Lrtld_global_ro: + .long C_SYMBOL_NAME(_rtld_global_ro)(GOT) diff --git a/SOURCES/glibc-upstream-2.34-57.patch b/SOURCES/glibc-upstream-2.34-57.patch new file mode 100644 index 0000000..c8523f9 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-57.patch @@ -0,0 +1,74 @@ +commit dc9b69d5331dcdca4547c0490cb9fefbd89e40f6 +Author: Florian Weimer +Date: Fri Dec 17 12:01:20 2021 +0100 + + nss: Use "files dns" as the default for the hosts database (bug 28700) + + This matches what is currently in nss/nsswitch.conf. The new ordering + matches what most distributions use in their installed configuration + files. + + It is common to add localhost to /etc/hosts because the name does not + exist in the DNS, but is commonly used as a host name. + + With the built-in "dns [!UNAVAIL=return] files" default, dns is + searched first and provides an answer for "localhost" (NXDOMAIN). + We never look at the files database as a result, so the contents of + /etc/hosts is ignored. This means that "getent hosts localhost" + fail without a /etc/nsswitch.conf file, even though the host name + is listed in /etc/hosts. + + Reviewed-by: Carlos O'Donell + (cherry picked from commit b99b0f93ee8762fe53ff65802deb6f00700b9924) + +diff --git a/manual/nss.texi b/manual/nss.texi +index 3aaa7786f8cf3168..524d22ad1e7f8ca0 100644 +--- a/manual/nss.texi ++++ b/manual/nss.texi +@@ -324,9 +324,8 @@ missing. + + @cindex default value, and NSS + For the @code{hosts} and @code{networks} databases the default value is +-@code{dns [!UNAVAIL=return] files}. I.e., the system is prepared for +-the DNS service not to be available but if it is available the answer it +-returns is definitive. ++@code{files dns}. I.e., local configuration will override the contents ++of the domain name system (DNS). + + The @code{passwd}, @code{group}, and @code{shadow} databases was + traditionally handled in a special way. The appropriate files in the +diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c +index f1c97f7c8e9d7378..dbc87868dd408d9f 100644 +--- a/nss/XXX-lookup.c ++++ b/nss/XXX-lookup.c +@@ -29,7 +29,7 @@ + |* ALTERNATE_NAME - name of another service which is examined in *| + |* case DATABASE_NAME is not found *| + |* *| +-|* DEFAULT_CONFIG - string for default conf (e.g. "dns files") *| ++|* DEFAULT_CONFIG - string for default conf (e.g. "files dns") *| + |* *| + \*******************************************************************/ + +diff --git a/nss/nss_database.c b/nss/nss_database.c +index ab121cb371c087e9..54561f03287db2e4 100644 +--- a/nss/nss_database.c ++++ b/nss/nss_database.c +@@ -80,7 +80,7 @@ enum nss_database_default + { + nss_database_default_defconfig = 0, /* "nis [NOTFOUND=return] files". */ + nss_database_default_compat, /* "compat [NOTFOUND=return] files". */ +- nss_database_default_dns, /* "dns [!UNAVAIL=return] files". */ ++ nss_database_default_dns, /* "files dns". */ + nss_database_default_files, /* "files". */ + nss_database_default_nis, /* "nis". */ + nss_database_default_nis_nisplus, /* "nis nisplus". */ +@@ -133,7 +133,7 @@ nss_database_select_default (struct nss_database_default_cache *cache, + #endif + + case nss_database_default_dns: +- line = "dns [!UNAVAIL=return] files"; ++ line = "files dns"; + break; + + case nss_database_default_files: diff --git a/SOURCES/glibc-upstream-2.34-58.patch b/SOURCES/glibc-upstream-2.34-58.patch new file mode 100644 index 0000000..d95112e --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-58.patch @@ -0,0 +1,35 @@ +commit 03de6917bd11c0591867607ce74ef658f76eabb9 +Author: Aurelien Jarno +Date: Wed Dec 15 23:46:19 2021 +0100 + + elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704] + + On KVM guests running on some AMD systems, the IBRS feature is reported + as a synthetic feature using the Intel feature, while the cpuinfo entry + keeps the same. Handle that by first checking the presence of the Intel + feature on AMD systems. + + Fixes bug 28704. + + (cherry picked from commit 94058f6cde8b887178885954740ac6c866d25eab) + +diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c +index 2d4927f5e52dc260..830aaca2ecae971b 100644 +--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c ++++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c +@@ -169,7 +169,14 @@ do_test (int argc, char **argv) + else if (cpu_features->basic.kind == arch_kind_amd) + { + fails += CHECK_PROC (ibpb, AMD_IBPB); +- fails += CHECK_PROC (ibrs, AMD_IBRS); ++ ++ /* The IBRS feature on AMD processors is reported using the Intel feature ++ * on KVM guests (synthetic bit). In both cases the cpuinfo entry is the ++ * same. */ ++ if (HAS_CPU_FEATURE (IBRS_IBPB)) ++ fails += CHECK_PROC (ibrs, IBRS_IBPB); ++ else ++ fails += CHECK_PROC (ibrs, AMD_IBRS); + fails += CHECK_PROC (stibp, AMD_STIBP); + } + fails += CHECK_PROC (ibt, IBT); diff --git a/SOURCES/glibc-upstream-2.34-59.patch b/SOURCES/glibc-upstream-2.34-59.patch new file mode 100644 index 0000000..b0ea00c --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-59.patch @@ -0,0 +1,35 @@ +commit 5daf13b1e637eec0f7a2de05b177cb0d76479aa2 +Author: Matheus Castanho +Date: Wed Dec 1 11:14:40 2021 -0300 + + powerpc64[le]: Allocate extra stack frame on syscall.S + + The syscall function does not allocate the extra stack frame for scv like other + assembly syscalls using DO_CALL_SCV. So after commit d120fb9941 changed the + offset that is used to save LR, syscall ended up using an invalid offset, + causing regressions on powerpc64. So make sure the extra stack frame is + allocated in syscall.S as well to make it consistent with other uses of + DO_CALL_SCV and avoid similar issues in the future. + + Tested on powerpc, powerpc64, and powerpc64le (with and without scv) + + Reviewed-by: Raphael M Zinsly + + (cherry picked from commit ae91d3df24a4a1b1f264d101a71a298bff310d14) + +diff --git a/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S +index a29652feaf6764cf..a5497c8370982fe3 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/syscall.S ++++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S +@@ -27,7 +27,11 @@ ENTRY (syscall) + mr r8,r9 + #if defined(USE_PPC_SCV) && !IS_IN(rtld) && (defined(__PPC64__) || defined(__powerpc64__)) + CHECK_SCV_SUPPORT r9 0f ++ stdu r1,-SCV_FRAME_SIZE(r1) ++ cfi_adjust_cfa_offset(SCV_FRAME_SIZE) + DO_CALL_SCV ++ addi r1,r1,SCV_FRAME_SIZE ++ cfi_adjust_cfa_offset(-SCV_FRAME_SIZE) + RET_SCV + b 1f + #endif diff --git a/SOURCES/glibc-upstream-2.34-6.patch b/SOURCES/glibc-upstream-2.34-6.patch new file mode 100644 index 0000000..5e6a43d --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-6.patch @@ -0,0 +1,65 @@ +commit 31902ae639d6a50e768a85f1cd2a17e56b8463c2 +Author: Florian Weimer +Date: Fri Aug 6 09:51:38 2021 +0200 + + Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182) + + __REDIRECT and __THROW are not compatible with C++ due to the ordering of the + __asm__ alias and the throw specifier. __REDIRECT_NTH has to be used + instead. + + Fixes commit 8a40aff86ba5f64a3a84883e539cb67b ("io: Add time64 alias + for fcntl"), commit 82c395d91ea4f69120d453aeec398e30 ("misc: Add + time64 alias for ioctl"), commit b39ffab860cd743a82c91946619f1b8158 + ("Linux: Add time64 alias for prctl"). + + Reviewed-by: Carlos O'Donell + (cherry picked from commit c87fcacc50505d550f1bb038382bcc7ea73a5926) + +diff --git a/io/fcntl.h b/io/fcntl.h +index 8917a73b420b503d..1c96f98f4d75ce65 100644 +--- a/io/fcntl.h ++++ b/io/fcntl.h +@@ -187,10 +187,10 @@ extern int fcntl64 (int __fd, int __cmd, ...); + # endif + #else /* __USE_TIME_BITS64 */ + # ifdef __REDIRECT +-extern int __REDIRECT (fcntl, (int __fd, int __request, ...), +- __fcntl_time64) __THROW; +-extern int __REDIRECT (fcntl64, (int __fd, int __request, ...), +- __fcntl_time64) __THROW; ++extern int __REDIRECT_NTH (fcntl, (int __fd, int __request, ...), ++ __fcntl_time64); ++extern int __REDIRECT_NTH (fcntl64, (int __fd, int __request, ...), ++ __fcntl_time64); + # else + extern int __fcntl_time64 (int __fd, int __request, ...) __THROW; + # define fcntl64 __fcntl_time64 +diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h +index 6884d9925f06125f..9945c1e9181eb313 100644 +--- a/misc/sys/ioctl.h ++++ b/misc/sys/ioctl.h +@@ -42,8 +42,8 @@ __BEGIN_DECLS + extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; + #else + # ifdef __REDIRECT +-extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...), +- __ioctl_time64) __THROW; ++extern int __REDIRECT_NTH (ioctl, (int __fd, unsigned long int __request, ...), ++ __ioctl_time64); + # else + extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW; + # define ioctl __ioctl_time64 +diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h +index db88938b3a542b0b..f0e0d2f27f9b9ee9 100644 +--- a/sysdeps/unix/sysv/linux/sys/prctl.h ++++ b/sysdeps/unix/sysv/linux/sys/prctl.h +@@ -42,7 +42,7 @@ __BEGIN_DECLS + extern int prctl (int __option, ...) __THROW; + #else + # ifdef __REDIRECT +-extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW; ++extern int __REDIRECT_NTH (prctl, (int __option, ...), __prctl_time64); + # else + extern int __prctl_time64 (int __option,d ...) __THROW; + # define ioctl __prctl_time64 diff --git a/SOURCES/glibc-upstream-2.34-60.patch b/SOURCES/glibc-upstream-2.34-60.patch new file mode 100644 index 0000000..60d2765 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-60.patch @@ -0,0 +1,32 @@ +commit 9de8011c328021f10588a8acb418daf5121d5f3d +Author: Aurelien Jarno +Date: Tue Dec 14 22:44:35 2021 +0100 + + riscv: align stack in clone [BZ #28702] + + The RISC-V ABI [1] mandates that "the stack pointer shall be aligned to + a 128-bit boundary upon procedure entry". This as not the case in clone. + + This fixes the misc/tst-misalign-clone-internal and + misc/tst-misalign-clone tests. + + Fixes bug 28702. + + [1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc + + (cherry picked from commit d2e594d71509faf36cf851a69370db34a4f5fa65) + +diff --git a/sysdeps/unix/sysv/linux/riscv/clone.S b/sysdeps/unix/sysv/linux/riscv/clone.S +index 12f91a20d3bb34f5..161e83c7e3786b8d 100644 +--- a/sysdeps/unix/sysv/linux/riscv/clone.S ++++ b/sysdeps/unix/sysv/linux/riscv/clone.S +@@ -32,6 +32,9 @@ + .text + LEAF (__clone) + ++ /* Align stack to a 128-bit boundary as per RISC-V ABI. */ ++ andi a1,a1,ALMASK ++ + /* Sanity check arguments. */ + beqz a0,L (invalid) /* No NULL function pointers. */ + beqz a1,L (invalid) /* No NULL stack pointers. */ diff --git a/SOURCES/glibc-upstream-2.34-61.patch b/SOURCES/glibc-upstream-2.34-61.patch new file mode 100644 index 0000000..82214de --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-61.patch @@ -0,0 +1,34 @@ +commit aa3a97496c82a8443039248ebee650322c9480f4 +Author: Aurelien Jarno +Date: Thu Dec 16 00:06:28 2021 +0100 + + riscv: align stack before calling _dl_init [BZ #28703] + + Align the stack pointer to 128 bits during the call to _dl_init() as + specified by the RISC-V ABI [1]. This fixes the elf/tst-align2 test. + + Fixes bug 28703. + + [1] https://github.com/riscv-non-isa/riscv-elf-psabi-doc + + (cherry picked from commit 225da459cebef1037dcd78b56471edc0721e1c41) + +diff --git a/sysdeps/riscv/dl-machine.h b/sysdeps/riscv/dl-machine.h +index aedf69fcdd8aff50..951268923da26a37 100644 +--- a/sysdeps/riscv/dl-machine.h ++++ b/sysdeps/riscv/dl-machine.h +@@ -127,8 +127,14 @@ elf_machine_load_address (void) + sll a3, a1, " STRINGXP (PTRLOG) "\n\ + add a3, a3, a2\n\ + add a3, a3, " STRINGXP (SZREG) "\n\ ++ # Stash the stack pointer in s1.\n\ ++ mv s1, sp\n\ ++ # Align stack to 128 bits for the _dl_init call.\n\ ++ andi sp, sp,-16\n\ + # Call the function to run the initializers.\n\ + jal _dl_init\n\ ++ # Restore the stack pointer for _start.\n\ ++ mv sp, s1\n\ + # Pass our finalizer function to _start.\n\ + lla a0, _dl_fini\n\ + # Jump to the user entry point.\n\ diff --git a/SOURCES/glibc-upstream-2.34-62.patch b/SOURCES/glibc-upstream-2.34-62.patch new file mode 100644 index 0000000..656bcfb --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-62.patch @@ -0,0 +1,21 @@ +commit 4029747c592cb2d59805b3a4e7a8963fcdcdbeb1 +Author: John David Anglin +Date: Mon Sep 6 17:37:29 2021 +0000 + + Update hppa libm-test-ulps + + (cherry picked from commit d8cf84ac7e504663dfeb2bb45d8d48ae81effe05) + +diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps +index 90e16a72692e9199..3d60fc25a14d053f 100644 +--- a/sysdeps/hppa/fpu/libm-test-ulps ++++ b/sysdeps/hppa/fpu/libm-test-ulps +@@ -1104,7 +1104,7 @@ float: 8 + ldouble: 1 + + Function: "tgamma_downward": +-double: 8 ++double: 9 + float: 7 + + Function: "tgamma_towardzero": diff --git a/SOURCES/glibc-upstream-2.34-63.patch b/SOURCES/glibc-upstream-2.34-63.patch new file mode 100644 index 0000000..e0944e1 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-63.patch @@ -0,0 +1,21 @@ +commit e94544c82f4ac37017589d8d83156d72388fc4af +Author: Adhemerval Zanella +Date: Wed Aug 4 21:40:32 2021 +0300 + + Update sparc libm-test-ulps + + (cherry picked from commit c52eb066bc634a79e4194457362384abe5b43b3a) + +diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps +index c2e4649524aa3a44..f34bbe6c592814d0 100644 +--- a/sysdeps/sparc/fpu/libm-test-ulps ++++ b/sysdeps/sparc/fpu/libm-test-ulps +@@ -1346,7 +1346,7 @@ float: 8 + ldouble: 4 + + Function: "tgamma_downward": +-double: 8 ++double: 9 + float: 7 + ldouble: 5 + diff --git a/SOURCES/glibc-upstream-2.34-64.patch b/SOURCES/glibc-upstream-2.34-64.patch new file mode 100644 index 0000000..54ae960 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-64.patch @@ -0,0 +1,81 @@ +commit 1d9764aba8c00754fbf8299e48afbe222245ee3e +Author: Adhemerval Zanella +Date: Wed Aug 4 21:34:12 2021 +0300 + + linux: Add sparck brk implementation + + It turned that the generic implementation of brk() does not work + for sparc, since on failure kernel will just return the previous + input value without setting the conditional register. + + This patches adds back a sparc32 and sparc64 implementation removed + by 720480934ab9107. + + Checked on sparc64-linux-gnu and sparcv9-linux-gnu. + + (cherry picked from commit 5b86241a032c50462988bdd1439e078384690d34) + +diff --git a/sysdeps/unix/sysv/linux/sparc/brk.c b/sysdeps/unix/sysv/linux/sparc/brk.c +new file mode 100644 +index 0000000000000000..aafe9673e3062cf8 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/sparc/brk.c +@@ -0,0 +1,58 @@ ++/* Change data segment. Linux SPARC version. ++ Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library. If not, see ++ . */ ++ ++#include ++#include ++#include ++ ++/* This must be initialized data because commons can't have aliases. */ ++void *__curbrk = 0; ++ ++#if HAVE_INTERNAL_BRK_ADDR_SYMBOL ++/* Old braindamage in GCC's crtstuff.c requires this symbol in an attempt ++ to work around different old braindamage in the old Linux ELF dynamic ++ linker. */ ++weak_alias (__curbrk, ___brk_addr) ++#endif ++ ++#ifdef __arch64__ ++# define SYSCALL_NUM "0x6d" ++#else ++# define SYSCALL_NUM "0x10" ++#endif ++ ++int ++__brk (void *addr) ++{ ++ register long int g1 asm ("g1") = __NR_brk; ++ register long int o0 asm ("o0") = (long int) addr; ++ asm volatile ("ta " SYSCALL_NUM ++ : "=r"(o0) ++ : "r"(g1), "0"(o0) ++ : "cc"); ++ __curbrk = (void *) o0; ++ ++ if (__curbrk < addr) ++ { ++ __set_errno (ENOMEM); ++ return -1; ++ } ++ ++ return 0; ++} ++weak_alias (__brk, brk) diff --git a/SOURCES/glibc-upstream-2.34-65.patch b/SOURCES/glibc-upstream-2.34-65.patch new file mode 100644 index 0000000..6644c9d --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-65.patch @@ -0,0 +1,33 @@ +commit 8ad6d6d8ed33631bd2ca5d1112e6da2f92731432 +Author: maminjie +Date: Mon Dec 20 19:36:32 2021 +0800 + + Linux: Fix 32-bit vDSO for clock_gettime on powerpc32 + + When the clock_id is CLOCK_PROCESS_CPUTIME_ID or CLOCK_THREAD_CPUTIME_ID, + on the 5.10 kernel powerpc 32-bit, the 32-bit vDSO is executed successfully ( + because the __kernel_clock_gettime in arch/powerpc/kernel/vdso32/gettimeofday.S + does not support these two IDs, the 32-bit time_t syscall will be used), + but tp32.tv_sec is equal to 0, causing the 64-bit time_t syscall to continue to be used, + resulting in two system calls. + + Fix commit 72e84d1db22203e01a43268de71ea8669eca2863. + + Signed-off-by: maminjie + Reviewed-by: Adhemerval Zanella + + (cherry picked from commit e0fc721ce600038dd390e77cfe52440707ef574d) + +diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c +index 91df6b3d967bf945..9c7d9073254843c7 100644 +--- a/sysdeps/unix/sysv/linux/clock_gettime.c ++++ b/sysdeps/unix/sysv/linux/clock_gettime.c +@@ -53,7 +53,7 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp) + { + struct timespec tp32; + r = INTERNAL_VSYSCALL_CALL (vdso_time, 2, clock_id, &tp32); +- if (r == 0 && tp32.tv_sec > 0) ++ if (r == 0 && tp32.tv_sec >= 0) + { + *tp = valid_timespec_to_timespec64 (tp32); + return 0; diff --git a/SOURCES/glibc-upstream-2.34-66.patch b/SOURCES/glibc-upstream-2.34-66.patch new file mode 100644 index 0000000..9619100 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-66.patch @@ -0,0 +1,37 @@ +commit 41fddc064ded5c9a36d8ffaad59a85407a22a535 +Author: Andrea Monaco +Date: Sun Dec 12 10:24:28 2021 +0100 + + intl/plural.y: Avoid conflicting declarations of yyerror and yylex + + bison-3.8 includes these lines in the generated intl/plural.c: + + #if !defined __gettexterror && !defined YYERROR_IS_DECLARED + void __gettexterror (struct parse_args *arg, const char *msg); + #endif + #if !defined __gettextlex && !defined YYLEX_IS_DECLARED + int __gettextlex (YYSTYPE *yylvalp, struct parse_args *arg); + #endif + + Those default prototypes provided by bison conflict with the + declarations later on in plural.y. This patch solves the issue. + + Reviewed-by: Arjun Shankar + (cherry picked from commit c6d7d6312c21bbcfb236d48bb7c11cedb234389f) + +diff --git a/intl/plural.y b/intl/plural.y +index e02e74541c4574eb..2ee128ba01b5820d 100644 +--- a/intl/plural.y ++++ b/intl/plural.y +@@ -40,6 +40,11 @@ + # define __gettextparse PLURAL_PARSE + #endif + ++/* Later we provide those prototypes. Without these macros, bison may ++ generate its own prototypes with possible conflicts. */ ++#define YYLEX_IS_DECLARED ++#define YYERROR_IS_DECLARED ++ + %} + %parse-param {struct parse_args *arg} + %lex-param {struct parse_args *arg} diff --git a/SOURCES/glibc-upstream-2.34-67.patch b/SOURCES/glibc-upstream-2.34-67.patch new file mode 100644 index 0000000..2ee0841 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-67.patch @@ -0,0 +1,50 @@ +commit 217b84127b3a6590afcc7e198e6c3f665935e8f4 +Author: Wilco Dijkstra +Date: Thu Jan 6 14:36:28 2022 +0000 + + AArch64: Check for SVE in ifuncs [BZ #28744] + + Add a check for SVE in the A64FX ifuncs for memcpy, memset and memmove. + This fixes BZ #28744. + + (cherry picked from commit e5fa62b8db546f8792ec9e5c61e6419f4f8e3f4d) + +diff --git a/sysdeps/aarch64/multiarch/memcpy.c b/sysdeps/aarch64/multiarch/memcpy.c +index 25e0081eeb51727c..b6703af44b3f1a3d 100644 +--- a/sysdeps/aarch64/multiarch/memcpy.c ++++ b/sysdeps/aarch64/multiarch/memcpy.c +@@ -48,7 +48,7 @@ libc_ifunc (__libc_memcpy, + || IS_NEOVERSE_V1 (midr) + ? __memcpy_simd + # if HAVE_AARCH64_SVE_ASM +- : (IS_A64FX (midr) ++ : (IS_A64FX (midr) && sve + ? __memcpy_a64fx + : __memcpy_generic)))))); + # else +diff --git a/sysdeps/aarch64/multiarch/memmove.c b/sysdeps/aarch64/multiarch/memmove.c +index d0adefc547f60030..d2339ff34ff7b3e5 100644 +--- a/sysdeps/aarch64/multiarch/memmove.c ++++ b/sysdeps/aarch64/multiarch/memmove.c +@@ -48,7 +48,7 @@ libc_ifunc (__libc_memmove, + || IS_NEOVERSE_V1 (midr) + ? __memmove_simd + # if HAVE_AARCH64_SVE_ASM +- : (IS_A64FX (midr) ++ : (IS_A64FX (midr) && sve + ? __memmove_a64fx + : __memmove_generic)))))); + # else +diff --git a/sysdeps/aarch64/multiarch/memset.c b/sysdeps/aarch64/multiarch/memset.c +index d7d9bbbda095e051..3d839bc02e96380d 100644 +--- a/sysdeps/aarch64/multiarch/memset.c ++++ b/sysdeps/aarch64/multiarch/memset.c +@@ -44,7 +44,7 @@ libc_ifunc (__libc_memset, + : (IS_EMAG (midr) && zva_size == 64 + ? __memset_emag + # if HAVE_AARCH64_SVE_ASM +- : (IS_A64FX (midr) ++ : (IS_A64FX (midr) && sve + ? __memset_a64fx + : __memset_generic)))); + # else diff --git a/SOURCES/glibc-upstream-2.34-68.patch b/SOURCES/glibc-upstream-2.34-68.patch new file mode 100644 index 0000000..935e4f0 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-68.patch @@ -0,0 +1,27 @@ +commit 515a6f53cd984d5e6e374fbee52772f967fc3c73 +Author: Paul Eggert +Date: Mon Sep 13 22:49:45 2021 -0700 + + Fix subscript error with odd TZif file [BZ #28338] + + * time/tzfile.c (__tzfile_compute): Fix unlikely off-by-one bug + that accessed before start of an array when an oddball-but-valid + TZif file was queried with an unusual time_t value. + + Reviewed-by: Adhemerval Zanella + (cherry picked from commit 645277434a42efc547d2cac8bfede4da10b4049f) + +diff --git a/time/tzfile.c b/time/tzfile.c +index 4377018a55936389..190a777152b31cee 100644 +--- a/time/tzfile.c ++++ b/time/tzfile.c +@@ -765,8 +765,7 @@ __tzfile_compute (__time64_t timer, int use_localtime, + *leap_correct = leaps[i].change; + + if (timer == leaps[i].transition /* Exactly at the transition time. */ +- && ((i == 0 && leaps[i].change > 0) +- || leaps[i].change > leaps[i - 1].change)) ++ && (leaps[i].change > (i == 0 ? 0 : leaps[i - 1].change))) + { + *leap_hit = 1; + while (i > 0 diff --git a/SOURCES/glibc-upstream-2.34-69.patch b/SOURCES/glibc-upstream-2.34-69.patch new file mode 100644 index 0000000..1346263 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-69.patch @@ -0,0 +1,52 @@ +commit 85b24f9694e21f1d2f2d8b80d3bf690687723347 +Author: Hans-Peter Nilsson +Date: Fri Dec 17 21:38:00 2021 +0100 + + timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707) + + When using a timezone file with a truncated starting time, + generated by the zic in IANA tzcode-2021d a.k.a. tzlib-2021d + (also in tzlib-2021e; current as of this writing), glibc + asserts in __tzfile_read (on e.g. tzset() for this file) and + you may find lines matching "tzfile.c:435: __tzfile_read: + Assertion `num_types == 1' failed" in your syslog. + + One example of such a file is the tzfile for Asuncion + generated by tzlib-2021e as follows, using the tzlib-2021e zic: + "zic -d DEST -r @1546300800 -L /dev/null -b slim + SOURCE/southamerica". Note that in its type 2 header, it has + two entries in its "time-types" array (types), but only one + entry in its "transition types" array (type_idxs). + + This is valid and expected already in the published RFC8536, and + not even frowned upon: "Local time for timestamps before the + first transition is specified by the first time type (time type + 0)" ... "every nonzero local time type index SHOULD appear at + least once in the transition type array". Note the "nonzero ... + index". Until the 2021d zic, index 0 has been shared by the + first valid transition but with 2021d it's separate, set apart + as a placeholder and only "implicitly" indexed. (A draft update + of the RFC mandates that the entry at index 0 is a placeholder + in this case, hence can no longer be shared.) + + * time/tzfile.c (__tzfile_read): Don't assert when no transitions + are found. + + Co-authored-by: Christopher Wong + (cherry picked from commit c36f64aa6dff13b12a1e03a185e75a50fa9f6a4c) + +diff --git a/time/tzfile.c b/time/tzfile.c +index 190a777152b31cee..8668392ad387af05 100644 +--- a/time/tzfile.c ++++ b/time/tzfile.c +@@ -431,8 +431,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap) + if (__tzname[0] == NULL) + { + /* This should only happen if there are no transition rules. +- In this case there should be only one single type. */ +- assert (num_types == 1); ++ In this case there's usually only one single type, unless ++ e.g. the data file has a truncated time-range. */ + __tzname[0] = __tzstring (zone_names); + } + if (__tzname[1] == NULL) diff --git a/SOURCES/glibc-upstream-2.34-7.patch b/SOURCES/glibc-upstream-2.34-7.patch new file mode 100644 index 0000000..c49b837 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-7.patch @@ -0,0 +1,35 @@ +commit 79474303223c5665bec75ffbdb2a86ee04a2514b +Author: Nikita Popov +Date: Mon Aug 9 20:17:34 2021 +0530 + + librt: fix NULL pointer dereference (bug 28213) + + Helper thread frees copied attribute on NOTIFY_REMOVED message + received from the OS kernel. Unfortunately, it fails to check whether + copied attribute actually exists (data.attr != NULL). This worked + earlier because free() checks passed pointer before actually + attempting to release corresponding memory. But + __pthread_attr_destroy assumes pointer is not NULL. + + So passing NULL pointer to __pthread_attr_destroy will result in + segmentation fault. This scenario is possible if + notification->sigev_notify_attributes == NULL (which means default + thread attributes should be used). + + Signed-off-by: Nikita Popov + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit b805aebd42364fe696e417808a700fdb9800c9e8) + +diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c +index 9799dcdaa479a1d5..eccae2e4c6cdfefa 100644 +--- a/sysdeps/unix/sysv/linux/mq_notify.c ++++ b/sysdeps/unix/sysv/linux/mq_notify.c +@@ -131,7 +131,7 @@ helper_thread (void *arg) + to wait until it is done with it. */ + (void) __pthread_barrier_wait (¬ify_barrier); + } +- else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED) ++ else if (data.raw[NOTIFY_COOKIE_LEN - 1] == NOTIFY_REMOVED && data.attr != NULL) + { + /* The only state we keep is the copy of the thread attributes. */ + __pthread_attr_destroy (data.attr); diff --git a/SOURCES/glibc-upstream-2.34-70.patch b/SOURCES/glibc-upstream-2.34-70.patch new file mode 100644 index 0000000..b83ae03 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-70.patch @@ -0,0 +1,130 @@ +commit d5ba02f67dd62a63e29c29eebd6c543722aa6b5b +Author: Hans-Peter Nilsson +Date: Fri Dec 17 21:45:54 2021 +0100 + + timezone: test-case for BZ #28707 + + This test-case is the tzfile for Asuncion generated by + tzlib-2021e as follows, using the tzlib-2021e zic: "zic -d + DEST -r @1546300800 -L /dev/null -b slim + SOURCE/southamerica". Note that in its type 2 header, it + has two entries in its "time-types" array (types), but only + one entry in its "transition types" array (type_idxs). + + * timezone/Makefile, timezone/tst-pr28707.c, + timezone/testdata/gen-XT5.sh: New test. + + Co-authored-by: Christopher Wong + (cherry picked from commit ebe899af0dc3215159a9c896ac6f35b72a18cb6e) + +diff --git a/timezone/Makefile b/timezone/Makefile +index c624a189b322cb5f..f091663b8bbbceda 100644 +--- a/timezone/Makefile ++++ b/timezone/Makefile +@@ -23,7 +23,7 @@ subdir := timezone + include ../Makeconfig + + others := zdump zic +-tests := test-tz tst-timezone tst-tzset ++tests := test-tz tst-timezone tst-tzset tst-bz28707 + + generated-dirs += testdata + +@@ -85,10 +85,12 @@ $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \ + America/Sao_Paulo Asia/Tokyo \ + Europe/London) + $(objpfx)tst-tzset.out: $(addprefix $(testdata)/XT, 1 2 3 4) ++$(objpfx)tst-bz28707.out: $(testdata)/XT5 + + test-tz-ENV = TZDIR=$(testdata) + tst-timezone-ENV = TZDIR=$(testdata) + tst-tzset-ENV = TZDIR=$(testdata) ++tst-bz28707-ENV = TZDIR=$(testdata) + + # Note this must come second in the deps list for $(built-program-cmd) to work. + zic-deps = $(objpfx)zic $(leapseconds) yearistype +@@ -122,6 +124,10 @@ $(testdata)/XT%: testdata/XT% + $(make-target-directory) + cp $< $@ + ++$(testdata)/XT%: testdata/gen-XT%.sh ++ $(SHELL) $< > $@.tmp ++ mv $@.tmp $@ ++ + $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make + sed -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \ + -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ +diff --git a/timezone/testdata/gen-XT5.sh b/timezone/testdata/gen-XT5.sh +new file mode 100755 +index 0000000000000000..3cea0569eb5a6a57 +--- /dev/null ++++ b/timezone/testdata/gen-XT5.sh +@@ -0,0 +1,16 @@ ++#! /bin/sh ++ ++# This test-case is the tzfile for America/Asuncion ++# generated by tzlib-2021e as follows, using the tzlib-2021e ++# zic: "zic -d DEST -r @1546300800 -L /dev/null -b slim ++# SOURCE/southamerica". Note that in its type 2 header, it ++# has two entries in its "time-types" array (types), but ++# only one entry in its "transition types" array ++# (type_idxs). ++ ++printf \ ++'TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'\ ++'\0\0\0\0\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0TZif2\0\0\0\0\0\0\0\0'\ ++'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\2\0\0\0\b\0'\ ++'\0\0\0\*\255\200\1\0\0\0\0\0\0\377\377\325\320\1\4-00\0-03\0\n'\ ++'<-04>4<-03>,M10.1.0/0,M3.4.0/0\n' +diff --git a/timezone/tst-bz28707.c b/timezone/tst-bz28707.c +new file mode 100644 +index 0000000000000000..0a9df1e9a094f1e9 +--- /dev/null ++++ b/timezone/tst-bz28707.c +@@ -0,0 +1,46 @@ ++/* Copyright (C) 2021 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++ ++/* Test that we can use a truncated timezone-file, where the time-type ++ at index 0 is not indexed by the transition-types array (and the ++ transition-types array does not contain at least both one DST and one ++ normal time members). */ ++ ++static int ++do_test (void) ++{ ++ if (setenv ("TZ", "XT5", 1)) ++ { ++ puts ("setenv failed."); ++ return 1; ++ } ++ ++ tzset (); ++ ++ return ++ /* Sanity-check that we got the right timezone-name for DST. For ++ normal time, we're likely to get "-00" (the "unspecified" marker), ++ even though the POSIX timezone string says "-04". Let's not test ++ that. */ ++ !(strcmp (tzname[1], "-03") == 0); ++} ++#include diff --git a/SOURCES/glibc-upstream-2.34-71.patch b/SOURCES/glibc-upstream-2.34-71.patch new file mode 100644 index 0000000..4e534ed --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-71.patch @@ -0,0 +1,39 @@ +commit e64235ff4266e87b20505101877fe57350ab69ab +Author: Paul A. Clarke +Date: Tue Sep 14 13:13:33 2021 -0500 + + powerpc: Fix unrecognized instruction errors with recent GCC + + Recent binutils commit b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a + changes the behavior of `.machine` directives to override, rather + than augment, the base CPU. This can result in _reduced_ functionality + when, for example, compiling for default machine "power8", but explicitly + asking for ".machine power5", which loses Altivec instructions. + + In tst-ucontext-ppc64-vscr.c, while the instructions provoking the new + error messages are bracketed by ".machine power5", which is ostensibly + Power ISA 2.03 (POWER5), the POWER5 processor did not support the + VSX subset, so these instructions are not recognized as "power5". + + Error: unrecognized opcode: `vspltisb' + Error: unrecognized opcode: `vpkuwus' + Error: unrecognized opcode: `mfvscr' + Error: unrecognized opcode: `stvx' + + Manually adding the VSX subset via ".machine altivec" is sufficient. + + Reviewed-by: Tulio Magno Quites Machado Filho + (cherry picked from commit 064b475a2e5662b6b3973fabf505eade86e61510) + +diff --git a/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c b/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c +index 28c87fcef72bded6..d3fc4ab589f4752a 100644 +--- a/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c ++++ b/sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c +@@ -50,6 +50,7 @@ do_test (void) + /* Set SAT bit in VSCR register. */ + asm volatile (".machine push;\n" + ".machine \"power5\";\n" ++ ".machine altivec;\n" + "vspltisb %0,0;\n" + "vspltisb %1,-1;\n" + "vpkuwus %0,%0,%1;\n" diff --git a/SOURCES/glibc-upstream-2.34-72.patch b/SOURCES/glibc-upstream-2.34-72.patch new file mode 100644 index 0000000..548e54e --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-72.patch @@ -0,0 +1,377 @@ +commit 73558ffe841cf4c60ccb4c71cf6dcebf84f2b736 +Author: Joseph Myers +Date: Wed Nov 10 15:21:19 2021 +0000 + + Update syscall lists for Linux 5.15 + + Linux 5.15 has one new syscall, process_mrelease (and also enables the + clone3 syscall for RV32). It also has a macro __NR_SYSCALL_MASK for + Arm, which is not a syscall but matches the pattern used for syscall + macro names. + + Add __NR_SYSCALL_MASK to the names filtered out in the code dealing + with syscall lists, update syscall-names.list for the new syscall and + regenerate the arch-syscall.h headers with build-many-glibcs.py + update-syscalls. + + Tested with build-many-glibcs.py. + + (cherry picked from commit 3387c40a8bbad5faf85b1feb56429cb20feaa640) + +diff --git a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h +index bedab1abbac7f6c1..74a809561a45edc4 100644 +--- a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h +@@ -180,6 +180,7 @@ + #define __NR_preadv2 286 + #define __NR_prlimit64 261 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 270 + #define __NR_process_vm_writev 271 + #define __NR_pselect6 72 +diff --git a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h +index 91354ed9e29b8d15..6fc0a23504c3b53d 100644 +--- a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h +@@ -328,6 +328,7 @@ + #define __NR_preadv2 520 + #define __NR_prlimit64 496 + #define __NR_process_madvise 550 ++#define __NR_process_mrelease 558 + #define __NR_process_vm_readv 504 + #define __NR_process_vm_writev 505 + #define __NR_pselect6 463 +diff --git a/sysdeps/unix/sysv/linux/arc/arch-syscall.h b/sysdeps/unix/sysv/linux/arc/arch-syscall.h +index ff5c7eb36db89494..0c66762bf868a992 100644 +--- a/sysdeps/unix/sysv/linux/arc/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/arc/arch-syscall.h +@@ -182,6 +182,7 @@ + #define __NR_preadv2 286 + #define __NR_prlimit64 261 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 270 + #define __NR_process_vm_writev 271 + #define __NR_pselect6_time64 413 +diff --git a/sysdeps/unix/sysv/linux/arm/arch-syscall.h b/sysdeps/unix/sysv/linux/arm/arch-syscall.h +index 5772333ceef6ce59..c41a864c6d530eb0 100644 +--- a/sysdeps/unix/sysv/linux/arm/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/arm/arch-syscall.h +@@ -235,6 +235,7 @@ + #define __NR_preadv2 392 + #define __NR_prlimit64 369 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 376 + #define __NR_process_vm_writev 377 + #define __NR_pselect6 335 +diff --git a/sysdeps/unix/sysv/linux/csky/arch-syscall.h b/sysdeps/unix/sysv/linux/csky/arch-syscall.h +index 4af6d6202f6df7ae..863ffa3e0cd34d3e 100644 +--- a/sysdeps/unix/sysv/linux/csky/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/csky/arch-syscall.h +@@ -190,6 +190,7 @@ + #define __NR_preadv2 286 + #define __NR_prlimit64 261 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 270 + #define __NR_process_vm_writev 271 + #define __NR_pselect6 72 +diff --git a/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk b/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk +index dddfd517471e5cc9..85b017918ef20736 100644 +--- a/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk ++++ b/sysdeps/unix/sysv/linux/filter-nr-syscalls.awk +@@ -22,7 +22,7 @@ + } + + # Skip pseudo-system calls which describe ranges. +-/^#define __NR_(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE) / { ++/^#define __NR_(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE|SYSCALL_MASK) / { + next; + } + /^#define __NR_(|64_|[NO]32_)Linux(_syscalls)? / { +diff --git a/sysdeps/unix/sysv/linux/glibcsyscalls.py b/sysdeps/unix/sysv/linux/glibcsyscalls.py +index 621a202ed75cd725..fe7896eebe74cdf4 100644 +--- a/sysdeps/unix/sysv/linux/glibcsyscalls.py ++++ b/sysdeps/unix/sysv/linux/glibcsyscalls.py +@@ -41,7 +41,7 @@ RE_PSEUDO_SYSCALL = re.compile(r"""__NR_( + (unused|reserved)[0-9]+ + + # Pseudo-system call which describes a range. +- |(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE) ++ |(syscalls|arch_specific_syscall|(OABI_)?SYSCALL_BASE|SYSCALL_MASK) + |(|64_|[NO]32_)Linux(_syscalls)? + )""", re.X) + +diff --git a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h +index b07fc8549de34157..6cf27cd17c1ad0c0 100644 +--- a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h +@@ -222,6 +222,7 @@ + #define __NR_preadv2 347 + #define __NR_prlimit64 321 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 330 + #define __NR_process_vm_writev 331 + #define __NR_pselect6 273 +diff --git a/sysdeps/unix/sysv/linux/i386/arch-syscall.h b/sysdeps/unix/sysv/linux/i386/arch-syscall.h +index 6e4264698b5ce480..2512508b7daa8ed2 100644 +--- a/sysdeps/unix/sysv/linux/i386/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/i386/arch-syscall.h +@@ -254,6 +254,7 @@ + #define __NR_preadv2 378 + #define __NR_prlimit64 340 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 347 + #define __NR_process_vm_writev 348 + #define __NR_prof 44 +diff --git a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h +index 1ca706d7216a3902..4a0c737369217367 100644 +--- a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h +@@ -209,6 +209,7 @@ + #define __NR_preadv2 1348 + #define __NR_prlimit64 1325 + #define __NR_process_madvise 1464 ++#define __NR_process_mrelease 1472 + #define __NR_process_vm_readv 1332 + #define __NR_process_vm_writev 1333 + #define __NR_pselect6 1294 +diff --git a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h +index 2f10f71f90d225ff..e310eb5075fb22d8 100644 +--- a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h +@@ -243,6 +243,7 @@ + #define __NR_preadv2 377 + #define __NR_prlimit64 339 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 345 + #define __NR_process_vm_writev 346 + #define __NR_pselect6 301 +diff --git a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h +index 0607a4dfa6adaa23..b4ecad010c2a6abf 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h +@@ -253,6 +253,7 @@ + #define __NR_preadv2 393 + #define __NR_prlimit64 370 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 377 + #define __NR_process_vm_writev 378 + #define __NR_prof 44 +diff --git a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h +index 0055eec0b169ba96..7e3d138ba969c57b 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h +@@ -238,6 +238,7 @@ + #define __NR_preadv2 4361 + #define __NR_prlimit64 4338 + #define __NR_process_madvise 4440 ++#define __NR_process_mrelease 4448 + #define __NR_process_vm_readv 4345 + #define __NR_process_vm_writev 4346 + #define __NR_prof 4044 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h +index 8e8e9f91ccfebfab..7e9e232e5256bc89 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h +@@ -221,6 +221,7 @@ + #define __NR_preadv2 6325 + #define __NR_prlimit64 6302 + #define __NR_process_madvise 6440 ++#define __NR_process_mrelease 6448 + #define __NR_process_vm_readv 6309 + #define __NR_process_vm_writev 6310 + #define __NR_pselect6 6264 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h +index ebd1545f806564bb..f9e7ef72b0aa1749 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h +@@ -209,6 +209,7 @@ + #define __NR_preadv2 5321 + #define __NR_prlimit64 5297 + #define __NR_process_madvise 5440 ++#define __NR_process_mrelease 5448 + #define __NR_process_vm_readv 5304 + #define __NR_process_vm_writev 5305 + #define __NR_pselect6 5260 +diff --git a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h +index 2b530b1f88e4c52a..afd73fc1daca1fb4 100644 +--- a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h +@@ -189,6 +189,7 @@ + #define __NR_preadv2 286 + #define __NR_prlimit64 261 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 270 + #define __NR_process_vm_writev 271 + #define __NR_pselect6 72 +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h +index a32984a9c17315ee..0ac2992028eda27e 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h +@@ -247,6 +247,7 @@ + #define __NR_preadv2 380 + #define __NR_prlimit64 325 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 351 + #define __NR_process_vm_writev 352 + #define __NR_prof 44 +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h +index b01e464fb906d632..c890bc644e14fe06 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h +@@ -231,6 +231,7 @@ + #define __NR_preadv2 380 + #define __NR_prlimit64 325 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 351 + #define __NR_process_vm_writev 352 + #define __NR_prof 44 +diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h +index 24d0a2c455caa630..cd336d755a42598a 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h +@@ -16,6 +16,7 @@ + #define __NR_clock_nanosleep_time64 407 + #define __NR_clock_settime64 404 + #define __NR_clone 220 ++#define __NR_clone3 435 + #define __NR_close 57 + #define __NR_close_range 436 + #define __NR_connect 203 +@@ -171,6 +172,7 @@ + #define __NR_preadv2 286 + #define __NR_prlimit64 261 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 270 + #define __NR_process_vm_writev 271 + #define __NR_pselect6_time64 413 +diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h +index e526c89ae7b285cc..8edd21620bb4ef64 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h +@@ -179,6 +179,7 @@ + #define __NR_preadv2 286 + #define __NR_prlimit64 261 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 270 + #define __NR_process_vm_writev 271 + #define __NR_pselect6 72 +diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h +index d4c7b101b64c010f..1a4873f505765617 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h +@@ -240,6 +240,7 @@ + #define __NR_preadv2 376 + #define __NR_prlimit64 334 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 340 + #define __NR_process_vm_writev 341 + #define __NR_pselect6 301 +diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h +index bd8c78d7059a0f31..2af4607c1d36d173 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h +@@ -211,6 +211,7 @@ + #define __NR_preadv2 376 + #define __NR_prlimit64 334 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 340 + #define __NR_process_vm_writev 341 + #define __NR_pselect6 301 +diff --git a/sysdeps/unix/sysv/linux/sh/arch-syscall.h b/sysdeps/unix/sysv/linux/sh/arch-syscall.h +index 3b6ac3d084d74638..7b422ce268ba14d0 100644 +--- a/sysdeps/unix/sysv/linux/sh/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sh/arch-syscall.h +@@ -237,6 +237,7 @@ + #define __NR_preadv2 381 + #define __NR_prlimit64 339 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 365 + #define __NR_process_vm_writev 366 + #define __NR_pselect6 308 +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h +index 35221a707e4d4a7c..77c3cc64f95ea7f3 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h +@@ -242,6 +242,7 @@ + #define __NR_preadv2 358 + #define __NR_prlimit64 331 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 338 + #define __NR_process_vm_writev 339 + #define __NR_pselect6 297 +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h +index 5ba2b2050924df1c..7ad50bc4ad6cef04 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h +@@ -222,6 +222,7 @@ + #define __NR_preadv2 358 + #define __NR_prlimit64 331 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 338 + #define __NR_process_vm_writev 339 + #define __NR_pselect6 297 +diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list +index fd98893b0e44a606..1a74d090b72f4d61 100644 +--- a/sysdeps/unix/sysv/linux/syscall-names.list ++++ b/sysdeps/unix/sysv/linux/syscall-names.list +@@ -21,8 +21,8 @@ + # This file can list all potential system calls. The names are only + # used if the installed kernel headers also provide them. + +-# The list of system calls is current as of Linux 5.14. +-kernel 5.14 ++# The list of system calls is current as of Linux 5.15. ++kernel 5.15 + + FAST_atomic_update + FAST_cmpxchg +@@ -440,6 +440,7 @@ preadv + preadv2 + prlimit64 + process_madvise ++process_mrelease + process_vm_readv + process_vm_writev + prof +diff --git a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h +index 26d6ac68a651ec98..3ce2a1fcfc1c15f2 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h +@@ -215,6 +215,7 @@ + #define __NR_preadv2 327 + #define __NR_prlimit64 302 + #define __NR_process_madvise 440 ++#define __NR_process_mrelease 448 + #define __NR_process_vm_readv 310 + #define __NR_process_vm_writev 311 + #define __NR_pselect6 270 +diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h +index 36847783f6b91d5e..9e87e89baccc397c 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h +@@ -208,6 +208,7 @@ + #define __NR_preadv2 1073742370 + #define __NR_prlimit64 1073742126 + #define __NR_process_madvise 1073742264 ++#define __NR_process_mrelease 1073742272 + #define __NR_process_vm_readv 1073742363 + #define __NR_process_vm_writev 1073742364 + #define __NR_pselect6 1073742094 diff --git a/SOURCES/glibc-upstream-2.34-73.patch b/SOURCES/glibc-upstream-2.34-73.patch new file mode 100644 index 0000000..5081674 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-73.patch @@ -0,0 +1,442 @@ +commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5 +Author: Florian Weimer +Date: Thu Jan 13 14:59:29 2022 +0100 + + i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771) + + The configure check for CAN_USE_REGISTER_ASM_EBP tried to compile a + simple function that uses %ebp as an inline assembly operand. If + compilation failed, CAN_USE_REGISTER_ASM_EBP was set 0, which + eventually had these consequences: + + (1) %ebx was avoided as an inline assembly operand, with an + assembler macro hack to avoid unnecessary register moves. + (2) %ebp was avoided as an inline assembly operand, using an + out-of-line syscall function for 6-argument system calls. + + (1) is no longer needed for any GCC version that is supported for + building glibc. %ebx can be used directly as a register operand. + Therefore, this commit removes the %ebx avoidance completely. This + avoids the assembler macro hack, which turns out to be incompatible + with the current Systemtap probe macros (which switch to .altmacro + unconditionally). + + (2) is still needed in many build configurations. The existing + configure check cannot really capture that because the simple function + succeeds to compile, while the full glibc build still fails. + Therefore, this commit removes the check, the CAN_USE_REGISTER_ASM_EBP + macro, and uses the out-of-line syscall function for 6-argument system + calls unconditionally. + + Reviewed-by: H.J. Lu + (cherry picked from commit a78e6a10d0b50d0ca80309775980fc99944b1727) + +diff --git a/config.h.in b/config.h.in +index 458342887e4e9380..790038fec60eb049 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -286,10 +286,6 @@ + /* Define if static PIE is enabled. */ + #define ENABLE_STATIC_PIE 0 + +-/* Some compiler options may now allow to use ebp in __asm__ (used mainly +- in i386 6 argument syscall issue). */ +-#define CAN_USE_REGISTER_ASM_EBP 0 +- + /* The default value of x86 CET control. */ + #define DEFAULT_DL_X86_CET_CONTROL cet_elf_property + +diff --git a/sysdeps/unix/sysv/linux/i386/configure b/sysdeps/unix/sysv/linux/i386/configure +index 0327590486c80777..f119e62fc31903b3 100644 +--- a/sysdeps/unix/sysv/linux/i386/configure ++++ b/sysdeps/unix/sysv/linux/i386/configure +@@ -1,44 +1,5 @@ + # This file is generated from configure.ac by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/i386. + +-# Check if CFLAGS allows compiler to use ebp register in inline assembly. +- +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler flags allows ebp in inline assembly" >&5 +-$as_echo_n "checking if compiler flags allows ebp in inline assembly... " >&6; } +-if ${libc_cv_can_use_register_asm_ebp+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +- void foo (int i) +- { +- register int reg asm ("ebp") = i; +- asm ("# %0" : : "r" (reg)); +- } +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO"; then : +- libc_cv_can_use_register_asm_ebp=yes +-else +- libc_cv_can_use_register_asm_ebp=no +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_can_use_register_asm_ebp" >&5 +-$as_echo "$libc_cv_can_use_register_asm_ebp" >&6; } +-if test $libc_cv_can_use_register_asm_ebp = yes; then +- $as_echo "#define CAN_USE_REGISTER_ASM_EBP 1" >>confdefs.h +- +-fi +- + libc_cv_gcc_unwind_find_fde=yes + ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed +diff --git a/sysdeps/unix/sysv/linux/i386/configure.ac b/sysdeps/unix/sysv/linux/i386/configure.ac +index 9e980784bb826463..64ab2cc2c8f9deec 100644 +--- a/sysdeps/unix/sysv/linux/i386/configure.ac ++++ b/sysdeps/unix/sysv/linux/i386/configure.ac +@@ -1,22 +1,5 @@ + GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. + # Local configure fragment for sysdeps/unix/sysv/linux/i386. + +-# Check if CFLAGS allows compiler to use ebp register in inline assembly. +-AC_CACHE_CHECK([if compiler flags allows ebp in inline assembly], +- libc_cv_can_use_register_asm_ebp, [ +-AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM([ +- void foo (int i) +- { +- register int reg asm ("ebp") = i; +- asm ("# %0" : : "r" (reg)); +- }])], +- [libc_cv_can_use_register_asm_ebp=yes], +- [libc_cv_can_use_register_asm_ebp=no]) +-]) +-if test $libc_cv_can_use_register_asm_ebp = yes; then +- AC_DEFINE(CAN_USE_REGISTER_ASM_EBP) +-fi +- + libc_cv_gcc_unwind_find_fde=yes + ldd_rewrite_script=sysdeps/unix/sysv/linux/ldd-rewrite.sed +diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h +index 8a9911b7acd9e692..39d6a3c13427abb5 100644 +--- a/sysdeps/unix/sysv/linux/i386/sysdep.h ++++ b/sysdeps/unix/sysv/linux/i386/sysdep.h +@@ -43,15 +43,6 @@ + # endif + #endif + +-/* Since GCC 5 and above can properly spill %ebx with PIC when needed, +- we can inline syscalls with 6 arguments if GCC 5 or above is used +- to compile glibc. Disable GCC 5 optimization when compiling for +- profiling or when -fno-omit-frame-pointer is used since asm ("ebp") +- can't be used to put the 6th argument in %ebp for syscall. */ +-#if !defined PROF && CAN_USE_REGISTER_ASM_EBP +-# define OPTIMIZE_FOR_GCC_5 +-#endif +- + #ifdef __ASSEMBLER__ + + /* Linux uses a negative return value to indicate syscall errors, +@@ -239,36 +230,6 @@ + extern int __syscall_error (int) + attribute_hidden __attribute__ ((__regparm__ (1))); + +-#ifndef OPTIMIZE_FOR_GCC_5 +-/* We need some help from the assembler to generate optimal code. We +- define some macros here which later will be used. */ +-asm (".L__X'%ebx = 1\n\t" +- ".L__X'%ecx = 2\n\t" +- ".L__X'%edx = 2\n\t" +- ".L__X'%eax = 3\n\t" +- ".L__X'%esi = 3\n\t" +- ".L__X'%edi = 3\n\t" +- ".L__X'%ebp = 3\n\t" +- ".L__X'%esp = 3\n\t" +- ".macro bpushl name reg\n\t" +- ".if 1 - \\name\n\t" +- ".if 2 - \\name\n\t" +- "error\n\t" +- ".else\n\t" +- "xchgl \\reg, %ebx\n\t" +- ".endif\n\t" +- ".endif\n\t" +- ".endm\n\t" +- ".macro bpopl name reg\n\t" +- ".if 1 - \\name\n\t" +- ".if 2 - \\name\n\t" +- "error\n\t" +- ".else\n\t" +- "xchgl \\reg, %ebx\n\t" +- ".endif\n\t" +- ".endif\n\t" +- ".endm\n\t"); +- + /* Six-argument syscalls use an out-of-line helper, because an inline + asm using all registers apart from %esp cannot work reliably and + the assembler does not support describing an asm that saves and +@@ -279,7 +240,6 @@ struct libc_do_syscall_args + { + int ebx, edi, ebp; + }; +-#endif + + # define VDSO_NAME "LINUX_2.6" + # define VDSO_HASH 61765110 +@@ -332,14 +292,8 @@ struct libc_do_syscall_args + + /* Each object using 6-argument inline syscalls must include a + definition of __libc_do_syscall. */ +-#ifdef OPTIMIZE_FOR_GCC_5 +-# define INTERNAL_SYSCALL_MAIN_6(name, args...) \ +- INTERNAL_SYSCALL_MAIN_INLINE(name, 6, args) +-# define INTERNAL_SYSCALL_MAIN_NCS_6(name, args...) \ +- INTERNAL_SYSCALL_MAIN_NCS(name, 6, args) +-#else /* GCC 5 */ +-# define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3, \ +- arg4, arg5, arg6) \ ++#define INTERNAL_SYSCALL_MAIN_6(name, arg1, arg2, arg3, \ ++ arg4, arg5, arg6) \ + struct libc_do_syscall_args _xv = \ + { \ + (int) (arg1), \ +@@ -352,8 +306,8 @@ struct libc_do_syscall_args + : "=a" (resultvar) \ + : "i" (__NR_##name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \ + : "memory", "cc") +-# define INTERNAL_SYSCALL_MAIN_NCS_6(name, arg1, arg2, arg3, \ +- arg4, arg5, arg6) \ ++#define INTERNAL_SYSCALL_MAIN_NCS_6(name, arg1, arg2, arg3, \ ++ arg4, arg5, arg6) \ + struct libc_do_syscall_args _xv = \ + { \ + (int) (arg1), \ +@@ -366,7 +320,6 @@ struct libc_do_syscall_args + : "=a" (resultvar) \ + : "a" (name), "c" (arg2), "d" (arg3), "S" (arg4), "D" (&_xv) \ + : "memory", "cc") +-#endif /* GCC 5 */ + + #define INTERNAL_SYSCALL(name, nr, args...) \ + ({ \ +@@ -380,193 +333,72 @@ struct libc_do_syscall_args + (int) resultvar; }) + + #if I386_USE_SYSENTER +-# ifdef OPTIMIZE_FOR_GCC_5 +-# ifdef PIC +-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ ++# ifdef PIC ++# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ + LOADREGS_##nr(args) \ + asm volatile ( \ + "call *%%gs:%P2" \ + : "=a" (resultvar) \ + : "a" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \ + ASMARGS_##nr(args) : "memory", "cc") +-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ ++# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ + LOADREGS_##nr(args) \ + asm volatile ( \ + "call *%%gs:%P2" \ + : "=a" (resultvar) \ + : "a" (name), "i" (offsetof (tcbhead_t, sysinfo)) \ + ASMARGS_##nr(args) : "memory", "cc") +-# else +-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ ++# else /* I386_USE_SYSENTER && !PIC */ ++# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ + LOADREGS_##nr(args) \ + asm volatile ( \ + "call *_dl_sysinfo" \ + : "=a" (resultvar) \ + : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") +-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ ++# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ + LOADREGS_##nr(args) \ + asm volatile ( \ + "call *_dl_sysinfo" \ + : "=a" (resultvar) \ + : "a" (name) ASMARGS_##nr(args) : "memory", "cc") +-# endif +-# else /* GCC 5 */ +-# ifdef PIC +-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ +- EXTRAVAR_##nr \ +- asm volatile ( \ +- LOADARGS_##nr \ +- "movl %1, %%eax\n\t" \ +- "call *%%gs:%P2\n\t" \ +- RESTOREARGS_##nr \ +- : "=a" (resultvar) \ +- : "i" (__NR_##name), "i" (offsetof (tcbhead_t, sysinfo)) \ +- ASMFMT_##nr(args) : "memory", "cc") +-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ +- EXTRAVAR_##nr \ +- asm volatile ( \ +- LOADARGS_##nr \ +- "call *%%gs:%P2\n\t" \ +- RESTOREARGS_##nr \ +- : "=a" (resultvar) \ +- : "0" (name), "i" (offsetof (tcbhead_t, sysinfo)) \ +- ASMFMT_##nr(args) : "memory", "cc") +-# else +-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ +- EXTRAVAR_##nr \ +- asm volatile ( \ +- LOADARGS_##nr \ +- "movl %1, %%eax\n\t" \ +- "call *_dl_sysinfo\n\t" \ +- RESTOREARGS_##nr \ +- : "=a" (resultvar) \ +- : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc") +-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ +- EXTRAVAR_##nr \ +- asm volatile ( \ +- LOADARGS_##nr \ +- "call *_dl_sysinfo\n\t" \ +- RESTOREARGS_##nr \ +- : "=a" (resultvar) \ +- : "0" (name) ASMFMT_##nr(args) : "memory", "cc") +-# endif +-# endif /* GCC 5 */ +-#else +-# ifdef OPTIMIZE_FOR_GCC_5 +-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ ++# endif /* I386_USE_SYSENTER && !PIC */ ++#else /* !I386_USE_SYSENTER */ ++# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ + LOADREGS_##nr(args) \ + asm volatile ( \ + "int $0x80" \ + : "=a" (resultvar) \ + : "a" (__NR_##name) ASMARGS_##nr(args) : "memory", "cc") +-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ ++# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ + LOADREGS_##nr(args) \ + asm volatile ( \ + "int $0x80" \ + : "=a" (resultvar) \ + : "a" (name) ASMARGS_##nr(args) : "memory", "cc") +-# else /* GCC 5 */ +-# define INTERNAL_SYSCALL_MAIN_INLINE(name, nr, args...) \ +- EXTRAVAR_##nr \ +- asm volatile ( \ +- LOADARGS_##nr \ +- "movl %1, %%eax\n\t" \ +- "int $0x80\n\t" \ +- RESTOREARGS_##nr \ +- : "=a" (resultvar) \ +- : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc") +-# define INTERNAL_SYSCALL_MAIN_NCS(name, nr, args...) \ +- EXTRAVAR_##nr \ +- asm volatile ( \ +- LOADARGS_##nr \ +- "int $0x80\n\t" \ +- RESTOREARGS_##nr \ +- : "=a" (resultvar) \ +- : "0" (name) ASMFMT_##nr(args) : "memory", "cc") +-# endif /* GCC 5 */ +-#endif +- +-#define LOADARGS_0 +-#ifdef __PIC__ +-# if I386_USE_SYSENTER && defined PIC +-# define LOADARGS_1 \ +- "bpushl .L__X'%k3, %k3\n\t" +-# define LOADARGS_5 \ +- "movl %%ebx, %4\n\t" \ +- "movl %3, %%ebx\n\t" +-# else +-# define LOADARGS_1 \ +- "bpushl .L__X'%k2, %k2\n\t" +-# define LOADARGS_5 \ +- "movl %%ebx, %3\n\t" \ +- "movl %2, %%ebx\n\t" +-# endif +-# define LOADARGS_2 LOADARGS_1 +-# define LOADARGS_3 \ +- "xchgl %%ebx, %%edi\n\t" +-# define LOADARGS_4 LOADARGS_3 +-#else +-# define LOADARGS_1 +-# define LOADARGS_2 +-# define LOADARGS_3 +-# define LOADARGS_4 +-# define LOADARGS_5 +-#endif +- +-#define RESTOREARGS_0 +-#ifdef __PIC__ +-# if I386_USE_SYSENTER && defined PIC +-# define RESTOREARGS_1 \ +- "bpopl .L__X'%k3, %k3\n\t" +-# define RESTOREARGS_5 \ +- "movl %4, %%ebx" +-# else +-# define RESTOREARGS_1 \ +- "bpopl .L__X'%k2, %k2\n\t" +-# define RESTOREARGS_5 \ +- "movl %3, %%ebx" +-# endif +-# define RESTOREARGS_2 RESTOREARGS_1 +-# define RESTOREARGS_3 \ +- "xchgl %%edi, %%ebx\n\t" +-# define RESTOREARGS_4 RESTOREARGS_3 +-#else +-# define RESTOREARGS_1 +-# define RESTOREARGS_2 +-# define RESTOREARGS_3 +-# define RESTOREARGS_4 +-# define RESTOREARGS_5 +-#endif ++#endif /* !I386_USE_SYSENTER */ + +-#ifdef OPTIMIZE_FOR_GCC_5 +-# define LOADREGS_0() +-# define ASMARGS_0() +-# define LOADREGS_1(arg1) \ ++#define LOADREGS_0() ++#define ASMARGS_0() ++#define LOADREGS_1(arg1) \ + LOADREGS_0 () +-# define ASMARGS_1(arg1) \ ++#define ASMARGS_1(arg1) \ + ASMARGS_0 (), "b" ((unsigned int) (arg1)) +-# define LOADREGS_2(arg1, arg2) \ ++#define LOADREGS_2(arg1, arg2) \ + LOADREGS_1 (arg1) +-# define ASMARGS_2(arg1, arg2) \ ++#define ASMARGS_2(arg1, arg2) \ + ASMARGS_1 (arg1), "c" ((unsigned int) (arg2)) +-# define LOADREGS_3(arg1, arg2, arg3) \ ++#define LOADREGS_3(arg1, arg2, arg3) \ + LOADREGS_2 (arg1, arg2) +-# define ASMARGS_3(arg1, arg2, arg3) \ ++#define ASMARGS_3(arg1, arg2, arg3) \ + ASMARGS_2 (arg1, arg2), "d" ((unsigned int) (arg3)) +-# define LOADREGS_4(arg1, arg2, arg3, arg4) \ ++#define LOADREGS_4(arg1, arg2, arg3, arg4) \ + LOADREGS_3 (arg1, arg2, arg3) +-# define ASMARGS_4(arg1, arg2, arg3, arg4) \ ++#define ASMARGS_4(arg1, arg2, arg3, arg4) \ + ASMARGS_3 (arg1, arg2, arg3), "S" ((unsigned int) (arg4)) +-# define LOADREGS_5(arg1, arg2, arg3, arg4, arg5) \ ++#define LOADREGS_5(arg1, arg2, arg3, arg4, arg5) \ + LOADREGS_4 (arg1, arg2, arg3, arg4) +-# define ASMARGS_5(arg1, arg2, arg3, arg4, arg5) \ ++#define ASMARGS_5(arg1, arg2, arg3, arg4, arg5) \ + ASMARGS_4 (arg1, arg2, arg3, arg4), "D" ((unsigned int) (arg5)) +-# define LOADREGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \ +- register unsigned int _a6 asm ("ebp") = (unsigned int) (arg6); \ +- LOADREGS_5 (arg1, arg2, arg3, arg4, arg5) +-# define ASMARGS_6(arg1, arg2, arg3, arg4, arg5, arg6) \ +- ASMARGS_5 (arg1, arg2, arg3, arg4, arg5), "r" (_a6) +-#endif /* GCC 5 */ + + #define ASMFMT_0() + #ifdef __PIC__ diff --git a/SOURCES/glibc-upstream-2.34-74.patch b/SOURCES/glibc-upstream-2.34-74.patch new file mode 100644 index 0000000..15d3b62 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-74.patch @@ -0,0 +1,337 @@ +commit 705f1e4606aa78f4e861b4e3346725bf5f083a56 +Author: Joseph Myers +Date: Thu Jan 13 22:18:13 2022 +0000 + + Update syscall lists for Linux 5.16 + + Linux 5.16 has one new syscall, futex_waitv. Update + syscall-names.list and regenerate the arch-syscall.h headers with + build-many-glibcs.py update-syscalls. + + Tested with build-many-glibcs.py. + + (cherry picked from commit 4997a533ae4b51ef66a6b68862b7578a7acb82df) + +diff --git a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h +index 74a809561a45edc4..9905ebedf298954c 100644 +--- a/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h +@@ -62,6 +62,7 @@ + #define __NR_fsync 82 + #define __NR_ftruncate 46 + #define __NR_futex 98 ++#define __NR_futex_waitv 449 + #define __NR_get_mempolicy 236 + #define __NR_get_robust_list 100 + #define __NR_getcpu 168 +diff --git a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h +index 6fc0a23504c3b53d..ee8085be69958b25 100644 +--- a/sysdeps/unix/sysv/linux/alpha/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/alpha/arch-syscall.h +@@ -78,6 +78,7 @@ + #define __NR_fsync 95 + #define __NR_ftruncate 130 + #define __NR_futex 394 ++#define __NR_futex_waitv 559 + #define __NR_futimesat 454 + #define __NR_get_kernel_syms 309 + #define __NR_get_mempolicy 430 +diff --git a/sysdeps/unix/sysv/linux/arc/arch-syscall.h b/sysdeps/unix/sysv/linux/arc/arch-syscall.h +index 0c66762bf868a992..1b626d97705d545a 100644 +--- a/sysdeps/unix/sysv/linux/arc/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/arc/arch-syscall.h +@@ -65,6 +65,7 @@ + #define __NR_fsync 82 + #define __NR_ftruncate64 46 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_get_mempolicy 236 + #define __NR_get_robust_list 100 + #define __NR_getcpu 168 +diff --git a/sysdeps/unix/sysv/linux/arm/arch-syscall.h b/sysdeps/unix/sysv/linux/arm/arch-syscall.h +index c41a864c6d530eb0..96ef8db9368e7de4 100644 +--- a/sysdeps/unix/sysv/linux/arm/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/arm/arch-syscall.h +@@ -90,6 +90,7 @@ + #define __NR_ftruncate64 194 + #define __NR_futex 240 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 326 + #define __NR_get_mempolicy 320 + #define __NR_get_robust_list 339 +diff --git a/sysdeps/unix/sysv/linux/csky/arch-syscall.h b/sysdeps/unix/sysv/linux/csky/arch-syscall.h +index 863ffa3e0cd34d3e..96910154ed6a5c1b 100644 +--- a/sysdeps/unix/sysv/linux/csky/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/csky/arch-syscall.h +@@ -70,6 +70,7 @@ + #define __NR_ftruncate64 46 + #define __NR_futex 98 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_get_mempolicy 236 + #define __NR_get_robust_list 100 + #define __NR_getcpu 168 +diff --git a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h +index 6cf27cd17c1ad0c0..36675fd48e6f50c5 100644 +--- a/sysdeps/unix/sysv/linux/hppa/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/hppa/arch-syscall.h +@@ -87,6 +87,7 @@ + #define __NR_ftruncate64 200 + #define __NR_futex 210 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 279 + #define __NR_get_mempolicy 261 + #define __NR_get_robust_list 290 +diff --git a/sysdeps/unix/sysv/linux/i386/arch-syscall.h b/sysdeps/unix/sysv/linux/i386/arch-syscall.h +index 2512508b7daa8ed2..c86ccbda4681066c 100644 +--- a/sysdeps/unix/sysv/linux/i386/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/i386/arch-syscall.h +@@ -94,6 +94,7 @@ + #define __NR_ftruncate64 194 + #define __NR_futex 240 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 299 + #define __NR_get_kernel_syms 130 + #define __NR_get_mempolicy 275 +diff --git a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h +index 4a0c737369217367..d898bce404955ef0 100644 +--- a/sysdeps/unix/sysv/linux/ia64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/ia64/arch-syscall.h +@@ -74,6 +74,7 @@ + #define __NR_fsync 1051 + #define __NR_ftruncate 1098 + #define __NR_futex 1230 ++#define __NR_futex_waitv 1473 + #define __NR_futimesat 1285 + #define __NR_get_mempolicy 1260 + #define __NR_get_robust_list 1299 +diff --git a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h +index e310eb5075fb22d8..fe721b809076abeb 100644 +--- a/sysdeps/unix/sysv/linux/m68k/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/m68k/arch-syscall.h +@@ -93,6 +93,7 @@ + #define __NR_ftruncate64 194 + #define __NR_futex 235 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 292 + #define __NR_get_kernel_syms 130 + #define __NR_get_mempolicy 269 +diff --git a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h +index b4ecad010c2a6abf..6e10c3661db96a1e 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/microblaze/arch-syscall.h +@@ -94,6 +94,7 @@ + #define __NR_ftruncate64 194 + #define __NR_futex 240 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 299 + #define __NR_get_kernel_syms 130 + #define __NR_get_mempolicy 275 +diff --git a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h +index 7e3d138ba969c57b..26a6d594a2222f15 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips32/arch-syscall.h +@@ -93,6 +93,7 @@ + #define __NR_ftruncate64 4212 + #define __NR_futex 4238 + #define __NR_futex_time64 4422 ++#define __NR_futex_waitv 4449 + #define __NR_futimesat 4292 + #define __NR_get_kernel_syms 4130 + #define __NR_get_mempolicy 4269 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h +index 7e9e232e5256bc89..83e0d49c5e3ca1bc 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/arch-syscall.h +@@ -86,6 +86,7 @@ + #define __NR_ftruncate 6075 + #define __NR_futex 6194 + #define __NR_futex_time64 6422 ++#define __NR_futex_waitv 6449 + #define __NR_futimesat 6255 + #define __NR_get_kernel_syms 6170 + #define __NR_get_mempolicy 6232 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h +index f9e7ef72b0aa1749..d6747c542f63202b 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/arch-syscall.h +@@ -78,6 +78,7 @@ + #define __NR_fsync 5072 + #define __NR_ftruncate 5075 + #define __NR_futex 5194 ++#define __NR_futex_waitv 5449 + #define __NR_futimesat 5251 + #define __NR_get_kernel_syms 5170 + #define __NR_get_mempolicy 5228 +diff --git a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h +index afd73fc1daca1fb4..4ee209bc4475ea7d 100644 +--- a/sysdeps/unix/sysv/linux/nios2/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/nios2/arch-syscall.h +@@ -69,6 +69,7 @@ + #define __NR_ftruncate64 46 + #define __NR_futex 98 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_get_mempolicy 236 + #define __NR_get_robust_list 100 + #define __NR_getcpu 168 +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h +index 0ac2992028eda27e..497299fbc47a708c 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/arch-syscall.h +@@ -92,6 +92,7 @@ + #define __NR_ftruncate64 194 + #define __NR_futex 221 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 290 + #define __NR_get_kernel_syms 130 + #define __NR_get_mempolicy 260 +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h +index c890bc644e14fe06..e840279f171b10b9 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/arch-syscall.h +@@ -81,6 +81,7 @@ + #define __NR_ftime 35 + #define __NR_ftruncate 93 + #define __NR_futex 221 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 290 + #define __NR_get_kernel_syms 130 + #define __NR_get_mempolicy 260 +diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h +index cd336d755a42598a..73ef74c005e5a2bb 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h +@@ -60,6 +60,7 @@ + #define __NR_fsync 82 + #define __NR_ftruncate64 46 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_get_mempolicy 236 + #define __NR_get_robust_list 100 + #define __NR_getcpu 168 +diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h +index 8edd21620bb4ef64..919a79ee91177459 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h +@@ -62,6 +62,7 @@ + #define __NR_fsync 82 + #define __NR_ftruncate 46 + #define __NR_futex 98 ++#define __NR_futex_waitv 449 + #define __NR_get_mempolicy 236 + #define __NR_get_robust_list 100 + #define __NR_getcpu 168 +diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h +index 1a4873f505765617..005c0ada7aab85a1 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/s390/s390-32/arch-syscall.h +@@ -91,6 +91,7 @@ + #define __NR_ftruncate64 194 + #define __NR_futex 238 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 292 + #define __NR_get_kernel_syms 130 + #define __NR_get_mempolicy 269 +diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h +index 2af4607c1d36d173..9131fddcc16116e4 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/s390/s390-64/arch-syscall.h +@@ -76,6 +76,7 @@ + #define __NR_fsync 118 + #define __NR_ftruncate 93 + #define __NR_futex 238 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 292 + #define __NR_get_kernel_syms 130 + #define __NR_get_mempolicy 269 +diff --git a/sysdeps/unix/sysv/linux/sh/arch-syscall.h b/sysdeps/unix/sysv/linux/sh/arch-syscall.h +index 7b422ce268ba14d0..d8fb041568ecb4da 100644 +--- a/sysdeps/unix/sysv/linux/sh/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sh/arch-syscall.h +@@ -90,6 +90,7 @@ + #define __NR_ftruncate64 194 + #define __NR_futex 240 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 299 + #define __NR_get_mempolicy 275 + #define __NR_get_robust_list 312 +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h +index 77c3cc64f95ea7f3..2bc014fe6a1a1f4a 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/arch-syscall.h +@@ -92,6 +92,7 @@ + #define __NR_ftruncate64 84 + #define __NR_futex 142 + #define __NR_futex_time64 422 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 288 + #define __NR_get_kernel_syms 223 + #define __NR_get_mempolicy 304 +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h +index 7ad50bc4ad6cef04..76dbbe595ffe868f 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/arch-syscall.h +@@ -82,6 +82,7 @@ + #define __NR_fsync 95 + #define __NR_ftruncate 130 + #define __NR_futex 142 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 288 + #define __NR_get_kernel_syms 223 + #define __NR_get_mempolicy 304 +diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list +index 1a74d090b72f4d61..0bc2af37dfa1eeb5 100644 +--- a/sysdeps/unix/sysv/linux/syscall-names.list ++++ b/sysdeps/unix/sysv/linux/syscall-names.list +@@ -21,8 +21,8 @@ + # This file can list all potential system calls. The names are only + # used if the installed kernel headers also provide them. + +-# The list of system calls is current as of Linux 5.15. +-kernel 5.15 ++# The list of system calls is current as of Linux 5.16. ++kernel 5.16 + + FAST_atomic_update + FAST_cmpxchg +@@ -146,6 +146,7 @@ ftruncate + ftruncate64 + futex + futex_time64 ++futex_waitv + futimesat + get_kernel_syms + get_mempolicy +diff --git a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h +index 3ce2a1fcfc1c15f2..28558279b48a1ef4 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h +@@ -78,6 +78,7 @@ + #define __NR_fsync 74 + #define __NR_ftruncate 77 + #define __NR_futex 202 ++#define __NR_futex_waitv 449 + #define __NR_futimesat 261 + #define __NR_get_kernel_syms 177 + #define __NR_get_mempolicy 239 +diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h +index 9e87e89baccc397c..c1ab8ec45e8b8fd3 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h ++++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch-syscall.h +@@ -74,6 +74,7 @@ + #define __NR_fsync 1073741898 + #define __NR_ftruncate 1073741901 + #define __NR_futex 1073742026 ++#define __NR_futex_waitv 1073742273 + #define __NR_futimesat 1073742085 + #define __NR_get_mempolicy 1073742063 + #define __NR_get_robust_list 1073742355 diff --git a/SOURCES/glibc-upstream-2.34-75.patch b/SOURCES/glibc-upstream-2.34-75.patch new file mode 100644 index 0000000..7fada18 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-75.patch @@ -0,0 +1,53 @@ +commit 03e6e02e6a216cfb913f49b3be80d5088603864f +Author: H.J. Lu +Date: Sun Jan 9 09:06:15 2022 -0800 + + Disable debuginfod in printer tests [BZ #28757] + + With gdb-11.1-6.fc35.x86_64, I got + + FAIL: nptl/test-cond-printers + FAIL: nptl/test-condattr-printers + FAIL: nptl/test-mutex-printers + FAIL: nptl/test-mutexattr-printers + FAIL: nptl/test-rwlock-printers + FAIL: nptl/test-rwlockattr-printers + + $ cat nptl/test-condattr-printers.out + Error: Response does not match the expected pattern. + Command: start + Expected pattern: main + Response: Temporary breakpoint 1 at 0x11d5: file test-condattr-printers.c, line 43. + Starting program: /export/build/gnu/tools-build/glibc-cet-gitlab/build-x86_64-linux/nptl/test-condattr-printers + + This GDB supports auto-downloading debuginfo from the following URLs: + https://debuginfod.fedoraproject.org/ + Enable debuginfod for this session? (y or [n]) + + Disable debuginfod to avoid GDB messages. This fixes BZ #28757. + + Reviewed-by: Florian Weimer + (cherry picked from commit 7de501f9418bf099e7104b63b0e4423257981b14) + +diff --git a/scripts/test_printers_common.py b/scripts/test_printers_common.py +index 34a3df6e6bd8b363..53b6d30d40ce2622 100644 +--- a/scripts/test_printers_common.py ++++ b/scripts/test_printers_common.py +@@ -161,6 +161,17 @@ def init_test(test_bin, printer_files, printer_names): + printer files. + """ + ++ # Disable debuginfod to avoid GDB messages like: ++ # ++ # This GDB supports auto-downloading debuginfo from the following URLs: ++ # https://debuginfod.fedoraproject.org/ ++ # Enable debuginfod for this session? (y or [n]) ++ # ++ try: ++ test('set debuginfod enabled off') ++ except Exception: ++ pass ++ + # Load all the pretty printer files. We're assuming these are safe. + for printer_file in printer_files: + test('source {0}'.format(printer_file)) diff --git a/SOURCES/glibc-upstream-2.34-76.patch b/SOURCES/glibc-upstream-2.34-76.patch new file mode 100644 index 0000000..3d669c3 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-76.patch @@ -0,0 +1,165 @@ +commit 5575daae5099e779bb860b566b4d608418a5b832 +Author: Florian Weimer +Date: Mon Jan 17 10:21:34 2022 +0100 + + socket: Add the __sockaddr_un_set function + + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit e368b12f6c16b6888dda99ba641e999b9c9643c8) + +diff --git a/include/sys/un.h b/include/sys/un.h +index bdbee999806930f4..152afd9fc7426d8b 100644 +--- a/include/sys/un.h ++++ b/include/sys/un.h +@@ -1 +1,13 @@ + #include ++ ++#ifndef _ISOMAC ++ ++/* Set ADDR->sun_family to AF_UNIX and ADDR->sun_path to PATHNAME. ++ Return 0 on success or -1 on failure (due to overlong PATHNAME). ++ The caller should always use sizeof (struct sockaddr_un) as the ++ socket address length, disregaring the length of PATHNAME. ++ Only concrete (non-abstract) pathnames are supported. */ ++int __sockaddr_un_set (struct sockaddr_un *addr, const char *pathname) ++ attribute_hidden; ++ ++#endif /* _ISOMAC */ +diff --git a/socket/Makefile b/socket/Makefile +index 375957601024c12e..c2de11d73ca1e324 100644 +--- a/socket/Makefile ++++ b/socket/Makefile +@@ -29,13 +29,17 @@ headers := sys/socket.h sys/un.h bits/sockaddr.h bits/socket.h \ + routines := accept bind connect getpeername getsockname getsockopt \ + listen recv recvfrom recvmsg send sendmsg sendto \ + setsockopt shutdown socket socketpair isfdtype opensock \ +- sockatmark accept4 recvmmsg sendmmsg ++ sockatmark accept4 recvmmsg sendmmsg sockaddr_un_set + + tests := \ + tst-accept4 \ + tst-sockopt \ + # tests + ++tests-internal := \ ++ tst-sockaddr_un_set \ ++ # tests-internal ++ + tests-time64 := \ + tst-sockopt-time64 \ + # tests +diff --git a/socket/sockaddr_un_set.c b/socket/sockaddr_un_set.c +new file mode 100644 +index 0000000000000000..0bd40dc34e3d7efc +--- /dev/null ++++ b/socket/sockaddr_un_set.c +@@ -0,0 +1,41 @@ ++/* Set the sun_path member of struct sockaddr_un. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++ ++int ++__sockaddr_un_set (struct sockaddr_un *addr, const char *pathname) ++{ ++ size_t name_length = strlen (pathname); ++ ++ /* The kernel supports names of exactly sizeof (addr->sun_path) ++ bytes, without a null terminator, but userspace does not; see the ++ SUN_LEN macro. */ ++ if (name_length >= sizeof (addr->sun_path)) ++ { ++ __set_errno (EINVAL); /* Error code used by the kernel. */ ++ return -1; ++ } ++ ++ addr->sun_family = AF_UNIX; ++ memcpy (addr->sun_path, pathname, name_length + 1); ++ return 0; ++} +diff --git a/socket/tst-sockaddr_un_set.c b/socket/tst-sockaddr_un_set.c +new file mode 100644 +index 0000000000000000..29c2a81afda81b5e +--- /dev/null ++++ b/socket/tst-sockaddr_un_set.c +@@ -0,0 +1,62 @@ ++/* Test the __sockaddr_un_set function. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* Re-compile the function because the version in libc is not ++ exported. */ ++#include "sockaddr_un_set.c" ++ ++#include ++ ++static int ++do_test (void) ++{ ++ struct sockaddr_un sun; ++ ++ memset (&sun, 0xcc, sizeof (sun)); ++ __sockaddr_un_set (&sun, ""); ++ TEST_COMPARE (sun.sun_family, AF_UNIX); ++ TEST_COMPARE (__sockaddr_un_set (&sun, ""), 0); ++ ++ memset (&sun, 0xcc, sizeof (sun)); ++ TEST_COMPARE (__sockaddr_un_set (&sun, "/example"), 0); ++ TEST_COMPARE_STRING (sun.sun_path, "/example"); ++ ++ { ++ char pathname[108]; /* Length of sun_path (ABI constant). */ ++ memset (pathname, 'x', sizeof (pathname)); ++ pathname[sizeof (pathname) - 1] = '\0'; ++ memset (&sun, 0xcc, sizeof (sun)); ++ TEST_COMPARE (__sockaddr_un_set (&sun, pathname), 0); ++ TEST_COMPARE (sun.sun_family, AF_UNIX); ++ TEST_COMPARE_STRING (sun.sun_path, pathname); ++ } ++ ++ { ++ char pathname[109]; ++ memset (pathname, 'x', sizeof (pathname)); ++ pathname[sizeof (pathname) - 1] = '\0'; ++ memset (&sun, 0xcc, sizeof (sun)); ++ errno = 0; ++ TEST_COMPARE (__sockaddr_un_set (&sun, pathname), -1); ++ TEST_COMPARE (errno, EINVAL); ++ } ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-77.patch b/SOURCES/glibc-upstream-2.34-77.patch new file mode 100644 index 0000000..752a81a --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-77.patch @@ -0,0 +1,33 @@ +commit 7b5d433fd097b8ed74e458eca33597290e07b974 +Author: Florian Weimer +Date: Mon Jan 17 10:21:34 2022 +0100 + + CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542) + + Processing an overlong pathname in the sunrpc clnt_create function + results in a stack-based buffer overflow. + + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit 226b46770c82899b555986583294b049c6ec9b40) + +diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c +index 13ced8994e49d4ee..b44357cd88e60599 100644 +--- a/sunrpc/clnt_gen.c ++++ b/sunrpc/clnt_gen.c +@@ -57,9 +57,13 @@ clnt_create (const char *hostname, u_long prog, u_long vers, + + if (strcmp (proto, "unix") == 0) + { +- memset ((char *)&sun, 0, sizeof (sun)); +- sun.sun_family = AF_UNIX; +- strcpy (sun.sun_path, hostname); ++ if (__sockaddr_un_set (&sun, hostname) < 0) ++ { ++ struct rpc_createerr *ce = &get_rpc_createerr (); ++ ce->cf_stat = RPC_SYSTEMERROR; ++ ce->cf_error.re_errno = errno; ++ return NULL; ++ } + sock = RPC_ANYSOCK; + client = clntunix_create (&sun, prog, vers, &sock, 0, 0); + if (client == NULL) diff --git a/SOURCES/glibc-upstream-2.34-78.patch b/SOURCES/glibc-upstream-2.34-78.patch new file mode 100644 index 0000000..cfd76f0 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-78.patch @@ -0,0 +1,82 @@ +commit 1081f1d3dd7c84ba3416b5198d47a4df2b70185d +Author: Martin Sebor +Date: Mon Jan 17 10:21:34 2022 +0100 + + sunrpc: Test case for clnt_create "unix" buffer overflow (bug 22542) + + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit ef972a4c50014a16132b5c75571cfb6b30bef136) + +diff --git a/sunrpc/Makefile b/sunrpc/Makefile +index 7e5bbfd951b1e835..a4281b18d04c78e9 100644 +--- a/sunrpc/Makefile ++++ b/sunrpc/Makefile +@@ -65,7 +65,8 @@ shared-only-routines = $(routines) + endif + + tests = tst-xdrmem tst-xdrmem2 test-rpcent tst-udp-error tst-udp-timeout \ +- tst-udp-nonblocking ++ tst-udp-nonblocking tst-bug22542 ++ + xtests := tst-getmyaddr + + ifeq ($(have-thread-library),yes) +@@ -110,6 +111,8 @@ $(objpfx)tst-udp-nonblocking: $(common-objpfx)linkobj/libc.so + $(objpfx)tst-udp-garbage: \ + $(common-objpfx)linkobj/libc.so $(shared-thread-library) + ++$(objpfx)tst-bug22542: $(common-objpfx)linkobj/libc.so ++ + else # !have-GLIBC_2.31 + + routines = $(routines-for-nss) +diff --git a/sunrpc/tst-bug22542.c b/sunrpc/tst-bug22542.c +new file mode 100644 +index 0000000000000000..d6cd79787bdef21d +--- /dev/null ++++ b/sunrpc/tst-bug22542.c +@@ -0,0 +1,44 @@ ++/* Test to verify that overlong hostname is rejected by clnt_create ++ and doesn't cause a buffer overflow (bug 22542). ++ ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static int ++do_test (void) ++{ ++ /* Create an arbitrary hostname that's longer than fits in sun_path. */ ++ char name [sizeof ((struct sockaddr_un*)0)->sun_path * 2]; ++ memset (name, 'x', sizeof name - 1); ++ name [sizeof name - 1] = '\0'; ++ ++ errno = 0; ++ CLIENT *clnt = clnt_create (name, 0, 0, "unix"); ++ ++ TEST_VERIFY (clnt == NULL); ++ TEST_COMPARE (errno, EINVAL); ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-79.patch b/SOURCES/glibc-upstream-2.34-79.patch new file mode 100644 index 0000000..84f34f8 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-79.patch @@ -0,0 +1,102 @@ +commit 6890b8a3ae40ab9d4c96024ab95b04816fcc8a4a +Author: Florian Weimer +Date: Mon Jan 17 11:49:25 2022 +0100 + + CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) + + The sunrpc function svcunix_create suffers from a stack-based buffer + overflow with overlong pathname arguments. + + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit f545ad4928fa1f27a3075265182b38a4f939a5f7) + +diff --git a/sunrpc/Makefile b/sunrpc/Makefile +index a4281b18d04c78e9..6408ab5c073538e9 100644 +--- a/sunrpc/Makefile ++++ b/sunrpc/Makefile +@@ -65,7 +65,7 @@ shared-only-routines = $(routines) + endif + + tests = tst-xdrmem tst-xdrmem2 test-rpcent tst-udp-error tst-udp-timeout \ +- tst-udp-nonblocking tst-bug22542 ++ tst-udp-nonblocking tst-bug22542 tst-bug28768 + + xtests := tst-getmyaddr + +diff --git a/sunrpc/svc_unix.c b/sunrpc/svc_unix.c +index 679fbe9cb69587bd..46f8d16fe94a3d4f 100644 +--- a/sunrpc/svc_unix.c ++++ b/sunrpc/svc_unix.c +@@ -154,7 +154,10 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path) + SVCXPRT *xprt; + struct unix_rendezvous *r; + struct sockaddr_un addr; +- socklen_t len = sizeof (struct sockaddr_in); ++ socklen_t len = sizeof (addr); ++ ++ if (__sockaddr_un_set (&addr, path) < 0) ++ return NULL; + + if (sock == RPC_ANYSOCK) + { +@@ -165,12 +168,6 @@ svcunix_create (int sock, u_int sendsize, u_int recvsize, char *path) + } + madesock = TRUE; + } +- memset (&addr, '\0', sizeof (addr)); +- addr.sun_family = AF_UNIX; +- len = strlen (path) + 1; +- memcpy (addr.sun_path, path, len); +- len += sizeof (addr.sun_family); +- + __bind (sock, (struct sockaddr *) &addr, len); + + if (__getsockname (sock, (struct sockaddr *) &addr, &len) != 0 +diff --git a/sunrpc/tst-bug28768.c b/sunrpc/tst-bug28768.c +new file mode 100644 +index 0000000000000000..35a4b7b0b3d34350 +--- /dev/null ++++ b/sunrpc/tst-bug28768.c +@@ -0,0 +1,42 @@ ++/* Test to verify that long path is rejected by svcunix_create (bug 28768). ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++/* svcunix_create does not have a default version in linkobj/libc.so. */ ++compat_symbol_reference (libc, svcunix_create, svcunix_create, GLIBC_2_1); ++ ++static int ++do_test (void) ++{ ++ char pathname[109]; ++ memset (pathname, 'x', sizeof (pathname)); ++ pathname[sizeof (pathname) - 1] = '\0'; ++ ++ errno = 0; ++ TEST_VERIFY (svcunix_create (RPC_ANYSOCK, 4096, 4096, pathname) == NULL); ++ TEST_COMPARE (errno, EINVAL); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-8.patch b/SOURCES/glibc-upstream-2.34-8.patch new file mode 100644 index 0000000..b08f0ce --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-8.patch @@ -0,0 +1,140 @@ +commit 7c987a5ccb31df80456d53a094e47f81310f549b +Author: Nikita Popov +Date: Thu Aug 12 16:09:50 2021 +0530 + + librt: add test (bug 28213) + + This test implements following logic: + 1) Create POSIX message queue. + Register a notification with mq_notify (using NULL attributes). + Then immediately unregister the notification with mq_notify. + Helper thread in a vulnerable version of glibc + should cause NULL pointer dereference after these steps. + 2) Once again, register the same notification. + Try to send a dummy message. + Test is considered successfulif the dummy message + is successfully received by the callback function. + + Signed-off-by: Nikita Popov + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit 4cc79c217744743077bf7a0ec5e0a4318f1e6641) + +diff --git a/rt/Makefile b/rt/Makefile +index 113cea03a5b75613..910e7759956d7ae9 100644 +--- a/rt/Makefile ++++ b/rt/Makefile +@@ -74,6 +74,7 @@ tests := tst-shm tst-timer tst-timer2 \ + tst-aio7 tst-aio8 tst-aio9 tst-aio10 \ + tst-mqueue1 tst-mqueue2 tst-mqueue3 tst-mqueue4 \ + tst-mqueue5 tst-mqueue6 tst-mqueue7 tst-mqueue8 tst-mqueue9 \ ++ tst-bz28213 \ + tst-timer3 tst-timer4 tst-timer5 \ + tst-cpuclock2 tst-cputimer1 tst-cputimer2 tst-cputimer3 \ + tst-shm-cancel \ +diff --git a/rt/tst-bz28213.c b/rt/tst-bz28213.c +new file mode 100644 +index 0000000000000000..0c096b5a0ad4170a +--- /dev/null ++++ b/rt/tst-bz28213.c +@@ -0,0 +1,101 @@ ++/* Bug 28213: test for NULL pointer dereference in mq_notify. ++ Copyright (C) The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static mqd_t m = -1; ++static const char msg[] = "hello"; ++ ++static void ++check_bz28213_cb (union sigval sv) ++{ ++ char buf[sizeof (msg)]; ++ ++ (void) sv; ++ ++ TEST_VERIFY_EXIT ((size_t) mq_receive (m, buf, sizeof (buf), NULL) ++ == sizeof (buf)); ++ TEST_VERIFY_EXIT (memcmp (buf, msg, sizeof (buf)) == 0); ++ ++ exit (0); ++} ++ ++static void ++check_bz28213 (void) ++{ ++ struct sigevent sev; ++ ++ memset (&sev, '\0', sizeof (sev)); ++ sev.sigev_notify = SIGEV_THREAD; ++ sev.sigev_notify_function = check_bz28213_cb; ++ ++ /* Step 1: Register & unregister notifier. ++ Helper thread should receive NOTIFY_REMOVED notification. ++ In a vulnerable version of glibc, NULL pointer dereference follows. */ ++ TEST_VERIFY_EXIT (mq_notify (m, &sev) == 0); ++ TEST_VERIFY_EXIT (mq_notify (m, NULL) == 0); ++ ++ /* Step 2: Once again, register notification. ++ Try to send one message. ++ Test is considered successful, if the callback does exit (0). */ ++ TEST_VERIFY_EXIT (mq_notify (m, &sev) == 0); ++ TEST_VERIFY_EXIT (mq_send (m, msg, sizeof (msg), 1) == 0); ++ ++ /* Wait... */ ++ pause (); ++} ++ ++static int ++do_test (void) ++{ ++ static const char m_name[] = "/bz28213_queue"; ++ struct mq_attr m_attr; ++ ++ memset (&m_attr, '\0', sizeof (m_attr)); ++ m_attr.mq_maxmsg = 1; ++ m_attr.mq_msgsize = sizeof (msg); ++ ++ m = mq_open (m_name, ++ O_RDWR | O_CREAT | O_EXCL, ++ 0600, ++ &m_attr); ++ ++ if (m < 0) ++ { ++ if (errno == ENOSYS) ++ FAIL_UNSUPPORTED ("POSIX message queues are not implemented\n"); ++ FAIL_EXIT1 ("Failed to create POSIX message queue: %m\n"); ++ } ++ ++ TEST_VERIFY_EXIT (mq_unlink (m_name) == 0); ++ ++ check_bz28213 (); ++ ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-80.patch b/SOURCES/glibc-upstream-2.34-80.patch new file mode 100644 index 0000000..fec92e2 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-80.patch @@ -0,0 +1,56 @@ +commit 1d401d1fccb85046402089268b94d86d822070e6 +Author: Aurelien Jarno +Date: Mon Jan 17 19:41:40 2022 +0100 + + x86: use default cache size if it cannot be determined [BZ #28784] + + In some cases (e.g QEMU, non-Intel/AMD CPU) the cache information can + not be retrieved and the corresponding values are set to 0. + + Commit 2d651eb9265d ("x86: Move x86 processor cache info to + cpu_features") changed the behaviour in such case by defining the + __x86_shared_cache_size and __x86_data_cache_size variables to 0 instead + of using the default values. This cause an issue with the i686 SSE2 + optimized bzero/routine which assumes that the cache size is at least + 128 bytes, and otherwise tries to zero/set the whole address space minus + 128 bytes. + + Fix that by restoring the original code to only update + __x86_shared_cache_size and __x86_data_cache_size variables if the + corresponding cache sizes are not zero. + + Fixes bug 28784 + Fixes commit 2d651eb9265d + + Reviewed-by: H.J. Lu + (cherry picked from commit c242fcce06e3102ca663b2f992611d0bda4f2668) + +diff --git a/sysdeps/x86/cacheinfo.h b/sysdeps/x86/cacheinfo.h +index 41d2c81369840ada..63f36877e3f35d99 100644 +--- a/sysdeps/x86/cacheinfo.h ++++ b/sysdeps/x86/cacheinfo.h +@@ -61,14 +61,20 @@ init_cacheinfo (void) + long int data = cpu_features->data_cache_size; + /* Round data cache size to multiple of 256 bytes. */ + data = data & ~255L; +- __x86_data_cache_size_half = data / 2; +- __x86_data_cache_size = data; ++ if (data > 0) ++ { ++ __x86_data_cache_size_half = data / 2; ++ __x86_data_cache_size = data; ++ } + + long int shared = cpu_features->shared_cache_size; + /* Round shared cache size to multiple of 256 bytes. */ + shared = shared & ~255L; +- __x86_shared_cache_size_half = shared / 2; +- __x86_shared_cache_size = shared; ++ if (shared > 0) ++ { ++ __x86_shared_cache_size_half = shared / 2; ++ __x86_shared_cache_size = shared; ++ } + + __x86_shared_non_temporal_threshold + = cpu_features->non_temporal_threshold; diff --git a/SOURCES/glibc-upstream-2.34-81.patch b/SOURCES/glibc-upstream-2.34-81.patch new file mode 100644 index 0000000..3fcbbf4 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-81.patch @@ -0,0 +1,64 @@ +commit 82b1acd9de9796298a230d7484f26fe9a7756d18 +Author: Paul A. Clarke +Date: Sat Sep 25 09:57:15 2021 -0500 + + powerpc: Fix unrecognized instruction errors with recent binutils + + Recent versions of binutils (with commit + b25f942e18d6ecd7ec3e2d2e9930eb4f996c258a) stopped preserving "sticky" + options across a base `.machine` directive, nullifying the use of + passing "-many" through GCC to the assembler. As a result, some + instructions which were recognized even under older, more stringent + `.machine` directives become unrecognized instructions in that + context. + + In `sysdeps/powerpc/tst-set_ppr.c`, the use of the `mfppr32` extended + mnemonic became unrecognized, as the default compilation with GCC for + 32bit powerpc adds a `.machine ppc` in the resulting assembly, so the + command line option `-Wa,-many` is essentially ignored, and the ISA 2.06 + instructions and mnemonics, like `mfppr32`, are unrecognized. + + The compilation of `sysdeps/powerpc/tst-set_ppr.c` fails with: + Error: unrecognized opcode: `mfppr32' + + Add appropriate `.machine` directives in the assembly to bracket the + `mfppr32` instruction. + + Part of a 2019 fix (commit 9250e6610fdb0f3a6f238d2813e319a41fb7a810) to + the above test's Makefile to add `-many` to the compilation when GCC + itself stopped passing `-many` to the assember no longer has any effect, + so remove that. + + Reported-by: Joseph Myers + (cherry picked from commit ee874f44fd55988808a4a162ef21bfa2cc8dc6f7) + +diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile +index 09860ffc0155d765..5e6cb07ce66decfa 100644 +--- a/sysdeps/powerpc/Makefile ++++ b/sysdeps/powerpc/Makefile +@@ -61,11 +61,6 @@ ifeq ($(subdir),misc) + sysdep_headers += sys/platform/ppc.h + tests += test-gettimebase + tests += tst-set_ppr +- +-# This test is expected to run and exit with EXIT_UNSUPPORTED on +-# processors that do not implement the Power ISA 2.06 or greater. +-# But the test makes use of instructions from Power ISA 2.06 and 2.07. +-CFLAGS-tst-set_ppr.c += -Wa,-many + endif + + ifeq ($(subdir),wcsmbs) +diff --git a/sysdeps/powerpc/tst-set_ppr.c b/sysdeps/powerpc/tst-set_ppr.c +index 7684f5d6ea905c60..e80da15320635585 100644 +--- a/sysdeps/powerpc/tst-set_ppr.c ++++ b/sysdeps/powerpc/tst-set_ppr.c +@@ -44,7 +44,8 @@ get_thread_priority (void) + { + /* Read the PPR. */ + ppr_t ppr; +- asm volatile (MFPPR" %0" : "=r"(ppr)); ++ asm volatile (".machine push; .machine power7; "MFPPR" %0; .machine pop" ++ : "=r"(ppr)); + /* Return the thread priority value. */ + return EXTRACT_THREAD_PRIORITY (ppr); + } diff --git a/SOURCES/glibc-upstream-2.34-82.patch b/SOURCES/glibc-upstream-2.34-82.patch new file mode 100644 index 0000000..1f522aa --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-82.patch @@ -0,0 +1,276 @@ +commit 062ff490c1467059f6cd64bb9c3d85f6cc6cf97a +Author: Siddhesh Poyarekar +Date: Tue Jan 18 13:29:36 2022 +0530 + + support: Add helpers to create paths longer than PATH_MAX + + Add new helpers support_create_and_chdir_toolong_temp_directory and + support_chdir_toolong_temp_directory to create and descend into + directory trees longer than PATH_MAX. + + Reviewed-by: Adhemerval Zanella + Signed-off-by: Siddhesh Poyarekar + (cherry picked from commit fb7bff12e81c677a6622f724edd4d4987dd9d971) + +diff --git a/support/temp_file.c b/support/temp_file.c +index c6df641876285bb2..e41128c2d43fe903 100644 +--- a/support/temp_file.c ++++ b/support/temp_file.c +@@ -1,5 +1,6 @@ + /* Temporary file handling for tests. +- Copyright (C) 1998-2021 Free Software Foundation, Inc. ++ Copyright (C) 1998-2022 Free Software Foundation, Inc. ++ Copyright The GNU Tools Authors. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -20,15 +21,17 @@ + some 32-bit platforms. */ + #define _FILE_OFFSET_BITS 64 + ++#include + #include + #include + #include + ++#include + #include + #include + #include + #include +-#include ++#include + + /* List of temporary files. */ + static struct temp_name_list +@@ -36,14 +39,20 @@ static struct temp_name_list + struct temp_name_list *next; + char *name; + pid_t owner; ++ bool toolong; + } *temp_name_list; + + /* Location of the temporary files. Set by the test skeleton via + support_set_test_dir. The string is not be freed. */ + static const char *test_dir = _PATH_TMP; + +-void +-add_temp_file (const char *name) ++/* Name of subdirectories in a too long temporary directory tree. */ ++static char toolong_subdir[NAME_MAX + 1]; ++static bool toolong_initialized; ++static size_t toolong_path_max; ++ ++static void ++add_temp_file_internal (const char *name, bool toolong) + { + struct temp_name_list *newp + = (struct temp_name_list *) xcalloc (sizeof (*newp), 1); +@@ -53,12 +62,19 @@ add_temp_file (const char *name) + newp->name = newname; + newp->next = temp_name_list; + newp->owner = getpid (); ++ newp->toolong = toolong; + temp_name_list = newp; + } + else + free (newp); + } + ++void ++add_temp_file (const char *name) ++{ ++ add_temp_file_internal (name, false); ++} ++ + int + create_temp_file_in_dir (const char *base, const char *dir, char **filename) + { +@@ -90,8 +106,8 @@ create_temp_file (const char *base, char **filename) + return create_temp_file_in_dir (base, test_dir, filename); + } + +-char * +-support_create_temp_directory (const char *base) ++static char * ++create_temp_directory_internal (const char *base, bool toolong) + { + char *path = xasprintf ("%s/%sXXXXXX", test_dir, base); + if (mkdtemp (path) == NULL) +@@ -99,16 +115,132 @@ support_create_temp_directory (const char *base) + printf ("error: mkdtemp (\"%s\"): %m", path); + exit (1); + } +- add_temp_file (path); ++ add_temp_file_internal (path, toolong); + return path; + } + +-/* Helper functions called by the test skeleton follow. */ ++char * ++support_create_temp_directory (const char *base) ++{ ++ return create_temp_directory_internal (base, false); ++} ++ ++static void ++ensure_toolong_initialized (void) ++{ ++ if (!toolong_initialized) ++ FAIL_EXIT1 ("uninitialized toolong directory tree\n"); ++} ++ ++static void ++initialize_toolong (const char *base) ++{ ++ long name_max = pathconf (base, _PC_NAME_MAX); ++ name_max = (name_max < 0 ? 64 ++ : (name_max < sizeof (toolong_subdir) ? name_max ++ : sizeof (toolong_subdir) - 1)); ++ ++ long path_max = pathconf (base, _PC_PATH_MAX); ++ path_max = (path_max < 0 ? 1024 ++ : path_max <= PTRDIFF_MAX ? path_max : PTRDIFF_MAX); ++ ++ /* Sanity check to ensure that the test does not create temporary directories ++ in different filesystems because this API doesn't support it. */ ++ if (toolong_initialized) ++ { ++ if (name_max != strlen (toolong_subdir)) ++ FAIL_UNSUPPORTED ("name_max: Temporary directories in different" ++ " filesystems not supported yet\n"); ++ if (path_max != toolong_path_max) ++ FAIL_UNSUPPORTED ("path_max: Temporary directories in different" ++ " filesystems not supported yet\n"); ++ return; ++ } ++ ++ toolong_path_max = path_max; ++ ++ size_t len = name_max; ++ memset (toolong_subdir, 'X', len); ++ toolong_initialized = true; ++} ++ ++char * ++support_create_and_chdir_toolong_temp_directory (const char *basename) ++{ ++ char *base = create_temp_directory_internal (basename, true); ++ xchdir (base); ++ ++ initialize_toolong (base); ++ ++ size_t sz = strlen (toolong_subdir); ++ ++ /* Create directories and descend into them so that the final path is larger ++ than PATH_MAX. */ ++ for (size_t i = 0; i <= toolong_path_max / sz; i++) ++ { ++ int ret = mkdir (toolong_subdir, S_IRWXU); ++ if (ret != 0 && errno == ENAMETOOLONG) ++ FAIL_UNSUPPORTED ("Filesystem does not support creating too long " ++ "directory trees\n"); ++ else if (ret != 0) ++ FAIL_EXIT1 ("Failed to create directory tree: %m\n"); ++ xchdir (toolong_subdir); ++ } ++ return base; ++} + + void +-support_set_test_dir (const char *path) ++support_chdir_toolong_temp_directory (const char *base) + { +- test_dir = path; ++ ensure_toolong_initialized (); ++ ++ xchdir (base); ++ ++ size_t sz = strlen (toolong_subdir); ++ for (size_t i = 0; i <= toolong_path_max / sz; i++) ++ xchdir (toolong_subdir); ++} ++ ++/* Helper functions called by the test skeleton follow. */ ++ ++static void ++remove_toolong_subdirs (const char *base) ++{ ++ ensure_toolong_initialized (); ++ ++ if (chdir (base) != 0) ++ { ++ printf ("warning: toolong cleanup base failed: chdir (\"%s\"): %m\n", ++ base); ++ return; ++ } ++ ++ /* Descend. */ ++ int levels = 0; ++ size_t sz = strlen (toolong_subdir); ++ for (levels = 0; levels <= toolong_path_max / sz; levels++) ++ if (chdir (toolong_subdir) != 0) ++ { ++ printf ("warning: toolong cleanup failed: chdir (\"%s\"): %m\n", ++ toolong_subdir); ++ break; ++ } ++ ++ /* Ascend and remove. */ ++ while (--levels >= 0) ++ { ++ if (chdir ("..") != 0) ++ { ++ printf ("warning: toolong cleanup failed: chdir (\"..\"): %m\n"); ++ return; ++ } ++ if (remove (toolong_subdir) != 0) ++ { ++ printf ("warning: could not remove subdirectory: %s: %m\n", ++ toolong_subdir); ++ return; ++ } ++ } + } + + void +@@ -123,6 +255,9 @@ support_delete_temp_files (void) + around, to prevent PID reuse.) */ + if (temp_name_list->owner == pid) + { ++ if (temp_name_list->toolong) ++ remove_toolong_subdirs (temp_name_list->name); ++ + if (remove (temp_name_list->name) != 0) + printf ("warning: could not remove temporary file: %s: %m\n", + temp_name_list->name); +@@ -147,3 +282,9 @@ support_print_temp_files (FILE *f) + fprintf (f, ")\n"); + } + } ++ ++void ++support_set_test_dir (const char *path) ++{ ++ test_dir = path; ++} +diff --git a/support/temp_file.h b/support/temp_file.h +index f3a7fb6f9ca44d19..a22964c6fa11abd2 100644 +--- a/support/temp_file.h ++++ b/support/temp_file.h +@@ -44,6 +44,15 @@ int create_temp_file_in_dir (const char *base, const char *dir, + returns. The caller should free this string. */ + char *support_create_temp_directory (const char *base); + ++/* Create a temporary directory tree that is longer than PATH_MAX and schedule ++ it for deletion. BASENAME is used as a prefix for the unique directory ++ name, which the function returns. The caller should free this string. */ ++char *support_create_and_chdir_toolong_temp_directory (const char *basename); ++ ++/* Change into the innermost directory of the directory tree BASE, which was ++ created using support_create_and_chdir_toolong_temp_directory. */ ++void support_chdir_toolong_temp_directory (const char *base); ++ + __END_DECLS + + #endif /* SUPPORT_TEMP_FILE_H */ diff --git a/SOURCES/glibc-upstream-2.34-83.patch b/SOURCES/glibc-upstream-2.34-83.patch new file mode 100644 index 0000000..4a37c4d --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-83.patch @@ -0,0 +1,121 @@ +commit 269eb9d930546ce57e83b56c44c430f154684a23 +Author: Siddhesh Poyarekar +Date: Thu Jan 13 10:34:37 2022 +0530 + + stdlib: Sort tests in Makefile + + Put one test per line and sort them. + + Signed-off-by: Siddhesh Poyarekar + (cherry picked from commit 5b766603efa727c236a5f0cdcf09b71ff60b7584) + +diff --git a/stdlib/Makefile b/stdlib/Makefile +index 7c15549cafa8e397..6a1c3580bd1648ee 100644 +--- a/stdlib/Makefile ++++ b/stdlib/Makefile +@@ -65,30 +65,81 @@ aux = grouping groupingwc tens_in_limb + static-only-routines = atexit at_quick_exit + + test-srcs := tst-fmtmsg +-tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ +- test-canon test-canon2 tst-strtoll tst-environ \ +- tst-xpg-basename tst-random tst-random2 tst-bsearch \ +- tst-limits tst-rand48 bug-strtod tst-setcontext \ +- tst-setcontext2 test-a64l tst-qsort testmb2 \ +- bug-strtod2 tst-atof1 tst-atof2 tst-strtod2 \ +- tst-rand48-2 tst-makecontext tst-strtod5 \ +- tst-qsort2 tst-makecontext2 tst-strtod6 tst-unsetenv1 \ +- tst-makecontext3 bug-getcontext bug-fmtmsg1 \ +- tst-secure-getenv tst-strtod-overflow tst-strtod-round \ +- tst-tininess tst-strtod-underflow tst-setcontext3 \ +- tst-strtol-locale tst-strtod-nan-locale tst-strfmon_l \ +- tst-quick_exit tst-thread-quick_exit tst-width \ +- tst-width-stdint tst-strfrom tst-strfrom-locale \ +- tst-getrandom tst-atexit tst-at_quick_exit \ +- tst-cxa_atexit tst-on_exit test-atexit-race \ +- test-at_quick_exit-race test-cxa_atexit-race \ +- test-cxa_atexit-race2 \ +- test-on_exit-race test-dlclose-exit-race \ +- tst-makecontext-align test-bz22786 tst-strtod-nan-sign \ +- tst-swapcontext1 tst-setcontext4 tst-setcontext5 \ +- tst-setcontext6 tst-setcontext7 tst-setcontext8 \ +- tst-setcontext9 tst-bz20544 tst-canon-bz26341 \ +- tst-realpath ++tests := bug-fmtmsg1 \ ++ bug-getcontext \ ++ bug-strtod \ ++ bug-strtod2 \ ++ test-a64l \ ++ test-at_quick_exit-race \ ++ test-atexit-race \ ++ test-bz22786 \ ++ test-canon \ ++ test-canon2 \ ++ test-cxa_atexit-race \ ++ test-cxa_atexit-race2 \ ++ test-dlclose-exit-race \ ++ test-on_exit-race \ ++ testdiv \ ++ testmb \ ++ testmb2 \ ++ testrand \ ++ testsort \ ++ tst-at_quick_exit \ ++ tst-atexit \ ++ tst-atof1 \ ++ tst-atof2 \ ++ tst-bsearch \ ++ tst-bz20544 \ ++ tst-canon-bz26341 \ ++ tst-cxa_atexit \ ++ tst-environ \ ++ tst-getrandom \ ++ tst-limits \ ++ tst-makecontext \ ++ tst-makecontext-align \ ++ tst-makecontext2 \ ++ tst-makecontext3 \ ++ tst-on_exit \ ++ tst-qsort \ ++ tst-qsort2 \ ++ tst-quick_exit \ ++ tst-rand48 \ ++ tst-rand48-2 \ ++ tst-random \ ++ tst-random2 \ ++ tst-realpath \ ++ tst-secure-getenv \ ++ tst-setcontext \ ++ tst-setcontext2 \ ++ tst-setcontext3 \ ++ tst-setcontext4 \ ++ tst-setcontext5 \ ++ tst-setcontext6 \ ++ tst-setcontext7 \ ++ tst-setcontext8 \ ++ tst-setcontext9 \ ++ tst-strfmon_l \ ++ tst-strfrom \ ++ tst-strfrom-locale \ ++ tst-strtod \ ++ tst-strtod-nan-locale \ ++ tst-strtod-nan-sign \ ++ tst-strtod-overflow \ ++ tst-strtod-round \ ++ tst-strtod-underflow \ ++ tst-strtod2 \ ++ tst-strtod5 \ ++ tst-strtod6 \ ++ tst-strtol \ ++ tst-strtol-locale \ ++ tst-strtoll \ ++ tst-swapcontext1 \ ++ tst-thread-quick_exit \ ++ tst-tininess \ ++ tst-unsetenv1 \ ++ tst-width \ ++ tst-width-stdint \ ++ tst-xpg-basename + + tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ + tst-tls-atexit tst-tls-atexit-nodelete diff --git a/SOURCES/glibc-upstream-2.34-84.patch b/SOURCES/glibc-upstream-2.34-84.patch new file mode 100644 index 0000000..e97805a --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-84.patch @@ -0,0 +1,173 @@ +commit 73c362840c4efde45125a6c27bf41726397f4038 +Author: Siddhesh Poyarekar +Date: Thu Jan 13 18:50:55 2022 +0530 + + stdlib: Fix formatting of tests list in Makefile + + Signed-off-by: Siddhesh Poyarekar + Reviewed-by: Florian Weimer + (cherry picked from commit f9dab1b5f23d0fb008a56c7c6c8919adb49d3611) + +diff --git a/stdlib/Makefile b/stdlib/Makefile +index 6a1c3580bd1648ee..9bb5c221e8be3288 100644 +--- a/stdlib/Makefile ++++ b/stdlib/Makefile +@@ -65,81 +65,83 @@ aux = grouping groupingwc tens_in_limb + static-only-routines = atexit at_quick_exit + + test-srcs := tst-fmtmsg +-tests := bug-fmtmsg1 \ +- bug-getcontext \ +- bug-strtod \ +- bug-strtod2 \ +- test-a64l \ +- test-at_quick_exit-race \ +- test-atexit-race \ +- test-bz22786 \ +- test-canon \ +- test-canon2 \ +- test-cxa_atexit-race \ +- test-cxa_atexit-race2 \ +- test-dlclose-exit-race \ +- test-on_exit-race \ +- testdiv \ +- testmb \ +- testmb2 \ +- testrand \ +- testsort \ +- tst-at_quick_exit \ +- tst-atexit \ +- tst-atof1 \ +- tst-atof2 \ +- tst-bsearch \ +- tst-bz20544 \ +- tst-canon-bz26341 \ +- tst-cxa_atexit \ +- tst-environ \ +- tst-getrandom \ +- tst-limits \ +- tst-makecontext \ +- tst-makecontext-align \ +- tst-makecontext2 \ +- tst-makecontext3 \ +- tst-on_exit \ +- tst-qsort \ +- tst-qsort2 \ +- tst-quick_exit \ +- tst-rand48 \ +- tst-rand48-2 \ +- tst-random \ +- tst-random2 \ +- tst-realpath \ +- tst-secure-getenv \ +- tst-setcontext \ +- tst-setcontext2 \ +- tst-setcontext3 \ +- tst-setcontext4 \ +- tst-setcontext5 \ +- tst-setcontext6 \ +- tst-setcontext7 \ +- tst-setcontext8 \ +- tst-setcontext9 \ +- tst-strfmon_l \ +- tst-strfrom \ +- tst-strfrom-locale \ +- tst-strtod \ +- tst-strtod-nan-locale \ +- tst-strtod-nan-sign \ +- tst-strtod-overflow \ +- tst-strtod-round \ +- tst-strtod-underflow \ +- tst-strtod2 \ +- tst-strtod5 \ +- tst-strtod6 \ +- tst-strtol \ +- tst-strtol-locale \ +- tst-strtoll \ +- tst-swapcontext1 \ +- tst-thread-quick_exit \ +- tst-tininess \ +- tst-unsetenv1 \ +- tst-width \ +- tst-width-stdint \ +- tst-xpg-basename ++tests := \ ++ bug-fmtmsg1 \ ++ bug-getcontext \ ++ bug-strtod \ ++ bug-strtod2 \ ++ test-a64l \ ++ test-at_quick_exit-race \ ++ test-atexit-race \ ++ test-bz22786 \ ++ test-canon \ ++ test-canon2 \ ++ test-cxa_atexit-race \ ++ test-cxa_atexit-race2 \ ++ test-dlclose-exit-race \ ++ test-on_exit-race \ ++ testdiv \ ++ testmb \ ++ testmb2 \ ++ testrand \ ++ testsort \ ++ tst-at_quick_exit \ ++ tst-atexit \ ++ tst-atof1 \ ++ tst-atof2 \ ++ tst-bsearch \ ++ tst-bz20544 \ ++ tst-canon-bz26341 \ ++ tst-cxa_atexit \ ++ tst-environ \ ++ tst-getrandom \ ++ tst-limits \ ++ tst-makecontext \ ++ tst-makecontext-align \ ++ tst-makecontext2 \ ++ tst-makecontext3 \ ++ tst-on_exit \ ++ tst-qsort \ ++ tst-qsort2 \ ++ tst-quick_exit \ ++ tst-rand48 \ ++ tst-rand48-2 \ ++ tst-random \ ++ tst-random2 \ ++ tst-realpath \ ++ tst-secure-getenv \ ++ tst-setcontext \ ++ tst-setcontext2 \ ++ tst-setcontext3 \ ++ tst-setcontext4 \ ++ tst-setcontext5 \ ++ tst-setcontext6 \ ++ tst-setcontext7 \ ++ tst-setcontext8 \ ++ tst-setcontext9 \ ++ tst-strfmon_l \ ++ tst-strfrom \ ++ tst-strfrom-locale \ ++ tst-strtod \ ++ tst-strtod-nan-locale \ ++ tst-strtod-nan-sign \ ++ tst-strtod-overflow \ ++ tst-strtod-round \ ++ tst-strtod-underflow \ ++ tst-strtod2 \ ++ tst-strtod5 \ ++ tst-strtod6 \ ++ tst-strtol \ ++ tst-strtol-locale \ ++ tst-strtoll \ ++ tst-swapcontext1 \ ++ tst-thread-quick_exit \ ++ tst-tininess \ ++ tst-unsetenv1 \ ++ tst-width \ ++ tst-width-stdint \ ++ tst-xpg-basename \ ++# tests + + tests-internal := tst-strtod1i tst-strtod3 tst-strtod4 tst-strtod5i \ + tst-tls-atexit tst-tls-atexit-nodelete diff --git a/SOURCES/glibc-upstream-2.34-85.patch b/SOURCES/glibc-upstream-2.34-85.patch new file mode 100644 index 0000000..3ea12aa --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-85.patch @@ -0,0 +1,109 @@ +commit f7a79879c0b2bef0dadd6caaaeeb0d26423e04e5 +Author: Siddhesh Poyarekar +Date: Thu Jan 13 11:28:36 2022 +0530 + + realpath: Set errno to ENAMETOOLONG for result larger than PATH_MAX [BZ #28770] + + realpath returns an allocated string when the result exceeds PATH_MAX, + which is unexpected when its second argument is not NULL. This results + in the second argument (resolved) being uninitialized and also results + in a memory leak since the caller expects resolved to be the same as the + returned value. + + Return NULL and set errno to ENAMETOOLONG if the result exceeds + PATH_MAX. This fixes [BZ #28770], which is CVE-2021-3998. + + Reviewed-by: Adhemerval Zanella + Signed-off-by: Siddhesh Poyarekar + (cherry picked from commit ee8d5e33adb284601c00c94687bc907e10aec9bb) + +diff --git a/stdlib/Makefile b/stdlib/Makefile +index 9bb5c221e8be3288..a4ac30d1f6359561 100644 +--- a/stdlib/Makefile ++++ b/stdlib/Makefile +@@ -109,6 +109,7 @@ tests := \ + tst-random \ + tst-random2 \ + tst-realpath \ ++ tst-realpath-toolong \ + tst-secure-getenv \ + tst-setcontext \ + tst-setcontext2 \ +diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c +index 698f9ede25570ef2..7a23a51b3a395eb3 100644 +--- a/stdlib/canonicalize.c ++++ b/stdlib/canonicalize.c +@@ -400,8 +400,16 @@ realpath_stk (const char *name, char *resolved, + + error: + *dest++ = '\0'; +- if (resolved != NULL && dest - rname <= get_path_max ()) +- rname = strcpy (resolved, rname); ++ if (resolved != NULL) ++ { ++ if (dest - rname <= get_path_max ()) ++ rname = strcpy (resolved, rname); ++ else ++ { ++ failed = true; ++ __set_errno (ENAMETOOLONG); ++ } ++ } + + error_nomem: + scratch_buffer_free (&extra_buffer); +diff --git a/stdlib/tst-realpath-toolong.c b/stdlib/tst-realpath-toolong.c +new file mode 100644 +index 0000000000000000..8bed772460b37571 +--- /dev/null ++++ b/stdlib/tst-realpath-toolong.c +@@ -0,0 +1,49 @@ ++/* Verify that realpath returns NULL with ENAMETOOLONG if the result exceeds ++ NAME_MAX. ++ Copyright The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define BASENAME "tst-realpath-toolong." ++ ++int ++do_test (void) ++{ ++ char *base = support_create_and_chdir_toolong_temp_directory (BASENAME); ++ ++ char buf[PATH_MAX + 1]; ++ const char *res = realpath (".", buf); ++ ++ /* canonicalize.c states that if the real path is >= PATH_MAX, then ++ realpath returns NULL and sets ENAMETOOLONG. */ ++ TEST_VERIFY (res == NULL); ++ TEST_VERIFY (errno == ENAMETOOLONG); ++ ++ free (base); ++ return 0; ++} ++ ++#include diff --git a/SOURCES/glibc-upstream-2.34-86.patch b/SOURCES/glibc-upstream-2.34-86.patch new file mode 100644 index 0000000..1885d41 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-86.patch @@ -0,0 +1,26 @@ +commit 8c8a71c85f2ed5cc90d08d82ce645513fc907cb6 +Author: Siddhesh Poyarekar +Date: Mon Jan 24 10:57:09 2022 +0530 + + tst-realpath-toolong: Fix hurd build + + Define PATH_MAX to a constant if it isn't already defined, like in hurd. + + Signed-off-by: Siddhesh Poyarekar + (cherry picked from commit 976db046bc3a3738f69255ae00b0a09b8e77fd9c) + +diff --git a/stdlib/tst-realpath-toolong.c b/stdlib/tst-realpath-toolong.c +index 8bed772460b37571..4388890294374601 100644 +--- a/stdlib/tst-realpath-toolong.c ++++ b/stdlib/tst-realpath-toolong.c +@@ -29,6 +29,10 @@ + + #define BASENAME "tst-realpath-toolong." + ++#ifndef PATH_MAX ++# define PATH_MAX 1024 ++#endif ++ + int + do_test (void) + { diff --git a/SOURCES/glibc-upstream-2.34-87.patch b/SOURCES/glibc-upstream-2.34-87.patch new file mode 100644 index 0000000..a696584 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-87.patch @@ -0,0 +1,329 @@ +commit 472e799a5f2102bc0c3206dbd5a801765fceb39c +Author: Siddhesh Poyarekar +Date: Fri Jan 21 23:32:56 2022 +0530 + + getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) + + No valid path returned by getcwd would fit into 1 byte, so reject the + size early and return NULL with errno set to ERANGE. This change is + prompted by CVE-2021-3999, which describes a single byte buffer + underflow and overflow when all of the following conditions are met: + + - The buffer size (i.e. the second argument of getcwd) is 1 byte + - The current working directory is too long + - '/' is also mounted on the current working directory + + Sequence of events: + + - In sysdeps/unix/sysv/linux/getcwd.c, the syscall returns ENAMETOOLONG + because the linux kernel checks for name length before it checks + buffer size + + - The code falls back to the generic getcwd in sysdeps/posix + + - In the generic func, the buf[0] is set to '\0' on line 250 + + - this while loop on line 262 is bypassed: + + while (!(thisdev == rootdev && thisino == rootino)) + + since the rootfs (/) is bind mounted onto the directory and the flow + goes on to line 449, where it puts a '/' in the byte before the + buffer. + + - Finally on line 458, it moves 2 bytes (the underflowed byte and the + '\0') to the buf[0] and buf[1], resulting in a 1 byte buffer overflow. + + - buf is returned on line 469 and errno is not set. + + This resolves BZ #28769. + + Reviewed-by: Andreas Schwab + Reviewed-by: Adhemerval Zanella + Signed-off-by: Qualys Security Advisory + Signed-off-by: Siddhesh Poyarekar + (cherry picked from commit 23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e) + +diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c +index 13680026ffecbd51..b6984a382c3e1711 100644 +--- a/sysdeps/posix/getcwd.c ++++ b/sysdeps/posix/getcwd.c +@@ -187,6 +187,13 @@ __getcwd_generic (char *buf, size_t size) + size_t allocated = size; + size_t used; + ++ /* A size of 1 byte is never useful. */ ++ if (allocated == 1) ++ { ++ __set_errno (ERANGE); ++ return NULL; ++ } ++ + #if HAVE_MINIMALLY_WORKING_GETCWD + /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and + this is much slower than the system getcwd (at least on +diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile +index d30d21898b402d1e..cdc01a3f023ec09a 100644 +--- a/sysdeps/unix/sysv/linux/Makefile ++++ b/sysdeps/unix/sysv/linux/Makefile +@@ -342,7 +342,12 @@ sysdep_routines += xstatconv internal_statvfs \ + + sysdep_headers += bits/fcntl-linux.h + +-tests += tst-fallocate tst-fallocate64 tst-o_path-locks ++tests += \ ++ tst-fallocate \ ++ tst-fallocate64 \ ++ tst-getcwd-smallbuff \ ++ tst-o_path-locks \ ++# tests + endif + + ifeq ($(subdir),elf) +diff --git a/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c +new file mode 100644 +index 0000000000000000..d460d6e7662dc5e4 +--- /dev/null ++++ b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c +@@ -0,0 +1,241 @@ ++/* Verify that getcwd returns ERANGE for size 1 byte and does not underflow ++ buffer when the CWD is too long and is also a mount target of /. See bug ++ #28769 or CVE-2021-3999 for more context. ++ Copyright The GNU Toolchain Authors. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static char *base; ++#define BASENAME "tst-getcwd-smallbuff" ++#define MOUNT_NAME "mpoint" ++static int sockfd[2]; ++ ++static void ++do_cleanup (void) ++{ ++ support_chdir_toolong_temp_directory (base); ++ TEST_VERIFY_EXIT (rmdir (MOUNT_NAME) == 0); ++ free (base); ++} ++ ++static void ++send_fd (const int sock, const int fd) ++{ ++ struct msghdr msg = {0}; ++ union ++ { ++ struct cmsghdr hdr; ++ char buf[CMSG_SPACE (sizeof (int))]; ++ } cmsgbuf = {0}; ++ struct cmsghdr *cmsg; ++ struct iovec vec; ++ char ch = 'A'; ++ ssize_t n; ++ ++ msg.msg_control = &cmsgbuf.buf; ++ msg.msg_controllen = sizeof (cmsgbuf.buf); ++ ++ cmsg = CMSG_FIRSTHDR (&msg); ++ cmsg->cmsg_len = CMSG_LEN (sizeof (int)); ++ cmsg->cmsg_level = SOL_SOCKET; ++ cmsg->cmsg_type = SCM_RIGHTS; ++ memcpy (CMSG_DATA (cmsg), &fd, sizeof (fd)); ++ ++ vec.iov_base = &ch; ++ vec.iov_len = 1; ++ msg.msg_iov = &vec; ++ msg.msg_iovlen = 1; ++ ++ while ((n = sendmsg (sock, &msg, 0)) == -1 && errno == EINTR); ++ ++ TEST_VERIFY_EXIT (n == 1); ++} ++ ++static int ++recv_fd (const int sock) ++{ ++ struct msghdr msg = {0}; ++ union ++ { ++ struct cmsghdr hdr; ++ char buf[CMSG_SPACE(sizeof(int))]; ++ } cmsgbuf = {0}; ++ struct cmsghdr *cmsg; ++ struct iovec vec; ++ ssize_t n; ++ char ch = '\0'; ++ int fd = -1; ++ ++ vec.iov_base = &ch; ++ vec.iov_len = 1; ++ msg.msg_iov = &vec; ++ msg.msg_iovlen = 1; ++ ++ msg.msg_control = &cmsgbuf.buf; ++ msg.msg_controllen = sizeof (cmsgbuf.buf); ++ ++ while ((n = recvmsg (sock, &msg, 0)) == -1 && errno == EINTR); ++ if (n != 1 || ch != 'A') ++ return -1; ++ ++ cmsg = CMSG_FIRSTHDR (&msg); ++ if (cmsg == NULL) ++ return -1; ++ if (cmsg->cmsg_type != SCM_RIGHTS) ++ return -1; ++ memcpy (&fd, CMSG_DATA (cmsg), sizeof (fd)); ++ if (fd < 0) ++ return -1; ++ return fd; ++} ++ ++static int ++child_func (void * const arg) ++{ ++ xclose (sockfd[0]); ++ const int sock = sockfd[1]; ++ char ch; ++ ++ TEST_VERIFY_EXIT (read (sock, &ch, 1) == 1); ++ TEST_VERIFY_EXIT (ch == '1'); ++ ++ if (mount ("/", MOUNT_NAME, NULL, MS_BIND | MS_REC, NULL)) ++ FAIL_EXIT1 ("mount failed: %m\n"); ++ const int fd = xopen ("mpoint", ++ O_RDONLY | O_PATH | O_DIRECTORY | O_NOFOLLOW, 0); ++ ++ send_fd (sock, fd); ++ xclose (fd); ++ ++ TEST_VERIFY_EXIT (read (sock, &ch, 1) == 1); ++ TEST_VERIFY_EXIT (ch == 'a'); ++ ++ xclose (sock); ++ return 0; ++} ++ ++static void ++update_map (char * const mapping, const char * const map_file) ++{ ++ const size_t map_len = strlen (mapping); ++ ++ const int fd = xopen (map_file, O_WRONLY, 0); ++ xwrite (fd, mapping, map_len); ++ xclose (fd); ++} ++ ++static void ++proc_setgroups_write (const long child_pid, const char * const str) ++{ ++ const size_t str_len = strlen(str); ++ ++ char setgroups_path[sizeof ("/proc//setgroups") + INT_STRLEN_BOUND (long)]; ++ ++ snprintf (setgroups_path, sizeof (setgroups_path), ++ "/proc/%ld/setgroups", child_pid); ++ ++ const int fd = open (setgroups_path, O_WRONLY); ++ ++ if (fd < 0) ++ { ++ TEST_VERIFY_EXIT (errno == ENOENT); ++ FAIL_UNSUPPORTED ("/proc/%ld/setgroups not found\n", child_pid); ++ } ++ ++ xwrite (fd, str, str_len); ++ xclose(fd); ++} ++ ++static char child_stack[1024 * 1024]; ++ ++int ++do_test (void) ++{ ++ base = support_create_and_chdir_toolong_temp_directory (BASENAME); ++ ++ xmkdir (MOUNT_NAME, S_IRWXU); ++ atexit (do_cleanup); ++ ++ TEST_VERIFY_EXIT (socketpair (AF_UNIX, SOCK_STREAM, 0, sockfd) == 0); ++ pid_t child_pid = xclone (child_func, NULL, child_stack, ++ sizeof (child_stack), ++ CLONE_NEWUSER | CLONE_NEWNS | SIGCHLD); ++ ++ xclose (sockfd[1]); ++ const int sock = sockfd[0]; ++ ++ char map_path[sizeof ("/proc//uid_map") + INT_STRLEN_BOUND (long)]; ++ char map_buf[sizeof ("0 1") + INT_STRLEN_BOUND (long)]; ++ ++ snprintf (map_path, sizeof (map_path), "/proc/%ld/uid_map", ++ (long) child_pid); ++ snprintf (map_buf, sizeof (map_buf), "0 %ld 1", (long) getuid()); ++ update_map (map_buf, map_path); ++ ++ proc_setgroups_write ((long) child_pid, "deny"); ++ snprintf (map_path, sizeof (map_path), "/proc/%ld/gid_map", ++ (long) child_pid); ++ snprintf (map_buf, sizeof (map_buf), "0 %ld 1", (long) getgid()); ++ update_map (map_buf, map_path); ++ ++ TEST_VERIFY_EXIT (send (sock, "1", 1, MSG_NOSIGNAL) == 1); ++ const int fd = recv_fd (sock); ++ TEST_VERIFY_EXIT (fd >= 0); ++ TEST_VERIFY_EXIT (fchdir (fd) == 0); ++ ++ static char buf[2 * 10 + 1]; ++ memset (buf, 'A', sizeof (buf)); ++ ++ /* Finally, call getcwd and check if it resulted in a buffer underflow. */ ++ char * cwd = getcwd (buf + sizeof (buf) / 2, 1); ++ TEST_VERIFY (cwd == NULL); ++ TEST_VERIFY (errno == ERANGE); ++ ++ for (int i = 0; i < sizeof (buf); i++) ++ if (buf[i] != 'A') ++ { ++ printf ("buf[%d] = %02x\n", i, (unsigned int) buf[i]); ++ support_record_failure (); ++ } ++ ++ TEST_VERIFY_EXIT (send (sock, "a", 1, MSG_NOSIGNAL) == 1); ++ xclose (sock); ++ TEST_VERIFY_EXIT (xwaitpid (child_pid, NULL, 0) == child_pid); ++ ++ return 0; ++} ++ ++#define CLEANUP_HANDLER do_cleanup ++#include diff --git a/SOURCES/glibc-upstream-2.34-88.patch b/SOURCES/glibc-upstream-2.34-88.patch new file mode 100644 index 0000000..d741c3c --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-88.patch @@ -0,0 +1,28 @@ +commit d084965adc7baa8ea804427cccf973cea556d697 +Author: Siddhesh Poyarekar +Date: Mon Jan 24 21:36:41 2022 +0530 + + realpath: Avoid overwriting preexisting error (CVE-2021-3998) + + Set errno and failure for paths that are too long only if no other error + occurred earlier. + + Related: BZ #28770 + + Reviewed-by: Andreas Schwab + Signed-off-by: Siddhesh Poyarekar + (cherry picked from commit 84d2d0fe20bdf94feed82b21b4d7d136db471f03) + +diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c +index 7a23a51b3a395eb3..e2d4244fc7b8fa25 100644 +--- a/stdlib/canonicalize.c ++++ b/stdlib/canonicalize.c +@@ -404,7 +404,7 @@ error: + { + if (dest - rname <= get_path_max ()) + rname = strcpy (resolved, rname); +- else ++ else if (!failed) + { + failed = true; + __set_errno (ENAMETOOLONG); diff --git a/SOURCES/glibc-upstream-2.34-89.patch b/SOURCES/glibc-upstream-2.34-89.patch new file mode 100644 index 0000000..37ddc35 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-89.patch @@ -0,0 +1,47 @@ +commit 3438bbca90895d32825a52e31a77dc44d273c1c1 +Author: Florian Weimer +Date: Mon Jan 24 18:14:24 2022 +0100 + + Linux: Detect user namespace support in io/tst-getcwd-smallbuff + + Otherwise the test fails with certain container runtimes. + + Reviewed-by: Siddhesh Poyarekar + (cherry picked from commit 5b8e7980c5dabd9aaefeba4f0208baa8cf7653ee) + +diff --git a/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c +index d460d6e7662dc5e4..55362f6060a2b3be 100644 +--- a/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c ++++ b/sysdeps/unix/sysv/linux/tst-getcwd-smallbuff.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -188,6 +189,23 @@ do_test (void) + xmkdir (MOUNT_NAME, S_IRWXU); + atexit (do_cleanup); + ++ /* Check whether user namespaces are supported. */ ++ { ++ pid_t pid = xfork (); ++ if (pid == 0) ++ { ++ if (unshare (CLONE_NEWUSER | CLONE_NEWNS) != 0) ++ _exit (EXIT_UNSUPPORTED); ++ else ++ _exit (0); ++ } ++ int status; ++ xwaitpid (pid, &status, 0); ++ TEST_VERIFY_EXIT (WIFEXITED (status)); ++ if (WEXITSTATUS (status) != 0) ++ return WEXITSTATUS (status); ++ } ++ + TEST_VERIFY_EXIT (socketpair (AF_UNIX, SOCK_STREAM, 0, sockfd) == 0); + pid_t child_pid = xclone (child_func, NULL, child_stack, + sizeof (child_stack), diff --git a/SOURCES/glibc-upstream-2.34-9.patch b/SOURCES/glibc-upstream-2.34-9.patch new file mode 100644 index 0000000..b22636d --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-9.patch @@ -0,0 +1,24 @@ +commit 9acab0bba6a5a57323b1f94bf95b21618a9e5aa4 +Author: Arjun Shankar +Date: Fri Aug 20 16:24:05 2021 +0200 + + elf: Fix missing colon in LD_SHOW_AUXV output [BZ #28253] + + This commit adds a missing colon in the AT_MINSIGSTKSZ entry in + the _dl_show_auxv function. + + (cherry picked from commit 82fbcd7118d760492e2ecc9fa291e358b9ba0361) + +diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c +index d47bef1340ce6f35..2c684c2db2a1f59b 100644 +--- a/elf/dl-sysdep.c ++++ b/elf/dl-sysdep.c +@@ -317,7 +317,7 @@ _dl_show_auxv (void) + [AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex }, + [AT_RANDOM - 2] = { "RANDOM: 0x", hex }, + [AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex }, +- [AT_MINSIGSTKSZ - 2] = { "MINSIGSTKSZ ", dec }, ++ [AT_MINSIGSTKSZ - 2] = { "MINSIGSTKSZ: ", dec }, + [AT_L1I_CACHESIZE - 2] = { "L1I_CACHESIZE: ", dec }, + [AT_L1I_CACHEGEOMETRY - 2] = { "L1I_CACHEGEOMETRY: 0x", hex }, + [AT_L1D_CACHESIZE - 2] = { "L1D_CACHESIZE: ", dec }, diff --git a/SOURCES/glibc-upstream-2.34-91.patch b/SOURCES/glibc-upstream-2.34-91.patch new file mode 100644 index 0000000..f577e34 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-91.patch @@ -0,0 +1,36 @@ +commit b50d5b746cc0af5ad52164dcb0d3628f08b05a0d +Author: Noah Goldstein +Date: Sun Jan 9 16:02:21 2022 -0600 + + x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755] + + Fixes [BZ# 28755] for wcsncmp by redirecting length >= 2^56 to + __wcscmp_avx2. For x86_64 this covers the entire address range so any + length larger could not possibly be used to bound `s1` or `s2`. + + test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. + + Signed-off-by: Noah Goldstein + (cherry picked from commit ddf0992cf57a93200e0c782e2a94d0733a5a0b87) + +diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S +index 40333010a65650f9..3dfcb1bf803cf9ec 100644 +--- a/sysdeps/x86_64/multiarch/strcmp-avx2.S ++++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S +@@ -87,6 +87,16 @@ ENTRY (STRCMP) + je L(char0) + jb L(zero) + # ifdef USE_AS_WCSCMP ++# ifndef __ILP32__ ++ movq %rdx, %rcx ++ /* Check if length could overflow when multiplied by ++ sizeof(wchar_t). Checking top 8 bits will cover all potential ++ overflow cases as well as redirect cases where its impossible to ++ length to bound a valid memory region. In these cases just use ++ 'wcscmp'. */ ++ shrq $56, %rcx ++ jnz __wcscmp_avx2 ++# endif + /* Convert units: from wide to byte char. */ + shl $2, %RDX_LP + # endif diff --git a/SOURCES/glibc-upstream-2.34-92.patch b/SOURCES/glibc-upstream-2.34-92.patch new file mode 100644 index 0000000..03a51c6 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-92.patch @@ -0,0 +1,36 @@ +commit 08beb3a3f4f46e306fffe184a08c5664bf0e13d6 +Author: Noah Goldstein +Date: Sun Jan 9 16:02:28 2022 -0600 + + x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755] + + Fixes [BZ# 28755] for wcsncmp by redirecting length >= 2^56 to + __wcscmp_evex. For x86_64 this covers the entire address range so any + length larger could not possibly be used to bound `s1` or `s2`. + + test-strcmp, test-strncmp, test-wcscmp, and test-wcsncmp all pass. + + Signed-off-by: Noah Goldstein + (cherry picked from commit 7e08db3359c86c94918feb33a1182cd0ff3bb10b) + +diff --git a/sysdeps/x86_64/multiarch/strcmp-evex.S b/sysdeps/x86_64/multiarch/strcmp-evex.S +index 459eeed09f5e276e..d5aa6daa46c7ed25 100644 +--- a/sysdeps/x86_64/multiarch/strcmp-evex.S ++++ b/sysdeps/x86_64/multiarch/strcmp-evex.S +@@ -97,6 +97,16 @@ ENTRY (STRCMP) + je L(char0) + jb L(zero) + # ifdef USE_AS_WCSCMP ++# ifndef __ILP32__ ++ movq %rdx, %rcx ++ /* Check if length could overflow when multiplied by ++ sizeof(wchar_t). Checking top 8 bits will cover all potential ++ overflow cases as well as redirect cases where its impossible to ++ length to bound a valid memory region. In these cases just use ++ 'wcscmp'. */ ++ shrq $56, %rcx ++ jnz __wcscmp_evex ++# endif + /* Convert units: from wide to byte char. */ + shl $2, %RDX_LP + # endif diff --git a/SOURCES/glibc-upstream-2.34-97.patch b/SOURCES/glibc-upstream-2.34-97.patch new file mode 100644 index 0000000..e9adea4 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-97.patch @@ -0,0 +1,360 @@ +commit 948ebc098ed3cd928ea10997f990115e7770bda3 +Author: Florian Weimer +Date: Thu Jan 27 16:03:58 2022 +0100 + + Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader) + + The glibc 2.34 release really should have added a GLIBC_2.34 + symbol to the dynamic loader. With it, we could move functions such + as dlopen or pthread_key_create that work on process-global state + into the dynamic loader (once we have fixed a longstanding issue + with static linking). Without the GLIBC_2.34 symbol, yet another + new symbol version would be needed because old glibc will fail to + load binaries due to the missing symbol version in ld.so that newly + linked programs will require. + + Reviewed-by: H.J. Lu + (cherry picked from commit af121ae3e7cd12628c91ecfc46a9d65313a6e972) + +diff --git a/elf/Makefile b/elf/Makefile +index 11ff0aa8438de4e4..cd8725c76f4cfb48 100644 +--- a/elf/Makefile ++++ b/elf/Makefile +@@ -117,6 +117,7 @@ elide-routines.os = \ + # interpreter and operating independent of libc. + rtld-routines = \ + $(all-dl-routines) \ ++ dl-compat \ + dl-conflict \ + dl-diagnostics \ + dl-diagnostics-cpu \ +diff --git a/elf/Versions b/elf/Versions +index 775aab62af500f6c..2af210b8f771c950 100644 +--- a/elf/Versions ++++ b/elf/Versions +@@ -48,6 +48,9 @@ ld { + # stack canary + __stack_chk_guard; + } ++ GLIBC_2.34 { ++ __rtld_version_placeholder; ++ } + GLIBC_PRIVATE { + # Those are in the dynamic linker, but used by libc.so. + __libc_enable_secure; +diff --git a/elf/dl-compat.c b/elf/dl-compat.c +new file mode 100644 +index 0000000000000000..cc560c515930f59a +--- /dev/null ++++ b/elf/dl-compat.c +@@ -0,0 +1,32 @@ ++/* Placeholder compatibility symbols. ++ Copyright (C) 2022 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#include ++#include ++ ++/* GLIBC_2.34 placeholder for future symbol moves. */ ++ ++void ++attribute_compat_text_section ++__attribute_used__ ++__rtld_version_placeholder_1 (void) ++{ ++} ++ ++compat_symbol (ld, __rtld_version_placeholder_1, ++ __rtld_version_placeholder, GLIBC_2_34); +diff --git a/sysdeps/mach/hurd/i386/ld.abilist b/sysdeps/mach/hurd/i386/ld.abilist +index 7e20c5e7ce8a7a5e..ebba31f7706d854d 100644 +--- a/sysdeps/mach/hurd/i386/ld.abilist ++++ b/sysdeps/mach/hurd/i386/ld.abilist +@@ -16,3 +16,4 @@ GLIBC_2.2.6 _r_debug D 0x14 + GLIBC_2.2.6 abort F + GLIBC_2.3 ___tls_get_addr F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/aarch64/ld.abilist b/sysdeps/unix/sysv/linux/aarch64/ld.abilist +index 80b2fe672541c6e9..b7196a80e2df8efc 100644 +--- a/sysdeps/unix/sysv/linux/aarch64/ld.abilist ++++ b/sysdeps/unix/sysv/linux/aarch64/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.17 __stack_chk_guard D 0x8 + GLIBC_2.17 __tls_get_addr F + GLIBC_2.17 _dl_mcount F + GLIBC_2.17 _r_debug D 0x28 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/alpha/ld.abilist b/sysdeps/unix/sysv/linux/alpha/ld.abilist +index 98a03f611f98f3a4..13f7fc74af62941d 100644 +--- a/sysdeps/unix/sysv/linux/alpha/ld.abilist ++++ b/sysdeps/unix/sysv/linux/alpha/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x28 + GLIBC_2.1 __libc_stack_end D 0x8 + GLIBC_2.1 _dl_mcount F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x8 +diff --git a/sysdeps/unix/sysv/linux/arc/ld.abilist b/sysdeps/unix/sysv/linux/arc/ld.abilist +index 048f17c8486f3d54..7284383a6bea8e64 100644 +--- a/sysdeps/unix/sysv/linux/arc/ld.abilist ++++ b/sysdeps/unix/sysv/linux/arc/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.32 __stack_chk_guard D 0x4 + GLIBC_2.32 __tls_get_addr F + GLIBC_2.32 _dl_mcount F + GLIBC_2.32 _r_debug D 0x14 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/arm/be/ld.abilist b/sysdeps/unix/sysv/linux/arm/be/ld.abilist +index cc8825c3bc68ad4a..7987bbae1112aa3d 100644 +--- a/sysdeps/unix/sysv/linux/arm/be/ld.abilist ++++ b/sysdeps/unix/sysv/linux/arm/be/ld.abilist +@@ -1,3 +1,4 @@ ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __libc_stack_end D 0x4 + GLIBC_2.4 __stack_chk_guard D 0x4 + GLIBC_2.4 __tls_get_addr F +diff --git a/sysdeps/unix/sysv/linux/arm/le/ld.abilist b/sysdeps/unix/sysv/linux/arm/le/ld.abilist +index cc8825c3bc68ad4a..7987bbae1112aa3d 100644 +--- a/sysdeps/unix/sysv/linux/arm/le/ld.abilist ++++ b/sysdeps/unix/sysv/linux/arm/le/ld.abilist +@@ -1,3 +1,4 @@ ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __libc_stack_end D 0x4 + GLIBC_2.4 __stack_chk_guard D 0x4 + GLIBC_2.4 __tls_get_addr F +diff --git a/sysdeps/unix/sysv/linux/csky/ld.abilist b/sysdeps/unix/sysv/linux/csky/ld.abilist +index 564ac09737d6d8d5..4939b20631dc6c54 100644 +--- a/sysdeps/unix/sysv/linux/csky/ld.abilist ++++ b/sysdeps/unix/sysv/linux/csky/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.29 __stack_chk_guard D 0x4 + GLIBC_2.29 __tls_get_addr F + GLIBC_2.29 _dl_mcount F + GLIBC_2.29 _r_debug D 0x14 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/hppa/ld.abilist b/sysdeps/unix/sysv/linux/hppa/ld.abilist +index d155a59843df9091..7cc9ebd792c2aadc 100644 +--- a/sysdeps/unix/sysv/linux/hppa/ld.abilist ++++ b/sysdeps/unix/sysv/linux/hppa/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.2 __libc_stack_end D 0x4 + GLIBC_2.2 _dl_mcount F + GLIBC_2.2 _r_debug D 0x14 + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x4 +diff --git a/sysdeps/unix/sysv/linux/i386/ld.abilist b/sysdeps/unix/sysv/linux/i386/ld.abilist +index 0478e220712a55e6..e8d187b14d722a64 100644 +--- a/sysdeps/unix/sysv/linux/i386/ld.abilist ++++ b/sysdeps/unix/sysv/linux/i386/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.1 __libc_stack_end D 0x4 + GLIBC_2.1 _dl_mcount F + GLIBC_2.3 ___tls_get_addr F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/ia64/ld.abilist b/sysdeps/unix/sysv/linux/ia64/ld.abilist +index 33f91199bfa516fb..be5122650ae2b327 100644 +--- a/sysdeps/unix/sysv/linux/ia64/ld.abilist ++++ b/sysdeps/unix/sysv/linux/ia64/ld.abilist +@@ -2,3 +2,4 @@ GLIBC_2.2 __libc_stack_end D 0x8 + GLIBC_2.2 _dl_mcount F + GLIBC_2.2 _r_debug D 0x28 + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist +index cc8825c3bc68ad4a..7987bbae1112aa3d 100644 +--- a/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist ++++ b/sysdeps/unix/sysv/linux/m68k/coldfire/ld.abilist +@@ -1,3 +1,4 @@ ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __libc_stack_end D 0x4 + GLIBC_2.4 __stack_chk_guard D 0x4 + GLIBC_2.4 __tls_get_addr F +diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist +index 3ba474c27f62fb10..4f2854edf7746958 100644 +--- a/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist ++++ b/sysdeps/unix/sysv/linux/m68k/m680x0/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x14 + GLIBC_2.1 __libc_stack_end D 0x4 + GLIBC_2.1 _dl_mcount F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x4 +diff --git a/sysdeps/unix/sysv/linux/microblaze/ld.abilist b/sysdeps/unix/sysv/linux/microblaze/ld.abilist +index a4933c3541119538..9f0fdeca38890a34 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/ld.abilist ++++ b/sysdeps/unix/sysv/linux/microblaze/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.18 __stack_chk_guard D 0x4 + GLIBC_2.18 __tls_get_addr F + GLIBC_2.18 _dl_mcount F + GLIBC_2.18 _r_debug D 0x14 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist +index be09641a48962434..f750067d5c34bf42 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist ++++ b/sysdeps/unix/sysv/linux/mips/mips32/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x14 + GLIBC_2.2 __libc_stack_end D 0x4 + GLIBC_2.2 _dl_mcount F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x4 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist +index be09641a48962434..f750067d5c34bf42 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x14 + GLIBC_2.2 __libc_stack_end D 0x4 + GLIBC_2.2 _dl_mcount F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x4 +diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist +index 1ea36e13f294a249..2fba6a9b6ec92e47 100644 +--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist ++++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.0 _r_debug D 0x28 + GLIBC_2.2 __libc_stack_end D 0x8 + GLIBC_2.2 _dl_mcount F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x8 +diff --git a/sysdeps/unix/sysv/linux/nios2/ld.abilist b/sysdeps/unix/sysv/linux/nios2/ld.abilist +index 52178802dd82b59a..57dfad5a53b739e8 100644 +--- a/sysdeps/unix/sysv/linux/nios2/ld.abilist ++++ b/sysdeps/unix/sysv/linux/nios2/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.21 __stack_chk_guard D 0x4 + GLIBC_2.21 __tls_get_addr F + GLIBC_2.21 _dl_mcount F + GLIBC_2.21 _r_debug D 0x14 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist +index 4bbfba7a61c7a5ef..e89660739262c6ab 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist +@@ -4,3 +4,4 @@ GLIBC_2.1 _dl_mcount F + GLIBC_2.22 __tls_get_addr_opt F + GLIBC_2.23 __parse_hwcap_and_convert_at_platform F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/ld.abilist +index 283fb4510bea40ba..ce0bc639597c4bd9 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/ld.abilist ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/ld.abilist +@@ -4,3 +4,4 @@ GLIBC_2.3 __libc_stack_end D 0x8 + GLIBC_2.3 __tls_get_addr F + GLIBC_2.3 _dl_mcount F + GLIBC_2.3 _r_debug D 0x28 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ld.abilist +index b1f313c7cd33defc..65b22674d2462e96 100644 +--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ld.abilist ++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ld.abilist +@@ -4,3 +4,4 @@ GLIBC_2.17 _dl_mcount F + GLIBC_2.17 _r_debug D 0x28 + GLIBC_2.22 __tls_get_addr_opt F + GLIBC_2.23 __parse_hwcap_and_convert_at_platform F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist +index 94ca64c43db63b2a..5ad4c81d12d7a612 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist ++++ b/sysdeps/unix/sysv/linux/riscv/rv32/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.33 __stack_chk_guard D 0x4 + GLIBC_2.33 __tls_get_addr F + GLIBC_2.33 _dl_mcount F + GLIBC_2.33 _r_debug D 0x14 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist +index 845f356c3c3fad54..479efdea9bb654bb 100644 +--- a/sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist ++++ b/sysdeps/unix/sysv/linux/riscv/rv64/ld.abilist +@@ -3,3 +3,4 @@ GLIBC_2.27 __stack_chk_guard D 0x8 + GLIBC_2.27 __tls_get_addr F + GLIBC_2.27 _dl_mcount F + GLIBC_2.27 _r_debug D 0x28 ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist +index b56f005bebd3baf1..d5ecb636bb792bdf 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist ++++ b/sysdeps/unix/sysv/linux/s390/s390-32/ld.abilist +@@ -2,3 +2,4 @@ GLIBC_2.0 _r_debug D 0x14 + GLIBC_2.1 __libc_stack_end D 0x4 + GLIBC_2.1 _dl_mcount F + GLIBC_2.3 __tls_get_offset F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist +index 6f788a086d68aaa5..62a5e1d99a2e6f42 100644 +--- a/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist ++++ b/sysdeps/unix/sysv/linux/s390/s390-64/ld.abilist +@@ -2,3 +2,4 @@ GLIBC_2.2 __libc_stack_end D 0x8 + GLIBC_2.2 _dl_mcount F + GLIBC_2.2 _r_debug D 0x28 + GLIBC_2.3 __tls_get_offset F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/sh/be/ld.abilist b/sysdeps/unix/sysv/linux/sh/be/ld.abilist +index d155a59843df9091..7cc9ebd792c2aadc 100644 +--- a/sysdeps/unix/sysv/linux/sh/be/ld.abilist ++++ b/sysdeps/unix/sysv/linux/sh/be/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.2 __libc_stack_end D 0x4 + GLIBC_2.2 _dl_mcount F + GLIBC_2.2 _r_debug D 0x14 + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x4 +diff --git a/sysdeps/unix/sysv/linux/sh/le/ld.abilist b/sysdeps/unix/sysv/linux/sh/le/ld.abilist +index d155a59843df9091..7cc9ebd792c2aadc 100644 +--- a/sysdeps/unix/sysv/linux/sh/le/ld.abilist ++++ b/sysdeps/unix/sysv/linux/sh/le/ld.abilist +@@ -2,4 +2,5 @@ GLIBC_2.2 __libc_stack_end D 0x4 + GLIBC_2.2 _dl_mcount F + GLIBC_2.2 _r_debug D 0x14 + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F + GLIBC_2.4 __stack_chk_guard D 0x4 +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist +index 0c6610e3c2f00cf3..2e6054349871e7d5 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist ++++ b/sysdeps/unix/sysv/linux/sparc/sparc32/ld.abilist +@@ -2,3 +2,4 @@ GLIBC_2.0 _r_debug D 0x14 + GLIBC_2.1 __libc_stack_end D 0x4 + GLIBC_2.1 _dl_mcount F + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist +index 33f91199bfa516fb..be5122650ae2b327 100644 +--- a/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist ++++ b/sysdeps/unix/sysv/linux/sparc/sparc64/ld.abilist +@@ -2,3 +2,4 @@ GLIBC_2.2 __libc_stack_end D 0x8 + GLIBC_2.2 _dl_mcount F + GLIBC_2.2 _r_debug D 0x28 + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist b/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist +index d3cdf7611eb9cab3..afddaec57c11f837 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist ++++ b/sysdeps/unix/sysv/linux/x86_64/64/ld.abilist +@@ -2,3 +2,4 @@ GLIBC_2.2.5 __libc_stack_end D 0x8 + GLIBC_2.2.5 _dl_mcount F + GLIBC_2.2.5 _r_debug D 0x28 + GLIBC_2.3 __tls_get_addr F ++GLIBC_2.34 __rtld_version_placeholder F +diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist +index c70bccf78245a552..defc488d137c61c3 100644 +--- a/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist ++++ b/sysdeps/unix/sysv/linux/x86_64/x32/ld.abilist +@@ -2,3 +2,4 @@ GLIBC_2.16 __libc_stack_end D 0x4 + GLIBC_2.16 __tls_get_addr F + GLIBC_2.16 _dl_mcount F + GLIBC_2.16 _r_debug D 0x14 ++GLIBC_2.34 __rtld_version_placeholder F diff --git a/SOURCES/glibc-upstream-2.34-98.patch b/SOURCES/glibc-upstream-2.34-98.patch new file mode 100644 index 0000000..adbb154 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-98.patch @@ -0,0 +1,62 @@ +commit b952c25dc7adf0684c53ad72d1d667da0348c929 +Author: H.J. Lu +Date: Fri Jan 14 14:48:01 2022 -0800 + + x86: Black list more Intel CPUs for TSX [BZ #27398] + + Disable TSX and enable RTM_ALWAYS_ABORT for Intel CPUs listed in: + + https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html + + This fixes BZ #27398. + + Reviewed-by: Noah Goldstein + (cherry picked from commit 1e000d3d33211d5a954300e2a69b90f93f18a1a1) + +diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c +index 645bba63147f6589..de4e3c3b7258120d 100644 +--- a/sysdeps/x86/cpu-features.c ++++ b/sysdeps/x86/cpu-features.c +@@ -507,11 +507,39 @@ init_cpu_features (struct cpu_features *cpu_features) + break; + } + +- /* Disable TSX on some Haswell processors to avoid TSX on kernels that +- weren't updated with the latest microcode package (which disables +- broken feature by default). */ ++ /* Disable TSX on some processors to avoid TSX on kernels that ++ weren't updated with the latest microcode package (which ++ disables broken feature by default). */ + switch (model) + { ++ case 0x55: ++ if (stepping <= 5) ++ goto disable_tsx; ++ break; ++ case 0x8e: ++ /* NB: Although the errata documents that for model == 0x8e, ++ only 0xb stepping or lower are impacted, the intention of ++ the errata was to disable TSX on all client processors on ++ all steppings. Include 0xc stepping which is an Intel ++ Core i7-8665U, a client mobile processor. */ ++ case 0x9e: ++ if (stepping > 0xc) ++ break; ++ /* Fall through. */ ++ case 0x4e: ++ case 0x5e: ++ { ++ /* Disable Intel TSX and enable RTM_ALWAYS_ABORT for ++ processors listed in: ++ ++https://www.intel.com/content/www/us/en/support/articles/000059422/processors.html ++ */ ++disable_tsx: ++ CPU_FEATURE_UNSET (cpu_features, HLE); ++ CPU_FEATURE_UNSET (cpu_features, RTM); ++ CPU_FEATURE_SET (cpu_features, RTM_ALWAYS_ABORT); ++ } ++ break; + case 0x3f: + /* Xeon E7 v3 with stepping >= 4 has working TSX. */ + if (stepping >= 4) diff --git a/SOURCES/glibc-upstream-2.34-99.patch b/SOURCES/glibc-upstream-2.34-99.patch new file mode 100644 index 0000000..7df75d8 --- /dev/null +++ b/SOURCES/glibc-upstream-2.34-99.patch @@ -0,0 +1,24 @@ +commit aa601d024424c40ae9a69b0c4e394a70ea0570c8 +Author: H.J. Lu +Date: Mon Jan 24 19:33:43 2022 -0800 + + x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398] + + HLE is disabled on blacklisted CPUs. Use CHECK_FEATURE_PRESENT, instead + of CHECK_FEATURE_ACTIVE, to check HLE. + + (cherry picked from commit 501246c5e2dfcc278f0ebbdb72345cdd239521c7) + +diff --git a/sysdeps/x86/tst-cpu-features-supports.c b/sysdeps/x86/tst-cpu-features-supports.c +index 9d76e6bd3f8db024..faa5091b78431487 100644 +--- a/sysdeps/x86/tst-cpu-features-supports.c ++++ b/sysdeps/x86/tst-cpu-features-supports.c +@@ -130,7 +130,7 @@ do_test (int argc, char **argv) + fails += CHECK_FEATURE_ACTIVE (gfni, GFNI); + #endif + #if __GNUC_PREREQ (11, 0) +- fails += CHECK_FEATURE_ACTIVE (hle, HLE); ++ fails += CHECK_FEATURE_PRESENT (hle, HLE); + fails += CHECK_FEATURE_PRESENT (ibt, IBT); + fails += CHECK_FEATURE_ACTIVE (lahf_lm, LAHF64_SAHF64); + fails += CHECK_FEATURE_PRESENT (lm, LM); diff --git a/SOURCES/glibc.attr b/SOURCES/glibc.attr new file mode 100644 index 0000000..fddfd91 --- /dev/null +++ b/SOURCES/glibc.attr @@ -0,0 +1,3 @@ +%__glibc_requires %{_rpmconfigdir}/glibc.req +%__glibc_magic ELF +%__glibc_flags exeonly diff --git a/SOURCES/glibc.req.in b/SOURCES/glibc.req.in new file mode 100644 index 0000000..9fb7f76 --- /dev/null +++ b/SOURCES/glibc.req.in @@ -0,0 +1,42 @@ +#!/bin/bash +# Auto-generating dependencies for glibc development snapshots. +# +# A glibc development snapshot (say version 2.33.9000) may define +# symbols in its under-development symbol version (GLIBC_2.34). RPM +# automatically derives RPM dependencies such as +# libc.so.6(GLIBC_2.34)(64bit) from that. While the GLIBC_2.34 +# version is under development, these dependencies may be inaccurate +# and could be satisfied by glibc RPM package versions that lack the +# symbols because they were created from an earlier development +# snapshot that had some other GLIBC_2.34 symbols. Therefore, if the +# latest, under-development ELF symbol version is detected, this +# dependency generator adds an explicit RPM dependencies on the glibc +# packaging version against which an RPM package is built. +# +# This script runs for the glibc build itself. In this case, it may +# produce a >= dependency on the build-time glibc, but there will also +# be an (potentially indirect) = dependency, which takes precedence. + +set -e +set -o pipefail + +searching=true +# Pre-filter using eu-elfclassify, to skip kernel modules. +eu-elfclassify --loadable --file --stdin --print | while read path; do + # Assume that all dynamically linked objects depend on glibc in + # some way. + if $searching; then + # Undefined symbols within latest, under-development + # (changing) symbol versions trigger the versioned RPM + # dependency. Do not use "egrep -q" to keep reading from the + # pipe, avoiding a spurious EPIPE error in eu-readelf. + if eu-readelf -s "$path" \ + | egrep '\sUNDEF\s.*@''@SYMVER@(\s|$)' >/dev/null + then + echo 'glibc >= @VERSION@-@RELEASE@' + # Stop searching after the first match, but keep reading from + # the pipe. + searching=false + fi + fi +done diff --git a/SOURCES/nscd.conf b/SOURCES/nscd.conf new file mode 100644 index 0000000..8a24a78 --- /dev/null +++ b/SOURCES/nscd.conf @@ -0,0 +1 @@ +d /run/nscd 0755 root root diff --git a/SOURCES/parse-SUPPORTED.py b/SOURCES/parse-SUPPORTED.py new file mode 100644 index 0000000..cf512de --- /dev/null +++ b/SOURCES/parse-SUPPORTED.py @@ -0,0 +1,40 @@ +#!/usr/bin/python3 +# +# This script turns localedata/SUPPORTED (whose path is passed as the +# first argument) into a normalized list of LANGUAGE "_" REGION pairs. +# (If there is no REGION defined, only LANGUAGE is used.) The list +# is written to standard output, with one element per line. + +import sys + +supported, = sys.argv[1:] + +# Pairs seen so far. Used to suppress duplicates. +seen = set() +with open(supported) as inp: + for line in inp: + if line.startswith("#") or line == "SUPPORTED-LOCALES=\\\n": + # Comment or prefix. + continue + if not line.endswith(" \\\n"): + raise IOError("line without continuation: " + repr(line)) + try: + slash = line.index("/") + except ValueError: + raise IOError("line without slash: " + repr(line)) + spec = line[:slash] + for separator in ".@": + try: + # Strip charset, variant specifiers. + spec = spec[:spec.index(separator)] + except ValueError: + pass + seen.add(spec) + +# The C locale does not correspond to a language. +seen.remove("C") + +# The glibc source file is not sorted. +for spec in sorted(seen): + print(spec) +print() # The Lua generator produces a trailing newline. diff --git a/SOURCES/wrap-find-debuginfo.sh b/SOURCES/wrap-find-debuginfo.sh new file mode 100644 index 0000000..6a558df --- /dev/null +++ b/SOURCES/wrap-find-debuginfo.sh @@ -0,0 +1,117 @@ +#!/bin/bash +# Wrapper script for find-debuginfo.sh +# +# Usage: +# wrap-find-debuginfo.sh SYSROOT-PATH SCRIPT-PATH SCRIPT-ARGS... +# +# The wrapper saves the original version of ld.so found in SYSROOT-PATH, +# invokes SCRIPT-PATH with SCRIPT-ARGS, and then restores the +# LDSO-PATH file, followed by note merging and DWZ compression. +# As a result, ld.so has (mostly) unchanged debuginfo even +# after debuginfo extraction. +# +# For libc.so.6, a set of strategic symbols is preserved in .symtab +# that are frequently used in valgrind suppressions and elsewhere. + +set -ex + +ldso_tmp="$(mktemp)" +libc_tmp="$(mktemp)" + +# Prefer a separately installed debugedit over the RPM-integrated one. +if command -v debugedit >/dev/null ; then + debugedit=debugedit +else + debugedit=/usr/lib/rpm/debugedit +fi + +cleanup () { + rm -f "$ldso_tmp" "$libc_tmp" +} +trap cleanup 0 + +sysroot_path="$1" +shift +script_path="$1" +shift + +# See ldso_path setting in glibc.spec. +ldso_path= +for ldso_candidate in `find "$sysroot_path" -regextype posix-extended \ + -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f` ; do + if test -z "$ldso_path" ; then + ldso_path="$ldso_candidate" + else + echo "error: multiple ld.so candidates: $ldso_path, $ldso_candidate" + exit 1 + fi +done + +# libc.so.6 always uses this name, so it is simpler to locate. +libc_path= +for libc_candidate in `find "$sysroot_path" -name libc.so.6`; do + if test -z "$libc_path" ; then + libc_path="$libc_candidate" + else + echo "error: multiple libc.so.6 candidates: $libc_path, $libc_candidate" + exit 1 + fi +done + + +# Preserve the original files. +cp "$ldso_path" "$ldso_tmp" +cp "$libc_path" "$libc_tmp" + +# Run the debuginfo extraction. +"$script_path" "$@" + +# Restore the original files. +cp "$ldso_tmp" "$ldso_path" +cp "$libc_tmp" "$libc_path" + +# Reduce the size of notes. Primarily for annobin. +objcopy --merge-notes "$ldso_path" +objcopy --merge-notes "$libc_path" + +# libc.so.6: Reduce to valuable symbols. Eliminate file symbols, +# annobin symbols, and symbols used by the glibc build to implement +# hidden aliases (__EI_*). We would also like to remove __GI_* +# symbols, but even listing them explicitly (as in -K __GI_strlen) +# still causes strip to remove them, so there is no filtering of +# __GI_* here. (Debuginfo is gone after this, so no need to optimize +# it.) +strip -w \ + -K '*' \ + -K '!*.c' \ + -K '!*.os' \ + -K '!.annobin_*' \ + -K '!__EI_*' \ + -K '!__PRETTY_FUNCTION__*' \ + "$libc_path" + +# ld.so: Rewrite the source file paths to match the extracted +# locations. First compute the arguments for invoking debugedit. +# See find-debuginfo.sh. +debug_dest_name="/usr/src/debug" +last_arg= +while true ; do + arg="$1" + shift || break + case "$arg" in + (--unique-debug-src-base) + debug_dest_name="/usr/src/debug/$1" + shift + ;; + (-*) + ;; + (*) + last_arg="$arg" + ;; + esac +done +debug_base_name=${last_arg:-$RPM_BUILD_ROOT} +$debugedit -b "$debug_base_name" -d "$debug_dest_name" -n $ldso_path + +# Apply single-file DWARF optimization. +dwz $ldso_path diff --git a/SPECS/glibc.spec b/SPECS/glibc.spec new file mode 100644 index 0000000..37af8d3 --- /dev/null +++ b/SPECS/glibc.spec @@ -0,0 +1,2629 @@ +%define glibcsrcdir glibc-2.34 +%define glibcversion 2.34 +# Pre-release tarballs are pulled in from git using a command that is +# effectively: +# +# git archive HEAD --format=tar --prefix=$(git describe --match 'glibc-*')/ \ +# > $(git describe --match 'glibc-*').tar +# gzip -9 $(git describe --match 'glibc-*').tar +# +# glibc_release_url is only defined when we have a release tarball. +# Conversly, glibc_autorequires is set for development snapshots, where +# dependencies based on symbol versions are inaccurate. +%{lua: if string.match(rpm.expand("%glibcsrcdir"), "^glibc%-[0-9.]+$") then + rpm.define("glibc_release_url https://ftp.gnu.org/gnu/glibc/") + end + local major, minor = string.match(rpm.expand("%glibcversion"), + "^([0-9]+)%.([0-9]+)%.9000$") + if major and minor then + rpm.define("glibc_autorequires 1") + -- The minor version in a .9000 development version lags the actual + -- symbol version by one. + local symver = "GLIBC_" .. major .. "." .. (minor + 1) + rpm.define("glibc_autorequires_symver " .. symver) + else + rpm.define("glibc_autorequires 0") + end} +############################################################################## +# We support the following options: +# --with/--without, +# * testsuite - Running the testsuite. +# * benchtests - Running and building benchmark subpackage. +# * bootstrap - Bootstrapping the package. +# * werror - Build with -Werror +# * docs - Build with documentation and the required dependencies. +# * valgrind - Run smoke tests with valgrind to verify dynamic loader. +# +# You must always run the testsuite for production builds. +# Default: Always run the testsuite. +%bcond_without testsuite +# Default: Always build the benchtests. +%bcond_without benchtests +# Default: Not bootstrapping. +%bcond_with bootstrap +# Default: Enable using -Werror +%bcond_without werror +# Default: Always build documentation. +%bcond_without docs + +# Default: Always run valgrind tests if there is architecture support. +%ifarch %{valgrind_arches} +%bcond_without valgrind +%else +%bcond_with valgrind +%endif +# Restrict %%{valgrind_arches} further in case there are problems with +# the smoke test. +%if %{with valgrind} +%ifarch ppc64p7 +# The valgrind smoke test does not work on ppc64, ppc64p7 (bug 1273103). +%undefine with_valgrind +%endif +%endif + +%if %{with bootstrap} +# Disable benchtests, -Werror, docs, and valgrind if we're bootstrapping +%undefine with_benchtests +%undefine with_werror +%undefine with_docs +%undefine with_valgrind +%endif + +# The annobin annotations cause binutils to produce broken ARM EABI +# unwinding information. Symptom is a hang/test failure for +# malloc/tst-malloc-stats-cancellation. See +# . +%ifarch armv7hl +%undefine _annotated_build +%endif + +############################################################################## +# Any architecture/kernel combination that supports running 32-bit and 64-bit +# code in userspace is considered a biarch arch. +%define biarcharches %{ix86} x86_64 s390 s390x + +# Avoid generating a glibc-headers package on architectures which are +# not biarch. +%ifarch %{biarcharches} +%define need_headers_package 1 +%if 0%{?rhel} > 0 +%define headers_package_name glibc-headers +%else +%ifarch %{ix86} x86_64 +%define headers_package_name glibc-headers-x86 +%endif +%ifarch s390 s390x +%define headers_package_name glibc-headers-s390 +%endif +%dnl !rhel +%endif +%else +%define need_headers_package 0 +%dnl !biarcharches +%endif + +############################################################################## +# Utility functions for pre/post scripts. Stick them at the beginning of +# any lua %pre, %post, %postun, etc. sections to have them expand into +# those scripts. It only works in lua sections and not anywhere else. +%define glibc_post_funcs() \ +-- We use lua posix.exec because there may be no shell that we can \ +-- run during glibc upgrade. We used to implement much of %%post as a \ +-- C program, but from an overall maintenance perspective the lua in \ +-- the spec file was simpler and safer given the operations required. \ +-- All lua code will be ignored by rpm-ostree; see: \ +-- https://github.com/projectatomic/rpm-ostree/pull/1869 \ +-- If we add new lua actions to the %%post code we should coordinate \ +-- with rpm-ostree and ensure that their glibc install is functional. \ +function post_exec (program, ...) \ + local pid = posix.fork () \ + if pid == 0 then \ + posix.exec (program, ...) \ + assert (nil) \ + elseif pid > 0 then \ + posix.wait (pid) \ + end \ +end \ +\ +function update_gconv_modules_cache () \ + local iconv_dir = "%{_libdir}/gconv" \ + local iconv_cache = iconv_dir .. "/gconv-modules.cache" \ + local iconv_modules = iconv_dir .. "/gconv-modules" \ + if (posix.utime (iconv_modules) == 0) then \ + if (posix.utime (iconv_cache) == 0) then \ + post_exec ("%{_prefix}/sbin/iconvconfig", \ + "-o", iconv_cache, \ + "--nostdlib", \ + iconv_dir) \ + else \ + io.stdout:write ("Error: Missing " .. iconv_cache .. " file.\n") \ + end \ + end \ +end \ +%{nil} + +############################################################################## +# %%package glibc - The GNU C Library (glibc) core package. +############################################################################## +Summary: The GNU libc libraries +Name: glibc +Version: %{glibcversion} +Release: 28%{?dist} + +# In general, GPLv2+ is used by programs, LGPLv2+ is used for +# libraries. +# +# LGPLv2+ with exceptions is used for things that are linked directly +# into dynamically linked programs and shared libraries (e.g. crt +# files, lib*_nonshared.a). Historically, this exception also applies +# to parts of libio. +# +# GPLv2+ with exceptions is used for parts of the Arm unwinder. +# +# GFDL is used for the documentation. +# +# Some other licenses are used in various places (BSD, Inner-Net, +# ISC, Public Domain). +# +# HSRL and FSFAP are only used in test cases, which currently do not +# ship in binary RPMs, so they are not listed here. MIT is used for +# scripts/install-sh, which does not ship, either. +# +# GPLv3+ is used by manual/texinfo.tex, which we do not use. +# +# LGPLv3+ is used by some Hurd code, which we do not build. +# +# LGPLv2 is used in one place (time/timespec_get.c, by mistake), but +# it is not actually compiled, so it does not matter for libraries. +License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ and GPLv2+ with exceptions and BSD and Inner-Net and ISC and Public Domain and GFDL + +URL: http://www.gnu.org/software/glibc/ +Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.xz +Source1: nscd.conf +Source2: bench.mk +Source3: glibc-bench-compare +Source4: glibc.req.in +Source5: glibc.attr +Source10: wrap-find-debuginfo.sh +Source11: parse-SUPPORTED.py +# Include in the source RPM for reference. +Source12: ChangeLog.old + +###################################################################### +# Activate the wrapper script for debuginfo generation, by rewriting +# the definition of __debug_install_post. +%{lua: +local wrapper = rpm.expand("%{SOURCE10}") +local sysroot = rpm.expand("%{glibc_sysroot}") +local original = rpm.expand("%{macrobody:__debug_install_post}") +-- Strip leading newline. It confuses the macro redefinition. +-- Avoid embedded newlines that confuse the macro definition. +original = original:match("^%s*(.-)%s*$"):gsub("\\\n", "") +rpm.define("__debug_install_post bash " .. wrapper + .. " " .. sysroot .. " " .. original) +} + +# The wrapper script relies on the fact that debugedit does not change +# build IDs. +%define _no_recompute_build_ids 1 +%undefine _unique_build_ids + +############################################################################## +# Patches: +# - See each individual patch file for origin and upstream status. +# - For new patches follow template.patch format. +############################################################################## +Patch1: glibc-fedora-nscd.patch +Patch4: glibc-fedora-linux-tcsetattr.patch +Patch6: glibc-fedora-localedef.patch +Patch8: glibc-fedora-manual-dircategory.patch +Patch9: glibc-rh827510.patch +Patch13: glibc-fedora-localedata-rh61908.patch +Patch15: glibc-rh1070416.patch +Patch16: glibc-nscd-sysconfig.patch +Patch17: glibc-cs-path.patch +Patch18: glibc-c-utf8-locale-1.patch +Patch19: glibc-c-utf8-locale-2.patch +Patch23: glibc-python3.patch +Patch29: glibc-fedora-nsswitch.patch +Patch30: glibc-deprecated-selinux-makedb.patch +Patch31: glibc-deprecated-selinux-nscd.patch +Patch32: glibc-upstream-2.34-1.patch +Patch33: glibc-upstream-2.34-2.patch +Patch34: glibc-upstream-2.34-3.patch +Patch35: glibc-upstream-2.34-4.patch +Patch36: glibc-upstream-2.34-5.patch +Patch37: glibc-upstream-2.34-6.patch +Patch38: glibc-upstream-2.34-7.patch +Patch39: glibc-upstream-2.34-8.patch +Patch40: glibc-upstream-2.34-9.patch +Patch41: glibc-upstream-2.34-10.patch +Patch42: glibc-upstream-2.34-11.patch +Patch43: glibc-upstream-2.34-12.patch +Patch44: glibc-upstream-2.34-13.patch +Patch45: glibc-upstream-2.34-14.patch +Patch46: glibc-upstream-2.34-15.patch +Patch47: glibc-upstream-2.34-16.patch +Patch48: glibc-upstream-2.34-17.patch +Patch49: glibc-upstream-2.34-18.patch +Patch50: glibc-upstream-2.34-19.patch +Patch51: glibc-upstream-2.34-20.patch +Patch52: glibc-upstream-2.34-21.patch +Patch53: glibc-upstream-2.34-22.patch +Patch54: glibc-upstream-2.34-23.patch +Patch55: glibc-upstream-2.34-24.patch +Patch56: glibc-upstream-2.34-25.patch +Patch57: glibc-upstream-2.34-26.patch +Patch58: glibc-upstream-2.34-27.patch +Patch59: glibc-upstream-2.34-28.patch +Patch60: glibc-upstream-2.34-29.patch +Patch61: glibc-upstream-2.34-30.patch +Patch62: glibc-upstream-2.34-31.patch +Patch63: glibc-upstream-2.34-32.patch +Patch64: glibc-upstream-2.34-33.patch +Patch65: glibc-upstream-2.34-34.patch +Patch66: glibc-upstream-2.34-35.patch +Patch67: glibc-upstream-2.34-36.patch +Patch68: glibc-upstream-2.34-37.patch +Patch69: glibc-upstream-2.34-38.patch +Patch70: glibc-upstream-2.34-39.patch +Patch71: glibc-upstream-2.34-40.patch +Patch72: glibc-upstream-2.34-41.patch +Patch73: glibc-upstream-2.34-42.patch +Patch74: glibc-upstream-2.34-43.patch +Patch75: glibc-upstream-2.34-44.patch +Patch76: glibc-upstream-2.34-45.patch +Patch77: glibc-upstream-2.34-46.patch +Patch78: glibc-upstream-2.34-47.patch +Patch79: glibc-upstream-2.34-48.patch +Patch80: glibc-upstream-2.34-49.patch +Patch81: glibc-rh2027789.patch +Patch82: glibc-rh2023422-1.patch +Patch83: glibc-rh2023422-2.patch +Patch84: glibc-rh2023422-3.patch +Patch85: glibc-rh2029410.patch +Patch86: glibc-upstream-2.34-50.patch +Patch87: glibc-upstream-2.34-51.patch +Patch88: glibc-upstream-2.34-52.patch +Patch89: glibc-upstream-2.34-53.patch +Patch90: glibc-rh1988382.patch +Patch91: glibc-upstream-2.34-54.patch +Patch92: glibc-upstream-2.34-55.patch +Patch93: glibc-upstream-2.34-56.patch +Patch94: glibc-upstream-2.34-57.patch +Patch95: glibc-upstream-2.34-58.patch +Patch96: glibc-upstream-2.34-59.patch +Patch97: glibc-upstream-2.34-60.patch +Patch98: glibc-upstream-2.34-61.patch +Patch99: glibc-upstream-2.34-62.patch +Patch100: glibc-upstream-2.34-63.patch +Patch101: glibc-upstream-2.34-64.patch +Patch102: glibc-upstream-2.34-65.patch +Patch103: glibc-upstream-2.34-66.patch +Patch104: glibc-upstream-2.34-67.patch +Patch105: glibc-upstream-2.34-68.patch +Patch106: glibc-upstream-2.34-69.patch +Patch107: glibc-upstream-2.34-70.patch +Patch108: glibc-upstream-2.34-71.patch +Patch109: glibc-upstream-2.34-72.patch +Patch110: glibc-upstream-2.34-73.patch +Patch111: glibc-rh2032647-1.patch +Patch112: glibc-rh2032647-2.patch +Patch113: glibc-rh2032647-3.patch +Patch114: glibc-rh2032647-4.patch +Patch115: glibc-rh2032647-5.patch +Patch116: glibc-rh2032647-6.patch +Patch117: glibc-rh2024347-1.patch +Patch118: glibc-rh2024347-2.patch +Patch119: glibc-rh2024347-3.patch +Patch120: glibc-rh2024347-4.patch +Patch121: glibc-rh2024347-5.patch +Patch122: glibc-rh2024347-6.patch +Patch123: glibc-rh2024347-7.patch +Patch124: glibc-rh2024347-8.patch +Patch125: glibc-rh2024347-9.patch +Patch126: glibc-rh2024347-10.patch +Patch127: glibc-rh2024347-11.patch +Patch128: glibc-rh2024347-12.patch +Patch129: glibc-rh2024347-13.patch +Patch130: glibc-rh2040657-1.patch +Patch131: glibc-rh2040657-2.patch +Patch132: glibc-rh2040657-3.patch +Patch133: glibc-rh2040657-4.patch +Patch134: glibc-rh2040657-5.patch +Patch135: glibc-rh2040657-6.patch +Patch136: glibc-rh2040657-7.patch +Patch137: glibc-rh2040657-8.patch +Patch138: glibc-rh2040657-9.patch +Patch139: glibc-rh2040657-10.patch +Patch140: glibc-rh2040657-11.patch +Patch141: glibc-rh2040657-12.patch +Patch142: glibc-upstream-2.34-74.patch +Patch143: glibc-upstream-2.34-75.patch +Patch144: glibc-upstream-2.34-76.patch +Patch145: glibc-upstream-2.34-77.patch +Patch146: glibc-upstream-2.34-78.patch +Patch147: glibc-upstream-2.34-79.patch +Patch148: glibc-upstream-2.34-80.patch +Patch149: glibc-upstream-2.34-81.patch +Patch150: glibc-upstream-2.34-82.patch +Patch151: glibc-upstream-2.34-83.patch +Patch152: glibc-upstream-2.34-84.patch +Patch153: glibc-upstream-2.34-85.patch +Patch154: glibc-upstream-2.34-86.patch +Patch155: glibc-upstream-2.34-87.patch +Patch156: glibc-upstream-2.34-88.patch +Patch157: glibc-upstream-2.34-89.patch +# glibc-2.34-90-g1b9cd6a721 only changes NEWS. +Patch158: glibc-upstream-2.34-91.patch +Patch159: glibc-upstream-2.34-92.patch +# glibc-2.34-93-g72123e1b56 only changes NEWS. +# glibc-2.34-94-g31186e2cb7 is glibc-rh2040657-1.patch. +# glibc-2.34-95-g511b244cc5 is glibc-rh2040657-2.patch. +# glibc-2.34-96-gde6cdd6875 is glibc-rh2040657-6.patch. +Patch160: glibc-upstream-2.34-97.patch +Patch161: glibc-upstream-2.34-98.patch +Patch162: glibc-upstream-2.34-99.patch +Patch163: glibc-c-utf8-locale-3.patch +Patch164: glibc-c-utf8-locale-4.patch +Patch165: glibc-c-utf8-locale-5.patch +Patch166: glibc-upstream-2.34-100.patch +Patch167: glibc-upstream-2.34-101.patch +Patch168: glibc-upstream-2.34-102.patch +Patch169: glibc-upstream-2.34-103.patch +Patch170: glibc-upstream-2.34-104.patch +Patch171: glibc-upstream-2.34-105.patch +Patch172: glibc-upstream-2.34-106.patch +Patch173: glibc-upstream-2.34-107.patch +Patch174: glibc-rh2058224-1.patch +Patch175: glibc-rh2058224-2.patch +Patch176: glibc-rh2058230.patch + +############################################################################## +# Continued list of core "glibc" package information: +############################################################################## +Obsoletes: glibc-profile < 2.4 +Provides: ldconfig + +# The dynamic linker supports DT_GNU_HASH +Provides: rtld(GNU_HASH) + +# We need libgcc for cancellation support in POSIX threads. +Requires: libgcc%{_isa} + +Requires: glibc-common = %{version}-%{release} + +# Various components (regex, glob) have been imported from gnulib. +Provides: bundled(gnulib) + +Requires(pre): basesystem +Requires: basesystem + +%ifarch %{ix86} +# Automatically install the 32-bit variant if the 64-bit variant has +# been installed. This covers the case when glibc.i686 is installed +# after nss_*.x86_64. (See below for the other ordering.) +Recommends: (nss_db(x86-32) if nss_db(x86-64)) +Recommends: (nss_hesiod(x86-32) if nss_hesiod(x86-64)) +%endif + +# This is for building auxiliary programs like memusage, nscd +# For initial glibc bootstraps it can be commented out +%if %{without bootstrap} +BuildRequires: gd-devel libpng-devel zlib-devel +%endif +%if %{with docs} +%endif +%if %{without bootstrap} +BuildRequires: libselinux-devel >= 1.33.4-3 +%endif +BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext +# We need procps-ng (/bin/ps), util-linux (/bin/kill), and gawk (/bin/awk), +# but it is more flexible to require the actual programs and let rpm infer +# the packages. However, until bug 1259054 is widely fixed we avoid the +# following: +# BuildRequires: /bin/ps, /bin/kill, /bin/awk +# And use instead (which should be reverted some time in the future): +BuildRequires: procps-ng, util-linux, gawk +BuildRequires: systemtap-sdt-devel + +%if %{with valgrind} +# Require valgrind for smoke testing the dynamic loader to make sure we +# have not broken valgrind. +BuildRequires: valgrind +%endif + +# We use systemd rpm macros for nscd +BuildRequires: systemd + +# We use python for the microbenchmarks and locale data regeneration +# from unicode sources (carried out manually). We choose python3 +# explicitly because it supports both use cases. On some +# distributions, python3 does not actually install /usr/bin/python3, +# so we also depend on python3-devel. +BuildRequires: python3 python3-devel + +# This GCC version is needed for -fstack-clash-protection support. +BuildRequires: gcc >= 7.2.1-6 +%define enablekernel 3.2 +Conflicts: kernel < %{enablekernel} +%define target %{_target_cpu}-powerel-linux +%ifarch %{arm} +%define target %{_target_cpu}-powerel-linuxeabi +%endif +%ifarch ppc64le +%define target ppc64le-powerel-linux +%endif + +# GNU make 4.0 introduced the -O option. +BuildRequires: make >= 4.0 + +# The intl subsystem generates a parser using bison. +BuildRequires: bison >= 2.7 + +# binutils 2.30-17 is needed for --generate-missing-build-notes. +BuildRequires: binutils >= 2.30-17 + +# Earlier releases have broken support for IRELATIVE relocations +Conflicts: prelink < 0.4.2 + +%if %{without bootstrap} +%if %{with testsuite} +# The testsuite builds static C++ binaries that require a C++ compiler, +# static C++ runtime from libstdc++-static, and lastly static glibc. +BuildRequires: gcc-c++ +BuildRequires: libstdc++-static +# A configure check tests for the ability to create static C++ binaries +# before glibc is built and therefore we need a glibc-static for that +# check to pass even if we aren't going to use any of those objects to +# build the tests. +BuildRequires: glibc-static + +# libidn2 (but not libidn2-devel) is needed for testing AI_IDN/NI_IDN. +BuildRequires: libidn2 + +# The testsuite runs mtrace, which is a perl script +BuildRequires: perl-interpreter +%endif +%endif + +# Filter out all GLIBC_PRIVATE symbols since they are internal to +# the package and should not be examined by any other tool. +%global __filter_GLIBC_PRIVATE 1 +%global __provides_exclude ^libc_malloc_debug\\.so.*$ + +# For language packs we have glibc require a virtual dependency +# "glibc-langpack" wich gives us at least one installed langpack. +# If no langpack providing 'glibc-langpack' was installed you'd +# get language-neutral support e.g. C, POSIX, and C.UTF-8 locales. +# In the past we used to install the glibc-all-langpacks by default +# but we no longer do this to minimize container and VM sizes. +# Today you must actively use the language packs infrastructure to +# install language support. +Requires: glibc-langpack = %{version}-%{release} +Suggests: glibc-minimal-langpack = %{version}-%{release} + +# Suggest extra gconv modules so that they are installed by default but can be +# removed if needed to build a minimal OS image. +Recommends: glibc-gconv-extra%{_isa} = %{version}-%{release} +# Use redhat-rpm-config as a marker for a buildroot configuration, and +# unconditionally pull in glibc-gconv-extra in that case. +Requires: (glibc-gconv-extra%{_isa} = %{version}-%{release} if powerel-rpm-config) + +%description +The glibc package contains standard libraries which are used by +multiple programs on the system. In order to save disk space and +memory, as well as to make upgrading easier, common system code is +kept in one place and shared between programs. This particular package +contains the most important sets of shared libraries: the standard C +library and the standard math library. Without these two libraries, a +Linux system will not function. + +###################################################################### +# libnsl subpackage +###################################################################### + +%package -n libnsl +Summary: Legacy support library for NIS +Requires: %{name}%{_isa} = %{version}-%{release} + +%description -n libnsl +This package provides the legacy version of libnsl library, for +accessing NIS services. + +This library is provided for backwards compatibility only; +applications should use libnsl2 instead to gain IPv6 support. + +############################################################################## +# glibc "devel" sub-package +############################################################################## +%package devel +Summary: Object files for development using standard C libraries. +Requires: %{name} = %{version}-%{release} +Requires: libxcrypt-devel%{_isa} >= 4.0.0 +Requires: kernel-headers >= 3.2 +BuildRequires: kernel-headers >= 3.2 +%if %{need_headers_package} +Requires: %{headers_package_name} = %{version}-%{release} +%endif +%if !(0%{?rhel} > 0 && %{need_headers_package}) +# For backwards compatibility, when the glibc-headers package existed. +Provides: glibc-headers = %{version}-%{release} +Provides: glibc-headers(%{_target_cpu}) +Obsoletes: glibc-headers < %{version}-%{release} +%endif + +%description devel +The glibc-devel package contains the object files necessary +for developing programs which use the standard C libraries (which are +used by nearly all programs). If you are developing programs which +will use the standard C libraries, your system needs to have these +standard object files available in order to create the +executables. + +Install glibc-devel if you are going to develop programs which will +use the standard C libraries. + +############################################################################## +# glibc "doc" sub-package +############################################################################## +%if %{with docs} +%package doc +Summary: Documentation for GNU libc +BuildArch: noarch +Requires: %{name} = %{version}-%{release} + +# Removing texinfo will cause check-safety.sh test to fail because it seems to +# trigger documentation generation based on dependencies. We need to fix this +# upstream in some way that doesn't depend on generating docs to validate the +# texinfo. I expect it's simply the wrong dependency for that target. +BuildRequires: texinfo >= 5.0 + +%description doc +The glibc-doc package contains The GNU C Library Reference Manual in info +format. Additional package documentation is also provided. +%endif + +############################################################################## +# glibc "static" sub-package +############################################################################## +%package static +Summary: C library static libraries for -static linking. +Requires: %{name}-devel = %{version}-%{release} +Requires: libxcrypt-static%{?_isa} >= 4.0.0 + +%description static +The glibc-static package contains the C library static libraries +for -static linking. You don't need these, unless you link statically, +which is highly discouraged. + +############################################################################## +# glibc "headers" sub-package +# - The headers package includes all common headers that are shared amongst +# the multilib builds. It avoids file conflicts between the architecture- +# specific glibc-devel variants. +# Files like gnu/stubs.h which have gnu/stubs-32.h (i686) and gnu/stubs-64.h +# are included in glibc-headers, but the -32 and -64 files are in their +# respective i686 and x86_64 devel packages. +############################################################################## +%if %{need_headers_package} +%package -n %{headers_package_name} +Summary: Additional internal header files for glibc-devel. +Requires: %{name} = %{version}-%{release} +%if 0%{?rhel} > 0 +Provides: %{name}-headers(%{_target_cpu}) +Obsoletes: glibc-headers-x86 < %{version}-%{release} +Obsoletes: glibc-headers-s390 < %{version}-%{release} +%else +BuildArch: noarch +%endif + +%description -n %{headers_package_name} +The %{headers_package_name} package contains the architecture-specific +header files which cannot be included in glibc-devel package. +%endif + +############################################################################## +# glibc "common" sub-package +############################################################################## +%package common +Summary: Common binaries and locale data for glibc +Requires: %{name} = %{version}-%{release} +Requires: tzdata >= 2003a + +%description common +The glibc-common package includes common binaries for the GNU libc +libraries, as well as national language (locale) support. + +###################################################################### +# File triggers to do ldconfig calls automatically (see rhbz#1380878) +###################################################################### + +# File triggers for when libraries are added or removed in standard +# paths. +%transfiletriggerin common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64 +/sbin/ldconfig +%end + +%transfiletriggerpostun common -P 2000000 -- /lib /usr/lib /lib64 /usr/lib64 +/sbin/ldconfig +%end + +# We need to run ldconfig manually because __brp_ldconfig assumes that +# glibc itself is always installed in $RPM_BUILD_ROOT, but with sysroots +# we may be installed into a subdirectory of that path. Therefore we +# unset __brp_ldconfig and run ldconfig by hand with the sysroots path +# passed to -r. +%undefine __brp_ldconfig + +###################################################################### + +%package locale-source +Summary: The sources for the locales +Requires: %{name} = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} + +%description locale-source +The sources for all locales provided in the language packs. +If you are building custom locales you will most likely use +these sources as the basis for your new locale. + +%{lua: +-- To make lua-mode happy: ' + +-- List of supported locales. This is used to generate the langpack +-- subpackages below. This table needs adjustments if the set of +-- glibc locales changes. "code" is the glibc code for the language +-- (before the "_". "name" is the English translation of the language +-- name (for use in subpackage descriptions). "regions" is a table of +-- variant specifiers (after the "_", excluding "@" and "." +-- variants/charset specifiers). The table must be sorted by the code +-- field, and the regions table must be sorted as well. +-- +-- English translations of language names can be obtained using (for +-- the "aa" language in this example): +-- +-- python3 -c 'import langtable; print(langtable.language_name("aa", languageIdQuery="en"))' + +local locales = { + { code="aa", name="Afar", regions={ "DJ", "ER", "ET" } }, + { code="af", name="Afrikaans", regions={ "ZA" } }, + { code="agr", name="Aguaruna", regions={ "PE" } }, + { code="ak", name="Akan", regions={ "GH" } }, + { code="am", name="Amharic", regions={ "ET" } }, + { code="an", name="Aragonese", regions={ "ES" } }, + { code="anp", name="Angika", regions={ "IN" } }, + { + code="ar", + name="Arabic", + regions={ + "AE", + "BH", + "DZ", + "EG", + "IN", + "IQ", + "JO", + "KW", + "LB", + "LY", + "MA", + "OM", + "QA", + "SA", + "SD", + "SS", + "SY", + "TN", + "YE" + } + }, + { code="as", name="Assamese", regions={ "IN" } }, + { code="ast", name="Asturian", regions={ "ES" } }, + { code="ayc", name="Southern Aymara", regions={ "PE" } }, + { code="az", name="Azerbaijani", regions={ "AZ", "IR" } }, + { code="be", name="Belarusian", regions={ "BY" } }, + { code="bem", name="Bemba", regions={ "ZM" } }, + { code="ber", name="Berber", regions={ "DZ", "MA" } }, + { code="bg", name="Bulgarian", regions={ "BG" } }, + { code="bhb", name="Bhili", regions={ "IN" } }, + { code="bho", name="Bhojpuri", regions={ "IN", "NP" } }, + { code="bi", name="Bislama", regions={ "VU" } }, + { code="bn", name="Bangla", regions={ "BD", "IN" } }, + { code="bo", name="Tibetan", regions={ "CN", "IN" } }, + { code="br", name="Breton", regions={ "FR" } }, + { code="brx", name="Bodo", regions={ "IN" } }, + { code="bs", name="Bosnian", regions={ "BA" } }, + { code="byn", name="Blin", regions={ "ER" } }, + { code="ca", name="Catalan", regions={ "AD", "ES", "FR", "IT" } }, + { code="ce", name="Chechen", regions={ "RU" } }, + { code="chr", name="Cherokee", regions={ "US" } }, + { code="ckb", name="Central Kurdish", regions={ "IQ" } }, + { code="cmn", name="Mandarin Chinese", regions={ "TW" } }, + { code="crh", name="Crimean Turkish", regions={ "UA" } }, + { code="cs", name="Czech", regions={ "CZ" } }, + { code="csb", name="Kashubian", regions={ "PL" } }, + { code="cv", name="Chuvash", regions={ "RU" } }, + { code="cy", name="Welsh", regions={ "GB" } }, + { code="da", name="Danish", regions={ "DK" } }, + { + code="de", + name="German", + regions={ "AT", "BE", "CH", "DE", "IT", "LI", "LU" } + }, + { code="doi", name="Dogri", regions={ "IN" } }, + { code="dsb", name="Lower Sorbian", regions={ "DE" } }, + { code="dv", name="Divehi", regions={ "MV" } }, + { code="dz", name="Dzongkha", regions={ "BT" } }, + { code="el", name="Greek", regions={ "CY", "GR" } }, + { + code="en", + name="English", + regions={ + "AG", + "AU", + "BW", + "CA", + "DK", + "GB", + "HK", + "IE", + "IL", + "IN", + "NG", + "NZ", + "PH", + "SC", + "SG", + "US", + "ZA", + "ZM", + "ZW" + } + }, + { code="eo", name="Esperanto", regions={} }, + { + code="es", + name="Spanish", + regions={ + "AR", + "BO", + "CL", + "CO", + "CR", + "CU", + "DO", + "EC", + "ES", + "GT", + "HN", + "MX", + "NI", + "PA", + "PE", + "PR", + "PY", + "SV", + "US", + "UY", + "VE" + } + }, + { code="et", name="Estonian", regions={ "EE" } }, + { code="eu", name="Basque", regions={ "ES" } }, + { code="fa", name="Persian", regions={ "IR" } }, + { code="ff", name="Fulah", regions={ "SN" } }, + { code="fi", name="Finnish", regions={ "FI" } }, + { code="fil", name="Filipino", regions={ "PH" } }, + { code="fo", name="Faroese", regions={ "FO" } }, + { code="fr", name="French", regions={ "BE", "CA", "CH", "FR", "LU" } }, + { code="fur", name="Friulian", regions={ "IT" } }, + { code="fy", name="Western Frisian", regions={ "DE", "NL" } }, + { code="ga", name="Irish", regions={ "IE" } }, + { code="gd", name="Scottish Gaelic", regions={ "GB" } }, + { code="gez", name="Geez", regions={ "ER", "ET" } }, + { code="gl", name="Galician", regions={ "ES" } }, + { code="gu", name="Gujarati", regions={ "IN" } }, + { code="gv", name="Manx", regions={ "GB" } }, + { code="ha", name="Hausa", regions={ "NG" } }, + { code="hak", name="Hakka Chinese", regions={ "TW" } }, + { code="he", name="Hebrew", regions={ "IL" } }, + { code="hi", name="Hindi", regions={ "IN" } }, + { code="hif", name="Fiji Hindi", regions={ "FJ" } }, + { code="hne", name="Chhattisgarhi", regions={ "IN" } }, + { code="hr", name="Croatian", regions={ "HR" } }, + { code="hsb", name="Upper Sorbian", regions={ "DE" } }, + { code="ht", name="Haitian Creole", regions={ "HT" } }, + { code="hu", name="Hungarian", regions={ "HU" } }, + { code="hy", name="Armenian", regions={ "AM" } }, + { code="ia", name="Interlingua", regions={ "FR" } }, + { code="id", name="Indonesian", regions={ "ID" } }, + { code="ig", name="Igbo", regions={ "NG" } }, + { code="ik", name="Inupiaq", regions={ "CA" } }, + { code="is", name="Icelandic", regions={ "IS" } }, + { code="it", name="Italian", regions={ "CH", "IT" } }, + { code="iu", name="Inuktitut", regions={ "CA" } }, + { code="ja", name="Japanese", regions={ "JP" } }, + { code="ka", name="Georgian", regions={ "GE" } }, + { code="kab", name="Kabyle", regions={ "DZ" } }, + { code="kk", name="Kazakh", regions={ "KZ" } }, + { code="kl", name="Kalaallisut", regions={ "GL" } }, + { code="km", name="Khmer", regions={ "KH" } }, + { code="kn", name="Kannada", regions={ "IN" } }, + { code="ko", name="Korean", regions={ "KR" } }, + { code="kok", name="Konkani", regions={ "IN" } }, + { code="ks", name="Kashmiri", regions={ "IN" } }, + { code="ku", name="Kurdish", regions={ "TR" } }, + { code="kw", name="Cornish", regions={ "GB" } }, + { code="ky", name="Kyrgyz", regions={ "KG" } }, + { code="lb", name="Luxembourgish", regions={ "LU" } }, + { code="lg", name="Ganda", regions={ "UG" } }, + { code="li", name="Limburgish", regions={ "BE", "NL" } }, + { code="lij", name="Ligurian", regions={ "IT" } }, + { code="ln", name="Lingala", regions={ "CD" } }, + { code="lo", name="Lao", regions={ "LA" } }, + { code="lt", name="Lithuanian", regions={ "LT" } }, + { code="lv", name="Latvian", regions={ "LV" } }, + { code="lzh", name="Literary Chinese", regions={ "TW" } }, + { code="mag", name="Magahi", regions={ "IN" } }, + { code="mai", name="Maithili", regions={ "IN", "NP" } }, + { code="mfe", name="Morisyen", regions={ "MU" } }, + { code="mg", name="Malagasy", regions={ "MG" } }, + { code="mhr", name="Meadow Mari", regions={ "RU" } }, + { code="mi", name="Maori", regions={ "NZ" } }, + { code="miq", name="Miskito", regions={ "NI" } }, + { code="mjw", name="Karbi", regions={ "IN" } }, + { code="mk", name="Macedonian", regions={ "MK" } }, + { code="ml", name="Malayalam", regions={ "IN" } }, + { code="mn", name="Mongolian", regions={ "MN" } }, + { code="mni", name="Manipuri", regions={ "IN" } }, + { code="mnw", name="Mon", regions={ "MM" } }, + { code="mr", name="Marathi", regions={ "IN" } }, + { code="ms", name="Malay", regions={ "MY" } }, + { code="mt", name="Maltese", regions={ "MT" } }, + { code="my", name="Burmese", regions={ "MM" } }, + { code="nan", name="Min Nan Chinese", regions={ "TW" } }, + { code="nb", name="Norwegian BokmÃ¥l", regions={ "NO" } }, + { code="nds", name="Low German", regions={ "DE", "NL" } }, + { code="ne", name="Nepali", regions={ "NP" } }, + { code="nhn", name="Tlaxcala-Puebla Nahuatl", regions={ "MX" } }, + { code="niu", name="Niuean", regions={ "NU", "NZ" } }, + { code="nl", name="Dutch", regions={ "AW", "BE", "NL" } }, + { code="nn", name="Norwegian Nynorsk", regions={ "NO" } }, + { code="nr", name="South Ndebele", regions={ "ZA" } }, + { code="nso", name="Northern Sotho", regions={ "ZA" } }, + { code="oc", name="Occitan", regions={ "FR" } }, + { code="om", name="Oromo", regions={ "ET", "KE" } }, + { code="or", name="Odia", regions={ "IN" } }, + { code="os", name="Ossetic", regions={ "RU" } }, + { code="pa", name="Punjabi", regions={ "IN", "PK" } }, + { code="pap", name="Papiamento", regions={ "AW", "CW" } }, + { code="pl", name="Polish", regions={ "PL" } }, + { code="ps", name="Pashto", regions={ "AF" } }, + { code="pt", name="Portuguese", regions={ "BR", "PT" } }, + { code="quz", name="Cusco Quechua", regions={ "PE" } }, + { code="raj", name="Rajasthani", regions={ "IN" } }, + { code="ro", name="Romanian", regions={ "RO" } }, + { code="ru", name="Russian", regions={ "RU", "UA" } }, + { code="rw", name="Kinyarwanda", regions={ "RW" } }, + { code="sa", name="Sanskrit", regions={ "IN" } }, + { code="sah", name="Sakha", regions={ "RU" } }, + { code="sat", name="Santali", regions={ "IN" } }, + { code="sc", name="Sardinian", regions={ "IT" } }, + { code="sd", name="Sindhi", regions={ "IN" } }, + { code="se", name="Northern Sami", regions={ "NO" } }, + { code="sgs", name="Samogitian", regions={ "LT" } }, + { code="shn", name="Shan", regions={ "MM" } }, + { code="shs", name="Shuswap", regions={ "CA" } }, + { code="si", name="Sinhala", regions={ "LK" } }, + { code="sid", name="Sidamo", regions={ "ET" } }, + { code="sk", name="Slovak", regions={ "SK" } }, + { code="sl", name="Slovenian", regions={ "SI" } }, + { code="sm", name="Samoan", regions={ "WS" } }, + { code="so", name="Somali", regions={ "DJ", "ET", "KE", "SO" } }, + { code="sq", name="Albanian", regions={ "AL", "MK" } }, + { code="sr", name="Serbian", regions={ "ME", "RS" } }, + { code="ss", name="Swati", regions={ "ZA" } }, + { code="st", name="Southern Sotho", regions={ "ZA" } }, + { code="sv", name="Swedish", regions={ "FI", "SE" } }, + { code="sw", name="Swahili", regions={ "KE", "TZ" } }, + { code="szl", name="Silesian", regions={ "PL" } }, + { code="ta", name="Tamil", regions={ "IN", "LK" } }, + { code="tcy", name="Tulu", regions={ "IN" } }, + { code="te", name="Telugu", regions={ "IN" } }, + { code="tg", name="Tajik", regions={ "TJ" } }, + { code="th", name="Thai", regions={ "TH" } }, + { code="the", name="Chitwania Tharu", regions={ "NP" } }, + { code="ti", name="Tigrinya", regions={ "ER", "ET" } }, + { code="tig", name="Tigre", regions={ "ER" } }, + { code="tk", name="Turkmen", regions={ "TM" } }, + { code="tl", name="Tagalog", regions={ "PH" } }, + { code="tn", name="Tswana", regions={ "ZA" } }, + { code="to", name="Tongan", regions={ "TO" } }, + { code="tpi", name="Tok Pisin", regions={ "PG" } }, + { code="tr", name="Turkish", regions={ "CY", "TR" } }, + { code="ts", name="Tsonga", regions={ "ZA" } }, + { code="tt", name="Tatar", regions={ "RU" } }, + { code="ug", name="Uyghur", regions={ "CN" } }, + { code="uk", name="Ukrainian", regions={ "UA" } }, + { code="unm", name="Unami language", regions={ "US" } }, + { code="ur", name="Urdu", regions={ "IN", "PK" } }, + { code="uz", name="Uzbek", regions={ "UZ" } }, + { code="ve", name="Venda", regions={ "ZA" } }, + { code="vi", name="Vietnamese", regions={ "VN" } }, + { code="wa", name="Walloon", regions={ "BE" } }, + { code="wae", name="Walser", regions={ "CH" } }, + { code="wal", name="Wolaytta", regions={ "ET" } }, + { code="wo", name="Wolof", regions={ "SN" } }, + { code="xh", name="Xhosa", regions={ "ZA" } }, + { code="yi", name="Yiddish", regions={ "US" } }, + { code="yo", name="Yoruba", regions={ "NG" } }, + { code="yue", name="Cantonese", regions={ "HK" } }, + { code="yuw", name="Yau", regions={ "PG" } }, + { code="zh", name="Mandarin Chinese", regions={ "CN", "HK", "SG", "TW" } }, + { code="zu", name="Zulu", regions={ "ZA" } } +} + +-- Prints a list of LANGUAGE "_" REGION pairs. The output is expected +-- to be identical to parse-SUPPORTED.py. Called from the %%prep section. +function print_locale_pairs() + for i = 1, #locales do + local locale = locales[i] + if #locale.regions == 0 then + print(locale.code .. "\n") + else + for j = 1, #locale.regions do + print(locale.code .. "_" .. locale.regions[j] .. "\n") + end + end + end +end + +local function compute_supplements(locale) + local lang = locale.code + local regions = locale.regions + result = "langpacks-core-" .. lang + for i = 1, #regions do + result = result .. " or langpacks-core-" .. lang .. "_" .. regions[i] + end + return result +end + +-- Emit the definition of a language pack package. +local function lang_package(locale) + local lang = locale.code + local langname = locale.name + local suppl = compute_supplements(locale) + print(rpm.expand([[ + +%package langpack-]]..lang..[[ + +Summary: Locale data for ]]..langname..[[ + +Provides: glibc-langpack = %{version}-%{release} +Requires: %{name} = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +Supplements: (glibc and (]]..suppl..[[)) +%description langpack-]]..lang..[[ + +The glibc-langpack-]]..lang..[[ package includes the basic information required +to support the ]]..langname..[[ language in your applications. +%files -f langpack-]]..lang..[[.filelist langpack-]]..lang..[[ +]])) +end + +for i = 1, #locales do + lang_package(locales[i]) +end +} + +# The glibc-all-langpacks provides the virtual glibc-langpack, +# and thus satisfies glibc's requirement for installed locales. +# Users can add one more other langauge packs and then eventually +# uninstall all-langpacks to save space. +%package all-langpacks +Summary: All language packs for %{name}. +Requires: %{name} = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +Provides: %{name}-langpack = %{version}-%{release} +%description all-langpacks + +# No %files, this is an empty package. The C/POSIX and +# C.UTF-8 files are already installed by glibc. We create +# minimal-langpack because the virtual provide of +# glibc-langpack needs at least one package installed +# to satisfy it. Given that no-locales installed is a valid +# use case we support it here with this package. +%package minimal-langpack +Summary: Minimal language packs for %{name}. +Provides: glibc-langpack = %{version}-%{release} +Requires: %{name} = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} +%description minimal-langpack +This is a Meta package that is used to install minimal language packs. +This package ensures you can use C, POSIX, or C.UTF-8 locales, but +nothing else. It is designed for assembling a minimal system. +%files minimal-langpack + +# Infrequently used iconv converter modules. +%package gconv-extra +Summary: All iconv converter modules for %{name}. +Requires: %{name}%{_isa} = %{version}-%{release} +Requires: %{name}-common = %{version}-%{release} + +%description gconv-extra +This package contains all iconv converter modules built in %{name}. + +############################################################################## +# glibc "nscd" sub-package +# +# Deprecated in Fedora 34 and planned for removal in Fedora 35. +# +# systemd-resolved is now enabled by default for DNS caching in Fedora, and +# sssd is capable of caching the remaining named services that nscd handles. +# It is therefore time to retire nscd in Fedora and move to more modern named +# services caches. +# +# For details, see: +# bug 1905135: https://fedoraproject.org/wiki/Changes/DeprecateNSCD +# bug 1905142: https://fedoraproject.org/wiki/Changes/RemoveNSCD +############################################################################## +%package -n nscd +Summary: A Name Service Caching Daemon (nscd). +# Fedora 35 is planned for release on Oct 26 2021, with nscd removed +Provides: deprecated() = 20211026 +Requires: %{name} = %{version}-%{release} +%if %{without bootstrap} +Requires: libselinux >= 1.17.10-1 +%endif +Requires: audit-libs >= 1.1.3 +Requires(pre): /usr/sbin/useradd, coreutils +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd, /usr/sbin/userdel + +%description -n nscd +The nscd daemon caches name service lookups and can improve +performance with LDAP, and may help with DNS as well. + +############################################################################## +# Subpackages for NSS modules except nss_files, nss_compat, nss_dns +############################################################################## + +# This should remain it's own subpackage or "Provides: nss_db" to allow easy +# migration from old systems that previously had the old nss_db package +# installed. Note that this doesn't make the migration that smooth, the +# databases still need rebuilding because the formats were different. +# The nss_db package was deprecated in F16 and onwards: +# https://lists.fedoraproject.org/pipermail/devel/2011-July/153665.html +# The different database format does cause some issues for users: +# https://lists.fedoraproject.org/pipermail/devel/2011-December/160497.html +%package -n nss_db +Summary: Name Service Switch (NSS) module using hash-indexed files +Requires: %{name}%{_isa} = %{version}-%{release} +%ifarch x86_64 +# Automatically install the 32-bit variant if the 64-bit variant has +# been installed. This covers the case when glibc.i686 is installed +# before nss_db.x86_64. (See above for the other ordering.) +Recommends: (nss_db(x86-32) if glibc(x86-32)) +%endif + +%description -n nss_db +The nss_db Name Service Switch module uses hash-indexed files in /var/db +to speed up user, group, service, host name, and other NSS-based lookups. + +%package -n nss_hesiod +Summary: Name Service Switch (NSS) module using Hesiod +Requires: %{name}%{_isa} = %{version}-%{release} +%ifarch x86_64 +# Automatically install the 32-bit variant if the 64-bit variant has +# been installed. This covers the case when glibc.i686 is installed +# before nss_hesiod.x86_64. (See above for the other ordering.) +Recommends: (nss_hesiod(x86-32) if glibc(x86-32)) +%endif + +%description -n nss_hesiod +The nss_hesiod Name Service Switch module uses the Domain Name System +(DNS) as a source for user, group, and service information, following +the Hesiod convention of Project Athena. + +%package nss-devel +Summary: Development files for directly linking NSS service modules +Requires: %{name}%{_isa} = %{version}-%{release} +Requires: nss_db%{_isa} = %{version}-%{release} +Requires: nss_hesiod%{_isa} = %{version}-%{release} + +%description nss-devel +The glibc-nss-devel package contains the object files necessary to +compile applications and libraries which directly link against NSS +modules supplied by glibc. + +This is a rare and special use case; regular development has to use +the glibc-devel package instead. + +############################################################################## +# glibc "utils" sub-package +############################################################################## +%package utils +Summary: Development utilities from GNU C library +Requires: %{name} = %{version}-%{release} + +%description utils +The glibc-utils package contains memusage, a memory usage profiler, +mtrace, a memory leak tracer and xtrace, a function call tracer +which can be helpful during program debugging. + +If unsure if you need this, don't install this package. + +%if %{with benchtests} +%package benchtests +Summary: Benchmarking binaries and scripts for %{name} +%description benchtests +This package provides built benchmark binaries and scripts to run +microbenchmark tests on the system. +%endif + +############################################################################## +# compat-libpthread-nonshared +# See: https://sourceware.org/bugzilla/show_bug.cgi?id=23500 +############################################################################## +%package -n compat-libpthread-nonshared +Summary: Compatibility support for linking against libpthread_nonshared.a. + +%description -n compat-libpthread-nonshared +This package provides compatibility support for applications that expect +libpthread_nonshared.a to exist. The support provided is in the form of +an empty libpthread_nonshared.a that allows dynamic links to succeed. +Such applications should be adjusted to avoid linking against +libpthread_nonshared.a which is no longer used. The static library +libpthread_nonshared.a is an internal implementation detail of the C +runtime and should not be expected to exist. + +############################################################################## +# Prepare for the build. +############################################################################## +%prep +%autosetup -n %{glibcsrcdir} -p1 + +############################################################################## +# %%prep - Additional prep required... +############################################################################## +# Make benchmark scripts executable +chmod +x benchtests/scripts/*.py scripts/pylint + +# Remove all files generated from patching. +find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \; + +# Ensure timestamps on configure files are current to prevent +# regenerating them. +touch `find . -name configure` + +# Ensure *-kw.h files are current to prevent regenerating them. +touch locale/programs/*-kw.h + +# Verify that our locales table is compatible with the locales table +# in the spec file. +set +x +echo '%{lua: print_locale_pairs()}' > localedata/SUPPORTED.spec +set -x +python3 %{SOURCE11} localedata/SUPPORTED > localedata/SUPPORTED.glibc +diff -u \ + --label "spec file" localedata/SUPPORTED.spec \ + --label "glibc localedata/SUPPORTED" localedata/SUPPORTED.glibc +rm localedata/SUPPORTED.spec localedata/SUPPORTED.glibc + +############################################################################## +# Build glibc... +############################################################################## +%build +# Log osystem information +uname -a +LD_SHOW_AUXV=1 /bin/true +cat /proc/cpuinfo +cat /proc/sysinfo 2>/dev/null || true +cat /proc/meminfo +df + +# We build using the native system compilers. +GCC=gcc +GXX=g++ + +# Part of rpm_inherit_flags. Is overridden below. +rpm_append_flag () +{ + BuildFlags="$BuildFlags $*" +} + +# Propagates the listed flags to rpm_append_flag if supplied by +# redhat-rpm-config. +BuildFlags="-O2 -g" +rpm_inherit_flags () +{ + local reference=" $* " + local flag + for flag in $RPM_OPT_FLAGS $RPM_LD_FLAGS ; do + if echo "$reference" | grep -q -F " $flag " ; then + rpm_append_flag "$flag" + fi + done +} + +# Propgate select compiler flags from redhat-rpm-config. These flags +# are target-dependent, so we use only those which are specified in +# redhat-rpm-config. We keep the -m32/-m32/-m64 flags to support +# multilib builds. +# +# Note: For building alternative run-times, care is required to avoid +# overriding the architecture flags which go into CC/CXX. The flags +# below are passed in CFLAGS. + +rpm_inherit_flags \ + "-Wp,-D_GLIBCXX_ASSERTIONS" \ + "-fasynchronous-unwind-tables" \ + "-fstack-clash-protection" \ + "-funwind-tables" \ + "-m31" \ + "-m32" \ + "-m64" \ + "-march=armv8-a+lse" \ + "-march=armv8.1-a" \ + "-march=haswell" \ + "-march=i686" \ + "-march=x86-64" \ + "-march=x86-64-v2" \ + "-march=x86-64-v3" \ + "-march=x86-64-v4" \ + "-march=z13" \ + "-march=z14" \ + "-march=z15" \ + "-march=zEC12" \ + "-mbranch-protection=standard" \ + "-mcpu=power10" \ + "-mcpu=power8" \ + "-mcpu=power9" \ + "-mfpmath=sse" \ + "-msse2" \ + "-mstackrealign" \ + "-mtune=generic" \ + "-mtune=power10" \ + "-mtune=power8" \ + "-mtune=power9" \ + "-mtune=z13" \ + "-mtune=z14" \ + "-mtune=z15" \ + "-mtune=zEC12" \ + "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" \ + +# Use the RHEL 8 baseline for the early dynamic loader code, so that +# running on too old CPUs results in a diagnostic. +%if 0%{?rhel} >= 9 +%ifarch ppc64le +%define glibc_rtld_early_cflags -mcpu=power8 +%endif +%ifarch s390x +%define glibc_rtld_early_cflags -march=z13 +%endif +%ifarch x86_64 +%define glibc_rtld_early_cflags -march=x86-64 +%endif +%endif + +# libc_nonshared.a cannot be built with the default hardening flags +# because the glibc build system is incompatible with +# -D_FORTIFY_SOURCE. The object files need to be marked as to be +# skipped in annobin annotations. (The -specs= variant of activating +# annobin does not work here because of flag ordering issues.) +# See . +BuildFlagsNonshared="-fplugin=annobin -fplugin-arg-annobin-disable -Wa,--generate-missing-build-notes=yes" + +# Special flag to enable annobin annotations for statically linked +# assembler code. Needs to be passed to make; not preserved by +# configure. +%define glibc_make_flags_as ASFLAGS="-g -Wa,--generate-missing-build-notes=yes" +%define glibc_make_flags %{glibc_make_flags_as} + +############################################################################## +# %%build - Generic options. +############################################################################## +EnableKernel="--enable-kernel=%{enablekernel}" +# Save the used compiler and options into the file "Gcc" for use later +# by %%install. +echo "$GCC" > Gcc + +############################################################################## +# build() +# Build glibc in `build-%{target}$1', passing the rest of the arguments +# as CFLAGS to the build (not the same as configure CFLAGS). Several +# global values are used to determine build flags, kernel version, +# system tap support, etc. +############################################################################## +build() +{ + local builddir=build-%{target}${1:+-$1} + ${1+shift} + rm -rf $builddir + mkdir $builddir + pushd $builddir + ../configure CC="$GCC" CXX="$GXX" CFLAGS="$BuildFlags $*" \ + --prefix=%{_prefix} \ + --with-headers=%{_prefix}/include $EnableKernel \ + --with-nonshared-cflags="$BuildFlagsNonshared" \ + --enable-bind-now \ + --build=%{target} \ + --enable-stack-protector=strong \ + --enable-tunables \ + --enable-systemtap \ + ${core_with_options} \ + %{?glibc_rtld_early_cflags:--with-rtld-early-cflags=%glibc_rtld_early_cflags} \ +%ifarch x86_64 %{ix86} + --enable-cet \ +%endif +%ifarch %{ix86} + --disable-multi-arch \ +%endif +%if %{without werror} + --disable-werror \ +%endif + --disable-profile \ +%if %{with bootstrap} + --without-selinux \ +%endif +%ifarch aarch64 + --enable-memory-tagging \ +%endif + --disable-crypt || + { cat config.log; false; } + + %make_build -r %{glibc_make_flags} + popd +} + +# Default set of compiler options. +build + +############################################################################## +# Install glibc... +############################################################################## +%install + +# The built glibc is installed into a subdirectory of $RPM_BUILD_ROOT. +# For a system glibc that subdirectory is "/" (the root of the filesystem). +# This is called a sysroot (system root) and can be changed if we have a +# distribution that supports multiple installed glibc versions. +%define glibc_sysroot $RPM_BUILD_ROOT + +# Remove existing file lists. +find . -type f -name '*.filelist' -exec rm -rf {} \; + +# Reload compiler and build options that were used during %%build. +GCC=`cat Gcc` + +%ifarch riscv64 +# RISC-V ABI wants to install everything in /lib64/lp64d or /usr/lib64/lp64d. +# Make these be symlinks to /lib64 or /usr/lib64 respectively. See: +# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DRHT5YTPK4WWVGL3GIN5BF2IKX2ODHZ3/ +for d in %{glibc_sysroot}%{_libdir} %{glibc_sysroot}/%{_lib}; do + mkdir -p $d + (cd $d && ln -sf . lp64d) +done +%endif + +# Build and install: +pushd build-%{target} +%make_build install_root=%{glibc_sysroot} install +%make_build install_root=%{glibc_sysroot} \ + install-locales -C ../localedata objdir=`pwd` +popd +# Locale creation may produce different groups of hardlinks in an +# unpredictable manner. Re-grouping makes those differences go away. +hardlink %{glibc_sysroot}/usr/lib/locale + +# install_different: +# Install all core libraries into DESTDIR/SUBDIR. Either the file is +# installed as a copy or a symlink to the default install (if it is the +# same). The path SUBDIR_UP is the prefix used to go from +# DESTDIR/SUBDIR to the default installed libraries e.g. +# ln -s SUBDIR_UP/foo.so DESTDIR/SUBDIR/foo.so. +# When you call this function it is expected that you are in the root +# of the build directory, and that the default build directory is: +# "../build-%{target}" (relatively). +# The primary use of this function is to install alternate runtimes +# into the build directory and avoid duplicating this code for each +# runtime. +install_different() +{ + local lib libbase libbaseso dlib + local destdir="$1" + local subdir="$2" + local subdir_up="$3" + local libdestdir="$destdir/$subdir" + # All three arguments must be non-zero paths. + if ! [ "$destdir" \ + -a "$subdir" \ + -a "$subdir_up" ]; then + echo "One of the arguments to install_different was emtpy." + exit 1 + fi + # Create the destination directory and the multilib directory. + mkdir -p "$destdir" + mkdir -p "$libdestdir" + # Walk all of the libraries we installed... + for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db + do + libbase=${lib#*/} + # Take care that `libbaseso' has a * that needs expanding so + # take care with quoting. + libbaseso=$(basename %{glibc_sysroot}/%{_lib}/${libbase}-*.so) + # Only install if different from default build library. + if cmp -s ${lib}.so ../build-%{target}/${lib}.so; then + ln -sf "$subdir_up"/$libbaseso $libdestdir/$libbaseso + else + cp -a ${lib}.so $libdestdir/$libbaseso + fi + dlib=$libdestdir/$(basename %{glibc_sysroot}/%{_lib}/${libbase}.so.*) + ln -sf $libbaseso $dlib + done +} + +############################################################################## +# Remove the files we don't want to distribute +############################################################################## + +# Remove the libNoVersion files. +# XXX: This looks like a bug in glibc that accidentally installed these +# wrong files. We probably don't need this today. +rm -f %{glibc_sysroot}/%{_libdir}/libNoVersion* +rm -f %{glibc_sysroot}/%{_lib}/libNoVersion* + +# Remove the old nss modules. +rm -f %{glibc_sysroot}/%{_lib}/libnss1-* +rm -f %{glibc_sysroot}/%{_lib}/libnss-*.so.1 + +# This statically linked binary is no longer necessary in a world where +# the default Fedora install uses an initramfs, and further we have rpm-ostree +# which captures the whole userspace FS tree. +# Further, see https://github.com/projectatomic/rpm-ostree/pull/1173#issuecomment-355014583 +rm -f %{glibc_sysroot}/{usr/,}sbin/sln + +###################################################################### +# Run ldconfig to create all the symbolic links we need +###################################################################### + +# Note: This has to happen before creating /etc/ld.so.conf. + +mkdir -p %{glibc_sysroot}/var/cache/ldconfig +truncate -s 0 %{glibc_sysroot}/var/cache/ldconfig/aux-cache + +# ldconfig is statically linked, so we can use the new version. +%{glibc_sysroot}/sbin/ldconfig -N -r %{glibc_sysroot} + +############################################################################## +# Install info files +############################################################################## + +%if %{with docs} +# Move the info files if glibc installed them into the wrong location. +if [ -d %{glibc_sysroot}%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then + mkdir -p %{glibc_sysroot}%{_infodir} + mv -f %{glibc_sysroot}%{_prefix}/info/* %{glibc_sysroot}%{_infodir} + rm -rf %{glibc_sysroot}%{_prefix}/info +fi + +# Compress all of the info files. +gzip -9nvf %{glibc_sysroot}%{_infodir}/libc* + +# Copy the debugger interface documentation over to the right location +mkdir -p %{glibc_sysroot}%{_docdir}/glibc +cp elf/rtld-debugger-interface.txt %{glibc_sysroot}%{_docdir}/glibc +%else +rm -f %{glibc_sysroot}%{_infodir}/dir +rm -f %{glibc_sysroot}%{_infodir}/libc.info* +%endif + +############################################################################## +# Create locale sub-package file lists +############################################################################## + +olddir=`pwd` +pushd %{glibc_sysroot}%{_prefix}/lib/locale +rm -f locale-archive +$olddir/build-%{target}/elf/ld.so \ + --library-path $olddir/build-%{target}/ \ + $olddir/build-%{target}/locale/localedef \ + --alias-file=$olddir/intl/locale.alias \ + --prefix %{glibc_sysroot} --add-to-archive \ + eo *_* +# Historically, glibc-all-langpacks deleted the file on updates (sic), +# so we need to restore it in the posttrans scriptlet (like the old +# glibc-all-langpacks versions) +ln locale-archive locale-archive.real + +# Create the file lists for the language specific sub-packages: +for i in eo *_* +do + lang=${i%%_*} + if [ ! -e langpack-${lang}.filelist ]; then + echo "%dir %{_prefix}/lib/locale" >> langpack-${lang}.filelist + fi + echo "%dir %{_prefix}/lib/locale/$i" >> langpack-${lang}.filelist + echo "%{_prefix}/lib/locale/$i/*" >> langpack-${lang}.filelist +done +popd +pushd %{glibc_sysroot}%{_prefix}/share/locale +for i in */LC_MESSAGES/libc.mo +do + locale=${i%%%%/*} + lang=${locale%%%%_*} + echo "%lang($lang) %{_prefix}/share/locale/${i}" \ + >> %{glibc_sysroot}%{_prefix}/lib/locale/langpack-${lang}.filelist +done +popd +mv %{glibc_sysroot}%{_prefix}/lib/locale/*.filelist . + +############################################################################## +# Install configuration files for services +############################################################################## + +install -p -m 644 nss/nsswitch.conf %{glibc_sysroot}/etc/nsswitch.conf + +# This is for ncsd - in glibc 2.2 +install -m 644 nscd/nscd.conf %{glibc_sysroot}/etc +mkdir -p %{glibc_sysroot}%{_tmpfilesdir} +install -m 644 %{SOURCE1} %{buildroot}%{_tmpfilesdir} +mkdir -p %{glibc_sysroot}/lib/systemd/system +install -m 644 nscd/nscd.service nscd/nscd.socket %{glibc_sysroot}/lib/systemd/system + +# Include ld.so.conf +echo 'include ld.so.conf.d/*.conf' > %{glibc_sysroot}/etc/ld.so.conf +truncate -s 0 %{glibc_sysroot}/etc/ld.so.cache +chmod 644 %{glibc_sysroot}/etc/ld.so.conf +mkdir -p %{glibc_sysroot}/etc/ld.so.conf.d +mkdir -p %{glibc_sysroot}/etc/sysconfig +truncate -s 0 %{glibc_sysroot}/etc/sysconfig/nscd +truncate -s 0 %{glibc_sysroot}/etc/gai.conf + +# Include %{_libdir}/gconv/gconv-modules.cache +truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache +chmod 644 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache + +# Remove any zoneinfo files; they are maintained by tzdata. +rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo + +# Make sure %config files have the same timestamp across multilib packages. +# +# XXX: Ideally ld.so.conf should have the timestamp of the spec file, but there +# doesn't seem to be any macro to give us that. So we do the next best thing, +# which is to at least keep the timestamp consistent. The choice of using +# SOURCE0 is arbitrary. +touch -r %{SOURCE0} %{glibc_sysroot}/etc/ld.so.conf +touch -r inet/etc.rpc %{glibc_sysroot}/etc/rpc + +%if %{with benchtests} +# Build benchmark binaries. Ignore the output of the benchmark runs. +pushd build-%{target} +make BENCH_DURATION=1 bench-build +popd + +# Copy over benchmark binaries. +mkdir -p %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests +cp $(find build-%{target}/benchtests -type f -executable) %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ +# ... and the makefile. +for b in %{SOURCE2} %{SOURCE3}; do + cp $b %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ +done +# .. and finally, the comparison scripts. +cp benchtests/scripts/benchout.schema.json %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ +cp benchtests/scripts/compare_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ +cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ +cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/ +%endif + +# The #line directives gperf generates do not give the proper +# file name relative to the build directory. +pushd locale +ln -s programs/*.gperf . +popd +pushd iconv +ln -s ../locale/programs/charmap-kw.gperf . +popd + +%if %{with docs} +# Remove the `dir' info-heirarchy file which will be maintained +# by the system as it adds info files to the install. +rm -f %{glibc_sysroot}%{_infodir}/dir +%endif + +mkdir -p %{glibc_sysroot}/var/{db,run}/nscd +touch %{glibc_sysroot}/var/{db,run}/nscd/{passwd,group,hosts,services} +touch %{glibc_sysroot}/var/run/nscd/{socket,nscd.pid} + +# Move libpcprofile.so and libmemusage.so into the proper library directory. +# They can be moved without any real consequences because users would not use +# them directly. +mkdir -p %{glibc_sysroot}%{_libdir} +mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \ + %{glibc_sysroot}%{_libdir} + +# Disallow linking against libc_malloc_debug. +rm %{glibc_sysroot}%{_libdir}/libc_malloc_debug.so + +# Strip all of the installed object files. +strip -g %{glibc_sysroot}%{_libdir}/*.o + +# The xtrace and memusage scripts have hard-coded paths that need to be +# translated to a correct set of paths using the $LIB token which is +# dynamically translated by ld.so as the default lib directory. +for i in %{glibc_sysroot}%{_prefix}/bin/{xtrace,memusage}; do +%if %{with bootstrap} + test -w $i || continue +%endif + sed -e 's~=/%{_lib}/libpcprofile.so~=%{_libdir}/libpcprofile.so~' \ + -e 's~=/%{_lib}/libmemusage.so~=%{_libdir}/libmemusage.so~' \ + -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \ + -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \ + -i $i +done + +############################################################################## +# Build an empty libpthread_nonshared.a for compatiliby with applications +# that have old linker scripts that reference this file. We ship this only +# in compat-libpthread-nonshared sub-package. +############################################################################## +ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a + +############################################################################## +# Beyond this point in the install process we no longer modify the set of +# installed files. +############################################################################## + +############################################################################## +# Build the file lists used for describing the package and subpackages. +############################################################################## +# There are several main file lists (and many more for +# the langpack sub-packages (langpack-${lang}.filelist)): +# * master.filelist +# - Master file list from which all other lists are built. +# * glibc.filelist +# - Files for the glibc packages. +# * common.filelist +# - Flies for the common subpackage. +# * utils.filelist +# - Files for the utils subpackage. +# * nscd.filelist +# - Files for the nscd subpackage. +# * devel.filelist +# - Files for the devel subpackage. +# * doc.filelist +# - Files for the documentation subpackage. +# * headers.filelist +# - Files for the headers subpackage. +# * static.filelist +# - Files for the static subpackage. +# * libnsl.filelist +# - Files for the libnsl subpackage +# * nss_db.filelist +# * nss_hesiod.filelist +# - File lists for nss_* NSS module subpackages. +# * nss-devel.filelist +# - File list with the .so symbolic links for NSS packages. +# * compat-libpthread-nonshared.filelist. +# - File list for compat-libpthread-nonshared subpackage. + +# Create the main file lists. This way we can append to any one of them later +# wihtout having to create it. Note these are removed at the start of the +# install phase. +touch master.filelist +touch glibc.filelist +touch common.filelist +touch utils.filelist +touch gconv.filelist +touch nscd.filelist +touch devel.filelist +touch doc.filelist +touch headers.filelist +touch static.filelist +touch libnsl.filelist +touch nss_db.filelist +touch nss_hesiod.filelist +touch nss-devel.filelist +touch compat-libpthread-nonshared.filelist + +############################################################################### +# Master file list, excluding a few things. +############################################################################### +{ + # List all files or links that we have created during install. + # Files with 'etc' are configuration files, likewise 'gconv-modules' + # and 'gconv-modules.cache' are caches, and we exclude them. + find %{glibc_sysroot} \( -type f -o -type l \) \ + \( \ + -name etc -printf "%%%%config " -o \ + -name gconv-modules.cache \ + -printf "%%%%verify(not md5 size mtime) " -o \ + -name gconv-modules* \ + -printf "%%%%verify(not md5 size mtime) %%%%config(noreplace) " \ + , \ + ! -path "*/lib/debug/*" -printf "/%%P\n" \) + # List all directories with a %%dir prefix. We omit the info directory and + # all directories in (and including) /usr/share/locale. + find %{glibc_sysroot} -type d \ + \( -path '*%{_prefix}/share/locale' -prune -o \ + \( -path '*%{_prefix}/share/*' \ +%if %{with docs} + ! -path '*%{_infodir}' -o \ +%endif + -path "*%{_prefix}/include/*" \ + \) -printf "%%%%dir /%%P\n" \) +} | { + # Also remove the *.mo entries. We will add them to the + # language specific sub-packages. + # libnss_ files go into subpackages related to NSS modules. + # and .*/share/i18n/charmaps/.*), they go into the sub-package + # "locale-source": + sed -e '\,.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo,d' \ + -e '\,.*/share/i18n/locales/.*,d' \ + -e '\,.*/share/i18n/charmaps/.*,d' \ + -e '\,.*/etc/\(localtime\|nsswitch.conf\|ld\.so\.conf\|ld\.so\.cache\|default\|rpc\|gai\.conf\),d' \ + -e '\,.*/%{_libdir}/lib\(pcprofile\|memusage\)\.so,d' \ + -e '\,.*/bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\),d' +} | sort > master.filelist + +# The master file list is now used by each subpackage to list their own +# files. We go through each package and subpackage now and create their lists. +# Each subpackage picks the files from the master list that they need. +# The order of the subpackage list generation does not matter. + +# Make the master file list read-only after this point to avoid accidental +# modification. +chmod 0444 master.filelist + +############################################################################### +# glibc +############################################################################### + +# Add all files with the following exceptions: +# - The info files '%{_infodir}/dir' +# - The partial (lib*_p.a) static libraries, include files. +# - The static files, objects, unversioned DSOs, and nscd. +# - The bin, locale, some sbin, and share. +# - We want iconvconfig in the main package and we do this by using +# a double negation of -v and [^i] so it removes all files in +# sbin *but* iconvconfig. +# - All the libnss files (we add back the ones we want later). +# - All bench test binaries. +# - The aux-cache, since it's handled specially in the files section. +# - Extra gconv modules. We add the required modules later. +cat master.filelist \ + | grep -v \ + -e '%{_infodir}' \ + -e '%{_libdir}/lib.*_p.a' \ + -e '%{_prefix}/include' \ + -e '%{_libdir}/lib.*\.a' \ + -e '%{_libdir}/.*\.o' \ + -e '%{_libdir}/lib.*\.so' \ + -e '%{_libdir}/gconv/.*\.so$' \ + -e '%{_libdir}/gconv/gconv-modules.d/gconv-modules-extra\.conf$' \ + -e 'nscd' \ + -e '%{_prefix}/bin' \ + -e '%{_prefix}/lib/locale' \ + -e '%{_prefix}/sbin/[^i]' \ + -e '%{_prefix}/share' \ + -e '/var/db/Makefile' \ + -e '/libnss_.*\.so[0-9.]*$' \ + -e '/libnsl' \ + -e 'glibc-benchtests' \ + -e 'aux-cache' \ + > glibc.filelist + +# Add specific files: +# - The nss_files, nss_compat, and nss_db files. +# - The libmemusage.so and libpcprofile.so used by utils. +for module in compat files dns; do + cat master.filelist \ + | grep -E \ + -e "/libnss_$module(\.so\.[0-9.]+|-[0-9.]+\.so)$" \ + >> glibc.filelist +done +grep -e "libmemusage.so" -e "libpcprofile.so" master.filelist >> glibc.filelist + +############################################################################### +# glibc-gconv-extra +############################################################################### + +grep -e "gconv-modules-extra.conf" master.filelist > gconv.filelist + +# Put the essential gconv modules into the main package. +GconvBaseModules="ANSI_X3.110 ISO8859-15 ISO8859-1 CP1252" +GconvBaseModules="$GconvBaseModules UNICODE UTF-16 UTF-32 UTF-7" +%ifarch s390 s390x +GconvBaseModules="$GconvBaseModules ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9" +GconvBaseModules="$GconvBaseModules UTF16_UTF32_Z9 UTF8_UTF32_Z9" +%endif +GconvAllModules=$(cat master.filelist | + sed -n 's|%{_libdir}/gconv/\(.*\)\.so|\1|p') + +# Put the base modules into glibc and the rest into glibc-gconv-extra +for conv in $GconvAllModules; do + if echo $GconvBaseModules | grep -q $conv; then + grep -E -e "%{_libdir}/gconv/$conv.so$" \ + master.filelist >> glibc.filelist + else + grep -E -e "%{_libdir}/gconv/$conv.so$" \ + master.filelist >> gconv.filelist + fi +done + +############################################################################### +# glibc-devel +############################################################################### + +# Static libraries that land in glibc-devel, not glibc-static. +devel_static_library_pattern='/lib\(\(c\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\|pthread\|dl\|rt\|util\|anl\)\.a$' +# Static libraries neither in glibc-devel nor in glibc-static. +other_static_library_pattern='/libpthread_nonshared\.a' + +grep '%{_libdir}/lib.*\.a' master.filelist \ + | grep "$devel_static_library_pattern" \ + | grep -v "$other_static_library_pattern" \ + > devel.filelist + +# Put all of the object files and *.so (not the versioned ones) into the +# devel package. +grep '%{_libdir}/.*\.o' < master.filelist >> devel.filelist +grep '%{_libdir}/lib.*\.so' < master.filelist >> devel.filelist +# The exceptions are: +# - libmemusage.so and libpcprofile.so in glibc used by utils. +# - libnss_*.so which are in nss-devel. +sed -i -e '\,libmemusage.so,d' \ + -e '\,libpcprofile.so,d' \ + -e '\,/libnss_[a-z]*\.so$,d' \ + devel.filelist + +%if %{glibc_autorequires} +mkdir -p %{glibc_sysroot}/%{_rpmconfigdir} %{glibc_sysroot}/%{_fileattrsdir} +sed < %{SOURCE4} \ + -e s/@VERSION@/%{version}/ \ + -e s/@RELEASE@/%{release}/ \ + -e s/@SYMVER@/%{glibc_autorequires_symver}/ \ + > %{glibc_sysroot}/%{_rpmconfigdir}/glibc.req +cp %{SOURCE5} %{glibc_sysroot}/%{_fileattrsdir}/glibc.attr +%endif + +############################################################################### +# glibc-doc +############################################################################### + +%if %{with docs} +# Put the info files into the doc file list, but exclude the generated dir. +grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > doc.filelist +grep '%{_docdir}' master.filelist >> doc.filelist +%endif + +############################################################################### +# glibc-headers +############################################################################### + +%if %{need_headers_package} +# The glibc-headers package includes only common files which are identical +# across all multilib packages. We must keep gnu/stubs.h and gnu/lib-names.h +# in the glibc-headers package, but the -32, -64, -64-v1, and -64-v2 versions +# go into glibc-devel. +grep '%{_prefix}/include/gnu/stubs-.*\.h$' < master.filelist >> devel.filelist || : +grep '%{_prefix}/include/gnu/lib-names-.*\.h$' < master.filelist >> devel.filelist || : +# Put the include files into headers file list. +grep '%{_prefix}/include' < master.filelist \ + | egrep -v '%{_prefix}/include/gnu/stubs-.*\.h$' \ + | egrep -v '%{_prefix}/include/gnu/lib-names-.*\.h$' \ + > headers.filelist +%else +# If there is no glibc-headers package, all header files go into the +# glibc-devel package. +grep '%{_prefix}/include' < master.filelist >> devel.filelist +%endif + +############################################################################### +# glibc-static +############################################################################### + +# Put the rest of the static files into the static package. +grep '%{_libdir}/lib.*\.a' < master.filelist \ + | grep -v "$devel_static_library_pattern" \ + | grep -v "$other_static_library_pattern" \ + > static.filelist + +############################################################################### +# glibc-common +############################################################################### + +# All of the bin and certain sbin files go into the common package except +# iconvconfig which needs to go in glibc. Likewise nscd is excluded because +# it goes in nscd. The iconvconfig binary is kept in the main glibc package +# because we use it in the post-install scriptlet to rebuild the +# gconv-modules.cache. The makedb binary is in nss_db. +grep '%{_prefix}/bin' master.filelist \ + | grep -v '%{_prefix}/bin/makedb' \ + >> common.filelist +grep '%{_prefix}/sbin' master.filelist \ + | grep -v '%{_prefix}/sbin/iconvconfig' \ + | grep -v 'nscd' >> common.filelist +# All of the files under share go into the common package since they should be +# multilib-independent. +# Exceptions: +# - The actual share directory, not owned by us. +# - The info files which go into doc, and the info directory. +# - All documentation files, which go into doc. +grep '%{_prefix}/share' master.filelist \ + | grep -v \ + -e '%{_prefix}/share/info/libc.info.*' \ + -e '%%dir %{prefix}/share/info' \ + -e '%%dir %{prefix}/share' \ + -e '%{_docdir}' \ + >> common.filelist + +############################################################################### +# nscd +############################################################################### + +# The nscd binary must go into the nscd subpackage. +echo '%{_prefix}/sbin/nscd' > nscd.filelist + +############################################################################### +# glibc-utils +############################################################################### + +# Add the utils scripts and programs to the utils subpackage. +cat > utils.filelist < nss_$module.filelist +done +grep -E "%{_prefix}/bin/makedb$" master.filelist >> nss_db.filelist + +############################################################################### +# nss-devel +############################################################################### + +# Symlinks go into the nss-devel package (instead of the main devel +# package). +grep '/libnss_[a-z]*\.so$' master.filelist > nss-devel.filelist + +############################################################################### +# libnsl +############################################################################### + +# Prepare the libnsl-related file lists. +grep -E '/libnsl\.so\.[0-9]+$' master.filelist > libnsl.filelist +test $(wc -l < libnsl.filelist) -eq 1 + +%if %{with benchtests} +############################################################################### +# glibc-benchtests +############################################################################### + +# List of benchmarks. +find build-%{target}/benchtests -type f -executable | while read b; do + echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" +done >> benchtests.filelist +# ... and the makefile. +for b in %{SOURCE2} %{SOURCE3}; do + echo "%{_prefix}/libexec/glibc-benchtests/$(basename $b)" >> benchtests.filelist +done +# ... and finally, the comparison scripts. +echo "%{_prefix}/libexec/glibc-benchtests/benchout.schema.json" >> benchtests.filelist +echo "%{_prefix}/libexec/glibc-benchtests/compare_bench.py*" >> benchtests.filelist +echo "%{_prefix}/libexec/glibc-benchtests/import_bench.py*" >> benchtests.filelist +echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.filelist +%endif + +############################################################################### +# compat-libpthread-nonshared +############################################################################### +echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist + +############################################################################## +# Run the glibc testsuite +############################################################################## +%check +%if %{with testsuite} + +# Run the glibc tests. If any tests fail to build we exit %check with +# an error, otherwise we print the test failure list and the failed +# test output and continue. Write to standard error to avoid +# synchronization issues with make and shell tracing output if +# standard output and standard error are different pipes. +run_tests () { + # This hides a test suite build failure, which should be fatal. We + # check "Summary of test results:" below to verify that all tests + # were built and run. + %make_build check |& tee rpmbuild.check.log >&2 + test -n tests.sum + if ! grep -q '^Summary of test results:$' rpmbuild.check.log ; then + echo "FAIL: test suite build of target: $(basename "$(pwd)")" >& 2 + exit 1 + fi + set +x + grep -v ^PASS: tests.sum > rpmbuild.tests.sum.not-passing || true + if test -n rpmbuild.tests.sum.not-passing ; then + echo ===================FAILED TESTS===================== >&2 + echo "Target: $(basename "$(pwd)")" >& 2 + cat rpmbuild.tests.sum.not-passing >&2 + while read failed_code failed_test ; do + for suffix in out test-result ; do + if test -e "$failed_test.$suffix"; then + echo >&2 + echo "=====$failed_code $failed_test.$suffix=====" >&2 + cat -- "$failed_test.$suffix" >&2 + echo >&2 + fi + done + done &2 + cat misc/tst-syscall-list.out >&2 + set -x +} + +# Increase timeouts +export TIMEOUTFACTOR=16 +parent=$$ +echo ====================TESTING========================= + +# Default libraries. +pushd build-%{target} +run_tests +popd + +echo ====================TESTING END===================== +PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p' +echo ====================PLT RELOCS LD.SO================ +readelf -Wr %{glibc_sysroot}/%{_lib}/ld-*.so | sed -n -e "$PLTCMD" +echo ====================PLT RELOCS LIBC.SO============== +readelf -Wr %{glibc_sysroot}/%{_lib}/libc-*.so | sed -n -e "$PLTCMD" +echo ====================PLT RELOCS END================== + +# Obtain a way to run the dynamic loader. Avoid matching the symbolic +# link and then pick the first loader (although there should be only +# one). See wrap-find-debuginfo.sh. +ldso_path="$(find %{glibc_sysroot}/ -regextype posix-extended \ + -regex '.*/ld(-.*|64|)\.so\.[0-9]+$' -type f | LC_ALL=C sort | head -n1)" +run_ldso="$ldso_path --library-path %{glibc_sysroot}/%{_lib}" + +# Show the auxiliary vector as seen by the new library +# (even if we do not perform the valgrind test). +LD_SHOW_AUXV=1 $run_ldso /bin/true + +%if 0%{?_enable_debug_packages} +# Finally, check if valgrind runs with the new glibc. +# We want to fail building if valgrind is not able to run with this glibc so +# that we can then coordinate with valgrind to get it fixed before we update +# glibc. +%if %{with valgrind} +$run_ldso /usr/bin/valgrind --error-exitcode=1 \ + $run_ldso /usr/bin/true +# true --help performs some memory allocations. +$run_ldso /usr/bin/valgrind --error-exitcode=1 \ + $run_ldso /usr/bin/true --help >/dev/null +%endif +%endif + +%endif + + +%pre -p +-- Check that the running kernel is new enough +required = '%{enablekernel}' +rel = posix.uname("%r") +if rpm.vercmp(rel, required) < 0 then + error("FATAL: kernel too old", 0) +end + +%post -p +%glibc_post_funcs +-- (1) Remove multilib libraries from previous installs. +-- In order to support in-place upgrades, we must immediately remove +-- obsolete platform directories after installing a new glibc +-- version. RPM only deletes files removed by updates near the end +-- of the transaction. If we did not remove the obsolete platform +-- directories here, they may be preferred by the dynamic linker +-- during the execution of subsequent RPM scriptlets, likely +-- resulting in process startup failures. + +-- Full set of libraries glibc may install. +install_libs = { "anl", "BrokenLocale", "c", "dl", "m", "mvec", + "nss_compat", "nss_db", "nss_dns", "nss_files", + "nss_hesiod", "pthread", "resolv", "rt", "SegFault", + "thread_db", "util" } + +-- We are going to remove these libraries. Generally speaking we remove +-- all core libraries in the multilib directory. +-- For the versioned install names, the version are [2.0,9.9*], so we +-- match "libc-2.0.so" and so on up to "libc-9.9*". +-- For the unversioned install names, we match the library plus ".so." +-- followed by digests. +remove_regexps = {} +for i = 1, #install_libs do + -- Versioned install name. + remove_regexps[#remove_regexps + 1] = ("lib" .. install_libs[i] + .. "%%-[2-9]%%.[0-9]+%%.so$") + -- Unversioned install name. + remove_regexps[#remove_regexps + 1] = ("lib" .. install_libs[i] + .. "%%.so%%.[0-9]+$") +end + +-- Two exceptions: +remove_regexps[#install_libs + 1] = "libthread_db%%-1%%.0%%.so" +remove_regexps[#install_libs + 2] = "libSegFault%%.so" + +-- We are going to search these directories. +local remove_dirs = { "%{_libdir}/i686", + "%{_libdir}/i686/nosegneg", + "%{_libdir}/power6", + "%{_libdir}/power7", + "%{_libdir}/power8", + "%{_libdir}/power9", + } + +-- Add all the subdirectories of the glibc-hwcaps subdirectory. +repeat + local iter = posix.files("%{_libdir}/glibc-hwcaps") + if iter ~= nil then + for entry in iter do + if entry ~= "." and entry ~= ".." then + local path = "%{_libdir}/glibc-hwcaps/" .. entry + if posix.access(path .. "/.", "x") then + remove_dirs[#remove_dirs + 1] = path + end + end + end + end +until true + +-- Walk all the directories with files we need to remove... +for _, rdir in ipairs (remove_dirs) do + if posix.access (rdir) then + -- If the directory exists we look at all the files... + local remove_files = posix.files (rdir) + for rfile in remove_files do + for _, rregexp in ipairs (remove_regexps) do + -- Does it match the regexp? + local dso = string.match (rfile, rregexp) + if (dso ~= nil) then + -- Removing file... + os.remove (rdir .. '/' .. rfile) + end + end + end + end +end + +-- (2) Update /etc/ld.so.conf +-- Next we update /etc/ld.so.conf to ensure that it starts with +-- a literal "include ld.so.conf.d/*.conf". + +local ldsoconf = "/etc/ld.so.conf" +local ldsoconf_tmp = "/etc/glibc_post_upgrade.ld.so.conf" + +if posix.access (ldsoconf) then + + -- We must have a "include ld.so.conf.d/*.conf" line. + local have_include = false + for line in io.lines (ldsoconf) do + -- This must match, and we don't ignore whitespace. + if string.match (line, "^include ld.so.conf.d/%%*%%.conf$") ~= nil then + have_include = true + end + end + + if not have_include then + -- Insert "include ld.so.conf.d/*.conf" line at the start of the + -- file. We only support one of these post upgrades running at + -- a time (temporary file name is fixed). + local tmp_fd = io.open (ldsoconf_tmp, "w") + if tmp_fd ~= nil then + tmp_fd:write ("include ld.so.conf.d/*.conf\n") + for line in io.lines (ldsoconf) do + tmp_fd:write (line .. "\n") + end + tmp_fd:close () + local res = os.rename (ldsoconf_tmp, ldsoconf) + if res == nil then + io.stdout:write ("Error: Unable to update configuration file (rename).\n") + end + else + io.stdout:write ("Error: Unable to update configuration file (open).\n") + end + end +end + +-- (3) Rebuild ld.so.cache early. +-- If the format of the cache changes then we need to rebuild +-- the cache early to avoid any problems running binaries with +-- the new glibc. + +-- Note: We use _prefix because Fedora's UsrMove says so. +post_exec ("%{_prefix}/sbin/ldconfig") + +-- (4) Update gconv modules cache. +-- If the /usr/lib/gconv/gconv-modules.cache exists, then update it +-- with the latest set of modules that were just installed. +-- We assume that the cache is in _libdir/gconv and called +-- "gconv-modules.cache". + +update_gconv_modules_cache() + +-- (5) On upgrades, restart systemd if installed. "systemctl -q" does +-- not suppress the error message (which is common in chroots), so +-- open-code post_exec with standard error suppressed. +if tonumber(arg[2]) >= 2 + and posix.access("%{_prefix}/bin/systemctl", "x") +then + local pid = posix.fork() + if pid == 0 then + posix.redirect2null(2) + assert(posix.exec("%{_prefix}/bin/systemctl", "daemon-reexec")) + elseif pid > 0 then + posix.wait(pid) + end +end + +%posttrans all-langpacks -e -p +-- The old glibc-all-langpacks postun scriptlet deleted the locale-archive +-- file, so we may have to resurrect it on upgrades. +local archive_path = "%{_prefix}/lib/locale/locale-archive" +local real_path = "%{_prefix}/lib/locale/locale-archive.real" +local stat_archive = posix.stat(archive_path) +local stat_real = posix.stat(real_path) +-- If the hard link was removed, restore it. +if stat_archive ~= nil and stat_real ~= nil + and (stat_archive.ino ~= stat_real.ino + or stat_archive.dev ~= stat_real.dev) then + posix.unlink(archive_path) + stat_archive = nil +end +-- If the file is gone, restore it. +if stat_archive == nil then + posix.link(real_path, archive_path) +end +-- Remove .rpmsave file potentially created due to config file change. +local save_path = archive_path .. ".rpmsave" +if posix.access(save_path) then + posix.unlink(save_path) +end + +%post gconv-extra -p +%glibc_post_funcs +update_gconv_modules_cache () + +%postun gconv-extra -p +%glibc_post_funcs +update_gconv_modules_cache () + +%pre -n nscd +getent group nscd >/dev/null || /usr/sbin/groupadd -g 28 -r nscd +getent passwd nscd >/dev/null || + /usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \ + -c "NSCD Daemon" -u 28 -g nscd nscd + +%post -n nscd +%systemd_post nscd.service + +%preun -n nscd +%systemd_preun nscd.service + +%postun -n nscd +if test $1 = 0; then + /usr/sbin/userdel nscd > /dev/null 2>&1 || : +fi +%systemd_postun_with_restart nscd.service + +%files -f glibc.filelist +%dir %{_prefix}/%{_lib}/audit +%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf +%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf +%verify(not md5 size mtime) %config(noreplace) /etc/rpc +%dir /etc/ld.so.conf.d +%dir %{_prefix}/libexec/getconf +%dir %{_libdir}/gconv +%dir %{_libdir}/gconv/gconv-modules.d +%dir %attr(0700,root,root) /var/cache/ldconfig +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/cache/ldconfig/aux-cache +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/gai.conf +# If rpm doesn't support %license, then use %doc instead. +%{!?_licensedir:%global license %%doc} +%license COPYING COPYING.LIB LICENSES + +%files -f common.filelist common +%dir %{_prefix}/lib/locale +%dir %{_prefix}/lib/locale/C.utf8 +%{_prefix}/lib/locale/C.utf8/* + +%files all-langpacks +%{_prefix}/lib/locale/locale-archive +%{_prefix}/lib/locale/locale-archive.real +%{_prefix}/share/locale/*/LC_MESSAGES/libc.mo + +%files locale-source +%dir %{_prefix}/share/i18n/locales +%{_prefix}/share/i18n/locales/* +%dir %{_prefix}/share/i18n/charmaps +%{_prefix}/share/i18n/charmaps/* + +%files -f devel.filelist devel +%if %{glibc_autorequires} +%attr(0755,root,root) %{_rpmconfigdir}/glibc.req +%{_fileattrsdir}/glibc.attr +%endif + +%if %{with docs} +%files -f doc.filelist doc +%endif + +%files -f static.filelist static + +%if %{need_headers_package} +%files -f headers.filelist -n %{headers_package_name} +%endif + +%files -f utils.filelist utils + +%files -f gconv.filelist gconv-extra + +%files -f nscd.filelist -n nscd +%config(noreplace) /etc/nscd.conf +%dir %attr(0755,root,root) /var/run/nscd +%dir %attr(0755,root,root) /var/db/nscd +/lib/systemd/system/nscd.service +/lib/systemd/system/nscd.socket +%{_tmpfilesdir}/nscd.conf +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid +%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/services +%ghost %config(missingok,noreplace) /etc/sysconfig/nscd + +%files -f nss_db.filelist -n nss_db +/var/db/Makefile +%files -f nss_hesiod.filelist -n nss_hesiod +%doc hesiod/README.hesiod +%files -f nss-devel.filelist nss-devel + +%files -f libnsl.filelist -n libnsl +/%{_lib}/libnsl.so.1 + +%if %{with benchtests} +%files benchtests -f benchtests.filelist +%endif + +%files -f compat-libpthread-nonshared.filelist -n compat-libpthread-nonshared + +%changelog +* Tue Mar 15 2022 Florian Weimer - 2.34-28 +- Trim changelog (#2063247) + +* Mon Feb 28 2022 Florian Weimer - 2.34-27 +- Fix regression (ldd crash) during dependency sorting in ld.so (#2058230) + +* Mon Feb 28 2022 Florian Weimer - 2.34-26 +- Fix localedef compilation of C.UTF-8 (empty LC_MONETARY keywords) (#2058224) + +* Thu Feb 3 2022 Florian Weimer - 2.34-25 +- Sync with upstream branch release/2.34/master, + commit 6eaf10cbb78d22eae7999d9de55f6b93999e0860: +- socket: Do not use AF_NETLINK in __opensock +- hurd if_index: Explicitly use AF_INET for if index discovery +- Linux: Simplify __opensock and fix race condition [BZ #28353] +- linux: __get_nprocs_sched: do not feed CPU_COUNT_S with garbage [BZ #28850] + +* Tue Feb 1 2022 Florian Weimer - 2.34-24 +- Sync with upstream branch release/2.34/master, + commit 008003dc6e83439c5e04a744b7fd8197df19096e: +- tst-socket-timestamp-compat.c: Check __TIMESIZE [BZ #28837] +- Linux: Only generate 64 bit timestamps for 64 bit time_t recvmsg/recvmmsg +- linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350) +- support: Add support_socket_so_timestamp_time64 + +* Tue Feb 1 2022 Florian Weimer - 2.34-23 +- Align with glibc 2.35 version of C.UTF-8 + +* Tue Feb 1 2022 Florian Weimer - 2.34-22 +- Sync with upstream branch release/2.34/master, + commit aa601d024424c40ae9a69b0c4e394a70ea0570c8: +- x86: Use CHECK_FEATURE_PRESENT to check HLE [BZ #27398] +- x86: Filter out more Intel CPUs for TSX [BZ #27398] +- Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader) +- x86: Fix __wcsncmp_evex in strcmp-evex.S [BZ# 28755] +- x86: Fix __wcsncmp_avx2 in strcmp-avx2.S [BZ# 28755] + +* Mon Jan 24 2022 Florian Weimer - 2.34-21 +- Sync with upstream branch release/2.34/master, + commit 3438bbca90895d32825a52e31a77dc44d273c1c1: +- Linux: Detect user namespace support in io/tst-getcwd-smallbuff +- realpath: Avoid overwriting preexisting error +- CVE-2021-3999: getcwd: Set errno to ERANGE for size == 1 +- tst-realpath-toolong: Fix hurd build +- CVE-2021-3998: realpath: ENAMETOOLONG for result larger than PATH_MAX +- stdlib: Fix formatting of tests list in Makefile +- stdlib: Sort tests in Makefile +- support: Add helpers to create paths longer than PATH_MAX +- powerpc: Fix unrecognized instruction errors with recent binutils +- x86: use default cache size if it cannot be determined [BZ #28784] +- CVE-2022-23218: Buffer overflow in sunrpc svcunix_create (bug 28768) +- sunrpc: Test case for clnt_create "unix" buffer overflow (bug 22542) +- CVE-2022-23219: Buffer overflow in sunrpc clnt_create for "unix" (bug 22542) +- socket: Add the __sockaddr_un_set function +- Disable debuginfod in printer tests [BZ #28757] +- Update syscall lists for Linux 5.16 + +* Wed Jan 19 2022 Florian Weimer - 2.34-20 +- More reliable CPU compatibility diagnostics (#2040657) + +* Fri Jan 14 2022 Florian Weimer - 2.34-19 +- Optionally accelerate sched_getcpu using rseq (#2024347) + +* Thu Jan 13 2022 Florian Weimer - 2.34-18 +- Backport optimized ELF dependency sorting algorithm (#2032647) + +* Thu Jan 13 2022 Florian Weimer - 2.34-17 +- Sync with upstream branch release/2.34/master, + commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5 +- i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771) +- Update syscall lists for Linux 5.15 +- powerpc: Fix unrecognized instruction errors with recent GCC +- timezone: test-case for BZ #28707 +- timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707) +- Fix subscript error with odd TZif file [BZ #28338] +- AArch64: Check for SVE in ifuncs [BZ #28744] +- intl/plural.y: Avoid conflicting declarations of yyerror and yylex +- Linux: Fix 32-bit vDSO for clock_gettime on powerpc32 +- linux: Add sparck brk implementation +- Update sparc libm-test-ulps +- Update hppa libm-test-ulps +- riscv: align stack before calling _dl_init [BZ #28703] +- riscv: align stack in clone [BZ #28702] +- powerpc64[le]: Allocate extra stack frame on syscall.S +- elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704] +- nss: Use "files dns" as the default for the hosts database (bug 28700) +- arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro +- mips: increase stack alignment in clone to match the ABI +- mips: align stack in clone [BZ #28223] + +* Tue Dec 14 2021 Siddhesh Poyarekar - 2.34-16 +- Enable PIE by default on all architectures (#1988382) + +* Tue Dec 14 2021 Florian Weimer - 2.34-15 +- Sync with upstream branch release/2.34/master, + commit 06865865151579d1aa17d38110060a68b85c5d90: +- pthread/tst-cancel28: Fix barrier re-init race condition +- Use $(pie-default) with conformtest +- Run conform/ tests using newly built libc +- nptl: Add one more barrier to nptl/tst-create1 + +* Fri Dec 10 2021 Florian Weimer - 2.34-13 +- x86-64: Remove LD_PREFER_MAP_32BIT_EXEC support (#2029410) + +* Fri Dec 10 2021 Florian Weimer - 2.34-12 +- Add /usr/bin/ld.so --list-diagnostics (#2023422) + +* Tue Dec 7 2021 Florian Weimer - 2.34-11 +- backtrace function crashes without vDSO on ppc64le (#2027789) + +* Fri Dec 3 2021 Florian Weimer - 2.34-10 +- Sync with upstream branch release/2.34/master, + commit 387bff63dc2dccd62b09aa26dccf8cdc5f3c985c: +- powerpc64[le]: Fix CFI and LR save address for asm syscalls [BZ #28532] +- linux: Use /proc/stat fallback for __get_nprocs_conf (BZ #28624) +- nptl: Do not set signal mask on second setjmp return [BZ #28607] +- s390: Use long branches across object boundaries (jgh instead of jh) +- elf: Earlier missing dynamic segment check in _dl_map_object_from_fd +- gconv: Do not emit spurious NUL character in ISO-2022-JP-3 (bug 28524) + +* Tue Nov 16 2021 Arjun Shankar - 2.34-9 +- Create /{bin,lib,lib64,sbin} as symbolic links in test-container + +* Wed Nov 3 2021 Florian Weimer - 2.34-8 +- Sync with upstream branch release/2.34/master, + commit 6548a9bdba95b3e1fcdbd85445342467e4b0cd4f: +- Avoid warning: overriding recipe for .../tst-ro-dynamic-mod.so +- ld.so: Initialize bootstrap_map.l_ld_readonly [BZ #28340] +- ld.so: Replace DL_RO_DYN_SECTION with dl_relocate_ld [BZ #28340] +- Handle NULL input to malloc_usable_size [BZ #28506] +- elf: Avoid deadlock between pthread_create and ctors [BZ #28357] +- timex: Use 64-bit fields on 32-bit TIMESIZE=64 systems (BZ #28469) +- y2038: Use a common definition for stat for sparc32 +- elf: Replace nsid with args.nsid [BZ #27609] +- S390: Add PCI_MIO and SIE HWCAPs +- support: Also return fd when it is 0 + +* Fri Oct 1 2021 Florian Weimer - 2.34-7 +- Drop glibc-rh1992702-*.patch, applied upstream. (#1992702) +- Sync with upstream branch release/2.34/master, + commit a996d13b8a2e101bedbb1bdaa7ffcfea3b959bb2: +- Add missing braces to bsearch inline implementation [BZ #28400] +- Suppress -Wcast-qual warnings in bsearch +- linux: Revert the use of sched_getaffinity on get_nproc (BZ #28310) +- linux: Simplify get_nprocs +- misc: Add __get_nprocs_sched +- nptl: pthread_kill must send signals to a specific thread [BZ #28407] +- support: Add check for TID zero in support_wait_for_thread_exit + +* Thu Sep 23 2021 Florian Weimer - 2.34-6 +- Sync with upstream branch release/2.34/master, + commit 33adeaa3e2b9143c38884bc5aa65ded222ed274e: +- nptl: Avoid setxid deadlock with blocked signals in thread exit [BZ #28361] +- Use support_open_dev_null_range io/tst-closefrom, misc/tst-close_range, and + posix/tst-spawn5 (BZ #28260) +- support: Add support_open_dev_null_range +- nptl: Fix type of pthread_mutexattr_getrobust_np, + pthread_mutexattr_setrobust_np (bug 28036) +- nptl: pthread_kill needs to return ESRCH for old programs (bug 19193) + +* Wed Sep 15 2021 Florian Weimer - 2.34-5 +- Use system CPU count for sysconf(_SC_NPROCESSORS_*) (#1992702) + +* Wed Sep 15 2021 Florian Weimer - 2.34-4 +- Sync with upstream branch release/2.34/master, + commit 4ed990e5b97a61f29f929bdeb36c5b2abb547a64: +- Add MADV_POPULATE_READ and MADV_POPULATE_WRITE from Linux 5.14 to + bits/mman-linux.h +- Update kernel version to 5.14 in tst-mman-consts.py +- Update syscall lists for Linux 5.14 +- Use Linux 5.14 in build-many-glibcs.py +- Fix failing nss/tst-nss-files-hosts-long with local resolver +- iconvconfig: Fix behaviour with --prefix [BZ #28199] +- nptl: Fix race between pthread_kill and thread exit (swbz#12889, #1994068) +- nptl: pthread_kill, pthread_cancel should not fail after exit + (swbz#19193, #1994068) +- support: Add support_wait_for_thread_exit +- MIPS: Setup errno for {f,l,}xstat +- x86-64: Use testl to check __x86_string_control +- elf: Fix missing colon in LD_SHOW_AUXV output (swbz#28253, #1995648) +- librt: add test (swbz#28213, #1994264) +- CVE-2021-38604: fix NULL pointer dereference in mq_notify + (swbz#28213, #1994264) +- Linux: Fix fcntl, ioctl, prctl redirects for _TIME_BITS=64 (bug 28182) +- iconv_charmap: Close output file when done +- copy_and_spawn_sgid: Avoid double calls to close() +- gaiconf_init: Avoid double-free in label and precedence lists +- gconv_parseconfdir: Fix memory leak +- ldconfig: avoid leak on empty paths in config file + +* Wed Sep 15 2021 Florian Weimer - 2.34-3 +- Switch to upstream version of C.UTF-8 (#1997589) + +* Wed Aug 25 2021 Siddhesh Poyarekar - 2.34-2 +- Disable dependencies and linking for libc_malloc_debug.so (#1985048). + +* Mon Aug 2 2021 Florian Weimer - 2.34-1 +- Switch to glibc 2.34 release tarball: +- Update ChangeLog.old/ChangeLog.23. +- Prepare for glibc 2.34 release. +- po/nl.po: Update Dutch translation. +- Update install.texi, and regenerate INSTALL. +- Update translations. +- Update NEWS. +- NEWS: Fix typos, grammar, and missing words +- elf: Fix audit regression