From 2d4cd0f65844495a17fb6694f9991fd43ba5c325 Mon Sep 17 00:00:00 2001 From: Danny Rawlins Date: Sat, 18 Sep 2021 23:23:53 +1000 Subject: [PATCH] [notify] glibc: fixed upstream bugs and CVE-2021-33574 denial of service (application crash) bug --- glibc/.signature | 6 +- glibc/Pkgfile | 6 +- ...{glibc-2.32-4.patch => glibc-2.32-5.patch} | 1671 ++++++++--------- 3 files changed, 794 insertions(+), 889 deletions(-) rename glibc/{glibc-2.32-4.patch => glibc-2.32-5.patch} (85%) diff --git a/glibc/.signature b/glibc/.signature index 0f951399..f0d0d455 100644 --- a/glibc/.signature +++ b/glibc/.signature @@ -1,10 +1,10 @@ untrusted comment: verify with /etc/ports/core.pub -RWRJc1FUaeVeqjLke5N/nYqmPS8FTuYrMIMM+JcrMXi+8bYduM69nInINCD/9aHGE46XRhhs9VXDk9OSXGGgYh+0qi53F07DdwE= -SHA256 (Pkgfile) = 9197d70016bdb5b75c53822a5949a397eda0feb038f59e7b2cfe3feef43eff1e +RWRJc1FUaeVeqkRgbm9Tt3SQmNdovthr26upk4hKJQ4CQPSGukiLSmbpEZl3y+YG1MT4883f5lEsDs2fsDBSvRPBxj19tyXKhws= +SHA256 (Pkgfile) = 83be9dd155cdb0c9e8ef7fcecdfafe55959214ac55f2b0f3c7875b9818481505 SHA256 (.footprint) = aa29daaba0d990bb954964b7605cf132588bcb5ee9cf56d219f2ed26e60eba7b SHA256 (glibc-2.32.tar.xz) = 1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836 SHA256 (linux-5.4.72.tar.xz) = 0e24645bd56fe5b55a7a662895f5562c103d71b54d097281f0c9c71ff22c1172 -SHA256 (glibc-2.32-4.patch) = 3c93822f91229e21fb718390fd41a0dd279032e80c878d2657d268e77f851202 +SHA256 (glibc-2.32-5.patch) = 195b66ab42fd8fa82119b720e0432faebac2087cd16943d230d4839e4d308dcf SHA256 (hosts) = 5c02b256c105f1d4a12fb738d71c1bab9eb126533074d7a0c8a14b92670c9431 SHA256 (resolv.conf) = 72ccb58768a72a771ec37142bc361a18478a07ec9de6e925a20760794389bf51 SHA256 (nsswitch.conf) = 859b8984e5e90aff3cce8f9779996ae4033b280d2122840e9411e2f44a1c2e61 diff --git a/glibc/Pkgfile b/glibc/Pkgfile index 2cbaf942..c6a6b4f3 100644 --- a/glibc/Pkgfile +++ b/glibc/Pkgfile @@ -4,10 +4,10 @@ name=glibc version=2.32 -release=4 +release=5 source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \ https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.72.tar.xz \ - glibc-$version-4.patch \ + glibc-$version-5.patch \ hosts resolv.conf nsswitch.conf host.conf ld.so.conf) build() { @@ -18,7 +18,7 @@ build() { make INSTALL_HDR_PATH=$PKG/usr headers_install chown root:root $PKG/usr - patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/$name-$version-4.patch + patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/$name-$version-5.patch mkdir $SRC/build cd $SRC/build diff --git a/glibc/glibc-2.32-4.patch b/glibc/glibc-2.32-5.patch similarity index 85% rename from glibc/glibc-2.32-4.patch rename to glibc/glibc-2.32-5.patch index ea46dfbd..b08b1624 100644 --- a/glibc/glibc-2.32-4.patch +++ b/glibc/glibc-2.32-5.patch @@ -1,118 +1,7 @@ -diff --git a/NEWS b/NEWS -index 485b8ddffa..2afe250ccf 100644 ---- a/NEWS -+++ b/NEWS -@@ -5,6 +5,25 @@ See the end for copying conditions. - Please send GNU C library bug reports via - using `glibc' in the "product" field. - -+The following bugs are resolved with this release: -+ -+ [20019] NULL pointer dereference in libc.so.6 IFUNC due to uninitialized GOT -+ [26224] iconv hangs when converting some invalid inputs from several IBM -+ character sets (CVE-2020-27618) -+ [26534] libm.so 2.32 SIGILL in pow() due to FMA4 instruction on non-FMA4 -+ system -+ [26555] string: strerrorname_np does not return the documented value -+ [26600] Transaction ID collisions cause slow DNS lookups in getaddrinfo -+ [26636] libc: 32-bit shmctl(IPC_INFO) crashes when shminfo struct is -+ at the end of a memory mapping -+ [26637] libc: semctl SEM_STAT_ANY fails to pass the buffer specified -+ by the caller to the kernel -+ [26639] libc: msgctl IPC_INFO and MSG_INFO return garbage -+ [26853] aarch64: Missing unwind information in statically linked startup code -+ [26932] libc: sh: Multiple floating point functions defined as stubs only -+ [27130] "rep movsb" performance issue -+ [27177] GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on doesn't work -+ - Version 2.32 - - Major new features: -@@ -185,6 +204,14 @@ Security related changes: - Dytrych of the Cisco Security Assessment and Penetration Team (See - TALOS-2020-1019). - -+ CVE-2020-27618: An infinite loop has been fixed in the iconv program when -+ invoked with input containing redundant shift sequences in the IBM1364, -+ IBM1371, IBM1388, IBM1390, or IBM1399 character sets. -+ -+ CVE-2021-33574: The mq_notify function has a potential use-after-free -+ issue when using a notification type of SIGEV_THREAD and a thread -+ attribute with a non-default affinity mask. -+ - The following bugs are resolved with this release: - - [9809] localedata: ckb_IQ: new Kurdish Sorani locale -diff --git a/Rules b/Rules -index 8b771f6095..beab969fde 100644 ---- a/Rules -+++ b/Rules -@@ -155,6 +155,7 @@ xtests: tests $(xtests-special) - else - tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ - $(tests-container:%=$(objpfx)%.out) \ -+ $(tests-mcheck:%=$(objpfx)%-mcheck.out) \ - $(tests-special) $(tests-printers-out) - xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special) - endif -@@ -165,7 +166,7 @@ ifeq ($(run-built-tests),no) - tests-expected = - else - tests-expected = $(tests) $(tests-internal) $(tests-printers) \ -- $(tests-container) -+ $(tests-container) $(tests-mcheck:%=%-mcheck) - endif - tests: - $(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \ -@@ -191,6 +192,7 @@ else - binaries-pie-tests = - binaries-pie-notests = - endif -+binaries-mcheck-tests = $(tests-mcheck:%=%-mcheck) - else - binaries-all-notests = - binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs) -@@ -200,6 +202,7 @@ binaries-static-tests = - binaries-static = - binaries-pie-tests = - binaries-pie-notests = -+binaries-mcheck-tests = - endif - - binaries-pie = $(binaries-pie-tests) $(binaries-pie-notests) -@@ -223,6 +226,14 @@ $(addprefix $(objpfx),$(binaries-shared-tests)): %: %.o \ - $(+link-tests) - endif - -+ifneq "$(strip $(binaries-mcheck-tests))" "" -+$(addprefix $(objpfx),$(binaries-mcheck-tests)): %-mcheck: %.o \ -+ $(link-extra-libs-tests) \ -+ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ -+ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) -+ $(+link-tests) -+endif -+ - ifneq "$(strip $(binaries-pie-tests))" "" - $(addprefix $(objpfx),$(binaries-pie-tests)): %: %.o \ - $(link-extra-libs-tests) \ -@@ -253,6 +264,12 @@ $(addprefix $(objpfx),$(binaries-static-tests)): %: %.o \ - $(+link-static-tests) - endif - -+# All mcheck tests will be run with MALLOC_CHECK_=3 -+define mcheck-ENVS -+$(1)-mcheck-ENV = MALLOC_CHECK_=3 -+endef -+$(foreach t,$(tests-mcheck),$(eval $(call mcheck-ENVS,$(t)))) -+ - ifneq "$(strip $(tests) $(tests-internal) $(xtests) $(test-srcs))" "" - # These are the implicit rules for making test outputs - # from the test programs and whatever input files are present. -diff --git a/debug/Makefile b/debug/Makefile -index 3a60d7af7a..0036edd187 100644 ---- a/debug/Makefile -+++ b/debug/Makefile -@@ -51,7 +51,7 @@ routines = backtrace backtracesyms backtracesymsfd noophooks \ +diff -pruN glibc-2.32.orig/debug/Makefile glibc-2.32/debug/Makefile +--- glibc-2.32.orig/debug/Makefile 2021-09-18 21:02:32.642182626 +1000 ++++ glibc-2.32/debug/Makefile 2021-09-18 21:03:05.310302219 +1000 +@@ -51,7 +51,7 @@ routines = backtrace backtracesyms back explicit_bzero_chk \ stack_chk_fail fortify_fail \ $(static-only-routines) @@ -121,11 +10,9 @@ index 3a60d7af7a..0036edd187 100644 # Don't add stack_chk_fail_local.o to libc.a since __stack_chk_fail_local # is an alias of __stack_chk_fail in stack_chk_fail.o. -diff --git a/debug/warning-nop.c b/debug/warning-nop.c -deleted file mode 100644 -index 4ab7e182b7..0000000000 ---- a/debug/warning-nop.c -+++ /dev/null +diff -pruN glibc-2.32.orig/debug/warning-nop.c glibc-2.32/debug/warning-nop.c +--- glibc-2.32.orig/debug/warning-nop.c 2021-09-18 21:02:32.642182626 +1000 ++++ glibc-2.32/debug/warning-nop.c 1970-01-01 10:00:00.000000000 +1000 @@ -1,70 +0,0 @@ -/* Dummy nop functions to elicit link-time warnings. - Copyright (C) 2005-2020 Free Software Foundation, Inc. @@ -197,33 +84,10 @@ index 4ab7e182b7..0000000000 -#define __builtin_object_size(bos, level) 0 - -#include -diff --git a/elf/Makefile b/elf/Makefile -index 0b78721848..3ba7f4ecfc 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -1381,6 +1381,8 @@ CFLAGS-ifuncmain7pie.c += $(pie-ccflag) - CFLAGS-ifuncmain9pie.c += $(pie-ccflag) - CFLAGS-tst-ifunc-textrel.c += $(pic-ccflag) - -+LDFLAGS-ifuncmain6pie = -Wl,-z,lazy -+ - $(objpfx)ifuncmain1pie: $(objpfx)ifuncmod1.so - $(objpfx)ifuncmain1staticpie: $(objpfx)ifuncdep1pic.o - $(objpfx)ifuncmain1vispie: $(objpfx)ifuncmod1.so -@@ -1630,8 +1632,6 @@ $(objpfx)tst-nodelete-dlclose.out: $(objpfx)tst-nodelete-dlclose-dso.so \ - - tst-env-setuid-ENV = MALLOC_CHECK_=2 MALLOC_MMAP_THRESHOLD_=4096 \ - LD_HWCAP_MASK=0x1 --tst-env-setuid-tunables-ENV = \ -- GLIBC_TUNABLES=glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096 - - $(objpfx)tst-debug1: $(libdl) - $(objpfx)tst-debug1.out: $(objpfx)tst-debug1mod1.so -diff --git a/elf/dl-load.c b/elf/dl-load.c -index e39980fb19..71867e7c1a 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -855,10 +855,12 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l, +diff -pruN glibc-2.32.orig/elf/dl-load.c glibc-2.32/elf/dl-load.c +--- glibc-2.32.orig/elf/dl-load.c 2021-09-18 21:02:32.643182660 +1000 ++++ glibc-2.32/elf/dl-load.c 2021-09-18 21:03:05.311302253 +1000 +@@ -855,10 +855,12 @@ lose (int code, int fd, const char *name /* Process PT_GNU_PROPERTY program header PH in module L after PT_LOAD segments are mapped. Only one NT_GNU_PROPERTY_TYPE_0 @@ -238,7 +102,7 @@ index e39980fb19..71867e7c1a 100644 { const ElfW(Nhdr) *note = (const void *) (ph->p_vaddr + l->l_addr); const ElfW(Addr) size = ph->p_memsz; -@@ -905,7 +907,7 @@ _dl_process_pt_gnu_property (struct link_map *l, const ElfW(Phdr) *ph) +@@ -905,7 +907,7 @@ _dl_process_pt_gnu_property (struct link last_type = type; /* Target specific property processing. */ @@ -247,7 +111,7 @@ index e39980fb19..71867e7c1a 100644 return; /* Check the next property item. */ -@@ -1251,21 +1253,6 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, +@@ -1251,21 +1253,6 @@ _dl_map_object_from_fd (const char *name maplength, has_holes, loader); if (__glibc_unlikely (errstring != NULL)) goto call_lose; @@ -269,7 +133,7 @@ index e39980fb19..71867e7c1a 100644 } if (l->l_ld == 0) -@@ -1377,6 +1364,21 @@ cannot enable executable stack as shared object requires"); +@@ -1377,6 +1364,21 @@ cannot enable executable stack as shared if (l->l_tls_initimage != NULL) l->l_tls_initimage = (char *) l->l_tls_initimage + l->l_addr; @@ -291,11 +155,10 @@ index e39980fb19..71867e7c1a 100644 /* We are done mapping in the file. We no longer need the descriptor. */ if (__glibc_unlikely (__close_nocancel (fd) != 0)) { -diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c -index 26e6e26612..15b29bcb90 100644 ---- a/elf/dl-tunables.c -+++ b/elf/dl-tunables.c -@@ -177,6 +177,7 @@ parse_tunables (char *tunestr, char *valstring) +diff -pruN glibc-2.32.orig/elf/dl-tunables.c glibc-2.32/elf/dl-tunables.c +--- glibc-2.32.orig/elf/dl-tunables.c 2021-09-18 21:02:32.643182660 +1000 ++++ glibc-2.32/elf/dl-tunables.c 2021-09-18 21:03:05.311302253 +1000 +@@ -177,6 +177,7 @@ parse_tunables (char *tunestr, char *val return; char *p = tunestr; @@ -303,7 +166,7 @@ index 26e6e26612..15b29bcb90 100644 while (true) { -@@ -190,7 +191,11 @@ parse_tunables (char *tunestr, char *valstring) +@@ -190,7 +191,11 @@ parse_tunables (char *tunestr, char *val /* If we reach the end of the string before getting a valid name-value pair, bail out. */ if (p[len] == '\0') @@ -316,7 +179,7 @@ index 26e6e26612..15b29bcb90 100644 /* We did not find a valid name-value pair before encountering the colon. */ -@@ -216,35 +221,28 @@ parse_tunables (char *tunestr, char *valstring) +@@ -216,35 +221,28 @@ parse_tunables (char *tunestr, char *val if (tunable_is_name (cur->name, name)) { @@ -371,7 +234,7 @@ index 26e6e26612..15b29bcb90 100644 } if (cur->security_level != TUNABLE_SECLEVEL_NONE) -@@ -257,9 +255,7 @@ parse_tunables (char *tunestr, char *valstring) +@@ -257,9 +255,7 @@ parse_tunables (char *tunestr, char *val } } @@ -382,10 +245,9 @@ index 26e6e26612..15b29bcb90 100644 p += len + 1; } } -diff --git a/elf/ifuncmain6pie.c b/elf/ifuncmain6pie.c -index 04faeb86ef..4a01906836 100644 ---- a/elf/ifuncmain6pie.c -+++ b/elf/ifuncmain6pie.c +diff -pruN glibc-2.32.orig/elf/ifuncmain6pie.c glibc-2.32/elf/ifuncmain6pie.c +--- glibc-2.32.orig/elf/ifuncmain6pie.c 2021-09-18 21:02:32.643182660 +1000 ++++ glibc-2.32/elf/ifuncmain6pie.c 2021-09-18 21:03:05.311302253 +1000 @@ -9,7 +9,6 @@ #include "ifunc-sel.h" @@ -431,10 +293,9 @@ index 04faeb86ef..4a01906836 100644 if (foo () != -30) abort (); -diff --git a/elf/ifuncmod6.c b/elf/ifuncmod6.c -index 2e16c1d06d..2f6d0715e6 100644 ---- a/elf/ifuncmod6.c -+++ b/elf/ifuncmod6.c +diff -pruN glibc-2.32.orig/elf/ifuncmod6.c glibc-2.32/elf/ifuncmod6.c +--- glibc-2.32.orig/elf/ifuncmod6.c 2021-09-18 21:02:32.643182660 +1000 ++++ glibc-2.32/elf/ifuncmod6.c 2021-09-18 21:03:05.311302253 +1000 @@ -4,7 +4,7 @@ extern int foo (void); typedef int (*foo_p) (void); @@ -456,11 +317,31 @@ index 2e16c1d06d..2f6d0715e6 100644 - return foo; + return foo (); } -diff --git a/elf/rtld.c b/elf/rtld.c -index 5b882163fa..14a42ed00a 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -1534,10 +1534,10 @@ of this helper program; chances are you did not intend to run this program.\n\ +diff -pruN glibc-2.32.orig/elf/Makefile glibc-2.32/elf/Makefile +--- glibc-2.32.orig/elf/Makefile 2021-09-18 21:02:32.643182660 +1000 ++++ glibc-2.32/elf/Makefile 2021-09-18 21:03:05.311302253 +1000 +@@ -1381,6 +1381,8 @@ CFLAGS-ifuncmain7pie.c += $(pie-ccflag) + CFLAGS-ifuncmain9pie.c += $(pie-ccflag) + CFLAGS-tst-ifunc-textrel.c += $(pic-ccflag) + ++LDFLAGS-ifuncmain6pie = -Wl,-z,lazy ++ + $(objpfx)ifuncmain1pie: $(objpfx)ifuncmod1.so + $(objpfx)ifuncmain1staticpie: $(objpfx)ifuncdep1pic.o + $(objpfx)ifuncmain1vispie: $(objpfx)ifuncmod1.so +@@ -1630,8 +1632,6 @@ $(objpfx)tst-nodelete-dlclose.out: $(obj + + tst-env-setuid-ENV = MALLOC_CHECK_=2 MALLOC_MMAP_THRESHOLD_=4096 \ + LD_HWCAP_MASK=0x1 +-tst-env-setuid-tunables-ENV = \ +- GLIBC_TUNABLES=glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096 + + $(objpfx)tst-debug1: $(libdl) + $(objpfx)tst-debug1.out: $(objpfx)tst-debug1mod1.so +diff -pruN glibc-2.32.orig/elf/rtld.c glibc-2.32/elf/rtld.c +--- glibc-2.32.orig/elf/rtld.c 2021-09-18 21:02:32.644182694 +1000 ++++ glibc-2.32/elf/rtld.c 2021-09-18 21:03:05.311302253 +1000 +@@ -1534,10 +1534,10 @@ of this helper program; chances are you switch (ph[-1].p_type) { case PT_NOTE: @@ -473,162 +354,9 @@ index 5b882163fa..14a42ed00a 100644 break; } -diff --git a/elf/tst-env-setuid-tunables.c b/elf/tst-env-setuid-tunables.c -index 971d5892b1..ca0c8c245c 100644 ---- a/elf/tst-env-setuid-tunables.c -+++ b/elf/tst-env-setuid-tunables.c -@@ -25,35 +25,76 @@ - #include "config.h" - #undef _LIBC - --#define test_parent test_parent_tunables --#define test_child test_child_tunables -- --static int test_child_tunables (void); --static int test_parent_tunables (void); -- --#include "tst-env-setuid.c" -- --#define CHILD_VALSTRING_VALUE "glibc.malloc.mmap_threshold=4096" --#define PARENT_VALSTRING_VALUE \ -- "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096" -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+const char *teststrings[] = -+{ -+ "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.check=2:glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096:glibc.malloc.check=2", -+ "glibc.malloc.perturb=0x800", -+ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.perturb=0x800:not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", -+ "glibc.not_valid.check=2:glibc.malloc.mmap_threshold=4096", -+ "not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096:glibc.malloc.check=2", -+ "glibc.malloc.check=4:glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096", -+ ":glibc.malloc.garbage=2:glibc.malloc.check=1", -+ "glibc.malloc.check=1:glibc.malloc.check=2", -+ "not_valid.malloc.check=2", -+ "glibc.not_valid.check=2", -+}; -+ -+const char *resultstrings[] = -+{ -+ "glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.perturb=0x800", -+ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.mmap_threshold=4096", -+ "glibc.malloc.mmap_threshold=4096", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+}; - - static int --test_child_tunables (void) -+test_child (int off) - { - const char *val = getenv ("GLIBC_TUNABLES"); - - #if HAVE_TUNABLES -- if (val != NULL && strcmp (val, CHILD_VALSTRING_VALUE) == 0) -+ if (val != NULL && strcmp (val, resultstrings[off]) == 0) - return 0; - - if (val != NULL) -- printf ("Unexpected GLIBC_TUNABLES VALUE %s\n", val); -+ printf ("[%d] Unexpected GLIBC_TUNABLES VALUE %s\n", off, val); - - return 1; - #else - if (val != NULL) - { -- printf ("GLIBC_TUNABLES not cleared\n"); -+ printf ("[%d] GLIBC_TUNABLES not cleared\n", off); - return 1; - } - return 0; -@@ -61,15 +102,48 @@ test_child_tunables (void) - } - - static int --test_parent_tunables (void) -+do_test (int argc, char **argv) - { -- const char *val = getenv ("GLIBC_TUNABLES"); -+ /* Setgid child process. */ -+ if (argc == 2) -+ { -+ if (getgid () == getegid ()) -+ /* This can happen if the file system is mounted nosuid. */ -+ FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n", -+ (intmax_t) getgid ()); - -- if (val != NULL && strcmp (val, PARENT_VALSTRING_VALUE) == 0) -- return 0; -+ int ret = test_child (atoi (argv[1])); - -- if (val != NULL) -- printf ("Unexpected GLIBC_TUNABLES VALUE %s\n", val); -+ if (ret != 0) -+ exit (1); - -- return 1; -+ exit (EXIT_SUCCESS); -+ } -+ else -+ { -+ int ret = 0; -+ -+ /* Spawn tests. */ -+ for (int i = 0; i < array_length (teststrings); i++) -+ { -+ char buf[INT_BUFSIZE_BOUND (int)]; -+ -+ printf ("Spawned test for %s (%d)\n", teststrings[i], i); -+ snprintf (buf, sizeof (buf), "%d\n", i); -+ if (setenv ("GLIBC_TUNABLES", teststrings[i], 1) != 0) -+ exit (1); -+ -+ int status = support_capture_subprogram_self_sgid (buf); -+ -+ /* Bail out early if unsupported. */ -+ if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) -+ return EXIT_UNSUPPORTED; -+ -+ ret |= status; -+ } -+ return ret; -+ } - } -+ -+#define TEST_FUNCTION_ARGV do_test -+#include -diff --git a/elf/tst-env-setuid.c b/elf/tst-env-setuid.c -index 41dc79e83a..2dbccdb69e 100644 ---- a/elf/tst-env-setuid.c -+++ b/elf/tst-env-setuid.c +diff -pruN glibc-2.32.orig/elf/tst-env-setuid.c glibc-2.32/elf/tst-env-setuid.c +--- glibc-2.32.orig/elf/tst-env-setuid.c 2021-09-18 21:02:32.644182694 +1000 ++++ glibc-2.32/elf/tst-env-setuid.c 2021-09-18 21:03:05.311302253 +1000 @@ -29,173 +29,12 @@ #include #include @@ -858,25 +586,158 @@ index 41dc79e83a..2dbccdb69e 100644 } #define TEST_FUNCTION_ARGV do_test -diff --git a/iconv/Versions b/iconv/Versions -index 8a5f4cf780..d51af52fa3 100644 ---- a/iconv/Versions -+++ b/iconv/Versions -@@ -6,7 +6,9 @@ libc { - GLIBC_PRIVATE { - # functions shared with iconv program - __gconv_get_alias_db; __gconv_get_cache; __gconv_get_modules_db; -- __gconv_open; __gconv_create_spec; -+ -+ # functions used elsewhere in glibc -+ __gconv_open; __gconv_create_spec; __gconv_destroy_spec; +diff -pruN glibc-2.32.orig/elf/tst-env-setuid-tunables.c glibc-2.32/elf/tst-env-setuid-tunables.c +--- glibc-2.32.orig/elf/tst-env-setuid-tunables.c 2021-09-18 21:02:32.644182694 +1000 ++++ glibc-2.32/elf/tst-env-setuid-tunables.c 2021-09-18 21:03:05.311302253 +1000 +@@ -25,35 +25,76 @@ + #include "config.h" + #undef _LIBC - # function used by the gconv modules - __gconv_transliterate; -diff --git a/iconv/gconv_charset.c b/iconv/gconv_charset.c -index 6ccd0773cc..4ba0aa99f5 100644 ---- a/iconv/gconv_charset.c -+++ b/iconv/gconv_charset.c +-#define test_parent test_parent_tunables +-#define test_child test_child_tunables ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include + +-static int test_child_tunables (void); +-static int test_parent_tunables (void); +- +-#include "tst-env-setuid.c" ++const char *teststrings[] = ++{ ++ "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.check=2:glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096:glibc.malloc.check=2", ++ "glibc.malloc.perturb=0x800", ++ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.perturb=0x800:not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", ++ "glibc.not_valid.check=2:glibc.malloc.mmap_threshold=4096", ++ "not_valid.malloc.check=2:glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096:glibc.malloc.check=2", ++ "glibc.malloc.check=4:glibc.malloc.garbage=2:glibc.maoc.mmap_threshold=4096", ++ ":glibc.malloc.garbage=2:glibc.malloc.check=1", ++ "glibc.malloc.check=1:glibc.malloc.check=2", ++ "not_valid.malloc.check=2", ++ "glibc.not_valid.check=2", ++}; + +-#define CHILD_VALSTRING_VALUE "glibc.malloc.mmap_threshold=4096" +-#define PARENT_VALSTRING_VALUE \ +- "glibc.malloc.check=2:glibc.malloc.mmap_threshold=4096" ++const char *resultstrings[] = ++{ ++ "glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.perturb=0x800", ++ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.perturb=0x800:glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.mmap_threshold=4096", ++ "glibc.malloc.mmap_threshold=4096", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++}; + + static int +-test_child_tunables (void) ++test_child (int off) + { + const char *val = getenv ("GLIBC_TUNABLES"); + + #if HAVE_TUNABLES +- if (val != NULL && strcmp (val, CHILD_VALSTRING_VALUE) == 0) ++ if (val != NULL && strcmp (val, resultstrings[off]) == 0) + return 0; + + if (val != NULL) +- printf ("Unexpected GLIBC_TUNABLES VALUE %s\n", val); ++ printf ("[%d] Unexpected GLIBC_TUNABLES VALUE %s\n", off, val); + + return 1; + #else + if (val != NULL) + { +- printf ("GLIBC_TUNABLES not cleared\n"); ++ printf ("[%d] GLIBC_TUNABLES not cleared\n", off); + return 1; + } + return 0; +@@ -61,15 +102,48 @@ test_child_tunables (void) + } + + static int +-test_parent_tunables (void) ++do_test (int argc, char **argv) + { +- const char *val = getenv ("GLIBC_TUNABLES"); ++ /* Setgid child process. */ ++ if (argc == 2) ++ { ++ if (getgid () == getegid ()) ++ /* This can happen if the file system is mounted nosuid. */ ++ FAIL_UNSUPPORTED ("SGID failed: GID and EGID match (%jd)\n", ++ (intmax_t) getgid ()); + +- if (val != NULL && strcmp (val, PARENT_VALSTRING_VALUE) == 0) +- return 0; ++ int ret = test_child (atoi (argv[1])); + +- if (val != NULL) +- printf ("Unexpected GLIBC_TUNABLES VALUE %s\n", val); ++ if (ret != 0) ++ exit (1); + +- return 1; ++ exit (EXIT_SUCCESS); ++ } ++ else ++ { ++ int ret = 0; ++ ++ /* Spawn tests. */ ++ for (int i = 0; i < array_length (teststrings); i++) ++ { ++ char buf[INT_BUFSIZE_BOUND (int)]; ++ ++ printf ("Spawned test for %s (%d)\n", teststrings[i], i); ++ snprintf (buf, sizeof (buf), "%d\n", i); ++ if (setenv ("GLIBC_TUNABLES", teststrings[i], 1) != 0) ++ exit (1); ++ ++ int status = support_capture_subprogram_self_sgid (buf); ++ ++ /* Bail out early if unsupported. */ ++ if (WEXITSTATUS (status) == EXIT_UNSUPPORTED) ++ return EXIT_UNSUPPORTED; ++ ++ ret |= status; ++ } ++ return ret; ++ } + } ++ ++#define TEST_FUNCTION_ARGV do_test ++#include +diff -pruN glibc-2.32.orig/iconv/gconv_charset.c glibc-2.32/iconv/gconv_charset.c +--- glibc-2.32.orig/iconv/gconv_charset.c 2021-09-18 21:02:32.646182763 +1000 ++++ glibc-2.32/iconv/gconv_charset.c 2021-09-18 21:03:05.311302253 +1000 @@ -216,3 +216,13 @@ out: return ret; } @@ -891,10 +752,9 @@ index 6ccd0773cc..4ba0aa99f5 100644 + return; +} +libc_hidden_def (__gconv_destroy_spec) -diff --git a/iconv/gconv_charset.h b/iconv/gconv_charset.h -index b39b09aea1..e9c122cf7e 100644 ---- a/iconv/gconv_charset.h -+++ b/iconv/gconv_charset.h +diff -pruN glibc-2.32.orig/iconv/gconv_charset.h glibc-2.32/iconv/gconv_charset.h +--- glibc-2.32.orig/iconv/gconv_charset.h 2021-09-18 21:02:32.646182763 +1000 ++++ glibc-2.32/iconv/gconv_charset.h 2021-09-18 21:03:05.311302253 +1000 @@ -48,33 +48,6 @@ #define GCONV_IGNORE_ERRORS_SUFFIX "IGNORE" @@ -929,11 +789,10 @@ index b39b09aea1..e9c122cf7e 100644 /* This function copies in-order, characters from the source 's' that are either alpha-numeric or one in one of these: "_-.,:/" - into the destination 'wp' while dropping all other characters. In the process, it converts all -diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h -index e86938dae7..f721ce30ff 100644 ---- a/iconv/gconv_int.h -+++ b/iconv/gconv_int.h -@@ -152,6 +152,27 @@ extern int __gconv_open (struct gconv_spec *conv_spec, +diff -pruN glibc-2.32.orig/iconv/gconv_int.h glibc-2.32/iconv/gconv_int.h +--- glibc-2.32.orig/iconv/gconv_int.h 2021-09-18 21:02:32.646182763 +1000 ++++ glibc-2.32/iconv/gconv_int.h 2021-09-18 21:03:05.311302253 +1000 +@@ -152,6 +152,27 @@ extern int __gconv_open (struct gconv_sp __gconv_t *handle, int flags); libc_hidden_proto (__gconv_open) @@ -961,11 +820,10 @@ index e86938dae7..f721ce30ff 100644 /* Free resources associated with transformation descriptor CD. */ extern int __gconv_close (__gconv_t cd) attribute_hidden; -diff --git a/iconv/iconv_open.c b/iconv/iconv_open.c -index dd54bc12e0..5b30055c04 100644 ---- a/iconv/iconv_open.c -+++ b/iconv/iconv_open.c -@@ -39,7 +39,7 @@ iconv_open (const char *tocode, const char *fromcode) +diff -pruN glibc-2.32.orig/iconv/iconv_open.c glibc-2.32/iconv/iconv_open.c +--- glibc-2.32.orig/iconv/iconv_open.c 2021-09-18 21:02:32.646182763 +1000 ++++ glibc-2.32/iconv/iconv_open.c 2021-09-18 21:03:05.311302253 +1000 +@@ -39,7 +39,7 @@ iconv_open (const char *tocode, const ch int res = __gconv_open (&conv_spec, &cd, 0); @@ -974,10 +832,9 @@ index dd54bc12e0..5b30055c04 100644 if (__builtin_expect (res, __GCONV_OK) != __GCONV_OK) { -diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c -index b4334faa57..d59979759c 100644 ---- a/iconv/iconv_prog.c -+++ b/iconv/iconv_prog.c +diff -pruN glibc-2.32.orig/iconv/iconv_prog.c glibc-2.32/iconv/iconv_prog.c +--- glibc-2.32.orig/iconv/iconv_prog.c 2021-09-18 21:02:32.646182763 +1000 ++++ glibc-2.32/iconv/iconv_prog.c 2021-09-18 21:03:05.311302253 +1000 @@ -184,7 +184,7 @@ main (int argc, char *argv[]) /* Let's see whether we have these coded character sets. */ res = __gconv_open (&conv_spec, &cd, 0); @@ -987,10 +844,9 @@ index b4334faa57..d59979759c 100644 if (res != __GCONV_OK) { -diff --git a/iconv/tst-iconv_prog.sh b/iconv/tst-iconv_prog.sh -index 8298136b7f..d8db7b335c 100644 ---- a/iconv/tst-iconv_prog.sh -+++ b/iconv/tst-iconv_prog.sh +diff -pruN glibc-2.32.orig/iconv/tst-iconv_prog.sh glibc-2.32/iconv/tst-iconv_prog.sh +--- glibc-2.32.orig/iconv/tst-iconv_prog.sh 2021-09-18 21:02:32.646182763 +1000 ++++ glibc-2.32/iconv/tst-iconv_prog.sh 2021-09-18 21:03:05.311302253 +1000 @@ -102,12 +102,16 @@ hangarray=( "\x00\x80;-c;IBM1161;UTF-8//TRANSLIT//IGNORE" "\x00\xdb;-c;IBM1162;UTF-8//TRANSLIT//IGNORE" @@ -1014,34 +870,23 @@ index 8298136b7f..d8db7b335c 100644 "\x00\x53;-c;IBM16804;UTF-8//TRANSLIT//IGNORE" "\x00\x41;-c;IBM274;UTF-8//TRANSLIT//IGNORE" "\x00\x41;-c;IBM275;UTF-8//TRANSLIT//IGNORE" -diff --git a/iconvdata/Makefile b/iconvdata/Makefile -index 4ec2741cdc..4eef07557e 100644 ---- a/iconvdata/Makefile -+++ b/iconvdata/Makefile -@@ -73,7 +73,8 @@ modules.so := $(addsuffix .so, $(modules)) - 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-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \ -+ bug-iconv13 bug-iconv14 - ifeq ($(have-thread-library),yes) - tests += bug-iconv3 - endif -@@ -321,6 +322,8 @@ $(objpfx)bug-iconv10.out: $(objpfx)gconv-modules \ - $(addprefix $(objpfx),$(modules.so)) - $(objpfx)bug-iconv12.out: $(objpfx)gconv-modules \ - $(addprefix $(objpfx),$(modules.so)) -+$(objpfx)bug-iconv14.out: $(objpfx)gconv-modules \ -+ $(addprefix $(objpfx),$(modules.so)) +diff -pruN glibc-2.32.orig/iconv/Versions glibc-2.32/iconv/Versions +--- glibc-2.32.orig/iconv/Versions 2021-09-18 21:02:32.646182763 +1000 ++++ glibc-2.32/iconv/Versions 2021-09-18 21:03:05.311302253 +1000 +@@ -6,7 +6,9 @@ libc { + GLIBC_PRIVATE { + # functions shared with iconv program + __gconv_get_alias_db; __gconv_get_cache; __gconv_get_modules_db; +- __gconv_open; __gconv_create_spec; ++ ++ # functions used elsewhere in glibc ++ __gconv_open; __gconv_create_spec; __gconv_destroy_spec; - $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ - $(addprefix $(objpfx),$(modules.so)) \ -diff --git a/iconvdata/bug-iconv13.c b/iconvdata/bug-iconv13.c -new file mode 100644 -index 0000000000..87aaff398e ---- /dev/null -+++ b/iconvdata/bug-iconv13.c + # function used by the gconv modules + __gconv_transliterate; +diff -pruN glibc-2.32.orig/iconvdata/bug-iconv13.c glibc-2.32/iconvdata/bug-iconv13.c +--- glibc-2.32.orig/iconvdata/bug-iconv13.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/iconvdata/bug-iconv13.c 2021-09-18 21:03:05.311302253 +1000 @@ -0,0 +1,53 @@ +/* bug 24973: Test EUC-KR module + Copyright (C) 2020 Free Software Foundation, Inc. @@ -1096,11 +941,9 @@ index 0000000000..87aaff398e +} + +#include -diff --git a/iconvdata/bug-iconv14.c b/iconvdata/bug-iconv14.c -new file mode 100644 -index 0000000000..902f140fa9 ---- /dev/null -+++ b/iconvdata/bug-iconv14.c +diff -pruN glibc-2.32.orig/iconvdata/bug-iconv14.c glibc-2.32/iconvdata/bug-iconv14.c +--- glibc-2.32.orig/iconvdata/bug-iconv14.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/iconvdata/bug-iconv14.c 2021-09-18 21:03:05.311302253 +1000 @@ -0,0 +1,127 @@ +/* Assertion in ISO-2022-JP-3 due to two-character sequence (bug 27256). + Copyright (C) 2021 Free Software Foundation, Inc. @@ -1229,11 +1072,10 @@ index 0000000000..902f140fa9 +} + +#include -diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c -index b0d56cf3ee..1045bae926 100644 ---- a/iconvdata/euc-kr.c -+++ b/iconvdata/euc-kr.c -@@ -80,11 +80,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) +diff -pruN glibc-2.32.orig/iconvdata/euc-kr.c glibc-2.32/iconvdata/euc-kr.c +--- glibc-2.32.orig/iconvdata/euc-kr.c 2021-09-18 21:02:32.648182831 +1000 ++++ glibc-2.32/iconvdata/euc-kr.c 2021-09-18 21:03:05.311302253 +1000 +@@ -80,11 +80,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned c \ if (ch <= 0x9f) \ ++inptr; \ @@ -1246,10 +1088,9 @@ index b0d56cf3ee..1045bae926 100644 { \ /* This is illegal. */ \ STANDARD_FROM_LOOP_ERR_HANDLER (1); \ -diff --git a/iconvdata/ibm1364.c b/iconvdata/ibm1364.c -index 49e7267ab4..521f0825b7 100644 ---- a/iconvdata/ibm1364.c -+++ b/iconvdata/ibm1364.c +diff -pruN glibc-2.32.orig/iconvdata/ibm1364.c glibc-2.32/iconvdata/ibm1364.c +--- glibc-2.32.orig/iconvdata/ibm1364.c 2021-09-18 21:02:32.649182866 +1000 ++++ glibc-2.32/iconvdata/ibm1364.c 2021-09-18 21:03:05.311302253 +1000 @@ -158,24 +158,14 @@ enum \ if (__builtin_expect (ch, 0) == SO) \ @@ -1277,10 +1118,9 @@ index 49e7267ab4..521f0825b7 100644 curcs = sb; \ ++inptr; \ continue; \ -diff --git a/iconvdata/iso-2022-jp-3.c b/iconvdata/iso-2022-jp-3.c -index 8c3b7e627e..62cbc54a11 100644 ---- a/iconvdata/iso-2022-jp-3.c -+++ b/iconvdata/iso-2022-jp-3.c +diff -pruN glibc-2.32.orig/iconvdata/iso-2022-jp-3.c glibc-2.32/iconvdata/iso-2022-jp-3.c +--- glibc-2.32.orig/iconvdata/iso-2022-jp-3.c 2021-09-18 21:02:32.651182934 +1000 ++++ glibc-2.32/iconvdata/iso-2022-jp-3.c 2021-09-18 21:03:05.311302253 +1000 @@ -67,23 +67,34 @@ enum CURRENT_SEL_MASK = 7 << 3 }; @@ -1383,11 +1223,10 @@ index 8c3b7e627e..62cbc54a11 100644 } \ \ inptr += 2; \ -diff --git a/iconvdata/ksc5601.h b/iconvdata/ksc5601.h -index d3eb3a4ff8..f5cdc72797 100644 ---- a/iconvdata/ksc5601.h -+++ b/iconvdata/ksc5601.h -@@ -50,15 +50,15 @@ ksc5601_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset) +diff -pruN glibc-2.32.orig/iconvdata/ksc5601.h glibc-2.32/iconvdata/ksc5601.h +--- glibc-2.32.orig/iconvdata/ksc5601.h 2021-09-18 21:02:32.652182968 +1000 ++++ glibc-2.32/iconvdata/ksc5601.h 2021-09-18 21:03:05.311302253 +1000 +@@ -50,15 +50,15 @@ ksc5601_to_ucs4 (const unsigned char **s unsigned char ch2; int idx; @@ -1406,11 +1245,32 @@ index d3eb3a4ff8..f5cdc72797 100644 ch2 = (*s)[1]; if (ch2 < offset || (ch2 - offset) <= 0x20 || (ch2 - offset) >= 0x7f) return __UNKNOWN_10646_CHAR; -diff --git a/intl/dcigettext.c b/intl/dcigettext.c -index 2e7c662bc7..bd332e71da 100644 ---- a/intl/dcigettext.c -+++ b/intl/dcigettext.c -@@ -1120,15 +1120,18 @@ _nl_find_msg (struct loaded_l10nfile *domain_file, +diff -pruN glibc-2.32.orig/iconvdata/Makefile glibc-2.32/iconvdata/Makefile +--- glibc-2.32.orig/iconvdata/Makefile 2021-09-18 21:02:32.647182797 +1000 ++++ glibc-2.32/iconvdata/Makefile 2021-09-18 21:03:05.311302253 +1000 +@@ -73,7 +73,8 @@ modules.so := $(addsuffix .so, $(modules + 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-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \ ++ bug-iconv13 bug-iconv14 + ifeq ($(have-thread-library),yes) + tests += bug-iconv3 + endif +@@ -321,6 +322,8 @@ $(objpfx)bug-iconv10.out: $(objpfx)gconv + $(addprefix $(objpfx),$(modules.so)) + $(objpfx)bug-iconv12.out: $(objpfx)gconv-modules \ + $(addprefix $(objpfx),$(modules.so)) ++$(objpfx)bug-iconv14.out: $(objpfx)gconv-modules \ ++ $(addprefix $(objpfx),$(modules.so)) + + $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ + $(addprefix $(objpfx),$(modules.so)) \ +diff -pruN glibc-2.32.orig/intl/dcigettext.c glibc-2.32/intl/dcigettext.c +--- glibc-2.32.orig/intl/dcigettext.c 2021-09-18 21:02:32.656183106 +1000 ++++ glibc-2.32/intl/dcigettext.c 2021-09-18 21:03:05.311302253 +1000 +@@ -1120,15 +1120,18 @@ _nl_find_msg (struct loaded_l10nfile *do # ifdef _LIBC @@ -1436,10 +1296,9 @@ index 2e7c662bc7..bd332e71da 100644 if (__builtin_expect (r != __GCONV_OK, 0)) { /* If the output encoding is the same there is -diff --git a/intl/tst-codeset.c b/intl/tst-codeset.c -index fd70432eca..e9f6e5e09f 100644 ---- a/intl/tst-codeset.c -+++ b/intl/tst-codeset.c +diff -pruN glibc-2.32.orig/intl/tst-codeset.c glibc-2.32/intl/tst-codeset.c +--- glibc-2.32.orig/intl/tst-codeset.c 2021-09-18 21:02:32.656183106 +1000 ++++ glibc-2.32/intl/tst-codeset.c 2021-09-18 21:03:05.311302253 +1000 @@ -22,13 +22,11 @@ #include #include @@ -1478,8 +1337,6 @@ index fd70432eca..e9f6e5e09f 100644 - printf ("call 2 returned: %s\n", s); - result = 1; - } -- -- return result; + /* `a with umlaut' is transliterated to `ae'. */ + bind_textdomain_codeset ("codeset", "ASCII//TRANSLIT"); + TEST_COMPARE_STRING (gettext ("cheese"), "Kaese"); @@ -1487,17 +1344,17 @@ index fd70432eca..e9f6e5e09f 100644 + /* Transliteration also works by default even if not set. */ + bind_textdomain_codeset ("codeset", "ASCII"); + TEST_COMPARE_STRING (gettext ("cheese"), "Kaese"); -+ + +- return result; + return 0; } -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" +#include -diff --git a/malloc/Makefile b/malloc/Makefile -index e22cbde22d..5093e8730e 100644 ---- a/malloc/Makefile -+++ b/malloc/Makefile +diff -pruN glibc-2.32.orig/malloc/Makefile glibc-2.32/malloc/Makefile +--- glibc-2.32.orig/malloc/Makefile 2021-09-18 21:02:32.670183585 +1000 ++++ glibc-2.32/malloc/Makefile 2021-09-18 21:03:05.312302287 +1000 @@ -62,6 +62,16 @@ endif tests += $(tests-static) test-srcs = tst-mtrace @@ -1515,7 +1372,7 @@ index e22cbde22d..5093e8730e 100644 routines = malloc morecore mcheck mtrace obstack reallocarray \ scratch_buffer_grow scratch_buffer_grow_preserve \ scratch_buffer_set_array_size \ -@@ -100,6 +110,11 @@ $(objpfx)tst-malloc-thread-exit: $(shared-thread-library) +@@ -100,6 +110,11 @@ $(objpfx)tst-malloc-thread-exit: $(share $(objpfx)tst-malloc-thread-fail: $(shared-thread-library) $(objpfx)tst-malloc-fork-deadlock: $(shared-thread-library) $(objpfx)tst-malloc-stats-cancellation: $(shared-thread-library) @@ -1527,7 +1384,7 @@ index e22cbde22d..5093e8730e 100644 # Export the __malloc_initialize_hook variable to libc.so. LDFLAGS-tst-mallocstate = -rdynamic -@@ -239,6 +254,8 @@ $(tests:%=$(objpfx)%.o): CPPFLAGS += -DTEST_NO_MALLOPT +@@ -239,6 +254,8 @@ $(tests:%=$(objpfx)%.o): CPPFLAGS += -DT $(objpfx)tst-interpose-nothread: $(objpfx)tst-interpose-aux-nothread.o $(objpfx)tst-interpose-thread: \ $(objpfx)tst-interpose-aux-thread.o $(shared-thread-library) @@ -1536,18 +1393,17 @@ index e22cbde22d..5093e8730e 100644 $(objpfx)tst-interpose-static-nothread: $(objpfx)tst-interpose-aux-nothread.o $(objpfx)tst-interpose-static-thread: \ $(objpfx)tst-interpose-aux-thread.o $(static-thread-library) -@@ -256,3 +273,6 @@ $(objpfx)tst-dynarray-fail-mem.out: $(objpfx)tst-dynarray-fail.out +@@ -256,3 +273,6 @@ $(objpfx)tst-dynarray-fail-mem.out: $(ob $(objpfx)tst-malloc-tcache-leak: $(shared-thread-library) $(objpfx)tst-malloc_info: $(shared-thread-library) $(objpfx)tst-mallocfork2: $(shared-thread-library) +$(objpfx)tst-malloc-tcache-leak-mcheck: $(shared-thread-library) +$(objpfx)tst-malloc_info-mcheck: $(shared-thread-library) +$(objpfx)tst-mallocfork2-mcheck: $(shared-thread-library) -diff --git a/manual/tunables.texi b/manual/tunables.texi -index 23ef0d40e7..d72d7a5ec0 100644 ---- a/manual/tunables.texi -+++ b/manual/tunables.texi -@@ -432,7 +432,11 @@ set shared cache size in bytes for use in memory and string routines. +diff -pruN glibc-2.32.orig/manual/tunables.texi glibc-2.32/manual/tunables.texi +--- glibc-2.32.orig/manual/tunables.texi 2021-09-18 21:02:32.672183654 +1000 ++++ glibc-2.32/manual/tunables.texi 2021-09-18 21:03:05.312302287 +1000 +@@ -432,7 +432,11 @@ set shared cache size in bytes for use i @deftp Tunable glibc.cpu.x86_non_temporal_threshold The @code{glibc.cpu.x86_non_temporal_threshold} tunable allows the user @@ -1560,10 +1416,9 @@ index 23ef0d40e7..d72d7a5ec0 100644 This tunable is specific to i386 and x86-64. @end deftp -diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h -index 19d9cc5cfe..38221d0b2a 100644 ---- a/misc/sys/cdefs.h -+++ b/misc/sys/cdefs.h +diff -pruN glibc-2.32.orig/misc/sys/cdefs.h glibc-2.32/misc/sys/cdefs.h +--- glibc-2.32.orig/misc/sys/cdefs.h 2021-09-18 21:02:32.690184271 +1000 ++++ glibc-2.32/misc/sys/cdefs.h 2021-09-18 21:03:05.312302287 +1000 @@ -124,13 +124,10 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) @@ -1578,11 +1433,62 @@ index 19d9cc5cfe..38221d0b2a 100644 # define __warnattr(msg) # define __errordecl(name, msg) extern void name (void) #endif -diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c -index 88c69d1e9c..381aa721ef 100644 ---- a/nscd/netgroupcache.c -+++ b/nscd/netgroupcache.c -@@ -248,7 +248,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, +diff -pruN glibc-2.32.orig/NEWS glibc-2.32/NEWS +--- glibc-2.32.orig/NEWS 2021-09-18 21:02:32.639182523 +1000 ++++ glibc-2.32/NEWS 2021-09-18 21:30:11.284117111 +1000 +@@ -5,6 +5,33 @@ See the end for copying conditions. + Please send GNU C library bug reports via + using `glibc' in the "product" field. + ++The following bugs are resolved with this release: ++ ++ [20019] NULL pointer dereference in libc.so.6 IFUNC due to uninitialized GOT ++ [25399] Remove __warn_memset_zero_len ++ [26224] iconv hangs when converting some invalid inputs from several IBM ++ character sets (CVE-2020-27618) ++ [26534] libm.so 2.32 SIGILL in pow() due to FMA4 instruction on non-FMA4 ++ system ++ [26555] string: strerrorname_np does not return the documented value ++ [26600] Transaction ID collisions cause slow DNS lookups in getaddrinfo ++ [26636] libc: 32-bit shmctl(IPC_INFO) crashes when shminfo struct is ++ at the end of a memory mapping ++ [26637] libc: semctl SEM_STAT_ANY fails to pass the buffer specified ++ by the caller to the kernel ++ [26639] libc: msgctl IPC_INFO and MSG_INFO return garbage ++ [26690] __vfscanf_internal: fix aliasing violation ++ [26853] aarch64: Missing unwind information in statically linked startup code ++ [26932] libc: sh: Multiple floating point functions defined as stubs only ++ [27024] posix: Correct attribute access mode on readlinkat ++ [27130] "rep movsb" performance issue ++ [27177] GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on doesn't work ++ [27256] gconv: Fix assertion failure in ISO-2022-JP-3 module ++ [27462] nscd: Fix double free in netgroupcache ++ [27471] Fix SXID_ERASE behavior in setuid programs ++ [27896] Use __pthread_attr_copy in mq_notify (CVE-2021-33574) ++ [28213] librt: fix NULL pointer dereference ++ + Version 2.32 + + Major new features: +@@ -185,6 +212,14 @@ Security related changes: + Dytrych of the Cisco Security Assessment and Penetration Team (See + TALOS-2020-1019). + ++ CVE-2020-27618: An infinite loop has been fixed in the iconv program when ++ invoked with input containing redundant shift sequences in the IBM1364, ++ IBM1371, IBM1388, IBM1390, or IBM1399 character sets. ++ ++ CVE-2021-33574: The mq_notify function has a potential use-after-free ++ issue when using a notification type of SIGEV_THREAD and a thread ++ attribute with a non-default affinity mask. ++ + The following bugs are resolved with this release: + + [9809] localedata: ckb_IQ: new Kurdish Sorani locale +diff -pruN glibc-2.32.orig/nscd/netgroupcache.c glibc-2.32/nscd/netgroupcache.c +--- glibc-2.32.orig/nscd/netgroupcache.c 2021-09-18 21:02:32.692184339 +1000 ++++ glibc-2.32/nscd/netgroupcache.c 2021-09-18 21:03:05.312302287 +1000 +@@ -248,7 +248,7 @@ addgetnetgrentX (struct database_dyn *db : NULL); ndomain = (ndomain ? newbuf + ndomaindiff : NULL); @@ -1591,7 +1497,7 @@ index 88c69d1e9c..381aa721ef 100644 } nhost = memcpy (buffer + bufused, -@@ -319,7 +319,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, +@@ -319,7 +319,7 @@ addgetnetgrentX (struct database_dyn *db else if (status == NSS_STATUS_TRYAGAIN && e == ERANGE) { buflen *= 2; @@ -1600,22 +1506,21 @@ index 88c69d1e9c..381aa721ef 100644 } else if (status == NSS_STATUS_RETURN || status == NSS_STATUS_NOTFOUND -diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c -index ed1b22308e..cb3f989cba 100644 ---- a/posix/wordexp-test.c -+++ b/posix/wordexp-test.c -@@ -183,6 +183,7 @@ struct test_case_struct - { 0, NULL, "$var", 0, 0, { NULL, }, IFS }, - { 0, NULL, "\"\\n\"", 0, 1, { "\\n", }, IFS }, - { 0, NULL, "", 0, 0, { NULL, }, IFS }, -+ { 0, NULL, "${1234567890123456789012}", 0, 0, { NULL, }, IFS }, +diff -pruN glibc-2.32.orig/posix/unistd.h glibc-2.32/posix/unistd.h +--- glibc-2.32.orig/posix/unistd.h 2021-09-18 21:02:32.696184476 +1000 ++++ glibc-2.32/posix/unistd.h 2021-09-18 21:04:13.411636170 +1000 +@@ -831,7 +831,7 @@ extern int symlinkat (const char *__from + /* Like readlink but a relative PATH is interpreted relative to FD. */ + extern ssize_t readlinkat (int __fd, const char *__restrict __path, + char *__restrict __buf, size_t __len) +- __THROW __nonnull ((2, 3)) __wur __attr_access ((__read_only__, 3, 4)); ++ __THROW __nonnull ((2, 3)) __wur __attr_access ((__write_only__, 3, 4)); + #endif - /* Flags not already covered (testit() has special handling for these) */ - { 0, NULL, "one two", WRDE_DOOFFS, 2, { "one", "two", }, IFS }, -diff --git a/posix/wordexp.c b/posix/wordexp.c -index e082d94895..56289503a1 100644 ---- a/posix/wordexp.c -+++ b/posix/wordexp.c + /* Remove the link NAME. */ +diff -pruN glibc-2.32.orig/posix/wordexp.c glibc-2.32/posix/wordexp.c +--- glibc-2.32.orig/posix/wordexp.c 2021-09-18 21:02:32.696184476 +1000 ++++ glibc-2.32/posix/wordexp.c 2021-09-18 21:03:05.312302287 +1000 @@ -1399,7 +1399,7 @@ envsubst: /* Is it a numeric parameter? */ else if (isdigit (env[0])) @@ -1625,10 +1530,20 @@ index e082d94895..56289503a1 100644 if (n >= __libc_argc) /* Substitute NULL. */ -diff --git a/resolv/Makefile b/resolv/Makefile -index b61c0c3e0c..dbd8f8bf4f 100644 ---- a/resolv/Makefile -+++ b/resolv/Makefile +diff -pruN glibc-2.32.orig/posix/wordexp-test.c glibc-2.32/posix/wordexp-test.c +--- glibc-2.32.orig/posix/wordexp-test.c 2021-09-18 21:02:32.696184476 +1000 ++++ glibc-2.32/posix/wordexp-test.c 2021-09-18 21:03:05.312302287 +1000 +@@ -183,6 +183,7 @@ struct test_case_struct + { 0, NULL, "$var", 0, 0, { NULL, }, IFS }, + { 0, NULL, "\"\\n\"", 0, 1, { "\\n", }, IFS }, + { 0, NULL, "", 0, 0, { NULL, }, IFS }, ++ { 0, NULL, "${1234567890123456789012}", 0, 0, { NULL, }, IFS }, + + /* Flags not already covered (testit() has special handling for these) */ + { 0, NULL, "one two", WRDE_DOOFFS, 2, { "one", "two", }, IFS }, +diff -pruN glibc-2.32.orig/resolv/Makefile glibc-2.32/resolv/Makefile +--- glibc-2.32.orig/resolv/Makefile 2021-09-18 21:02:32.696184476 +1000 ++++ glibc-2.32/resolv/Makefile 2021-09-18 21:03:05.312302287 +1000 @@ -61,6 +61,11 @@ tests += \ tst-resolv-search \ tst-resolv-trailing \ @@ -1641,7 +1556,7 @@ index b61c0c3e0c..dbd8f8bf4f 100644 # These tests need libdl. ifeq (yes,$(build-shared)) tests += \ -@@ -191,6 +196,8 @@ $(objpfx)tst-resolv-search: $(objpfx)libresolv.so $(shared-thread-library) +@@ -191,6 +196,8 @@ $(objpfx)tst-resolv-search: $(objpfx)lib $(objpfx)tst-resolv-trailing: $(objpfx)libresolv.so $(shared-thread-library) $(objpfx)tst-resolv-threads: \ $(libdl) $(objpfx)libresolv.so $(shared-thread-library) @@ -1650,10 +1565,9 @@ index b61c0c3e0c..dbd8f8bf4f 100644 $(objpfx)tst-resolv-canonname: \ $(libdl) $(objpfx)libresolv.so $(shared-thread-library) $(objpfx)tst-resolv-trustad: $(objpfx)libresolv.so $(shared-thread-library) -diff --git a/resolv/res_send.c b/resolv/res_send.c -index 7e5fec6646..70e5066031 100644 ---- a/resolv/res_send.c -+++ b/resolv/res_send.c +diff -pruN glibc-2.32.orig/resolv/res_send.c glibc-2.32/resolv/res_send.c +--- glibc-2.32.orig/resolv/res_send.c 2021-09-18 21:02:32.696184476 +1000 ++++ glibc-2.32/resolv/res_send.c 2021-09-18 21:03:05.312302287 +1000 @@ -1342,15 +1342,6 @@ send_dg(res_state statp, *terrno = EMSGSIZE; return close_and_return_error (statp, resplen2); @@ -1722,11 +1636,9 @@ index 7e5fec6646..70e5066031 100644 recvresp1 = 1; else recvresp2 = 1; -diff --git a/resolv/tst-resolv-txnid-collision.c b/resolv/tst-resolv-txnid-collision.c -new file mode 100644 -index 0000000000..189b76f126 ---- /dev/null -+++ b/resolv/tst-resolv-txnid-collision.c +diff -pruN glibc-2.32.orig/resolv/tst-resolv-txnid-collision.c glibc-2.32/resolv/tst-resolv-txnid-collision.c +--- glibc-2.32.orig/resolv/tst-resolv-txnid-collision.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/resolv/tst-resolv-txnid-collision.c 2021-09-18 21:03:05.312302287 +1000 @@ -0,0 +1,334 @@ +/* Test parallel queries with transaction ID collisions. + Copyright (C) 2020 Free Software Foundation, Inc. @@ -2062,24 +1974,73 @@ index 0000000000..189b76f126 +} + +#include -diff --git a/stdio-common/Makefile b/stdio-common/Makefile -index 8475fd1f09..eff0c98d82 100644 ---- a/stdio-common/Makefile -+++ b/stdio-common/Makefile -@@ -69,7 +69,8 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \ - tst-printf-bz25691 \ - tst-vfprintf-width-prec-alloc \ - tst-printf-fp-free \ -- tst-printf-fp-leak -+ tst-printf-fp-leak \ -+ test-strerr +diff -pruN glibc-2.32.orig/Rules glibc-2.32/Rules +--- glibc-2.32.orig/Rules 2021-09-18 21:02:32.639182523 +1000 ++++ glibc-2.32/Rules 2021-09-18 21:03:05.310302219 +1000 +@@ -155,6 +155,7 @@ xtests: tests $(xtests-special) + else + tests: $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ + $(tests-container:%=$(objpfx)%.out) \ ++ $(tests-mcheck:%=$(objpfx)%-mcheck.out) \ + $(tests-special) $(tests-printers-out) + xtests: tests $(xtests:%=$(objpfx)%.out) $(xtests-special) + endif +@@ -165,7 +166,7 @@ ifeq ($(run-built-tests),no) + tests-expected = + else + tests-expected = $(tests) $(tests-internal) $(tests-printers) \ +- $(tests-container) ++ $(tests-container) $(tests-mcheck:%=%-mcheck) + endif + tests: + $(..)scripts/merge-test-results.sh -s $(objpfx) $(subdir) \ +@@ -191,6 +192,7 @@ else + binaries-pie-tests = + binaries-pie-notests = + endif ++binaries-mcheck-tests = $(tests-mcheck:%=%-mcheck) + else + binaries-all-notests = + binaries-all-tests = $(tests) $(tests-internal) $(xtests) $(test-srcs) +@@ -200,6 +202,7 @@ binaries-static-tests = + binaries-static = + binaries-pie-tests = + binaries-pie-notests = ++binaries-mcheck-tests = + endif + binaries-pie = $(binaries-pie-tests) $(binaries-pie-notests) +@@ -223,6 +226,14 @@ $(addprefix $(objpfx),$(binaries-shared- + $(+link-tests) + endif - test-srcs = tst-unbputc tst-printf tst-printfsz-islongdouble -diff --git a/stdio-common/errlist.c b/stdio-common/errlist.c -index d15f13a22a..2ecf121674 100644 ---- a/stdio-common/errlist.c -+++ b/stdio-common/errlist.c ++ifneq "$(strip $(binaries-mcheck-tests))" "" ++$(addprefix $(objpfx),$(binaries-mcheck-tests)): %-mcheck: %.o \ ++ $(link-extra-libs-tests) \ ++ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ ++ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) ++ $(+link-tests) ++endif ++ + ifneq "$(strip $(binaries-pie-tests))" "" + $(addprefix $(objpfx),$(binaries-pie-tests)): %: %.o \ + $(link-extra-libs-tests) \ +@@ -253,6 +264,12 @@ $(addprefix $(objpfx),$(binaries-static- + $(+link-static-tests) + endif + ++# All mcheck tests will be run with MALLOC_CHECK_=3 ++define mcheck-ENVS ++$(1)-mcheck-ENV = MALLOC_CHECK_=3 ++endef ++$(foreach t,$(tests-mcheck),$(eval $(call mcheck-ENVS,$(t)))) ++ + ifneq "$(strip $(tests) $(tests-internal) $(xtests) $(test-srcs))" "" + # These are the implicit rules for making test outputs + # from the test programs and whatever input files are present. +diff -pruN glibc-2.32.orig/stdio-common/errlist.c glibc-2.32/stdio-common/errlist.c +--- glibc-2.32.orig/stdio-common/errlist.c 2021-09-18 21:02:32.698184545 +1000 ++++ glibc-2.32/stdio-common/errlist.c 2021-09-18 21:03:05.312302287 +1000 @@ -20,9 +20,13 @@ #include #include @@ -2120,10 +2081,22 @@ index d15f13a22a..2ecf121674 100644 #include #undef _S }; -diff --git a/stdio-common/test-strerr.c b/stdio-common/test-strerr.c -index fded208118..d77b81d507 100644 ---- a/stdio-common/test-strerr.c -+++ b/stdio-common/test-strerr.c +diff -pruN glibc-2.32.orig/stdio-common/Makefile glibc-2.32/stdio-common/Makefile +--- glibc-2.32.orig/stdio-common/Makefile 2021-09-18 21:02:32.698184545 +1000 ++++ glibc-2.32/stdio-common/Makefile 2021-09-18 21:03:05.312302287 +1000 +@@ -69,7 +69,8 @@ tests := tstscanf test_rdwr test-popen t + tst-printf-bz25691 \ + tst-vfprintf-width-prec-alloc \ + tst-printf-fp-free \ +- tst-printf-fp-leak ++ tst-printf-fp-leak \ ++ test-strerr + + + test-srcs = tst-unbputc tst-printf tst-printfsz-islongdouble +diff -pruN glibc-2.32.orig/stdio-common/test-strerr.c glibc-2.32/stdio-common/test-strerr.c +--- glibc-2.32.orig/stdio-common/test-strerr.c 2021-09-18 21:02:32.698184545 +1000 ++++ glibc-2.32/stdio-common/test-strerr.c 2021-09-18 21:03:05.312302287 +1000 @@ -18,46 +18,672 @@ #include @@ -2829,11 +2802,10 @@ index fded208118..d77b81d507 100644 return 0; } -diff --git a/stdio-common/vfscanf-internal.c b/stdio-common/vfscanf-internal.c -index 95b46dcbeb..3a323547f9 100644 ---- a/stdio-common/vfscanf-internal.c -+++ b/stdio-common/vfscanf-internal.c -@@ -277,7 +277,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, +diff -pruN glibc-2.32.orig/stdio-common/vfscanf-internal.c glibc-2.32/stdio-common/vfscanf-internal.c +--- glibc-2.32.orig/stdio-common/vfscanf-internal.c 2021-09-18 21:02:32.699184579 +1000 ++++ glibc-2.32/stdio-common/vfscanf-internal.c 2021-09-18 21:03:05.312302287 +1000 +@@ -277,7 +277,7 @@ __vfscanf_internal (FILE *s, const char #endif { va_list arg; @@ -2842,7 +2814,7 @@ index 95b46dcbeb..3a323547f9 100644 UCHAR_T fc; /* Current character of the format. */ WINT_T done = 0; /* Assignments done. */ size_t read_in = 0; /* Chars read in. */ -@@ -415,10 +415,11 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, +@@ -415,10 +415,11 @@ __vfscanf_internal (FILE *s, const char #endif #ifndef COMPILE_WSCANF @@ -2856,7 +2828,7 @@ index 95b46dcbeb..3a323547f9 100644 if (len > 0) { do -@@ -426,7 +427,7 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, +@@ -426,7 +427,7 @@ __vfscanf_internal (FILE *s, const char c = inchar (); if (__glibc_unlikely (c == EOF)) input_error (); @@ -2865,7 +2837,7 @@ index 95b46dcbeb..3a323547f9 100644 { ungetc_not_eof (c, s); conv_error (); -@@ -484,9 +485,9 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, +@@ -484,9 +485,9 @@ __vfscanf_internal (FILE *s, const char char_buffer_rewind (&charbuf); /* Check for a positional parameter specification. */ @@ -2877,7 +2849,7 @@ index 95b46dcbeb..3a323547f9 100644 if (*f == L_('$')) ++f; else -@@ -521,8 +522,8 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, +@@ -521,8 +522,8 @@ __vfscanf_internal (FILE *s, const char /* Find the maximum field width. */ width = 0; @@ -2888,7 +2860,7 @@ index 95b46dcbeb..3a323547f9 100644 got_width: if (width == 0) width = -1; -@@ -2522,12 +2523,11 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr, +@@ -2522,12 +2523,11 @@ __vfscanf_internal (FILE *s, const char } while ((fc = *f++) != '\0' && fc != ']') @@ -2903,10 +2875,9 @@ index 95b46dcbeb..3a323547f9 100644 ((char *)charbuf.scratch.data)[fc] = 1; } else -diff --git a/stdlib/tst-secure-getenv.c b/stdlib/tst-secure-getenv.c -index 3cfe9a05c3..d4b1139c5e 100644 ---- a/stdlib/tst-secure-getenv.c -+++ b/stdlib/tst-secure-getenv.c +diff -pruN glibc-2.32.orig/stdlib/tst-secure-getenv.c glibc-2.32/stdlib/tst-secure-getenv.c +--- glibc-2.32.orig/stdlib/tst-secure-getenv.c 2021-09-18 21:02:32.700184614 +1000 ++++ glibc-2.32/stdlib/tst-secure-getenv.c 2021-09-18 21:03:05.312302287 +1000 @@ -30,167 +30,12 @@ #include #include @@ -3133,10 +3104,9 @@ index 3cfe9a05c3..d4b1139c5e 100644 } } -diff --git a/string/bits/string_fortified.h b/string/bits/string_fortified.h -index 309d0f39b2..c8d3051af8 100644 ---- a/string/bits/string_fortified.h -+++ b/string/bits/string_fortified.h +diff -pruN glibc-2.32.orig/string/bits/string_fortified.h glibc-2.32/string/bits/string_fortified.h +--- glibc-2.32.orig/string/bits/string_fortified.h 2021-09-18 21:02:32.700184614 +1000 ++++ glibc-2.32/string/bits/string_fortified.h 2021-09-18 21:03:05.312302287 +1000 @@ -22,11 +22,6 @@ # error "Never use directly; include instead." #endif @@ -3149,7 +3119,7 @@ index 309d0f39b2..c8d3051af8 100644 __fortify_function void * __NTH (memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)) -@@ -58,16 +53,6 @@ __NTH (mempcpy (void *__restrict __dest, const void *__restrict __src, +@@ -58,16 +53,6 @@ __NTH (mempcpy (void *__restrict __dest, __fortify_function void * __NTH (memset (void *__dest, int __ch, size_t __len)) { @@ -3166,24 +3136,10 @@ index 309d0f39b2..c8d3051af8 100644 return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest)); } -diff --git a/support/Makefile b/support/Makefile -index 93faafddf9..4154863511 100644 ---- a/support/Makefile -+++ b/support/Makefile -@@ -35,6 +35,8 @@ libsupport-routines = \ - ignore_stderr \ - next_to_fault \ - oom_error \ -+ resolv_response_context_duplicate \ -+ resolv_response_context_free \ - resolv_test \ - set_fortify_handler \ - support-xfstat \ -diff --git a/support/capture_subprocess.h b/support/capture_subprocess.h -index 9808750f80..421f657678 100644 ---- a/support/capture_subprocess.h -+++ b/support/capture_subprocess.h -@@ -41,6 +41,12 @@ struct support_capture_subprocess support_capture_subprocess +diff -pruN glibc-2.32.orig/support/capture_subprocess.h glibc-2.32/support/capture_subprocess.h +--- glibc-2.32.orig/support/capture_subprocess.h 2021-09-18 21:02:32.701184648 +1000 ++++ glibc-2.32/support/capture_subprocess.h 2021-09-18 21:03:05.312302287 +1000 +@@ -41,6 +41,12 @@ struct support_capture_subprocess suppor struct support_capture_subprocess support_capture_subprogram (const char *file, char *const argv[]); @@ -3196,11 +3152,21 @@ index 9808750f80..421f657678 100644 /* Deallocate the subprocess data captured by support_capture_subprocess. */ void support_capture_subprocess_free (struct support_capture_subprocess *); -diff --git a/support/resolv_response_context_duplicate.c b/support/resolv_response_context_duplicate.c -new file mode 100644 -index 0000000000..f9c5c3462a ---- /dev/null -+++ b/support/resolv_response_context_duplicate.c +diff -pruN glibc-2.32.orig/support/Makefile glibc-2.32/support/Makefile +--- glibc-2.32.orig/support/Makefile 2021-09-18 21:02:32.701184648 +1000 ++++ glibc-2.32/support/Makefile 2021-09-18 21:03:05.312302287 +1000 +@@ -35,6 +35,8 @@ libsupport-routines = \ + ignore_stderr \ + next_to_fault \ + oom_error \ ++ resolv_response_context_duplicate \ ++ resolv_response_context_free \ + resolv_test \ + set_fortify_handler \ + support-xfstat \ +diff -pruN glibc-2.32.orig/support/resolv_response_context_duplicate.c glibc-2.32/support/resolv_response_context_duplicate.c +--- glibc-2.32.orig/support/resolv_response_context_duplicate.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/support/resolv_response_context_duplicate.c 2021-09-18 21:03:05.312302287 +1000 @@ -0,0 +1,37 @@ +/* Duplicate a response context used in DNS resolver tests. + Copyright (C) 2020 Free Software Foundation, Inc. @@ -3239,11 +3205,9 @@ index 0000000000..f9c5c3462a + memcpy (result->query_buffer, ctx->query_buffer, result->query_length); + return result; +} -diff --git a/support/resolv_response_context_free.c b/support/resolv_response_context_free.c -new file mode 100644 -index 0000000000..b88c05ffd4 ---- /dev/null -+++ b/support/resolv_response_context_free.c +diff -pruN glibc-2.32.orig/support/resolv_response_context_free.c glibc-2.32/support/resolv_response_context_free.c +--- glibc-2.32.orig/support/resolv_response_context_free.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/support/resolv_response_context_free.c 2021-09-18 21:03:05.312302287 +1000 @@ -0,0 +1,28 @@ +/* Free a response context used in DNS resolver tests. + Copyright (C) 2020 Free Software Foundation, Inc. @@ -3273,11 +3237,10 @@ index 0000000000..b88c05ffd4 + free (ctx->client_address); + free (ctx); +} -diff --git a/support/resolv_test.c b/support/resolv_test.c -index 53b7fc41ab..9878a040a3 100644 ---- a/support/resolv_test.c -+++ b/support/resolv_test.c -@@ -181,7 +181,9 @@ resolv_response_init (struct resolv_response_builder *b, +diff -pruN glibc-2.32.orig/support/resolv_test.c glibc-2.32/support/resolv_test.c +--- glibc-2.32.orig/support/resolv_test.c 2021-09-18 21:02:32.701184648 +1000 ++++ glibc-2.32/support/resolv_test.c 2021-09-18 21:03:05.312302287 +1000 +@@ -181,7 +181,9 @@ resolv_response_init (struct resolv_resp b->buffer[2] |= b->query_buffer[2] & 0x01; /* Copy the RD bit. */ if (flags.tc) b->buffer[2] |= 0x02; @@ -3288,7 +3251,7 @@ index 53b7fc41ab..9878a040a3 100644 if (flags.ad) b->buffer[3] |= 0x20; -@@ -434,9 +436,9 @@ resolv_response_buffer (const struct resolv_response_builder *b) +@@ -434,9 +436,9 @@ resolv_response_buffer (const struct res return result; } @@ -3312,7 +3275,7 @@ index 53b7fc41ab..9878a040a3 100644 { tdestroy (b->compression_offsets, free); free (b); -@@ -661,13 +663,17 @@ server_thread_udp_process_one (struct resolv_test *obj, int server_index) +@@ -661,13 +663,17 @@ server_thread_udp_process_one (struct re struct resolv_response_context ctx = { @@ -3331,7 +3294,7 @@ index 53b7fc41ab..9878a040a3 100644 obj->config.response_callback (&ctx, b, qinfo.qname, qinfo.qclass, qinfo.qtype); -@@ -684,7 +690,7 @@ server_thread_udp_process_one (struct resolv_test *obj, int server_index) +@@ -684,7 +690,7 @@ server_thread_udp_process_one (struct re if (b->offset >= 12) printf ("info: UDP server %d: sending response:" " %zu bytes, RCODE %d (for %s/%u/%u)\n", @@ -3340,7 +3303,7 @@ index 53b7fc41ab..9878a040a3 100644 qinfo.qname, qinfo.qclass, qinfo.qtype); else printf ("info: UDP server %d: sending response: %zu bytes" -@@ -694,23 +700,31 @@ server_thread_udp_process_one (struct resolv_test *obj, int server_index) +@@ -694,23 +700,31 @@ server_thread_udp_process_one (struct re if (b->truncate_bytes > 0) printf ("info: truncated by %u bytes\n", b->truncate_bytes); } @@ -3412,10 +3375,9 @@ index 53b7fc41ab..9878a040a3 100644 free (query_buffer); if (close_flag) break; -diff --git a/support/resolv_test.h b/support/resolv_test.h -index 67819469a0..31a5c1c3e7 100644 ---- a/support/resolv_test.h -+++ b/support/resolv_test.h +diff -pruN glibc-2.32.orig/support/resolv_test.h glibc-2.32/support/resolv_test.h +--- glibc-2.32.orig/support/resolv_test.h 2021-09-18 21:02:32.701184648 +1000 ++++ glibc-2.32/support/resolv_test.h 2021-09-18 21:03:05.312302287 +1000 @@ -35,25 +35,36 @@ struct resolv_edns_info uint16_t payload_size; }; @@ -3469,7 +3431,7 @@ index 67819469a0..31a5c1c3e7 100644 /* Initial section count values. Can be used to artificially increase the counts, for malformed packet testing.*/ unsigned short qdcount; -@@ -188,6 +203,22 @@ void resolv_response_close (struct resolv_response_builder *); +@@ -188,6 +203,22 @@ void resolv_response_close (struct resol /* The size of the response packet built so far. */ size_t resolv_response_length (const struct resolv_response_builder *); @@ -3492,11 +3454,10 @@ index 67819469a0..31a5c1c3e7 100644 __END_DECLS #endif /* SUPPORT_RESOLV_TEST_H */ -diff --git a/support/subprocess.h b/support/subprocess.h -index 8b442fd5c0..34ffd02e8e 100644 ---- a/support/subprocess.h -+++ b/support/subprocess.h -@@ -38,6 +38,11 @@ struct support_subprocess support_subprocess +diff -pruN glibc-2.32.orig/support/subprocess.h glibc-2.32/support/subprocess.h +--- glibc-2.32.orig/support/subprocess.h 2021-09-18 21:02:32.701184648 +1000 ++++ glibc-2.32/support/subprocess.h 2021-09-18 21:03:05.312302287 +1000 +@@ -38,6 +38,11 @@ struct support_subprocess support_subpro struct support_subprocess support_subprogram (const char *file, char *const argv[]); @@ -3508,10 +3469,9 @@ index 8b442fd5c0..34ffd02e8e 100644 /* Wait for the subprocess indicated by PROC::PID. Return the status indicate by waitpid call. */ int support_process_wait (struct support_subprocess *proc); -diff --git a/support/support_capture_subprocess.c b/support/support_capture_subprocess.c -index eeed676e3d..28a37df67f 100644 ---- a/support/support_capture_subprocess.c -+++ b/support/support_capture_subprocess.c +diff -pruN glibc-2.32.orig/support/support_capture_subprocess.c glibc-2.32/support/support_capture_subprocess.c +--- glibc-2.32.orig/support/support_capture_subprocess.c 2021-09-18 21:02:32.701184648 +1000 ++++ glibc-2.32/support/support_capture_subprocess.c 2021-09-18 21:03:05.313302322 +1000 @@ -20,11 +20,14 @@ #include @@ -3527,7 +3487,7 @@ index eeed676e3d..28a37df67f 100644 static void transfer (const char *what, struct pollfd *pfd, struct xmemstream *stream) -@@ -36,7 +39,7 @@ transfer (const char *what, struct pollfd *pfd, struct xmemstream *stream) +@@ -36,7 +39,7 @@ transfer (const char *what, struct pollf if (ret < 0) { support_record_failure (); @@ -3536,7 +3496,7 @@ index eeed676e3d..28a37df67f 100644 pfd->events = 0; pfd->revents = 0; } -@@ -102,6 +105,129 @@ support_capture_subprogram (const char *file, char *const argv[]) +@@ -102,6 +105,129 @@ support_capture_subprogram (const char * return result; } @@ -3666,10 +3626,9 @@ index eeed676e3d..28a37df67f 100644 void support_capture_subprocess_free (struct support_capture_subprocess *p) { -diff --git a/support/support_subprocess.c b/support/support_subprocess.c -index 36e3a77af2..4a25828111 100644 ---- a/support/support_subprocess.c -+++ b/support/support_subprocess.c +diff -pruN glibc-2.32.orig/support/support_subprocess.c glibc-2.32/support/support_subprocess.c +--- glibc-2.32.orig/support/support_subprocess.c 2021-09-18 21:02:32.701184648 +1000 ++++ glibc-2.32/support/support_subprocess.c 2021-09-18 21:03:05.313302322 +1000 @@ -27,7 +27,7 @@ #include @@ -3688,7 +3647,7 @@ index 36e3a77af2..4a25828111 100644 result.pid = xfork (); if (result.pid == 0) -@@ -71,7 +71,7 @@ support_subprocess (void (*callback) (void *), void *closure) +@@ -71,7 +71,7 @@ support_subprocess (void (*callback) (vo struct support_subprocess support_subprogram (const char *file, char *const argv[]) { @@ -3697,7 +3656,7 @@ index 36e3a77af2..4a25828111 100644 posix_spawn_file_actions_t fa; /* posix_spawn_file_actions_init does not fail. */ -@@ -84,7 +84,7 @@ support_subprogram (const char *file, char *const argv[]) +@@ -84,7 +84,7 @@ support_subprogram (const char *file, ch xposix_spawn_file_actions_addclose (&fa, result.stdout_pipe[1]); xposix_spawn_file_actions_addclose (&fa, result.stderr_pipe[1]); @@ -3706,11 +3665,10 @@ index 36e3a77af2..4a25828111 100644 xclose (result.stdout_pipe[1]); xclose (result.stderr_pipe[1]); -@@ -92,6 +92,19 @@ support_subprogram (const char *file, char *const argv[]) - return result; +@@ -93,6 +93,19 @@ support_subprogram (const char *file, ch } -+int + int +support_subprogram_wait (const char *file, char *const argv[]) +{ + posix_spawn_file_actions_t fa; @@ -3723,13 +3681,13 @@ index 36e3a77af2..4a25828111 100644 + return support_process_wait (&res); +} + - int ++int support_process_wait (struct support_subprocess *proc) { -diff --git a/sysdeps/aarch64/dl-bti.c b/sysdeps/aarch64/dl-bti.c -index 196e462520..cf7624aaa2 100644 ---- a/sysdeps/aarch64/dl-bti.c -+++ b/sysdeps/aarch64/dl-bti.c + xclose (proc->stdout_pipe[0]); +diff -pruN glibc-2.32.orig/sysdeps/aarch64/dl-bti.c glibc-2.32/sysdeps/aarch64/dl-bti.c +--- glibc-2.32.orig/sysdeps/aarch64/dl-bti.c 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/dl-bti.c 2021-09-18 21:03:05.313302322 +1000 @@ -19,43 +19,76 @@ #include #include @@ -3826,11 +3784,10 @@ index 196e462520..cf7624aaa2 100644 + bti_failed (dep, program); + } } -diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h -index 70b9ed3925..fde7cfd9e2 100644 ---- a/sysdeps/aarch64/dl-machine.h -+++ b/sysdeps/aarch64/dl-machine.h -@@ -395,13 +395,6 @@ elf_machine_lazy_rel (struct link_map *map, +diff -pruN glibc-2.32.orig/sysdeps/aarch64/dl-machine.h glibc-2.32/sysdeps/aarch64/dl-machine.h +--- glibc-2.32.orig/sysdeps/aarch64/dl-machine.h 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/dl-machine.h 2021-09-18 21:03:05.313302322 +1000 +@@ -395,13 +395,6 @@ elf_machine_lazy_rel (struct link_map *m /* Check for unexpected PLT reloc type. */ if (__builtin_expect (r_type == AARCH64_R(JUMP_SLOT), 1)) { @@ -3844,7 +3801,7 @@ index 70b9ed3925..fde7cfd9e2 100644 if (__glibc_unlikely (map->l_info[DT_AARCH64 (VARIANT_PCS)] != NULL)) { /* Check the symbol table for variant PCS symbols. */ -@@ -425,7 +418,10 @@ elf_machine_lazy_rel (struct link_map *map, +@@ -425,7 +418,10 @@ elf_machine_lazy_rel (struct link_map *m } } @@ -3856,10 +3813,9 @@ index 70b9ed3925..fde7cfd9e2 100644 } else if (__builtin_expect (r_type == AARCH64_R(TLSDESC), 1)) { -diff --git a/sysdeps/aarch64/dl-prop.h b/sysdeps/aarch64/dl-prop.h -index b0785bda83..e926e54984 100644 ---- a/sysdeps/aarch64/dl-prop.h -+++ b/sysdeps/aarch64/dl-prop.h +diff -pruN glibc-2.32.orig/sysdeps/aarch64/dl-prop.h glibc-2.32/sysdeps/aarch64/dl-prop.h +--- glibc-2.32.orig/sysdeps/aarch64/dl-prop.h 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/dl-prop.h 2021-09-18 21:03:05.313302322 +1000 @@ -19,6 +19,8 @@ #ifndef _DL_PROP_H #define _DL_PROP_H @@ -3891,7 +3847,7 @@ index b0785bda83..e926e54984 100644 if (type == GNU_PROPERTY_AARCH64_FEATURE_1_AND) { /* Stop if the property note is ill-formed. */ -@@ -51,7 +57,7 @@ _dl_process_gnu_property (struct link_map *l, uint32_t type, uint32_t datasz, +@@ -51,7 +57,7 @@ _dl_process_gnu_property (struct link_ma unsigned int feature_1 = *(unsigned int *) data; if (feature_1 & GNU_PROPERTY_AARCH64_FEATURE_1_BTI) @@ -3900,10 +3856,9 @@ index b0785bda83..e926e54984 100644 /* Stop if we processed the property note. */ return 0; -diff --git a/sysdeps/aarch64/linkmap.h b/sysdeps/aarch64/linkmap.h -index 847a03ace2..b3f7663b07 100644 ---- a/sysdeps/aarch64/linkmap.h -+++ b/sysdeps/aarch64/linkmap.h +diff -pruN glibc-2.32.orig/sysdeps/aarch64/linkmap.h glibc-2.32/sysdeps/aarch64/linkmap.h +--- glibc-2.32.orig/sysdeps/aarch64/linkmap.h 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/linkmap.h 2021-09-18 21:03:05.313302322 +1000 @@ -22,5 +22,5 @@ struct link_map_machine { ElfW(Addr) plt; /* Address of .plt */ @@ -3911,24 +3866,9 @@ index 847a03ace2..b3f7663b07 100644 - bool bti; /* Branch Target Identification is enabled. */ + bool bti_fail; /* Failed to enable Branch Target Identification. */ }; -diff --git a/sysdeps/aarch64/multiarch/memcpy.c b/sysdeps/aarch64/multiarch/memcpy.c -index 7cf5f033e8..799d60c98c 100644 ---- a/sysdeps/aarch64/multiarch/memcpy.c -+++ b/sysdeps/aarch64/multiarch/memcpy.c -@@ -41,7 +41,8 @@ libc_ifunc (__libc_memcpy, - ? __memcpy_falkor - : (IS_THUNDERX2 (midr) || IS_THUNDERX2PA (midr) - ? __memcpy_thunderx2 -- : (IS_NEOVERSE_N1 (midr) -+ : (IS_NEOVERSE_N1 (midr) || IS_NEOVERSE_N2 (midr) -+ || IS_NEOVERSE_V1 (midr) - ? __memcpy_simd - : __memcpy_generic))))); - -diff --git a/sysdeps/aarch64/multiarch/memcpy_advsimd.S b/sysdeps/aarch64/multiarch/memcpy_advsimd.S -index d4ba747777..48bb6d7ca4 100644 ---- a/sysdeps/aarch64/multiarch/memcpy_advsimd.S -+++ b/sysdeps/aarch64/multiarch/memcpy_advsimd.S +diff -pruN glibc-2.32.orig/sysdeps/aarch64/multiarch/memcpy_advsimd.S glibc-2.32/sysdeps/aarch64/multiarch/memcpy_advsimd.S +--- glibc-2.32.orig/sysdeps/aarch64/multiarch/memcpy_advsimd.S 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/multiarch/memcpy_advsimd.S 2021-09-18 21:03:05.313302322 +1000 @@ -223,12 +223,13 @@ L(copy_long_backwards): b.ls L(copy64_from_start) @@ -3946,10 +3886,22 @@ index d4ba747777..48bb6d7ca4 100644 subs count, count, 64 b.hi L(loop64_backwards) -diff --git a/sysdeps/aarch64/multiarch/memmove.c b/sysdeps/aarch64/multiarch/memmove.c -index ad10aa8ac6..46a4cb3a54 100644 ---- a/sysdeps/aarch64/multiarch/memmove.c -+++ b/sysdeps/aarch64/multiarch/memmove.c +diff -pruN glibc-2.32.orig/sysdeps/aarch64/multiarch/memcpy.c glibc-2.32/sysdeps/aarch64/multiarch/memcpy.c +--- glibc-2.32.orig/sysdeps/aarch64/multiarch/memcpy.c 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/multiarch/memcpy.c 2021-09-18 21:03:05.313302322 +1000 +@@ -41,7 +41,8 @@ libc_ifunc (__libc_memcpy, + ? __memcpy_falkor + : (IS_THUNDERX2 (midr) || IS_THUNDERX2PA (midr) + ? __memcpy_thunderx2 +- : (IS_NEOVERSE_N1 (midr) ++ : (IS_NEOVERSE_N1 (midr) || IS_NEOVERSE_N2 (midr) ++ || IS_NEOVERSE_V1 (midr) + ? __memcpy_simd + : __memcpy_generic))))); + +diff -pruN glibc-2.32.orig/sysdeps/aarch64/multiarch/memmove.c glibc-2.32/sysdeps/aarch64/multiarch/memmove.c +--- glibc-2.32.orig/sysdeps/aarch64/multiarch/memmove.c 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/multiarch/memmove.c 2021-09-18 21:03:05.313302322 +1000 @@ -41,7 +41,8 @@ libc_ifunc (__libc_memmove, ? __memmove_falkor : (IS_THUNDERX2 (midr) || IS_THUNDERX2PA (midr) @@ -3960,10 +3912,9 @@ index ad10aa8ac6..46a4cb3a54 100644 ? __memmove_simd : __memmove_generic))))); -diff --git a/sysdeps/aarch64/start.S b/sysdeps/aarch64/start.S -index 75393e1c18..1998ea95d4 100644 ---- a/sysdeps/aarch64/start.S -+++ b/sysdeps/aarch64/start.S +diff -pruN glibc-2.32.orig/sysdeps/aarch64/start.S glibc-2.32/sysdeps/aarch64/start.S +--- glibc-2.32.orig/sysdeps/aarch64/start.S 2021-09-18 21:02:32.702184682 +1000 ++++ glibc-2.32/sysdeps/aarch64/start.S 2021-09-18 21:03:05.313302322 +1000 @@ -43,11 +43,9 @@ */ @@ -3989,10 +3940,9 @@ index 75393e1c18..1998ea95d4 100644 /* Define a symbol for the first piece of initialized data. */ .data -diff --git a/sysdeps/generic/dl-prop.h b/sysdeps/generic/dl-prop.h -index f1cf576fe3..df27ff8e6a 100644 ---- a/sysdeps/generic/dl-prop.h -+++ b/sysdeps/generic/dl-prop.h +diff -pruN glibc-2.32.orig/sysdeps/generic/dl-prop.h glibc-2.32/sysdeps/generic/dl-prop.h +--- glibc-2.32.orig/sysdeps/generic/dl-prop.h 2021-09-18 21:02:32.705184785 +1000 ++++ glibc-2.32/sysdeps/generic/dl-prop.h 2021-09-18 21:03:05.313302322 +1000 @@ -37,15 +37,15 @@ _dl_open_check (struct link_map *m) } @@ -4012,11 +3962,10 @@ index f1cf576fe3..df27ff8e6a 100644 { return 0; } -diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index ba114ab4b1..62ac40d81b 100644 ---- a/sysdeps/generic/ldsodefs.h -+++ b/sysdeps/generic/ldsodefs.h -@@ -919,8 +919,9 @@ extern void _dl_rtld_di_serinfo (struct link_map *loader, +diff -pruN glibc-2.32.orig/sysdeps/generic/ldsodefs.h glibc-2.32/sysdeps/generic/ldsodefs.h +--- glibc-2.32.orig/sysdeps/generic/ldsodefs.h 2021-09-18 21:02:32.705184785 +1000 ++++ glibc-2.32/sysdeps/generic/ldsodefs.h 2021-09-18 21:03:05.313302322 +1000 +@@ -919,8 +919,9 @@ extern void _dl_rtld_di_serinfo (struct Dl_serinfo *si, bool counting); /* Process PT_GNU_PROPERTY program header PH in module L after @@ -4028,11 +3977,10 @@ index ba114ab4b1..62ac40d81b 100644 /* Search loaded objects' symbol tables for a definition of the symbol -diff --git a/sysdeps/generic/unwind.h b/sysdeps/generic/unwind.h -index b667a5b652..c229603af3 100644 ---- a/sysdeps/generic/unwind.h -+++ b/sysdeps/generic/unwind.h -@@ -75,15 +75,21 @@ typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, +diff -pruN glibc-2.32.orig/sysdeps/generic/unwind.h glibc-2.32/sysdeps/generic/unwind.h +--- glibc-2.32.orig/sysdeps/generic/unwind.h 2021-09-18 21:02:32.706184819 +1000 ++++ glibc-2.32/sysdeps/generic/unwind.h 2021-09-18 21:03:05.313302322 +1000 +@@ -75,15 +75,21 @@ typedef void (*_Unwind_Exception_Cleanup struct _Unwind_Exception { @@ -4040,11 +3988,6 @@ index b667a5b652..c229603af3 100644 - _Unwind_Exception_Cleanup_Fn exception_cleanup; - _Unwind_Word private_1; - _Unwind_Word private_2; -- -- /* @@@ The IA-64 ABI says that this structure must be double-word aligned. -- Taking that literally does not make much sense generically. Instead we -- provide the maximum alignment required by any type for the machine. */ --} __attribute__((__aligned__)); + union + { + struct @@ -4054,7 +3997,11 @@ index b667a5b652..c229603af3 100644 + _Unwind_Word private_1; + _Unwind_Word private_2; + }; -+ + +- /* @@@ The IA-64 ABI says that this structure must be double-word aligned. +- Taking that literally does not make much sense generically. Instead we +- provide the maximum alignment required by any type for the machine. */ +-} __attribute__((__aligned__)); + /* The IA-64 ABI says that this structure must be double-word aligned. */ + _Unwind_Word unwind_exception_align[2] + __attribute__ ((__aligned__ (2 * sizeof (_Unwind_Word)))); @@ -4063,10 +4010,9 @@ index b667a5b652..c229603af3 100644 /* The ACTIONS argument to the personality routine is a bitwise OR of one -diff --git a/sysdeps/gnu/errlist.h b/sysdeps/gnu/errlist.h -index 5d11ed723d..6329e5f393 100644 ---- a/sysdeps/gnu/errlist.h -+++ b/sysdeps/gnu/errlist.h +diff -pruN glibc-2.32.orig/sysdeps/gnu/errlist.h glibc-2.32/sysdeps/gnu/errlist.h +--- glibc-2.32.orig/sysdeps/gnu/errlist.h 2021-09-18 21:02:32.706184819 +1000 ++++ glibc-2.32/sysdeps/gnu/errlist.h 2021-09-18 21:03:05.313302322 +1000 @@ -1,24 +1,21 @@ -#ifndef ERR_MAP -#define ERR_MAP(value) value @@ -4111,7 +4057,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef ENXIO /* -@@ -43,7 +40,7 @@ TRANS represented by a file you specified, and it couldn't find the device. +@@ -43,7 +40,7 @@ TRANS represented by a file you specifie TRANS This can mean that the device file was installed incorrectly, or that TRANS the physical device is missing or not correctly attached to the TRANS computer. */ @@ -4120,7 +4066,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef E2BIG /* -@@ -51,27 +48,27 @@ TRANS Used when the arguments passed to a new program +@@ -51,27 +48,27 @@ TRANS Used when the arguments passed to TRANS being executed with one of the @code{exec} functions (@pxref{Executing a TRANS File}) occupy too much memory space. This condition never arises on TRANS @gnuhurdsystems{}. */ @@ -4152,7 +4098,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EDEADLK /* -@@ -79,74 +76,74 @@ TRANS Allocating a system resource would have resulted in a +@@ -79,74 +76,74 @@ TRANS Allocating a system resource would TRANS deadlock situation. The system does not guarantee that it will notice TRANS all such situations. This error means you got lucky and the system TRANS noticed; it might just hang. @xref{File Locks}, for an example. */ @@ -4239,7 +4185,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EMFILE /* -@@ -157,20 +154,20 @@ TRANS In BSD and GNU, the number of open files is controlled by a resource +@@ -157,20 +154,20 @@ TRANS In BSD and GNU, the number of open TRANS limit that can usually be increased. If you get this error, you might TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited; TRANS @pxref{Limits on Resources}. */ @@ -4263,7 +4209,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef ETXTBSY /* -@@ -179,35 +176,35 @@ TRANS write to a file that is currently being executed. Often using a +@@ -179,35 +176,35 @@ TRANS write to a file that is currently TRANS debugger to run a program is considered having it open for writing and TRANS will cause this error. (The name stands for ``text file busy''.) This TRANS is not an error on @gnuhurdsystems{}; the text is copied as necessary. */ @@ -4305,7 +4251,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EPIPE /* -@@ -216,19 +213,19 @@ TRANS Every library function that returns this error code also generates a +@@ -216,19 +213,19 @@ TRANS Every library function that return TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled TRANS or blocked. Thus, your program will never actually see @code{EPIPE} TRANS unless it has handled or blocked @code{SIGPIPE}. */ @@ -4328,7 +4274,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EAGAIN /* -@@ -261,7 +258,7 @@ TRANS Such shortages are usually fairly serious and affect the whole system, +@@ -261,7 +258,7 @@ TRANS Such shortages are usually fairly TRANS so usually an interactive program should report the error to the user TRANS and return to its command loop. TRANS @end itemize */ @@ -4337,7 +4283,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EINPROGRESS /* -@@ -273,47 +270,47 @@ TRANS the operation has begun and will take some time. Attempts to manipulate +@@ -273,47 +270,47 @@ TRANS the operation has begun and will t TRANS the object before the call completes return @code{EALREADY}. You can TRANS use the @code{select} function to find out when the pending operation TRANS has completed; @pxref{Waiting for I/O}. */ @@ -4393,7 +4339,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EOPNOTSUPP /* -@@ -323,71 +320,71 @@ TRANS implemented for all communications protocols. On @gnuhurdsystems{}, this +@@ -323,71 +320,71 @@ TRANS implemented for all communications TRANS error can happen for many calls when the object does not support the TRANS particular operation; it is a generic indication that the server knows TRANS nothing to do for that call. */ @@ -4477,7 +4423,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef ENOTCONN /* -@@ -395,74 +392,74 @@ TRANS The socket is not connected to anything. You get this error when you +@@ -395,74 +392,74 @@ TRANS The socket is not connected to any TRANS try to transmit data over a socket, without first specifying a TRANS destination for the data. For a connectionless socket (for datagram TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead. */ @@ -4565,7 +4511,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef ESTALE /* -@@ -471,7 +468,7 @@ TRANS file system which is due to file system rearrangements on the server host +@@ -471,7 +468,7 @@ TRANS file system which is due to file s TRANS for NFS file systems or corruption in other file systems. TRANS Repairing this condition usually requires unmounting, possibly repairing TRANS and remounting the file system. */ @@ -4574,7 +4520,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EREMOTE /* -@@ -479,7 +476,7 @@ TRANS An attempt was made to NFS-mount a remote file system with a file name tha +@@ -479,7 +476,7 @@ TRANS An attempt was made to NFS-mount a TRANS already specifies an NFS-mounted file. TRANS (This is an error on some operating systems, but we expect it to work TRANS properly on @gnuhurdsystems{}, making this error code impossible.) */ @@ -4583,7 +4529,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef ENOLCK /* -@@ -487,7 +484,7 @@ TRANS This is used by the file locking facilities; see +@@ -487,7 +484,7 @@ TRANS This is used by the file locking f TRANS @ref{File Locks}. This error is never generated by @gnuhurdsystems{}, but TRANS it can result from an operation to an NFS server running another TRANS operating system. */ @@ -4592,7 +4538,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef ENOSYS /* -@@ -496,46 +493,46 @@ TRANS not implemented at all, either in the C library itself or in the +@@ -496,46 +493,46 @@ TRANS not implemented at all, either in TRANS operating system. When you get this error, you can be sure that this TRANS particular function will always fail with @code{ENOSYS} unless you TRANS install a new version of the C library or the operating system. */ @@ -4652,7 +4598,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef ECANCELED /* -@@ -543,148 +540,148 @@ TRANS An asynchronous operation was canceled before it +@@ -543,148 +540,148 @@ TRANS An asynchronous operation was canc TRANS completed. @xref{Asynchronous I/O}. When you call @code{aio_cancel}, TRANS the normal result is for the operations affected to complete with this TRANS error; @pxref{Cancel AIO Operations}. */ @@ -4849,7 +4795,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EFTYPE /* -@@ -693,40 +690,40 @@ TRANS operation, or a data file had the wrong format. +@@ -693,40 +690,40 @@ TRANS operation, or a data file had the TRANS TRANS On some systems @code{chmod} returns this error if you try to set the TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}. */ @@ -4911,7 +4857,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EBACKGROUND /* -@@ -755,7 +752,7 @@ TRANS foreground process group of the terminal. Users do not usually see this +@@ -755,7 +752,7 @@ TRANS foreground process group of the te TRANS error because functions such as @code{read} and @code{write} translate TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control}, TRANS for information on process groups and these signals. */ @@ -4920,7 +4866,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #ifdef EIEIO /* -@@ -773,7 +770,7 @@ TRANS @c "bought the farm" means "died". -jtobey +@@ -773,7 +770,7 @@ TRANS @c "bought the farm" means "died". TRANS @c TRANS @c Translators, please do not translate this litteraly, translate it into TRANS @c an idiomatic funny way of saying that the computer died. */ @@ -4929,7 +4875,7 @@ index 5d11ed723d..6329e5f393 100644 #endif #if defined (EWOULDBLOCK) && EWOULDBLOCK != EAGAIN /* -@@ -782,18 +779,18 @@ TRANS The values are always the same, on every operating system. +@@ -782,18 +779,18 @@ TRANS The values are always the same, on TRANS TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a TRANS separate error code. */ @@ -4952,11 +4898,10 @@ index 5d11ed723d..6329e5f393 100644 -_S(ERR_MAP(EPROGUNAVAIL), N_("RPC program not available")) +_S(EPROGUNAVAIL, N_("RPC program not available")) #endif -diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h -index 0f08079e48..672d8f27ce 100644 ---- a/sysdeps/i386/dl-machine.h -+++ b/sysdeps/i386/dl-machine.h -@@ -338,16 +338,22 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc, +diff -pruN glibc-2.32.orig/sysdeps/i386/dl-machine.h glibc-2.32/sysdeps/i386/dl-machine.h +--- glibc-2.32.orig/sysdeps/i386/dl-machine.h 2021-09-18 21:02:32.707184853 +1000 ++++ glibc-2.32/sysdeps/i386/dl-machine.h 2021-09-18 21:03:05.313302322 +1000 +@@ -338,16 +338,22 @@ elf_machine_rel (struct link_map *map, c { # ifndef RTLD_BOOTSTRAP if (sym_map != map @@ -4984,10 +4929,9 @@ index 0f08079e48..672d8f27ce 100644 } # endif value = ((Elf32_Addr (*) (void)) value) (); -diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c -index 8a53a1088f..362a2b713c 100644 ---- a/sysdeps/powerpc/powerpc64/backtrace.c -+++ b/sysdeps/powerpc/powerpc64/backtrace.c +diff -pruN glibc-2.32.orig/sysdeps/powerpc/powerpc64/backtrace.c glibc-2.32/sysdeps/powerpc/powerpc64/backtrace.c +--- glibc-2.32.orig/sysdeps/powerpc/powerpc64/backtrace.c 2021-09-18 21:02:32.723185402 +1000 ++++ glibc-2.32/sysdeps/powerpc/powerpc64/backtrace.c 2021-09-18 21:03:05.313302322 +1000 @@ -54,11 +54,22 @@ struct signal_frame_64 { /* We don't care about the rest, since the IP value is at 'uc' field. */ }; @@ -5012,10 +4956,9 @@ index 8a53a1088f..362a2b713c 100644 return true; #endif return false; -diff --git a/sysdeps/s390/configure b/sysdeps/s390/configure -index fa46e9e351..e7f576338d 100644 ---- a/sysdeps/s390/configure -+++ b/sysdeps/s390/configure +diff -pruN glibc-2.32.orig/sysdeps/s390/configure glibc-2.32/sysdeps/s390/configure +--- glibc-2.32.orig/sysdeps/s390/configure 2021-09-18 21:02:32.727185539 +1000 ++++ glibc-2.32/sysdeps/s390/configure 2021-09-18 21:03:05.313302322 +1000 @@ -123,7 +123,9 @@ void testinsn (char *buf) __asm__ (".machine \"arch13\" \n\t" ".machinemode \"zarch_nohighgprs\" \n\t" @@ -5038,10 +4981,9 @@ index fa46e9e351..e7f576338d 100644 } EOF if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS --shared conftest.c -diff --git a/sysdeps/s390/configure.ac b/sysdeps/s390/configure.ac -index 3ed5a8ef87..5c3479e8cf 100644 ---- a/sysdeps/s390/configure.ac -+++ b/sysdeps/s390/configure.ac +diff -pruN glibc-2.32.orig/sysdeps/s390/configure.ac glibc-2.32/sysdeps/s390/configure.ac +--- glibc-2.32.orig/sysdeps/s390/configure.ac 2021-09-18 21:02:32.727185539 +1000 ++++ glibc-2.32/sysdeps/s390/configure.ac 2021-09-18 21:03:05.313302322 +1000 @@ -88,7 +88,9 @@ void testinsn (char *buf) __asm__ (".machine \"arch13\" \n\t" ".machinemode \"zarch_nohighgprs\" \n\t" @@ -5064,11 +5006,10 @@ index 3ed5a8ef87..5c3479e8cf 100644 } EOF dnl test, if assembler supports S390 arch13 zarch instructions as default -diff --git a/sysdeps/s390/memmove.c b/sysdeps/s390/memmove.c -index 5fc85e129f..ee59b5de14 100644 ---- a/sysdeps/s390/memmove.c -+++ b/sysdeps/s390/memmove.c -@@ -43,7 +43,7 @@ extern __typeof (__redirect_memmove) MEMMOVE_ARCH13 attribute_hidden; +diff -pruN glibc-2.32.orig/sysdeps/s390/memmove.c glibc-2.32/sysdeps/s390/memmove.c +--- glibc-2.32.orig/sysdeps/s390/memmove.c 2021-09-18 21:02:32.727185539 +1000 ++++ glibc-2.32/sysdeps/s390/memmove.c 2021-09-18 21:03:05.313302322 +1000 +@@ -43,7 +43,7 @@ extern __typeof (__redirect_memmove) MEM s390_libc_ifunc_expr (__redirect_memmove, memmove, ({ s390_libc_ifunc_expr_stfle_init (); @@ -5077,11 +5018,10 @@ index 5fc85e129f..ee59b5de14 100644 && S390_IS_ARCH13_MIE3 (stfle_bits)) ? MEMMOVE_ARCH13 : (HAVE_MEMMOVE_Z13 && (hwcap & HWCAP_S390_VX)) -diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c -index e6195c6e26..17c0cc3952 100644 ---- a/sysdeps/s390/multiarch/ifunc-impl-list.c -+++ b/sysdeps/s390/multiarch/ifunc-impl-list.c -@@ -171,7 +171,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, +diff -pruN glibc-2.32.orig/sysdeps/s390/multiarch/ifunc-impl-list.c glibc-2.32/sysdeps/s390/multiarch/ifunc-impl-list.c +--- glibc-2.32.orig/sysdeps/s390/multiarch/ifunc-impl-list.c 2021-09-18 21:02:32.727185539 +1000 ++++ glibc-2.32/sysdeps/s390/multiarch/ifunc-impl-list.c 2021-09-18 21:03:05.313302322 +1000 +@@ -171,7 +171,8 @@ __libc_ifunc_impl_list (const char *name IFUNC_IMPL (i, name, memmove, # if HAVE_MEMMOVE_ARCH13 IFUNC_IMPL_ADD (array, i, memmove, @@ -5091,37 +5031,19 @@ index e6195c6e26..17c0cc3952 100644 MEMMOVE_ARCH13) # endif # if HAVE_MEMMOVE_Z13 -diff --git a/sysdeps/sh/be/sh4/fpu/Implies b/sysdeps/sh/be/sh4/fpu/Implies -new file mode 100644 -index 0000000000..71b28ee1a4 ---- /dev/null -+++ b/sysdeps/sh/be/sh4/fpu/Implies +diff -pruN glibc-2.32.orig/sysdeps/sh/be/sh4/fpu/Implies glibc-2.32/sysdeps/sh/be/sh4/fpu/Implies +--- glibc-2.32.orig/sysdeps/sh/be/sh4/fpu/Implies 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/sh/be/sh4/fpu/Implies 2021-09-18 21:03:05.313302322 +1000 @@ -0,0 +1 @@ +sh/sh4/fpu -diff --git a/sysdeps/sh/le/sh4/fpu/Implies b/sysdeps/sh/le/sh4/fpu/Implies -new file mode 100644 -index 0000000000..71b28ee1a4 ---- /dev/null -+++ b/sysdeps/sh/le/sh4/fpu/Implies +diff -pruN glibc-2.32.orig/sysdeps/sh/le/sh4/fpu/Implies glibc-2.32/sysdeps/sh/le/sh4/fpu/Implies +--- glibc-2.32.orig/sysdeps/sh/le/sh4/fpu/Implies 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/sh/le/sh4/fpu/Implies 2021-09-18 21:03:05.313302322 +1000 @@ -0,0 +1 @@ +sh/sh4/fpu -diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile -index 9b2a253032..34748ffcd1 100644 ---- a/sysdeps/unix/sysv/linux/Makefile -+++ b/sysdeps/unix/sysv/linux/Makefile -@@ -100,7 +100,7 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ - tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \ - test-errno-linux tst-memfd_create tst-mlock2 tst-pkey \ - tst-rlimit-infinity tst-ofdlocks tst-gettid tst-gettid-kill \ -- tst-tgkill -+ tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux - tests-internal += tst-ofdlocks-compat tst-sigcontext-get_pc - - CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables -diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h -index fc688450ee..00a4d0c8e7 100644 ---- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.h -+++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.h +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/aarch64/cpu-features.h glibc-2.32/sysdeps/unix/sysv/linux/aarch64/cpu-features.h +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/aarch64/cpu-features.h 2021-09-18 21:02:32.731185676 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/aarch64/cpu-features.h 2021-09-18 21:03:05.313302322 +1000 @@ -54,6 +54,10 @@ && MIDR_PARTNUM(midr) == 0x000) #define IS_NEOVERSE_N1(midr) (MIDR_IMPLEMENTOR(midr) == 'A' \ @@ -5133,16 +5055,29 @@ index fc688450ee..00a4d0c8e7 100644 #define IS_EMAG(midr) (MIDR_IMPLEMENTOR(midr) == 'P' \ && MIDR_PARTNUM(midr) == 0x000) -diff --git a/sysdeps/unix/sysv/linux/mq_notify.c b/sysdeps/unix/sysv/linux/mq_notify.c -index 61bbb03b64..b5a903c3a2 100644 ---- a/sysdeps/unix/sysv/linux/mq_notify.c -+++ b/sysdeps/unix/sysv/linux/mq_notify.c -@@ -133,8 +133,11 @@ helper_thread (void *arg) +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.32/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/Makefile 2021-09-18 21:02:32.731185676 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/Makefile 2021-09-18 21:03:05.313302322 +1000 +@@ -100,7 +100,7 @@ tests += tst-clone tst-clone2 tst-clone3 + tst-quota tst-sync_file_range tst-sysconf-iov_max tst-ttyname \ + test-errno-linux tst-memfd_create tst-mlock2 tst-pkey \ + tst-rlimit-infinity tst-ofdlocks tst-gettid tst-gettid-kill \ +- tst-tgkill ++ tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux + tests-internal += tst-ofdlocks-compat tst-sigcontext-get_pc + + CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/mq_notify.c glibc-2.32/sysdeps/unix/sysv/linux/mq_notify.c +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/mq_notify.c 2021-09-18 21:02:32.736185847 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/mq_notify.c 2021-09-18 21:09:50.680196980 +1000 +@@ -132,9 +132,12 @@ 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) - /* The only state we keep is the copy of the thread attributes. */ - free (data.attr); ++ 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); @@ -5151,7 +5086,7 @@ index 61bbb03b64..b5a903c3a2 100644 } return NULL; } -@@ -255,8 +258,14 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) +@@ -255,8 +258,14 @@ mq_notify (mqd_t mqdes, const struct sig if (data.attr == NULL) return -1; @@ -5168,7 +5103,7 @@ index 61bbb03b64..b5a903c3a2 100644 } /* Construct the new request. */ -@@ -269,8 +278,11 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification) +@@ -269,8 +278,11 @@ mq_notify (mqd_t mqdes, const struct sig int retval = INLINE_SYSCALL (mq_notify, 2, mqdes, &se); /* If it failed, free the allocated memory. */ @@ -5182,11 +5117,10 @@ index 61bbb03b64..b5a903c3a2 100644 return retval; } -diff --git a/sysdeps/unix/sysv/linux/msgctl.c b/sysdeps/unix/sysv/linux/msgctl.c -index 0776472d5e..a1f24ab242 100644 ---- a/sysdeps/unix/sysv/linux/msgctl.c -+++ b/sysdeps/unix/sysv/linux/msgctl.c -@@ -90,8 +90,15 @@ __msgctl64 (int msqid, int cmd, struct __msqid64_ds *buf) +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/msgctl.c glibc-2.32/sysdeps/unix/sysv/linux/msgctl.c +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/msgctl.c 2021-09-18 21:02:32.736185847 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/msgctl.c 2021-09-18 21:03:05.313302322 +1000 +@@ -90,8 +90,15 @@ __msgctl64 (int msqid, int cmd, struct _ struct kernel_msqid64_ds ksemid, *arg = NULL; if (buf != NULL) { @@ -5204,7 +5138,7 @@ index 0776472d5e..a1f24ab242 100644 } # ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T if (cmd == IPC_SET) -@@ -169,8 +176,15 @@ __msgctl (int msqid, int cmd, struct msqid_ds *buf) +@@ -169,8 +176,15 @@ __msgctl (int msqid, int cmd, struct msq struct __msqid64_ds msqid64, *buf64 = NULL; if (buf != NULL) { @@ -5222,11 +5156,10 @@ index 0776472d5e..a1f24ab242 100644 } int ret = __msgctl64 (msqid, cmd, buf64); -diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c -index f131a26fc7..1cdabde8f2 100644 ---- a/sysdeps/unix/sysv/linux/semctl.c -+++ b/sysdeps/unix/sysv/linux/semctl.c -@@ -102,6 +102,7 @@ semun64_to_ksemun64 (int cmd, union semun64 semun64, +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/semctl.c glibc-2.32/sysdeps/unix/sysv/linux/semctl.c +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/semctl.c 2021-09-18 21:02:32.739185950 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/semctl.c 2021-09-18 21:03:05.313302322 +1000 +@@ -102,6 +102,7 @@ semun64_to_ksemun64 (int cmd, union semu r.array = semun64.array; break; case SEM_STAT: @@ -5234,7 +5167,7 @@ index f131a26fc7..1cdabde8f2 100644 case IPC_STAT: case IPC_SET: r.buf = buf; -@@ -150,6 +151,7 @@ __semctl64 (int semid, int semnum, int cmd, ...) +@@ -150,6 +151,7 @@ __semctl64 (int semid, int semnum, int c case IPC_STAT: /* arg.buf */ case IPC_SET: case SEM_STAT: @@ -5242,7 +5175,7 @@ index f131a26fc7..1cdabde8f2 100644 case IPC_INFO: /* arg.__buf */ case SEM_INFO: va_start (ap, cmd); -@@ -238,6 +240,7 @@ semun_to_semun64 (int cmd, union semun semun, struct __semid64_ds *semid64) +@@ -238,6 +240,7 @@ semun_to_semun64 (int cmd, union semun s r.array = semun.array; break; case SEM_STAT: @@ -5250,7 +5183,7 @@ index f131a26fc7..1cdabde8f2 100644 case IPC_STAT: case IPC_SET: r.buf = semid64; -@@ -267,6 +270,7 @@ __semctl (int semid, int semnum, int cmd, ...) +@@ -267,6 +270,7 @@ __semctl (int semid, int semnum, int cmd case IPC_STAT: /* arg.buf */ case IPC_SET: case SEM_STAT: @@ -5258,7 +5191,7 @@ index f131a26fc7..1cdabde8f2 100644 case IPC_INFO: /* arg.__buf */ case SEM_INFO: va_start (ap, cmd); -@@ -321,6 +325,7 @@ __semctl_mode16 (int semid, int semnum, int cmd, ...) +@@ -321,6 +325,7 @@ __semctl_mode16 (int semid, int semnum, case IPC_STAT: /* arg.buf */ case IPC_SET: case SEM_STAT: @@ -5266,7 +5199,7 @@ index f131a26fc7..1cdabde8f2 100644 case IPC_INFO: /* arg.__buf */ case SEM_INFO: va_start (ap, cmd); -@@ -354,6 +359,7 @@ __old_semctl (int semid, int semnum, int cmd, ...) +@@ -354,6 +359,7 @@ __old_semctl (int semid, int semnum, int case IPC_STAT: /* arg.buf */ case IPC_SET: case SEM_STAT: @@ -5274,25 +5207,20 @@ index f131a26fc7..1cdabde8f2 100644 case IPC_INFO: /* arg.__buf */ case SEM_INFO: va_start (ap, cmd); -diff --git a/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies b/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies -new file mode 100644 -index 0000000000..7eeaf15a5a ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies glibc-2.32/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/sh/be/sh4/fpu/Implies 2021-09-18 21:03:05.313302322 +1000 @@ -0,0 +1 @@ +unix/sysv/linux/sh/sh4/fpu -diff --git a/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies b/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies -new file mode 100644 -index 0000000000..7eeaf15a5a ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies glibc-2.32/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/sh/le/sh4/fpu/Implies 2021-09-18 21:03:05.313302322 +1000 @@ -0,0 +1 @@ +unix/sysv/linux/sh/sh4/fpu -diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c -index 76d88441f1..1d19a798b1 100644 ---- a/sysdeps/unix/sysv/linux/shmctl.c -+++ b/sysdeps/unix/sysv/linux/shmctl.c -@@ -90,8 +90,15 @@ __shmctl64 (int shmid, int cmd, struct __shmid64_ds *buf) +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/shmctl.c glibc-2.32/sysdeps/unix/sysv/linux/shmctl.c +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/shmctl.c 2021-09-18 21:02:32.740185984 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/shmctl.c 2021-09-18 21:03:05.313302322 +1000 +@@ -90,8 +90,15 @@ __shmctl64 (int shmid, int cmd, struct _ struct kernel_shmid64_ds kshmid, *arg = NULL; if (buf != NULL) { @@ -5310,7 +5238,7 @@ index 76d88441f1..1d19a798b1 100644 } # ifdef __ASSUME_SYSVIPC_BROKEN_MODE_T if (cmd == IPC_SET) -@@ -107,7 +114,6 @@ __shmctl64 (int shmid, int cmd, struct __shmid64_ds *buf) +@@ -107,7 +114,6 @@ __shmctl64 (int shmid, int cmd, struct _ switch (cmd) { @@ -5318,7 +5246,7 @@ index 76d88441f1..1d19a798b1 100644 case IPC_STAT: case SHM_STAT: case SHM_STAT_ANY: -@@ -168,8 +174,15 @@ __shmctl (int shmid, int cmd, struct shmid_ds *buf) +@@ -168,8 +174,15 @@ __shmctl (int shmid, int cmd, struct shm struct __shmid64_ds shmid64, *buf64 = NULL; if (buf != NULL) { @@ -5336,7 +5264,7 @@ index 76d88441f1..1d19a798b1 100644 } int ret = __shmctl64 (shmid, cmd, buf64); -@@ -178,7 +191,6 @@ __shmctl (int shmid, int cmd, struct shmid_ds *buf) +@@ -178,7 +191,6 @@ __shmctl (int shmid, int cmd, struct shm switch (cmd) { @@ -5344,11 +5272,9 @@ index 76d88441f1..1d19a798b1 100644 case IPC_STAT: case SHM_STAT: case SHM_STAT_ANY: -diff --git a/sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c b/sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c -new file mode 100644 -index 0000000000..630f4f792c ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c glibc-2.32/sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/tst-sysvmsg-linux.c 2021-09-18 21:03:05.313302322 +1000 @@ -0,0 +1,177 @@ +/* Basic tests for Linux SYSV message queue extensions. + Copyright (C) 2020 Free Software Foundation, Inc. @@ -5527,11 +5453,9 @@ index 0000000000..630f4f792c +} + +#include -diff --git a/sysdeps/unix/sysv/linux/tst-sysvsem-linux.c b/sysdeps/unix/sysv/linux/tst-sysvsem-linux.c -new file mode 100644 -index 0000000000..45f19e2d37 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/tst-sysvsem-linux.c +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/tst-sysvsem-linux.c glibc-2.32/sysdeps/unix/sysv/linux/tst-sysvsem-linux.c +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/tst-sysvsem-linux.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/tst-sysvsem-linux.c 2021-09-18 21:03:05.314302356 +1000 @@ -0,0 +1,184 @@ +/* Basic tests for Linux SYSV semaphore extensions. + Copyright (C) 2020 Free Software Foundation, Inc. @@ -5717,11 +5641,9 @@ index 0000000000..45f19e2d37 +} + +#include -diff --git a/sysdeps/unix/sysv/linux/tst-sysvshm-linux.c b/sysdeps/unix/sysv/linux/tst-sysvshm-linux.c -new file mode 100644 -index 0000000000..7128ae2e14 ---- /dev/null -+++ b/sysdeps/unix/sysv/linux/tst-sysvshm-linux.c +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/tst-sysvshm-linux.c glibc-2.32/sysdeps/unix/sysv/linux/tst-sysvshm-linux.c +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/tst-sysvshm-linux.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/tst-sysvshm-linux.c 2021-09-18 21:03:05.314302356 +1000 @@ -0,0 +1,185 @@ +/* Basic tests for Linux SYSV shared memory extensions. + Copyright (C) 2020 Free Software Foundation, Inc. @@ -5908,27 +5830,41 @@ index 0000000000..7128ae2e14 +} + +#include -diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile -index a6736aef25..9736a13e7b 100644 ---- a/sysdeps/x86/Makefile -+++ b/sysdeps/x86/Makefile -@@ -12,6 +12,12 @@ endif - ifeq ($(subdir),setjmp) - gen-as-const-headers += jmp_buf-ssp.sym - sysdep_routines += __longjmp_cancel -+ifneq ($(enable-cet),no) -+ifneq ($(have-tunables),no) -+tests += tst-setjmp-cet -+tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on -+endif -+endif - endif +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/x86_64/64/configure glibc-2.32/sysdeps/unix/sysv/linux/x86_64/64/configure +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/x86_64/64/configure 2021-09-18 21:02:32.741186019 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/x86_64/64/configure 2021-09-18 21:03:05.314302356 +1000 +@@ -4,10 +4,10 @@ + test -n "$libc_cv_slibdir" || + case "$prefix" in + /usr | /usr/) +- libc_cv_slibdir='/lib64' +- libc_cv_rtlddir='/lib64' ++ libc_cv_slibdir='/lib' ++ libc_cv_rtlddir='/lib' + if test "$libdir" = '${exec_prefix}/lib'; then +- libdir='${exec_prefix}/lib64'; ++ libdir='${exec_prefix}/lib'; + # Locale data can be shared between 32-bit and 64-bit libraries. + libc_cv_complocaledir='${exec_prefix}/lib/locale' + fi +diff -pruN glibc-2.32.orig/sysdeps/unix/sysv/linux/x86_64/ldconfig.h glibc-2.32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h +--- glibc-2.32.orig/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2021-09-18 21:02:32.742186053 +1000 ++++ glibc-2.32/sysdeps/unix/sysv/linux/x86_64/ldconfig.h 2021-09-18 21:03:05.314302356 +1000 +@@ -18,9 +18,9 @@ + #include - ifeq ($(subdir),string) -diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c -index 217c21c34f..3fb4a028d8 100644 ---- a/sysdeps/x86/cacheinfo.c -+++ b/sysdeps/x86/cacheinfo.c + #define SYSDEP_KNOWN_INTERPRETER_NAMES \ +- { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \ ++ { "/lib32/ld-linux.so.2", FLAG_ELF_LIBC6 }, \ + { "/libx32/ld-linux-x32.so.2", FLAG_ELF_LIBC6 }, \ +- { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, ++ { "/lib/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, + #define SYSDEP_KNOWN_LIBRARY_NAMES \ + { "libc.so.6", FLAG_ELF_LIBC6 }, \ + { "libm.so.6", FLAG_ELF_LIBC6 }, +diff -pruN glibc-2.32.orig/sysdeps/x86/cacheinfo.c glibc-2.32/sysdeps/x86/cacheinfo.c +--- glibc-2.32.orig/sysdeps/x86/cacheinfo.c 2021-09-18 21:02:32.742186053 +1000 ++++ glibc-2.32/sysdeps/x86/cacheinfo.c 2021-09-18 21:03:05.314302356 +1000 @@ -808,7 +808,7 @@ init_cacheinfo (void) threads = 1 << ((ecx >> 12) & 0x0f); } @@ -5989,11 +5925,10 @@ index 217c21c34f..3fb4a028d8 100644 /* NB: The REP MOVSB threshold must be greater than VEC_SIZE * 8. */ unsigned int minimum_rep_movsb_threshold; -diff --git a/sysdeps/x86/dl-cet.c b/sysdeps/x86/dl-cet.c -index 03572f7af6..3cc54a8d53 100644 ---- a/sysdeps/x86/dl-cet.c -+++ b/sysdeps/x86/dl-cet.c -@@ -47,7 +47,10 @@ dl_cet_check (struct link_map *m, const char *program) +diff -pruN glibc-2.32.orig/sysdeps/x86/dl-cet.c glibc-2.32/sysdeps/x86/dl-cet.c +--- glibc-2.32.orig/sysdeps/x86/dl-cet.c 2021-09-18 21:02:32.742186053 +1000 ++++ glibc-2.32/sysdeps/x86/dl-cet.c 2021-09-18 21:03:05.314302356 +1000 +@@ -47,7 +47,10 @@ dl_cet_check (struct link_map *m, const /* No legacy object check if both IBT and SHSTK are always on. */ if (enable_ibt_type == cet_always_on && enable_shstk_type == cet_always_on) @@ -6005,11 +5940,10 @@ index 03572f7af6..3cc54a8d53 100644 /* Check if IBT is enabled by kernel. */ bool ibt_enabled -diff --git a/sysdeps/x86/dl-prop.h b/sysdeps/x86/dl-prop.h -index 89911e19e2..4eb3b85a7b 100644 ---- a/sysdeps/x86/dl-prop.h -+++ b/sysdeps/x86/dl-prop.h -@@ -145,15 +145,15 @@ _dl_process_cet_property_note (struct link_map *l, +diff -pruN glibc-2.32.orig/sysdeps/x86/dl-prop.h glibc-2.32/sysdeps/x86/dl-prop.h +--- glibc-2.32.orig/sysdeps/x86/dl-prop.h 2021-09-18 21:02:32.742186053 +1000 ++++ glibc-2.32/sysdeps/x86/dl-prop.h 2021-09-18 21:03:05.314302356 +1000 +@@ -145,15 +145,15 @@ _dl_process_cet_property_note (struct li } static inline void __attribute__ ((unused)) @@ -6028,20 +5962,31 @@ index 89911e19e2..4eb3b85a7b 100644 { return 0; } -diff --git a/sysdeps/x86/tst-setjmp-cet.c b/sysdeps/x86/tst-setjmp-cet.c -new file mode 100644 -index 0000000000..42c795d2a8 ---- /dev/null -+++ b/sysdeps/x86/tst-setjmp-cet.c +diff -pruN glibc-2.32.orig/sysdeps/x86/Makefile glibc-2.32/sysdeps/x86/Makefile +--- glibc-2.32.orig/sysdeps/x86/Makefile 2021-09-18 21:02:32.742186053 +1000 ++++ glibc-2.32/sysdeps/x86/Makefile 2021-09-18 21:03:05.314302356 +1000 +@@ -12,6 +12,12 @@ endif + ifeq ($(subdir),setjmp) + gen-as-const-headers += jmp_buf-ssp.sym + sysdep_routines += __longjmp_cancel ++ifneq ($(enable-cet),no) ++ifneq ($(have-tunables),no) ++tests += tst-setjmp-cet ++tst-setjmp-cet-ENV = GLIBC_TUNABLES=glibc.cpu.x86_ibt=on:glibc.cpu.x86_shstk=on ++endif ++endif + endif + + ifeq ($(subdir),string) +diff -pruN glibc-2.32.orig/sysdeps/x86/tst-setjmp-cet.c glibc-2.32/sysdeps/x86/tst-setjmp-cet.c +--- glibc-2.32.orig/sysdeps/x86/tst-setjmp-cet.c 1970-01-01 10:00:00.000000000 +1000 ++++ glibc-2.32/sysdeps/x86/tst-setjmp-cet.c 2021-09-18 21:03:05.314302356 +1000 @@ -0,0 +1 @@ +#include -diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure -old mode 100644 -new mode 100755 -index 84f82c2406..fc1840e23f ---- a/sysdeps/x86_64/configure -+++ b/sysdeps/x86_64/configure -@@ -107,39 +107,6 @@ if test x"$build_mathvec" = xnotset; then +diff -pruN glibc-2.32.orig/sysdeps/x86_64/configure glibc-2.32/sysdeps/x86_64/configure +--- glibc-2.32.orig/sysdeps/x86_64/configure 2021-09-18 21:02:32.743186087 +1000 ++++ glibc-2.32/sysdeps/x86_64/configure 2021-09-18 21:03:05.314302356 +1000 +@@ -107,39 +107,6 @@ if test x"$build_mathvec" = xnotset; the build_mathvec=yes fi @@ -6081,11 +6026,10 @@ index 84f82c2406..fc1840e23f $as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h -diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac -index cdaba0c075..611a7d9ba3 100644 ---- a/sysdeps/x86_64/configure.ac -+++ b/sysdeps/x86_64/configure.ac -@@ -53,31 +53,6 @@ if test x"$build_mathvec" = xnotset; then +diff -pruN glibc-2.32.orig/sysdeps/x86_64/configure.ac glibc-2.32/sysdeps/x86_64/configure.ac +--- glibc-2.32.orig/sysdeps/x86_64/configure.ac 2021-09-18 21:02:32.743186087 +1000 ++++ glibc-2.32/sysdeps/x86_64/configure.ac 2021-09-18 21:03:05.314302356 +1000 +@@ -53,31 +53,6 @@ if test x"$build_mathvec" = xnotset; the build_mathvec=yes fi @@ -6117,11 +6061,10 @@ index cdaba0c075..611a7d9ba3 100644 dnl It is always possible to access static and hidden symbols in an dnl position independent way. AC_DEFINE(PI_STATIC_AND_HIDDEN) -diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h -index ca73d8fef9..363a749cb2 100644 ---- a/sysdeps/x86_64/dl-machine.h -+++ b/sysdeps/x86_64/dl-machine.h -@@ -315,16 +315,22 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, +diff -pruN glibc-2.32.orig/sysdeps/x86_64/dl-machine.h glibc-2.32/sysdeps/x86_64/dl-machine.h +--- glibc-2.32.orig/sysdeps/x86_64/dl-machine.h 2021-09-18 21:02:32.743186087 +1000 ++++ glibc-2.32/sysdeps/x86_64/dl-machine.h 2021-09-18 21:03:05.314302356 +1000 +@@ -315,16 +315,22 @@ elf_machine_rela (struct link_map *map, { # ifndef RTLD_BOOTSTRAP if (sym_map != map @@ -6149,10 +6092,9 @@ index ca73d8fef9..363a749cb2 100644 } # endif value = ((ElfW(Addr) (*) (void)) value) (); -diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h -index 7659758972..e5fd5ac9cb 100644 ---- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h -+++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h +diff -pruN glibc-2.32.orig/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h glibc-2.32/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h +--- glibc-2.32.orig/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h 2021-09-18 21:02:32.743186087 +1000 ++++ glibc-2.32/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h 2021-09-18 21:03:05.314302356 +1000 @@ -32,7 +32,7 @@ IFUNC_SELECTOR (void) && CPU_FEATURE_USABLE_P (cpu_features, AVX2)) return OPTIMIZE (fma); @@ -6162,10 +6104,9 @@ index 7659758972..e5fd5ac9cb 100644 return OPTIMIZE (fma4); return OPTIMIZE (sse2); -diff --git a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S -index bd5dc1a3f3..092f364bb6 100644 ---- a/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S -+++ b/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S +diff -pruN glibc-2.32.orig/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S glibc-2.32/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S +--- glibc-2.32.orig/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S 2021-09-18 21:02:32.745186156 +1000 ++++ glibc-2.32/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S 2021-09-18 21:03:05.314302356 +1000 @@ -56,6 +56,13 @@ # endif #endif @@ -6202,10 +6143,9 @@ index bd5dc1a3f3..092f364bb6 100644 mov %RDX_LP, %RCX_LP rep movsb L(nop): -diff --git a/sysvipc/test-sysvsem.c b/sysvipc/test-sysvsem.c -index 01dbff343a..b7284e0b48 100644 ---- a/sysvipc/test-sysvsem.c -+++ b/sysvipc/test-sysvsem.c +diff -pruN glibc-2.32.orig/sysvipc/test-sysvsem.c glibc-2.32/sysvipc/test-sysvsem.c +--- glibc-2.32.orig/sysvipc/test-sysvsem.c 2021-09-18 21:02:32.746186190 +1000 ++++ glibc-2.32/sysvipc/test-sysvsem.c 2021-09-18 21:03:05.314302356 +1000 @@ -20,6 +20,7 @@ #include #include @@ -6214,47 +6154,12 @@ index 01dbff343a..b7284e0b48 100644 #include #include #include -diff --git a/version.h b/version.h -index 83cd196798..e6ca7a8857 100644 ---- a/version.h -+++ b/version.h +diff -pruN glibc-2.32.orig/version.h glibc-2.32/version.h +--- glibc-2.32.orig/version.h 2021-09-18 21:02:32.746186190 +1000 ++++ glibc-2.32/version.h 2021-09-18 21:03:05.314302356 +1000 @@ -1,4 +1,4 @@ /* This file just defines the current version number of libc. */ -#define RELEASE "release" +#define RELEASE "stable" #define VERSION "2.32" -diff --git a/sysdeps/unix/sysv/linux/x86_64/64/configure b/sysdeps/unix/sysv/linux/x86_64/64/configure -index 9d298faba7..cef1ec842c 100644 ---- a/sysdeps/unix/sysv/linux/x86_64/64/configure -+++ b/sysdeps/unix/sysv/linux/x86_64/64/configure -@@ -4,10 +4,10 @@ - test -n "$libc_cv_slibdir" || - case "$prefix" in - /usr | /usr/) -- libc_cv_slibdir='/lib64' -- libc_cv_rtlddir='/lib64' -+ libc_cv_slibdir='/lib' -+ libc_cv_rtlddir='/lib' - if test "$libdir" = '${exec_prefix}/lib'; then -- libdir='${exec_prefix}/lib64'; -+ libdir='${exec_prefix}/lib'; - # Locale data can be shared between 32-bit and 64-bit libraries. - libc_cv_complocaledir='${exec_prefix}/lib/locale' - fi -diff --git a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -index 062c04689d..7783757726 100644 ---- a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -+++ b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -@@ -18,9 +18,9 @@ - #include - - #define SYSDEP_KNOWN_INTERPRETER_NAMES \ -- { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \ -+ { "/lib32/ld-linux.so.2", FLAG_ELF_LIBC6 }, \ - { "/libx32/ld-linux-x32.so.2", FLAG_ELF_LIBC6 }, \ -- { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, -+ { "/lib/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, - #define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ - { "libm.so.6", FLAG_ELF_LIBC6 },