crux-commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
August 2022
- 1 participants
- 710 discussions
commit ff5ee82b89f6bbea5b3df0475354be476e4af3ff
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Aug 27 16:24:44 2022 +0200
libtasn1: 4.18.0 -> 4.19.0
diff --git a/libtasn1/.footprint b/libtasn1/.footprint
index d20484713..6d1524164 100644
--- a/libtasn1/.footprint
+++ b/libtasn1/.footprint
@@ -8,9 +8,9 @@ drwxr-xr-x root/root usr/include/
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libtasn1.a
-rwxr-xr-x root/root usr/lib/libtasn1.la
--rwxr-xr-x root/root usr/lib/libtasn1.so.6.6.2
-lrwxrwxrwx root/root usr/lib/libtasn1.so.6 -> libtasn1.so.6.6.2
-lrwxrwxrwx root/root usr/lib/libtasn1.so -> libtasn1.so.6.6.2
+lrwxrwxrwx root/root usr/lib/libtasn1.so -> libtasn1.so.6.6.3
+lrwxrwxrwx root/root usr/lib/libtasn1.so.6 -> libtasn1.so.6.6.3
+-rwxr-xr-x root/root usr/lib/libtasn1.so.6.6.3
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/libtasn1.pc
drwxr-xr-x root/root usr/share/
@@ -28,11 +28,11 @@ drwxr-xr-x root/root usr/share/man/man3/
-rw-r--r-- root/root usr/share/man/man3/asn1_decode_simple_ber.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_decode_simple_der.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_delete_element.3.gz
--rw-r--r-- root/root usr/share/man/man3/asn1_delete_structure2.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_delete_structure.3.gz
+-rw-r--r-- root/root usr/share/man/man3/asn1_delete_structure2.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_der_coding.3.gz
--rw-r--r-- root/root usr/share/man/man3/asn1_der_decoding2.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_der_decoding.3.gz
+-rw-r--r-- root/root usr/share/man/man3/asn1_der_decoding2.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_der_decoding_element.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_der_decoding_startEnd.3.gz
-rw-r--r-- root/root usr/share/man/man3/asn1_dup_node.3.gz
diff --git a/libtasn1/.signature b/libtasn1/.signature
index d480f4d86..5e3fde10c 100644
--- a/libtasn1/.signature
+++ b/libtasn1/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/ZjfNTFUJAaIawDLtLGEfaKWqi/KUp73e8Wq2WNLAgZaJ5HT32n9fxI3V/ZfrOHLDlLBwRK358cKlDQetZt3mQQ=
-SHA256 (Pkgfile) = 8559fe9a316081c5ee0dd91c3d5a4c94527dc03da02c8d4e8f7c34a8b166f915
-SHA256 (.footprint) = 21b3d5d676eca5f9d8ccc288858b7e63230418e4e98a9ff94b0d9075e56dcd8c
-SHA256 (libtasn1-4.18.0.tar.gz) = 4365c154953563d64c67a024b607d1ee75c6db76e0d0f65709ea80a334cd1898
+RWSE3ohX2g5d/T7HC/sXoVS1n2m7amLpcgt3BjzTgOA4lLxPj8XX4bx0W5J2FVnlP4A6JM/uw8RV7nUlwEjhci24x+lKgmey/ww=
+SHA256 (Pkgfile) = 610ba0591cd2f6943c6229a04f95c3336e8be46d2c5755110f2d0436c680bdd0
+SHA256 (.footprint) = a0ff6a25328681826a5f88c1f5f1d9a0f4b9c76ec773cbd489e2816ba7fcfb59
+SHA256 (libtasn1-4.19.0.tar.gz) = 1613f0ac1cf484d6ec0ce3b8c06d56263cc7242f1c23b30d82d23de345a63f7a
diff --git a/libtasn1/Pkgfile b/libtasn1/Pkgfile
index 8c55d641b..7249689c5 100644
--- a/libtasn1/Pkgfile
+++ b/libtasn1/Pkgfile
@@ -3,7 +3,7 @@
# Maintainer: Danny Rawlins, crux at romster dot me
name=libtasn1
-version=4.18.0
+version=4.19.0
release=1
source=(https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz)
1
0
commit 0815e0f0e08fcf0e54fb4ccc2f84b6f865b7254b
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Aug 27 16:22:59 2022 +0200
libwpe: 1.12.2 -> 1.12.3
diff --git a/libwpe/.footprint b/libwpe/.footprint
index 3cad5eb5f..38e6c2237 100644
--- a/libwpe/.footprint
+++ b/libwpe/.footprint
@@ -17,7 +17,7 @@ drwxr-xr-x root/root usr/include/wpe-1.0/wpe/
-rw-r--r-- root/root usr/include/wpe-1.0/wpe/wpe.h
drwxr-xr-x root/root usr/lib/
lrwxrwxrwx root/root usr/lib/libwpe-1.0.so -> libwpe-1.0.so.1
-lrwxrwxrwx root/root usr/lib/libwpe-1.0.so.1 -> libwpe-1.0.so.1.6.2
--rwxr-xr-x root/root usr/lib/libwpe-1.0.so.1.6.2
+lrwxrwxrwx root/root usr/lib/libwpe-1.0.so.1 -> libwpe-1.0.so.1.6.3
+-rwxr-xr-x root/root usr/lib/libwpe-1.0.so.1.6.3
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/wpe-1.0.pc
diff --git a/libwpe/.signature b/libwpe/.signature
index f8016c9c1..1dc9543d9 100644
--- a/libwpe/.signature
+++ b/libwpe/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/WPra4plJSbVz1xrV9qUPiCsfwO6geUWxF76Np12ICBMfWsh6YF1yAIOyxruPmwSFcZ0G4eBqWOAYYPqqm1izgk=
-SHA256 (Pkgfile) = c7fc114eb919adacce09762f86dfe36a9edf17fb4f2c3cd6b711b43038621828
-SHA256 (.footprint) = e5dd7e62ed3c659a1a04607d428267e8579990695340c72cbe1ee709b49b6d66
-SHA256 (libwpe-1.12.2.tar.xz) = 4ac4fd0a8b562b721bffd0f46ae9f06c2b5a3114407581978be875a9d651642a
+RWSE3ohX2g5d/Q98BQqh4Qf52LdoCAhJ/e8CetDsOa4yt1VUv9+82/u53xE0S6w6RdVF6HNXi4Ldh4j8c66zjLe1ydePy9vLCwI=
+SHA256 (Pkgfile) = e5db97769445b86a8a2c0d603c6b4c89e701d89c930810048afa451f0ca00543
+SHA256 (.footprint) = 90f6b186bd5cc8fa6df4d80545794ccbb5735dbbd7fecfe3846b10c600bedfb6
+SHA256 (libwpe-1.12.3.tar.xz) = b84fdbfbc849ce4fdf084bb28b58e5463b1b4b6cc8f200dc77b41f8545d5329d
diff --git a/libwpe/Pkgfile b/libwpe/Pkgfile
index 73f0efe31..718a1984f 100644
--- a/libwpe/Pkgfile
+++ b/libwpe/Pkgfile
@@ -4,7 +4,7 @@
# Depends on: libxkbcommon mesa
name=libwpe
-version=1.12.2
+version=1.12.3
release=1
source=(https://wpewebkit.org/releases/$name-$version.tar.xz)
1
0
commit d771866abd2397529c8bf9d6654fd1d1f133b29e
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Aug 27 16:20:46 2022 +0200
nodejs: 18.7.0 -> 18.8.0
diff --git a/nodejs/.signature b/nodejs/.signature
index bdb55ecf0..5a18261ba 100644
--- a/nodejs/.signature
+++ b/nodejs/.signature
@@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/RbvjCyrrfSFIOZEtZ7vYCtIcuOiP1FBPHjyCq/94Aon18BlDdhdzE0xs10JzXmlQ/OFDB9+rIe3GlIKtEXpYQM=
-SHA256 (Pkgfile) = 0a1e568b913809ef69cffde5dc2060840b92f89b343b4dd361ff0305f039e9d0
+RWSE3ohX2g5d/SsDMMCT/VEz3B5vJhlFglgOEnkpSrJ5V/iLwWPGSio7vr6Mlgb4LaLuK4Z9P48GCtRRngMPqwTUkEDD1Jp6TQs=
+SHA256 (Pkgfile) = b974cbb839cff3acc7ad5e1eff39dc81a7a4a8d848cb3cf03ae0fec2fb4c82f6
SHA256 (.footprint) = 8cc3451744cf3147497937902aeb6ce25ac3deb60ca995e3c88bc98b0ce7f8ac
-SHA256 (node-v18.7.0.tar.xz) = 8834a33c92dfe6ba8903e6715caeaa25dff4657e703c54cd06ec113493e2c3c2
+SHA256 (node-v18.8.0.tar.xz) = 2b5d9825d05ede6614f1668a8d97d774fe92ebc81088ec5fdf58184dce3c86b9
SHA256 (system-c-ares.patch) = 1ab0f849fe4fae2d295b6c60c12825d5f2c29f5b28b721916d1b550704b0f5f3
diff --git a/nodejs/Pkgfile b/nodejs/Pkgfile
index 0bd21c53a..da870f23a 100644
--- a/nodejs/Pkgfile
+++ b/nodejs/Pkgfile
@@ -5,7 +5,7 @@
# Optional: brotli c-ares icu nghttp2-libs ninja
name=nodejs
-version=18.7.0
+version=18.8.0
release=1
source=(https://nodejs.org/dist/v$version/node-v$version.tar.xz
system-c-ares.patch)
@@ -22,7 +22,6 @@ build() {
./configure ${PKGMK_NODEJS} \
--prefix=/usr \
- --enable-lto \
--without-npm \
--shared-libuv \
--shared-zlib \
1
0
commit dc5dcb59dbf6a47b20c88b068f5472afd1a6b771
Author: Tim Biermann <tbier(a)posteo.de>
Date: Sat Aug 27 15:39:11 2022 +0200
python3-setuptools: 65.1.0 -> 65.3.0
diff --git a/python3-setuptools/.footprint b/python3-setuptools/.footprint
index 3c1b035ca..45bf1e625 100644
--- a/python3-setuptools/.footprint
+++ b/python3-setuptools/.footprint
@@ -160,13 +160,13 @@ drwxr-xr-x root/root usr/lib/python3.9/site-packages/pkg_resources/extern/
drwxr-xr-x root/root usr/lib/python3.9/site-packages/pkg_resources/extern/__pycache__/
-rw-r--r-- root/root usr/lib/python3.9/site-packages/pkg_resources/extern/__pycache__/__init__.cpython-39.opt-1.pyc
-rw-r--r-- root/root usr/lib/python3.9/site-packages/pkg_resources/extern/__pycache__/__init__.cpython-39.pyc
-drwxr-xr-x root/root usr/lib/python3.9/site-packages/setuptools-65.1.0-py3.9.egg-info/
--rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.1.0-py3.9.egg-info/PKG-INFO
--rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.1.0-py3.9.egg-info/SOURCES.txt
--rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.1.0-py3.9.egg-info/dependency_links.txt
--rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.1.0-py3.9.egg-info/entry_points.txt
--rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.1.0-py3.9.egg-info/requires.txt
--rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.1.0-py3.9.egg-info/top_level.txt
+drwxr-xr-x root/root usr/lib/python3.9/site-packages/setuptools-65.3.0-py3.9.egg-info/
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.3.0-py3.9.egg-info/PKG-INFO
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.3.0-py3.9.egg-info/SOURCES.txt
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.3.0-py3.9.egg-info/dependency_links.txt
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.3.0-py3.9.egg-info/entry_points.txt
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.3.0-py3.9.egg-info/requires.txt
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools-65.3.0-py3.9.egg-info/top_level.txt
drwxr-xr-x root/root usr/lib/python3.9/site-packages/setuptools/
-rw-r--r-- root/root usr/lib/python3.9/site-packages/setuptools/__init__.py
drwxr-xr-x root/root usr/lib/python3.9/site-packages/setuptools/__pycache__/
diff --git a/python3-setuptools/.signature b/python3-setuptools/.signature
index 186c20240..9567829f3 100644
--- a/python3-setuptools/.signature
+++ b/python3-setuptools/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/opt.pub
-RWSE3ohX2g5d/QO3AjqY9Dp+L/ZoYH/QlImDK3TnOAUzGC+8c/TPCySFs9QXWnzk7G/rL9P9ytKxeVoA+HwjV9SX3pQZKpq1jwo=
-SHA256 (Pkgfile) = 435d57317a3de210dd24d760adff722ab40793dcbc5b8e83cd834d7b49240e4c
-SHA256 (.footprint) = 53c589a1cf2dc9c6b64ebf9785dfb4cc915b0b5c27f42872ff6778508614dffc
-SHA256 (setuptools-65.1.0.tar.gz) = d2e010624c781b26ad6629a8de9832327cf853dea93894487979e55f9ad06857
+RWSE3ohX2g5d/QHc7G8bWklhfOFHQNpsWkKZYolLxn/AZxsnGGEA0/oQvhH6DmCNtmDu/l+GW3qCUMHvCo3Dn/R36S3fy4Gmqgc=
+SHA256 (Pkgfile) = c1e790c6b7936550496b91bc546e5427a89a0f74293af68745e57fbe897a1f98
+SHA256 (.footprint) = 3266f4efffad93b90efd898bd536d37fbb6165c2b8ac9e4d921de3046a0add94
+SHA256 (setuptools-65.3.0.tar.gz) = 7732871f4f7fa58fb6bdcaeadb0161b2bd046c85905dbaa066bdcbcc81953b57
diff --git a/python3-setuptools/Pkgfile b/python3-setuptools/Pkgfile
index 572dba006..eece6bf7e 100644
--- a/python3-setuptools/Pkgfile
+++ b/python3-setuptools/Pkgfile
@@ -3,7 +3,7 @@
# Maintainer: Danny Rawlins, crux at romster dot me
name=python3-setuptools
-version=65.1.0
+version=65.3.0
release=1
source=(https://files.pythonhosted.org/packages/source/${name:8:1}/${name#*…
1
0
commit d8a771e31e30b9b47187dca844a127b1b79fb360
Author: Juergen Daubert <jue(a)jue.li>
Date: Sun Aug 28 10:58:39 2022 +0200
glibc-32: update to 2.36
diff --git a/glibc-32/.signature b/glibc-32/.signature
index 07e2119f..d9170707 100644
--- a/glibc-32/.signature
+++ b/glibc-32/.signature
@@ -1,8 +1,8 @@
untrusted comment: verify with /etc/ports/core.pub
-RWRJc1FUaeVeqh19lKx4wk8KE2AhxflKslbkarbdSukAiOJ6+8ga9luqkksDm1m7U1Yto0Z7EXUQiCJ7p7fKnn3JpbZkkVeVIgE=
-SHA256 (Pkgfile) = fd483db30bbd4bf632ee56d2511724f33edfed5d9bad80ea070d92b53ae58a9f
+RWRJc1FUaeVeqjo9bPJnyNtbs00H4I0jpMELqe2PP+oDIRcMcYWSUMgIXE/1f9tv6mDdScYxj2ZfG7y1zNzy7xFG0Hb21bcGcAM=
+SHA256 (Pkgfile) = 5e08a30996fa14ee5d1e224e95bb393cf0d17944d6a37b78105d0400beeb523c
SHA256 (.footprint) = f676700a19f936a1af944e81a516dbf182723d6ac244eadabd3fd19e9a01daa5
-SHA256 (glibc-2.35.tar.xz) = 5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e
-SHA256 (linux-5.15.21.tar.xz) = 294eeb6cd7dc9b144c3c3c8b8c7b3fca9c6b072b6ed9bf9d6c922f9deb70fbd1
-SHA256 (glibc-2.35-1.patch) = f9041b36bd2194753d43da1053320d58d75acc76cfdcc2bd13e502b247d90b4e
+SHA256 (glibc-2.36.tar.xz) = 1c959fea240906226062cb4b1e7ebce71a9f0e3c0836c09e7e3423d434fcfe75
+SHA256 (linux-5.15.55.tar.xz) = 1ef6bd508b6c3af3bef2d5b337e4477254dba284c79e329aa38f9763ae3bfdcc
+SHA256 (glibc-2.36-1.patch) = 6245087ab20402836cbd32b52ba944d31aeafc961ba597bcec0fa3727db79eee
SHA256 (lib32.conf) = 2f174d2bcefe1c29327690514f34d6970fffdd54398320ca23a11b5f1e3c9b2d
diff --git a/glibc-32/Pkgfile b/glibc-32/Pkgfile
index f7a6e182..4b9baf9c 100644
--- a/glibc-32/Pkgfile
+++ b/glibc-32/Pkgfile
@@ -3,9 +3,9 @@
# Maintainer: CRUX System Team, core-ports at crux dot nu
name=glibc-32
-version=2.35
+version=2.36
release=1
-_kernel_version=5.15.21
+_kernel_version=5.15.55
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_kernel_version.tar.xz
diff --git a/glibc-32/glibc-2.35-1.patch b/glibc-32/glibc-2.35-1.patch
deleted file mode 100644
index ce52a6e0..00000000
--- a/glibc-32/glibc-2.35-1.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-diff --git a/NEWS b/NEWS
-index faa7ec1871..6b8db4e947 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,17 @@ See the end for copying conditions.
-
- Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
- using `glibc' in the "product" field.
-+
-+Version 2.35.1
-+
-+The following bugs are resolved with this release:
-+
-+ [28850] linux: __get_nprocs_sched reads uninitialized memory from the stack
-+ [28853] libc: tst-spawn6 changes current foreground process group
-+ (breaks test isolation)
-+ [28860] build: --enable-kernel=5.1.0 build fails because of missing
-+ __convert_scm_timestamps
-+
-
- Version 2.35
-
-diff --git a/configure b/configure
-index 00dc638388..8e5bee775a 100755
---- a/configure
-+++ b/configure
-@@ -730,7 +730,6 @@ infodir
- docdir
- oldincludedir
- includedir
--runstatedir
- localstatedir
- sharedstatedir
- sysconfdir
-@@ -845,7 +844,6 @@ datadir='${datarootdir}'
- sysconfdir='${prefix}/etc'
- sharedstatedir='${prefix}/com'
- localstatedir='${prefix}/var'
--runstatedir='${localstatedir}/run'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
- docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-@@ -1098,15 +1096,6 @@ do
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
-- -runstatedir | --runstatedir | --runstatedi | --runstated \
-- | --runstate | --runstat | --runsta | --runst | --runs \
-- | --run | --ru | --r)
-- ac_prev=runstatedir ;;
-- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-- | --run=* | --ru=* | --r=*)
-- runstatedir=$ac_optarg ;;
--
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-@@ -1244,7 +1233,7 @@ fi
- for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-- libdir localedir mandir runstatedir
-+ libdir localedir mandir
- do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
-@@ -1397,7 +1386,6 @@ Fine tuning of the installation directories:
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
-diff --git a/posix/tst-spawn6.c b/posix/tst-spawn6.c
-index 911e90a461..044abd8535 100644
---- a/posix/tst-spawn6.c
-+++ b/posix/tst-spawn6.c
-@@ -29,7 +29,14 @@
- #include <support/check.h>
- #include <support/xunistd.h>
- #include <sys/wait.h>
-+#include <sys/ioctl.h>
- #include <stdlib.h>
-+#include <termios.h>
-+
-+#ifndef PATH_MAX
-+# define PATH_MAX 1024
-+#endif
-+static char ptmxpath[PATH_MAX];
-
- static int
- handle_restart (const char *argv1, const char *argv2)
-@@ -115,7 +122,7 @@ run_subprogram (int argc, char *argv[], const posix_spawnattr_t *attr,
- }
-
- static int
--do_test (int argc, char *argv[])
-+run_test (int argc, char *argv[])
- {
- /* We must have either:
- - four parameters left if called initially:
-@@ -127,16 +134,7 @@ do_test (int argc, char *argv[])
- + --setgrpr optional
- */
-
-- if (restart)
-- return handle_restart (argv[1], argv[2]);
--
-- int tcfd = open64 (_PATH_TTY, O_RDONLY, 0600);
-- if (tcfd == -1)
-- {
-- if (errno == ENXIO)
-- FAIL_UNSUPPORTED ("terminal not available, skipping test");
-- FAIL_EXIT1 ("open64 (\"%s\", 0x%x, 0600): %m", _PATH_TTY, O_RDONLY);
-- }
-+ int tcfd = xopen (ptmxpath, O_RDONLY, 0600);
-
- /* Check setting the controlling terminal without changing the group. */
- {
-@@ -198,5 +196,47 @@ do_test (int argc, char *argv[])
- return 0;
- }
-
-+static int
-+do_test (int argc, char *argv[])
-+{
-+ if (restart)
-+ return handle_restart (argv[1], argv[2]);
-+
-+ pid_t pid = xfork ();
-+ if (pid == 0)
-+ {
-+ /* Create a pseudo-terminal to avoid interfering with the one using by
-+ test itself, creates a new session (so there is no controlling
-+ terminal), and set the pseudo-terminal as the controlling one. */
-+ int ptmx = posix_openpt (0);
-+ if (ptmx == -1)
-+ {
-+ if (errno == ENXIO)
-+ FAIL_UNSUPPORTED ("terminal not available, skipping test");
-+ FAIL_EXIT1 ("posix_openpt (0): %m");
-+ }
-+ TEST_VERIFY_EXIT (grantpt (ptmx) == 0);
-+ TEST_VERIFY_EXIT (unlockpt (ptmx) == 0);
-+
-+ TEST_VERIFY_EXIT (setsid () != -1);
-+ TEST_VERIFY_EXIT (ioctl (ptmx, TIOCSCTTY, NULL) == 0);
-+ while (dup2 (ptmx, STDIN_FILENO) == -1 && errno == EBUSY)
-+ ;
-+ while (dup2 (ptmx, STDOUT_FILENO) == -1 && errno == EBUSY)
-+ ;
-+ while (dup2 (ptmx, STDERR_FILENO) == -1 && errno == EBUSY)
-+ ;
-+ TEST_VERIFY_EXIT (ptsname_r (ptmx, ptmxpath, sizeof ptmxpath) == 0);
-+ xclose (ptmx);
-+
-+ run_test (argc, argv);
-+ _exit (0);
-+ }
-+ int status;
-+ xwaitpid (pid, &status, 0);
-+ TEST_VERIFY (WIFEXITED (status));
-+ exit (0);
-+}
-+
- #define TEST_FUNCTION_ARGV do_test
- #include <support/test-driver.c>
-diff --git a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c
-index 82171bf325..dfc8c2beff 100644
---- a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c
-+++ b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c
-@@ -16,9 +16,9 @@
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
--#include <kernel-features.h>
-+#include <bits/timesize.h>
-
--#ifndef __ASSUME_TIME64_SYSCALLS
-+#if __TIMESIZE != 64
- # include <stdint.h>
- # include <string.h>
- # include <sys/socket.h>
-diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
-index 4798cc337e..c98c8ce3d4 100644
---- a/sysdeps/unix/sysv/linux/getsysstats.c
-+++ b/sysdeps/unix/sysv/linux/getsysstats.c
-@@ -44,7 +44,7 @@ __get_nprocs_sched (void)
- int r = INTERNAL_SYSCALL_CALL (sched_getaffinity, 0, cpu_bits_size,
- cpu_bits);
- if (r > 0)
-- return CPU_COUNT_S (cpu_bits_size, (cpu_set_t*) cpu_bits);
-+ return CPU_COUNT_S (r, (cpu_set_t*) cpu_bits);
- else if (r == -EINVAL)
- /* The input buffer is still not enough to store the number of cpus. This
- is an arbitrary values assuming such systems should be rare and there
-diff -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 <sysdeps/generic/ldconfig.h>
-
- #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 --git a/glibc-32/glibc-2.36-1.patch b/glibc-32/glibc-2.36-1.patch
new file mode 100644
index 00000000..36bf0075
--- /dev/null
+++ b/glibc-32/glibc-2.36-1.patch
@@ -0,0 +1,985 @@
+diff --git a/NEWS b/NEWS
+index f61e521fc8..ae30900bbc 100644
+--- a/NEWS
++++ b/NEWS
+@@ -4,6 +4,16 @@ See the end for copying conditions.
+
+ Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
+ using `glibc' in the "product" field.
++
++Version 2.36.1
++
++The following bugs are resolved with this release:
++
++ [28846] CMSG_NXTHDR may trigger -Wstrict-overflow warning
++ [29446] _dlopen now ignores dl_caller argument in static mode
++ [29485] Linux: Terminate subprocess on late failure in tst-pidfd
++ [29490] alpha: New __brk_call implementation is broken
++
+
+ Version 2.36
+
+diff --git a/bits/socket.h b/bits/socket.h
+index 2b99dea33b..aac8c49b00 100644
+--- a/bits/socket.h
++++ b/bits/socket.h
+@@ -245,6 +245,12 @@ struct cmsghdr
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+ #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
++/* Given a length, return the additional padding necessary such that
++ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
++#define __CMSG_PADDING(len) ((sizeof (size_t) \
++ - ((len) & (sizeof (size_t) - 1))) \
++ & (sizeof (size_t) - 1))
++
+ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+ #ifdef __USE_EXTERN_INLINES
+@@ -254,18 +260,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ _EXTERN_INLINE struct cmsghdr *
+ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+ {
++ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
++ __mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of __cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
++ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
++
++ size_t __size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (__cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+ return (struct cmsghdr *) 0;
+
++ /* There isn't enough space between __cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
++ < __size_needed)
++ || ((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
++ - __size_needed)
++ < __cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
++
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+- + __mhdr->msg_controllen)
+- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+- /* No more entries. */
+- return (struct cmsghdr *) 0;
+ return __cmsg;
+ }
+ #endif /* Use `extern inline'. */
+diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
+index 2696dde4b1..9b07b4e132 100644
+--- a/dlfcn/dlopen.c
++++ b/dlfcn/dlopen.c
+@@ -90,7 +90,7 @@ compat_symbol (libdl, ___dlopen, dlopen, GLIBC_2_1);
+ void *
+ __dlopen (const char *file, int mode, void *dl_caller)
+ {
+- return dlopen_implementation (file, mode, RETURN_ADDRESS (0));
++ return dlopen_implementation (file, mode, dl_caller);
+ }
+
+ void *
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index 8bbf110d02..b97c17b3a9 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -509,8 +509,9 @@ _dl_load_cache_lookup (const char *name)
+ we are accessing. Therefore we must make the copy of the
+ mapping data without using malloc. */
+ char *temp;
+- temp = alloca (strlen (best) + 1);
+- strcpy (temp, best);
++ size_t best_len = strlen (best) + 1;
++ temp = alloca (best_len);
++ memcpy (temp, best, best_len);
+ return __strdup (temp);
+ }
+
+diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
+index 43ab58ffe2..36d204c9b0 100644
+--- a/scripts/glibcextract.py
++++ b/scripts/glibcextract.py
+@@ -17,6 +17,7 @@
+ # License along with the GNU C Library; if not, see
+ # <https://www.gnu.org/licenses/>.
+
++import collections
+ import os.path
+ import re
+ import subprocess
+@@ -173,3 +174,21 @@ def compare_macro_consts(source_1, source_2, cc, macro_re, exclude_re=None,
+ if not allow_extra_2:
+ ret = 1
+ return ret
++
++CompileResult = collections.namedtuple("CompileResult", "returncode output")
++
++def compile_c_snippet(snippet, cc, extra_cc_args=''):
++ """Compile and return whether the SNIPPET can be build with CC along
++ EXTRA_CC_ARGS compiler flags. Return a CompileResult with RETURNCODE
++ being 0 for success, or the failure value and the compiler output.
++ """
++ with tempfile.TemporaryDirectory() as temp_dir:
++ c_file_name = os.path.join(temp_dir, 'test.c')
++ obj_file_name = os.path.join(temp_dir, 'test.o')
++ with open(c_file_name, 'w') as c_file:
++ c_file.write(snippet + '\n')
++ cmd = cc.split() + extra_cc_args.split() + ['-c', '-o', obj_file_name,
++ c_file_name]
++ r = subprocess.run(cmd, check=False, stdout=subprocess.PIPE,
++ stderr=subprocess.STDOUT)
++ return CompileResult(r.returncode, r.stdout)
+diff --git a/socket/Makefile b/socket/Makefile
+index 156eec6c85..2bde78387f 100644
+--- a/socket/Makefile
++++ b/socket/Makefile
+@@ -34,6 +34,7 @@ routines := accept bind connect getpeername getsockname getsockopt \
+ tests := \
+ tst-accept4 \
+ tst-sockopt \
++ tst-cmsghdr \
+ # tests
+
+ tests-internal := \
+diff --git a/socket/tst-cmsghdr-skeleton.c b/socket/tst-cmsghdr-skeleton.c
+new file mode 100644
+index 0000000000..4c6898569b
+--- /dev/null
++++ b/socket/tst-cmsghdr-skeleton.c
+@@ -0,0 +1,92 @@
++/* Test ancillary data header creation.
++ Copyright (C) 2022 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++/* We use the preprocessor to generate the function/macro tests instead of
++ using indirection because having all the macro expansions alongside
++ each other lets the compiler warn us about suspicious pointer
++ arithmetic across subsequent CMSG_{FIRST,NXT}HDR expansions. */
++
++#include <stdint.h>
++
++#define RUN_TEST_CONCAT(suffix) run_test_##suffix
++#define RUN_TEST_FUNCNAME(suffix) RUN_TEST_CONCAT (suffix)
++
++static void
++RUN_TEST_FUNCNAME (CMSG_NXTHDR_IMPL) (void)
++{
++ struct msghdr m = {0};
++ struct cmsghdr *cmsg;
++ char cmsgbuf[3 * CMSG_SPACE (sizeof (PAYLOAD))] = {0};
++
++ m.msg_control = cmsgbuf;
++ m.msg_controllen = sizeof (cmsgbuf);
++
++ /* First header should point to the start of the buffer. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++
++ /* If the first header length consumes the entire buffer, there is no
++ space remaining for additional headers. */
++ cmsg->cmsg_len = sizeof (cmsgbuf);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ /* The first header length is so big, using it would cause an overflow. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len = SIZE_MAX;
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ /* The first header leaves just enough space to hold another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len = sizeof (cmsgbuf) - sizeof (struct cmsghdr);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++
++ /* The first header leaves space but not enough for another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len ++;
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ /* The second header leaves just enough space to hold another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len = CMSG_LEN (sizeof (PAYLOAD));
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++ cmsg->cmsg_len = sizeof (cmsgbuf)
++ - CMSG_SPACE (sizeof (PAYLOAD)) /* First header. */
++ - sizeof (struct cmsghdr);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++
++ /* The second header leaves space but not enough for another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++ cmsg->cmsg_len ++;
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ return;
++}
+diff --git a/socket/tst-cmsghdr.c b/socket/tst-cmsghdr.c
+new file mode 100644
+index 0000000000..68c96d3c9d
+--- /dev/null
++++ b/socket/tst-cmsghdr.c
+@@ -0,0 +1,56 @@
++/* Test ancillary data header creation.
++ Copyright (C) 2022 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++#include <sys/socket.h>
++#include <gnu/lib-names.h>
++#include <support/xdlfcn.h>
++#include <support/check.h>
++
++#define PAYLOAD "Hello, World!"
++
++/* CMSG_NXTHDR is a macro that calls an inline function defined in
++ bits/socket.h. In case the function cannot be inlined, libc.so carries
++ a copy. Both versions need to be tested. */
++
++#define CMSG_NXTHDR_IMPL CMSG_NXTHDR
++#include "tst-cmsghdr-skeleton.c"
++#undef CMSG_NXTHDR_IMPL
++
++static struct cmsghdr * (* cmsg_nxthdr) (struct msghdr *, struct cmsghdr *);
++
++#define CMSG_NXTHDR_IMPL cmsg_nxthdr
++#include "tst-cmsghdr-skeleton.c"
++#undef CMSG_NXTHDR_IMPL
++
++static int
++do_test (void)
++{
++ static void *handle;
++
++ run_test_CMSG_NXTHDR ();
++
++ handle = xdlopen (LIBC_SO, RTLD_LAZY);
++ cmsg_nxthdr = (struct cmsghdr * (*) (struct msghdr *, struct cmsghdr *))
++ xdlsym (handle, "__cmsg_nxthdr");
++
++ run_test_cmsg_nxthdr ();
++
++ return 0;
++}
++
++#include <support/test-driver.c>
+diff --git a/sysdeps/mach/hurd/bits/socket.h b/sysdeps/mach/hurd/bits/socket.h
+index 5b35ea81ec..70fce4fb27 100644
+--- a/sysdeps/mach/hurd/bits/socket.h
++++ b/sysdeps/mach/hurd/bits/socket.h
+@@ -249,6 +249,12 @@ struct cmsghdr
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+ #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
++/* Given a length, return the additional padding necessary such that
++ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
++#define __CMSG_PADDING(len) ((sizeof (size_t) \
++ - ((len) & (sizeof (size_t) - 1))) \
++ & (sizeof (size_t) - 1))
++
+ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+ #ifdef __USE_EXTERN_INLINES
+@@ -258,18 +264,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ _EXTERN_INLINE struct cmsghdr *
+ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+ {
++ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
++ __mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of __cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
++ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
++
++ size_t __size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (__cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+ return (struct cmsghdr *) 0;
+
++ /* There isn't enough space between __cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
++ < __size_needed)
++ || ((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
++ - __size_needed)
++ < __cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
++
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+- + __mhdr->msg_controllen)
+- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+- /* No more entries. */
+- return (struct cmsghdr *) 0;
+ return __cmsg;
+ }
+ #endif /* Use `extern inline'. */
+diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
+index a139a16532..3ceda9fdbf 100644
+--- a/sysdeps/unix/sysv/linux/Makefile
++++ b/sysdeps/unix/sysv/linux/Makefile
+@@ -265,6 +265,14 @@ $(objpfx)tst-mount-consts.out: ../sysdeps/unix/sysv/linux/tst-mount-consts.py
+ < /dev/null > $@ 2>&1; $(evaluate-test)
+ $(objpfx)tst-mount-consts.out: $(sysdeps-linux-python-deps)
+
++tests-special += $(objpfx)tst-mount-compile.out
++$(objpfx)tst-mount-compile.out: ../sysdeps/unix/sysv/linux/tst-mount-compile.py
++ $(sysdeps-linux-python) \
++ ../sysdeps/unix/sysv/linux/tst-mount-compile.py \
++ $(sysdeps-linux-python-cc) \
++ < /dev/null > $@ 2>&1; $(evaluate-test)
++$(objpfx)tst-mount-compile.out: $(sysdeps-linux-python-deps)
++
+ tst-rseq-disable-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0
+
+ endif # $(subdir) == misc
+diff --git a/sysdeps/unix/sysv/linux/alpha/brk_call.h b/sysdeps/unix/sysv/linux/alpha/brk_call.h
+index b8088cf13f..0b851b6c86 100644
+--- a/sysdeps/unix/sysv/linux/alpha/brk_call.h
++++ b/sysdeps/unix/sysv/linux/alpha/brk_call.h
+@@ -21,8 +21,7 @@ __brk_call (void *addr)
+ {
+ unsigned long int result = INTERNAL_SYSCALL_CALL (brk, addr);
+ if (result == -ENOMEM)
+- /* Mimic the default error reporting behavior. */
+- return addr;
+- else
+- return (void *) result;
++ /* Mimic the generic error reporting behavior. */
++ result = INTERNAL_SYSCALL_CALL (brk, 0);
++ return (void *) result;
+ }
+diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
+index 4f1f810ea1..539b8d7716 100644
+--- a/sysdeps/unix/sysv/linux/bits/socket.h
++++ b/sysdeps/unix/sysv/linux/bits/socket.h
+@@ -307,6 +307,12 @@ struct cmsghdr
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+ #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
++/* Given a length, return the additional padding necessary such that
++ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
++#define __CMSG_PADDING(len) ((sizeof (size_t) \
++ - ((len) & (sizeof (size_t) - 1))) \
++ & (sizeof (size_t) - 1))
++
+ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+ #ifdef __USE_EXTERN_INLINES
+@@ -316,18 +322,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ _EXTERN_INLINE struct cmsghdr *
+ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+ {
++ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
++ __mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of __cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
++ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
++
++ size_t __size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (__cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+ return (struct cmsghdr *) 0;
+
++ /* There isn't enough space between __cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
++ < __size_needed)
++ || ((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
++ - __size_needed)
++ < __cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
++
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+- + __mhdr->msg_controllen)
+- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+- /* No more entries. */
+- return (struct cmsghdr *) 0;
+ return __cmsg;
+ }
+ #endif /* Use `extern inline'. */
+diff --git a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
+index 15b7a3a925..24f72b797a 100644
+--- a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
++++ b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
+@@ -23,18 +23,38 @@
+ struct cmsghdr *
+ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
+ {
++ /* We may safely assume that cmsg lies between mhdr->msg_control and
++ mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * msg_control_ptr = (unsigned char *) mhdr->msg_control;
++ unsigned char * cmsg_ptr = (unsigned char *) cmsg;
++
++ size_t size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+- return NULL;
++ return (struct cmsghdr *) 0;
++
++ /* There isn't enough space between cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (msg_control_ptr + mhdr->msg_controllen - cmsg_ptr)
++ < size_needed)
++ || ((size_t)
++ (msg_control_ptr + mhdr->msg_controllen - cmsg_ptr
++ - size_needed)
++ < cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
+
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ cmsg = (struct cmsghdr *) ((unsigned char *) cmsg
+ + CMSG_ALIGN (cmsg->cmsg_len));
+- if ((unsigned char *) (cmsg + 1) > ((unsigned char *) mhdr->msg_control
+- + mhdr->msg_controllen)
+- || ((unsigned char *) cmsg + CMSG_ALIGN (cmsg->cmsg_len)
+- > ((unsigned char *) mhdr->msg_control + mhdr->msg_controllen)))
+- /* No more entries. */
+- return NULL;
+ return cmsg;
+ }
+ libc_hidden_def (__cmsg_nxthdr)
+diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
+index bf4be80f8d..202520ee25 100644
+--- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
++++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
+@@ -122,6 +122,7 @@
+ #define __NR_mbind 235
+ #define __NR_membarrier 283
+ #define __NR_memfd_create 279
++#define __NR_memfd_secret 447
+ #define __NR_migrate_pages 238
+ #define __NR_mincore 232
+ #define __NR_mkdirat 34
+diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
+index d656aedcc2..4e65f337d4 100644
+--- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
++++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
+@@ -127,6 +127,7 @@
+ #define __NR_mbind 235
+ #define __NR_membarrier 283
+ #define __NR_memfd_create 279
++#define __NR_memfd_secret 447
+ #define __NR_migrate_pages 238
+ #define __NR_mincore 232
+ #define __NR_mkdirat 34
+diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
+index f965986ba8..19841d0738 100644
+--- a/sysdeps/unix/sysv/linux/sys/mount.h
++++ b/sysdeps/unix/sysv/linux/sys/mount.h
+@@ -27,77 +27,113 @@
+ #include <stddef.h>
+ #include <sys/ioctl.h>
+
+-#define BLOCK_SIZE 1024
++#ifdef __has_include
++# if __has_include ("linux/mount.h")
++# include "linux/mount.h"
++# endif
++#endif
++
++
+ #define BLOCK_SIZE_BITS 10
++#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
+
+
+ /* These are the fs-independent mount-flags: up to 16 flags are
+ supported */
+ enum
+ {
++#undef MS_RDONLY
+ MS_RDONLY = 1, /* Mount read-only. */
+ #define MS_RDONLY MS_RDONLY
++#undef MS_NOSUID
+ MS_NOSUID = 2, /* Ignore suid and sgid bits. */
+ #define MS_NOSUID MS_NOSUID
++#undef MS_NODEV
+ MS_NODEV = 4, /* Disallow access to device special files. */
+ #define MS_NODEV MS_NODEV
++#undef MS_NOEXEC
+ MS_NOEXEC = 8, /* Disallow program execution. */
+ #define MS_NOEXEC MS_NOEXEC
++#undef MS_SYNCHRONOUS
+ MS_SYNCHRONOUS = 16, /* Writes are synced at once. */
+ #define MS_SYNCHRONOUS MS_SYNCHRONOUS
++#undef MS_REMOUNT
+ MS_REMOUNT = 32, /* Alter flags of a mounted FS. */
+ #define MS_REMOUNT MS_REMOUNT
++#undef MS_MANDLOCK
+ MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
+ #define MS_MANDLOCK MS_MANDLOCK
++#undef MS_DIRSYNC
+ MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
+ #define MS_DIRSYNC MS_DIRSYNC
++#undef MS_NOSYMFOLLOW
+ MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
+ #define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
++#undef MS_NOATIME
+ MS_NOATIME = 1024, /* Do not update access times. */
+ #define MS_NOATIME MS_NOATIME
++#undef MS_NODIRATIME
+ MS_NODIRATIME = 2048, /* Do not update directory access times. */
+ #define MS_NODIRATIME MS_NODIRATIME
++#undef MS_BIND
+ MS_BIND = 4096, /* Bind directory at different place. */
+ #define MS_BIND MS_BIND
++#undef MS_MOVE
+ MS_MOVE = 8192,
+ #define MS_MOVE MS_MOVE
++#undef MS_REC
+ MS_REC = 16384,
+ #define MS_REC MS_REC
++#undef MS_SILENT
+ MS_SILENT = 32768,
+ #define MS_SILENT MS_SILENT
++#undef MS_POSIXACL
+ MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */
+ #define MS_POSIXACL MS_POSIXACL
++#undef MS_UNBINDABLE
+ MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */
+ #define MS_UNBINDABLE MS_UNBINDABLE
++#undef MS_PRIVATE
+ MS_PRIVATE = 1 << 18, /* Change to private. */
+ #define MS_PRIVATE MS_PRIVATE
++#undef MS_SLAVE
+ MS_SLAVE = 1 << 19, /* Change to slave. */
+ #define MS_SLAVE MS_SLAVE
++#undef MS_SHARED
+ MS_SHARED = 1 << 20, /* Change to shared. */
+ #define MS_SHARED MS_SHARED
++#undef MS_RELATIME
+ MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */
+ #define MS_RELATIME MS_RELATIME
++#undef MS_KERNMOUNT
+ MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */
+ #define MS_KERNMOUNT MS_KERNMOUNT
++#undef MS_I_VERSION
+ MS_I_VERSION = 1 << 23, /* Update inode I_version field. */
+ #define MS_I_VERSION MS_I_VERSION
++#undef MS_STRICTATIME
+ MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */
+ #define MS_STRICTATIME MS_STRICTATIME
++#undef MS_LAZYTIME
+ MS_LAZYTIME = 1 << 25, /* Update the on-disk [acm]times lazily. */
+ #define MS_LAZYTIME MS_LAZYTIME
++#undef MS_ACTIVE
+ MS_ACTIVE = 1 << 30,
+ #define MS_ACTIVE MS_ACTIVE
++#undef MS_NOUSER
+ MS_NOUSER = 1 << 31
+ #define MS_NOUSER MS_NOUSER
+ };
+
+ /* Flags that can be altered by MS_REMOUNT */
++#undef MS_RMT_MASK
+ #define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION \
+ |MS_LAZYTIME)
+
+
+ /* Magic mount flag number. Has to be or-ed to the flag values. */
+
++#undef MS_MGC_VAL
+ #define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
+ #define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
+
+@@ -106,20 +142,35 @@ enum
+ is probably as bad and I don't want to create yet another include
+ file. */
+
++#undef BLKROSET
+ #define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
++#undef BLKROGET
+ #define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
++#undef BLKRRPART
+ #define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
++#undef BLKGETSIZE
+ #define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
++#undef BLKFLSBUF
+ #define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
++#undef BLKRASET
+ #define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
++#undef BLKRAGET
+ #define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
++#undef BLKFRASET
+ #define BLKFRASET _IO(0x12,100) /* Set filesystem read-ahead. */
++#undef BLKFRAGET
+ #define BLKFRAGET _IO(0x12,101) /* Get filesystem read-ahead. */
++#undef BLKSECTSET
+ #define BLKSECTSET _IO(0x12,102) /* Set max sectors per request. */
++#undef BLKSECTGET
+ #define BLKSECTGET _IO(0x12,103) /* Get max sectors per request. */
++#undef BLKSSZGET
+ #define BLKSSZGET _IO(0x12,104) /* Get block device sector size. */
++#undef BLKBSZGET
+ #define BLKBSZGET _IOR(0x12,112,size_t)
++#undef BLKBSZSET
+ #define BLKBSZSET _IOW(0x12,113,size_t)
++#undef BLKGETSIZE64
+ #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size. */
+
+
+@@ -137,9 +188,6 @@ enum
+ };
+
+
+-/* fsopen flags. */
+-#define FSOPEN_CLOEXEC 0x00000001
+-
+ /* fsmount flags. */
+ #define FSMOUNT_CLOEXEC 0x00000001
+
+@@ -157,6 +205,7 @@ enum
+ #define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks. */
+
+
++#ifndef MOUNT_ATTR_SIZE_VER0
+ /* For mount_setattr. */
+ struct mount_attr
+ {
+@@ -165,6 +214,7 @@ struct mount_attr
+ uint64_t propagation;
+ uint64_t userns_fd;
+ };
++#endif
+
+ #define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */
+
+@@ -185,26 +235,31 @@ struct mount_attr
+ #define FSPICK_EMPTY_PATH 0x00000008
+
+
++#ifndef FSOPEN_CLOEXEC
+ /* The type of fsconfig call made. */
+ enum fsconfig_command
+ {
+ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+-#define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
++# define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
+ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
+-#define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
++# define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
+ FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
+-#define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
++# define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
+ FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
+-#define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
++# define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
+ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
+-#define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
++# define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
+ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
+-#define FSCONFIG_SET_FD FSCONFIG_SET_FD
++# define FSCONFIG_SET_FD FSCONFIG_SET_FD
+ FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
+-#define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
++# define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
+ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
+-#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
++# define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
+ };
++#endif
++
++/* fsopen flags. */
++#define FSOPEN_CLOEXEC 0x00000001
+
+ /* open_tree flags. */
+ #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
+diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
+index 6c7b2f7011..028ad3107a 100644
+--- a/sysdeps/unix/sysv/linux/syscall-names.list
++++ b/sysdeps/unix/sysv/linux/syscall-names.list
+@@ -21,8 +21,8 @@
+ # This file can list all potential system calls. The names are only
+ # used if the installed kernel headers also provide them.
+
+-# The list of system calls is current as of Linux 5.18.
+-kernel 5.18
++# The list of system calls is current as of Linux 5.19.
++kernel 5.19
+
+ FAST_atomic_update
+ FAST_cmpxchg
+diff --git a/sysdeps/unix/sysv/linux/tst-mount-compile.py b/sysdeps/unix/sysv/linux/tst-mount-compile.py
+new file mode 100755
+index 0000000000..0ec74d4e0b
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/tst-mount-compile.py
+@@ -0,0 +1,66 @@
++#!/usr/bin/python3
++# Check if glibc provided sys/mount.h can be used along related kernel
++# headers.
++# Copyright (C) 2022 Free Software Foundation, Inc.
++# This file is part of the GNU C Library.
++#
++# The GNU C Library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License as published by the Free Software Foundation; either
++# version 2.1 of the License, or (at your option) any later version.
++#
++# The GNU C Library is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# Lesser General Public License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with the GNU C Library; if not, see
++# <https://www.gnu.org/licenses/>.
++
++import argparse
++import sys
++
++import glibcextract
++
++
++def main():
++ """The main entry point."""
++ parser = argparse.ArgumentParser(
++ description='Check if glibc provided sys/mount.h can be '
++ ' used along related kernel headers.')
++ parser.add_argument('--cc', metavar='CC',
++ help='C compiler (including options) to use')
++ args = parser.parse_args()
++
++ if glibcextract.compile_c_snippet(
++ '#include <linux/mount.h>',
++ args.cc).returncode != 0:
++ sys.exit (77)
++
++ def check(testname, snippet):
++ # Add -Werror to catch macro redefinitions and _ISOMAC to avoid
++ # internal glibc definitions.
++ r = glibcextract.compile_c_snippet(snippet, args.cc,
++ '-Werror -D_ISOMAC')
++ if r.returncode != 0:
++ print('error: test {}:\n{}'.format(testname, r.output.decode()))
++ return r.returncode
++
++ status = max(
++ check("sys/mount.h + linux/mount.h",
++ "#include <sys/mount.h>\n"
++ "#include <linux/mount.h>"),
++ check("sys/mount.h + linux/fs.h",
++ "#include <sys/mount.h>\n"
++ "#include <linux/fs.h>"),
++ check("linux/mount.h + sys/mount.h",
++ "#include <linux/mount.h>\n"
++ "#include <sys/mount.h>"),
++ check("linux/fs.h + sys/mount.h",
++ "#include <linux/fs.h>\n"
++ "#include <sys/mount.h>"))
++ sys.exit(status)
++
++if __name__ == '__main__':
++ main()
+diff --git a/sysdeps/unix/sysv/linux/tst-mount-consts.py b/sysdeps/unix/sysv/linux/tst-mount-consts.py
+index a62f803123..be2ef2daf1 100755
+--- a/sysdeps/unix/sysv/linux/tst-mount-consts.py
++++ b/sysdeps/unix/sysv/linux/tst-mount-consts.py
+@@ -33,6 +33,11 @@ def main():
+ help='C compiler (including options) to use')
+ args = parser.parse_args()
+
++ if glibcextract.compile_c_snippet(
++ '#include <linux/mount.h>',
++ args.cc).returncode != 0:
++ sys.exit (77)
++
+ linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
+ # Constants in glibc were updated to match Linux v5.16. When glibc
+ # constants are updated this value should be updated to match the
+diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
+index 90cbb9be64..d732173abd 100644
+--- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
++++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
+@@ -33,11 +33,13 @@ def main():
+ help='C compiler (including options) to use')
+ args = parser.parse_args()
+
+- linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
+- # Linux started to provide pidfd.h with 5.10.
+- if linux_version_headers < (5, 10):
++ if glibcextract.compile_c_snippet(
++ '#include <linux/pidfd.h>',
++ args.cc).returncode != 0:
+ sys.exit (77)
+- linux_version_glibc = (5, 18)
++
++ linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
++ linux_version_glibc = (5, 19)
+ sys.exit(glibcextract.compare_macro_consts(
+ '#include <sys/pidfd.h>\n',
+ '#include <asm/fcntl.h>\n'
+diff --git a/sysdeps/unix/sysv/linux/tst-pidfd.c b/sysdeps/unix/sysv/linux/tst-pidfd.c
+index 037af22290..5711d1c312 100644
+--- a/sysdeps/unix/sysv/linux/tst-pidfd.c
++++ b/sysdeps/unix/sysv/linux/tst-pidfd.c
+@@ -147,8 +147,11 @@ do_test (void)
+ may be denied if the process doesn't have CAP_SYS_PTRACE or
+ if a LSM security_ptrace_access_check denies access. */
+ if (fd == -1 && errno == EPERM)
+- FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, "
+- "skipping test");
++ {
++ TEST_COMPARE (pidfd_send_signal (pidfd, SIGKILL, NULL, 0), 0);
++ FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, "
++ "skipping test");
++ }
+ TEST_VERIFY (fd > 0);
+
+ char *path = xasprintf ("/proc/%d/fd/%d", pid, remote_fd);
+diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
+index e6b9e8743a..3d19d5556f 100644
+--- a/wcsmbs/Makefile
++++ b/wcsmbs/Makefile
+@@ -73,6 +73,8 @@ $(objpfx)tst-wcstol-locale.out: $(gen-locales)
+ $(objpfx)tst-wcstod-nan-locale.out: $(gen-locales)
+ $(objpfx)tst-c16-surrogate.out: $(gen-locales)
+ $(objpfx)tst-c32-state.out: $(gen-locales)
++$(objpfx)test-c8rtomb.out: $(gen-locales)
++$(objpfx)test-mbrtoc8.out: $(gen-locales)
+ endif
+
+ $(objpfx)tst-wcstod-round: $(libm)
+diff --git a/wcsmbs/uchar.h b/wcsmbs/uchar.h
+index c37e8619a0..5f7139f279 100644
+--- a/wcsmbs/uchar.h
++++ b/wcsmbs/uchar.h
+@@ -34,8 +34,16 @@
+ /* Declare the C2x char8_t typedef in C2x modes, but only if the C++
+ __cpp_char8_t feature test macro is not defined. */
+ #if __GLIBC_USE (ISOC2X) && !defined __cpp_char8_t
++#if __GNUC_PREREQ (10, 0) && defined __cplusplus
++/* Suppress the diagnostic regarding char8_t being a keyword in C++20. */
++# pragma GCC diagnostic push
++# pragma GCC diagnostic ignored "-Wc++20-compat"
++#endif
+ /* Define the 8-bit character type. */
+ typedef unsigned char char8_t;
++#if __GNUC_PREREQ (10, 0) && defined __cplusplus
++# pragma GCC diagnostic pop
++#endif
+ #endif
+
+ #ifndef __USE_ISOCXX11
+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 <sysdeps/generic/ldconfig.h>
+
+ #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 },
1
0
commit 0c800492e99286c0f8ddd0ea6e8461f202588723
Author: Juergen Daubert <jue(a)jue.li>
Date: Sun Aug 28 10:53:30 2022 +0200
glibc: update to 2.36
diff --git a/glibc/.footprint b/glibc/.footprint
index 90b6f0ea..5e2b8500 100644
--- a/glibc/.footprint
+++ b/glibc/.footprint
@@ -231,6 +231,7 @@ drwxr-xr-x root/root usr/include/bits/
-rw-r--r-- root/root usr/include/bits/mman-map-flags-generic.h
-rw-r--r-- root/root usr/include/bits/mman-shared.h
-rw-r--r-- root/root usr/include/bits/mman.h
+-rw-r--r-- root/root usr/include/bits/mman_ext.h
-rw-r--r-- root/root usr/include/bits/monetary-ldbl.h
-rw-r--r-- root/root usr/include/bits/mqueue.h
-rw-r--r-- root/root usr/include/bits/mqueue2.h
@@ -294,6 +295,7 @@ drwxr-xr-x root/root usr/include/bits/platform/
-rw-r--r-- root/root usr/include/bits/stdint-uintn.h
-rw-r--r-- root/root usr/include/bits/stdio-ldbl.h
-rw-r--r-- root/root usr/include/bits/stdio.h
+-rw-r--r-- root/root usr/include/bits/stdio2-decl.h
-rw-r--r-- root/root usr/include/bits/stdio2.h
-rw-r--r-- root/root usr/include/bits/stdio_lim.h
-rw-r--r-- root/root usr/include/bits/stdlib-bsearch.h
@@ -341,6 +343,7 @@ drwxr-xr-x root/root usr/include/bits/types/
-rw-r--r-- root/root usr/include/bits/types/clockid_t.h
-rw-r--r-- root/root usr/include/bits/types/cookie_io_functions_t.h
-rw-r--r-- root/root usr/include/bits/types/error_t.h
+-rw-r--r-- root/root usr/include/bits/types/idtype_t.h
-rw-r--r-- root/root usr/include/bits/types/locale_t.h
-rw-r--r-- root/root usr/include/bits/types/mbstate_t.h
-rw-r--r-- root/root usr/include/bits/types/res_state.h
@@ -1458,6 +1461,7 @@ drwxr-xr-x root/root usr/include/sys/
-rw-r--r-- root/root usr/include/sys/pci.h
-rw-r--r-- root/root usr/include/sys/perm.h
-rw-r--r-- root/root usr/include/sys/personality.h
+-rw-r--r-- root/root usr/include/sys/pidfd.h
drwxr-xr-x root/root usr/include/sys/platform/
-rw-r--r-- root/root usr/include/sys/platform/x86.h
-rw-r--r-- root/root usr/include/sys/poll.h
@@ -1827,7 +1831,7 @@ lrwxrwxrwx root/root usr/lib/libc_malloc_debug.so -> ../../lib/libc_malloc_debug
lrwxrwxrwx root/root usr/lib/libcrypt.so -> ../../lib/libcrypt.so.1
-rw-r--r-- root/root usr/lib/libdl.a
-rw-r--r-- root/root usr/lib/libg.a
--rw-r--r-- root/root usr/lib/libm-2.35.a
+-rw-r--r-- root/root usr/lib/libm-2.36.a
-rw-r--r-- root/root usr/lib/libm.a
-rw-r--r-- root/root usr/lib/libm.so
-rw-r--r-- root/root usr/lib/libmcheck.a
@@ -2364,6 +2368,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/pt_PT@euro
-rw-r--r-- root/root usr/share/i18n/locales/quz_PE
-rw-r--r-- root/root usr/share/i18n/locales/raj_IN
+-rw-r--r-- root/root usr/share/i18n/locales/rif_MA
-rw-r--r-- root/root usr/share/i18n/locales/ro_RO
-rw-r--r-- root/root usr/share/i18n/locales/ru_RU
-rw-r--r-- root/root usr/share/i18n/locales/ru_UA
@@ -2399,6 +2404,7 @@ drwxr-xr-x root/root usr/share/i18n/locales/
-rw-r--r-- root/root usr/share/i18n/locales/sv_SE
-rw-r--r-- root/root usr/share/i18n/locales/sw_KE
-rw-r--r-- root/root usr/share/i18n/locales/sw_TZ
+-rw-r--r-- root/root usr/share/i18n/locales/syr
-rw-r--r-- root/root usr/share/i18n/locales/szl_PL
-rw-r--r-- root/root usr/share/i18n/locales/ta_IN
-rw-r--r-- root/root usr/share/i18n/locales/ta_LK
diff --git a/glibc/.signature b/glibc/.signature
index 66354522..7ffbe06e 100644
--- a/glibc/.signature
+++ b/glibc/.signature
@@ -1,10 +1,10 @@
untrusted comment: verify with /etc/ports/core.pub
-RWRJc1FUaeVeqjYRriUla91KhlDq9gPFCu5L0MnCcjEoJZ+xVqsbB8PQbgiidYaruz05fx7exAjsC/id8PcPgtESarBOlRQfTQ4=
-SHA256 (Pkgfile) = ae7490c52d39fdcb8c04f44abf21f9d9996d2bbe3bba833a3b5c67803866e632
-SHA256 (.footprint) = 45fa1520934f3952bbdffbe7303ec2f3cf97c17e98c7dd23a14e076e95edf466
-SHA256 (glibc-2.35.tar.xz) = 5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e
-SHA256 (linux-5.15.21.tar.xz) = 294eeb6cd7dc9b144c3c3c8b8c7b3fca9c6b072b6ed9bf9d6c922f9deb70fbd1
-SHA256 (glibc-2.35-1.patch) = f9041b36bd2194753d43da1053320d58d75acc76cfdcc2bd13e502b247d90b4e
+RWRJc1FUaeVeqkxOnwc5iLM9nx9NtANOUXrU0QXTmG0NVy87nmVgZTkXM6+Dje7epyFVHtzkAcADD84bKf8MEfJh2M/5L8xC5AE=
+SHA256 (Pkgfile) = 79237a932d21c7b4ef43e8a56d9cd489939c3216b4ec0d32448acdc3443ab11d
+SHA256 (.footprint) = d6c55451befafd731c0b3de1b5eff63c4dcafae7ad4ae9ac0baaeb5a055ab80b
+SHA256 (glibc-2.36.tar.xz) = 1c959fea240906226062cb4b1e7ebce71a9f0e3c0836c09e7e3423d434fcfe75
+SHA256 (linux-5.15.55.tar.xz) = 1ef6bd508b6c3af3bef2d5b337e4477254dba284c79e329aa38f9763ae3bfdcc
+SHA256 (glibc-2.36-1.patch) = 6245087ab20402836cbd32b52ba944d31aeafc961ba597bcec0fa3727db79eee
SHA256 (hosts) = 5c02b256c105f1d4a12fb738d71c1bab9eb126533074d7a0c8a14b92670c9431
SHA256 (resolv.conf) = 72ccb58768a72a771ec37142bc361a18478a07ec9de6e925a20760794389bf51
SHA256 (nsswitch.conf) = 859b8984e5e90aff3cce8f9779996ae4033b280d2122840e9411e2f44a1c2e61
diff --git a/glibc/Pkgfile b/glibc/Pkgfile
index 23fb8966..4101e393 100644
--- a/glibc/Pkgfile
+++ b/glibc/Pkgfile
@@ -3,9 +3,9 @@
# Maintainer: CRUX System Team, core-ports at crux dot nu
name=glibc
-version=2.35
-release=2
-_kernel_version=5.15.21
+version=2.36
+release=1
+_kernel_version=5.15.55
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_kernel_version.tar.xz
diff --git a/glibc/glibc-2.35-1.patch b/glibc/glibc-2.35-1.patch
deleted file mode 100644
index ce52a6e0..00000000
--- a/glibc/glibc-2.35-1.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-diff --git a/NEWS b/NEWS
-index faa7ec1871..6b8db4e947 100644
---- a/NEWS
-+++ b/NEWS
-@@ -4,6 +4,17 @@ See the end for copying conditions.
-
- Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
- using `glibc' in the "product" field.
-+
-+Version 2.35.1
-+
-+The following bugs are resolved with this release:
-+
-+ [28850] linux: __get_nprocs_sched reads uninitialized memory from the stack
-+ [28853] libc: tst-spawn6 changes current foreground process group
-+ (breaks test isolation)
-+ [28860] build: --enable-kernel=5.1.0 build fails because of missing
-+ __convert_scm_timestamps
-+
-
- Version 2.35
-
-diff --git a/configure b/configure
-index 00dc638388..8e5bee775a 100755
---- a/configure
-+++ b/configure
-@@ -730,7 +730,6 @@ infodir
- docdir
- oldincludedir
- includedir
--runstatedir
- localstatedir
- sharedstatedir
- sysconfdir
-@@ -845,7 +844,6 @@ datadir='${datarootdir}'
- sysconfdir='${prefix}/etc'
- sharedstatedir='${prefix}/com'
- localstatedir='${prefix}/var'
--runstatedir='${localstatedir}/run'
- includedir='${prefix}/include'
- oldincludedir='/usr/include'
- docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-@@ -1098,15 +1096,6 @@ do
- | -silent | --silent | --silen | --sile | --sil)
- silent=yes ;;
-
-- -runstatedir | --runstatedir | --runstatedi | --runstated \
-- | --runstate | --runstat | --runsta | --runst | --runs \
-- | --run | --ru | --r)
-- ac_prev=runstatedir ;;
-- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-- | --run=* | --ru=* | --r=*)
-- runstatedir=$ac_optarg ;;
--
- -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
- ac_prev=sbindir ;;
- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-@@ -1244,7 +1233,7 @@ fi
- for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
- datadir sysconfdir sharedstatedir localstatedir includedir \
- oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-- libdir localedir mandir runstatedir
-+ libdir localedir mandir
- do
- eval ac_val=\$$ac_var
- # Remove trailing slashes.
-@@ -1397,7 +1386,6 @@ Fine tuning of the installation directories:
- --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
-- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc [/usr/include]
-diff --git a/posix/tst-spawn6.c b/posix/tst-spawn6.c
-index 911e90a461..044abd8535 100644
---- a/posix/tst-spawn6.c
-+++ b/posix/tst-spawn6.c
-@@ -29,7 +29,14 @@
- #include <support/check.h>
- #include <support/xunistd.h>
- #include <sys/wait.h>
-+#include <sys/ioctl.h>
- #include <stdlib.h>
-+#include <termios.h>
-+
-+#ifndef PATH_MAX
-+# define PATH_MAX 1024
-+#endif
-+static char ptmxpath[PATH_MAX];
-
- static int
- handle_restart (const char *argv1, const char *argv2)
-@@ -115,7 +122,7 @@ run_subprogram (int argc, char *argv[], const posix_spawnattr_t *attr,
- }
-
- static int
--do_test (int argc, char *argv[])
-+run_test (int argc, char *argv[])
- {
- /* We must have either:
- - four parameters left if called initially:
-@@ -127,16 +134,7 @@ do_test (int argc, char *argv[])
- + --setgrpr optional
- */
-
-- if (restart)
-- return handle_restart (argv[1], argv[2]);
--
-- int tcfd = open64 (_PATH_TTY, O_RDONLY, 0600);
-- if (tcfd == -1)
-- {
-- if (errno == ENXIO)
-- FAIL_UNSUPPORTED ("terminal not available, skipping test");
-- FAIL_EXIT1 ("open64 (\"%s\", 0x%x, 0600): %m", _PATH_TTY, O_RDONLY);
-- }
-+ int tcfd = xopen (ptmxpath, O_RDONLY, 0600);
-
- /* Check setting the controlling terminal without changing the group. */
- {
-@@ -198,5 +196,47 @@ do_test (int argc, char *argv[])
- return 0;
- }
-
-+static int
-+do_test (int argc, char *argv[])
-+{
-+ if (restart)
-+ return handle_restart (argv[1], argv[2]);
-+
-+ pid_t pid = xfork ();
-+ if (pid == 0)
-+ {
-+ /* Create a pseudo-terminal to avoid interfering with the one using by
-+ test itself, creates a new session (so there is no controlling
-+ terminal), and set the pseudo-terminal as the controlling one. */
-+ int ptmx = posix_openpt (0);
-+ if (ptmx == -1)
-+ {
-+ if (errno == ENXIO)
-+ FAIL_UNSUPPORTED ("terminal not available, skipping test");
-+ FAIL_EXIT1 ("posix_openpt (0): %m");
-+ }
-+ TEST_VERIFY_EXIT (grantpt (ptmx) == 0);
-+ TEST_VERIFY_EXIT (unlockpt (ptmx) == 0);
-+
-+ TEST_VERIFY_EXIT (setsid () != -1);
-+ TEST_VERIFY_EXIT (ioctl (ptmx, TIOCSCTTY, NULL) == 0);
-+ while (dup2 (ptmx, STDIN_FILENO) == -1 && errno == EBUSY)
-+ ;
-+ while (dup2 (ptmx, STDOUT_FILENO) == -1 && errno == EBUSY)
-+ ;
-+ while (dup2 (ptmx, STDERR_FILENO) == -1 && errno == EBUSY)
-+ ;
-+ TEST_VERIFY_EXIT (ptsname_r (ptmx, ptmxpath, sizeof ptmxpath) == 0);
-+ xclose (ptmx);
-+
-+ run_test (argc, argv);
-+ _exit (0);
-+ }
-+ int status;
-+ xwaitpid (pid, &status, 0);
-+ TEST_VERIFY (WIFEXITED (status));
-+ exit (0);
-+}
-+
- #define TEST_FUNCTION_ARGV do_test
- #include <support/test-driver.c>
-diff --git a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c
-index 82171bf325..dfc8c2beff 100644
---- a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c
-+++ b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c
-@@ -16,9 +16,9 @@
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
--#include <kernel-features.h>
-+#include <bits/timesize.h>
-
--#ifndef __ASSUME_TIME64_SYSCALLS
-+#if __TIMESIZE != 64
- # include <stdint.h>
- # include <string.h>
- # include <sys/socket.h>
-diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
-index 4798cc337e..c98c8ce3d4 100644
---- a/sysdeps/unix/sysv/linux/getsysstats.c
-+++ b/sysdeps/unix/sysv/linux/getsysstats.c
-@@ -44,7 +44,7 @@ __get_nprocs_sched (void)
- int r = INTERNAL_SYSCALL_CALL (sched_getaffinity, 0, cpu_bits_size,
- cpu_bits);
- if (r > 0)
-- return CPU_COUNT_S (cpu_bits_size, (cpu_set_t*) cpu_bits);
-+ return CPU_COUNT_S (r, (cpu_set_t*) cpu_bits);
- else if (r == -EINVAL)
- /* The input buffer is still not enough to store the number of cpus. This
- is an arbitrary values assuming such systems should be rare and there
-diff -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 <sysdeps/generic/ldconfig.h>
-
- #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 --git a/glibc/glibc-2.36-1.patch b/glibc/glibc-2.36-1.patch
new file mode 100644
index 00000000..36bf0075
--- /dev/null
+++ b/glibc/glibc-2.36-1.patch
@@ -0,0 +1,985 @@
+diff --git a/NEWS b/NEWS
+index f61e521fc8..ae30900bbc 100644
+--- a/NEWS
++++ b/NEWS
+@@ -4,6 +4,16 @@ See the end for copying conditions.
+
+ Please send GNU C library bug reports via <https://sourceware.org/bugzilla/>
+ using `glibc' in the "product" field.
++
++Version 2.36.1
++
++The following bugs are resolved with this release:
++
++ [28846] CMSG_NXTHDR may trigger -Wstrict-overflow warning
++ [29446] _dlopen now ignores dl_caller argument in static mode
++ [29485] Linux: Terminate subprocess on late failure in tst-pidfd
++ [29490] alpha: New __brk_call implementation is broken
++
+
+ Version 2.36
+
+diff --git a/bits/socket.h b/bits/socket.h
+index 2b99dea33b..aac8c49b00 100644
+--- a/bits/socket.h
++++ b/bits/socket.h
+@@ -245,6 +245,12 @@ struct cmsghdr
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+ #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
++/* Given a length, return the additional padding necessary such that
++ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
++#define __CMSG_PADDING(len) ((sizeof (size_t) \
++ - ((len) & (sizeof (size_t) - 1))) \
++ & (sizeof (size_t) - 1))
++
+ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+ #ifdef __USE_EXTERN_INLINES
+@@ -254,18 +260,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ _EXTERN_INLINE struct cmsghdr *
+ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+ {
++ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
++ __mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of __cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
++ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
++
++ size_t __size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (__cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+ return (struct cmsghdr *) 0;
+
++ /* There isn't enough space between __cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
++ < __size_needed)
++ || ((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
++ - __size_needed)
++ < __cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
++
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+- + __mhdr->msg_controllen)
+- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+- /* No more entries. */
+- return (struct cmsghdr *) 0;
+ return __cmsg;
+ }
+ #endif /* Use `extern inline'. */
+diff --git a/dlfcn/dlopen.c b/dlfcn/dlopen.c
+index 2696dde4b1..9b07b4e132 100644
+--- a/dlfcn/dlopen.c
++++ b/dlfcn/dlopen.c
+@@ -90,7 +90,7 @@ compat_symbol (libdl, ___dlopen, dlopen, GLIBC_2_1);
+ void *
+ __dlopen (const char *file, int mode, void *dl_caller)
+ {
+- return dlopen_implementation (file, mode, RETURN_ADDRESS (0));
++ return dlopen_implementation (file, mode, dl_caller);
+ }
+
+ void *
+diff --git a/elf/dl-cache.c b/elf/dl-cache.c
+index 8bbf110d02..b97c17b3a9 100644
+--- a/elf/dl-cache.c
++++ b/elf/dl-cache.c
+@@ -509,8 +509,9 @@ _dl_load_cache_lookup (const char *name)
+ we are accessing. Therefore we must make the copy of the
+ mapping data without using malloc. */
+ char *temp;
+- temp = alloca (strlen (best) + 1);
+- strcpy (temp, best);
++ size_t best_len = strlen (best) + 1;
++ temp = alloca (best_len);
++ memcpy (temp, best, best_len);
+ return __strdup (temp);
+ }
+
+diff --git a/scripts/glibcextract.py b/scripts/glibcextract.py
+index 43ab58ffe2..36d204c9b0 100644
+--- a/scripts/glibcextract.py
++++ b/scripts/glibcextract.py
+@@ -17,6 +17,7 @@
+ # License along with the GNU C Library; if not, see
+ # <https://www.gnu.org/licenses/>.
+
++import collections
+ import os.path
+ import re
+ import subprocess
+@@ -173,3 +174,21 @@ def compare_macro_consts(source_1, source_2, cc, macro_re, exclude_re=None,
+ if not allow_extra_2:
+ ret = 1
+ return ret
++
++CompileResult = collections.namedtuple("CompileResult", "returncode output")
++
++def compile_c_snippet(snippet, cc, extra_cc_args=''):
++ """Compile and return whether the SNIPPET can be build with CC along
++ EXTRA_CC_ARGS compiler flags. Return a CompileResult with RETURNCODE
++ being 0 for success, or the failure value and the compiler output.
++ """
++ with tempfile.TemporaryDirectory() as temp_dir:
++ c_file_name = os.path.join(temp_dir, 'test.c')
++ obj_file_name = os.path.join(temp_dir, 'test.o')
++ with open(c_file_name, 'w') as c_file:
++ c_file.write(snippet + '\n')
++ cmd = cc.split() + extra_cc_args.split() + ['-c', '-o', obj_file_name,
++ c_file_name]
++ r = subprocess.run(cmd, check=False, stdout=subprocess.PIPE,
++ stderr=subprocess.STDOUT)
++ return CompileResult(r.returncode, r.stdout)
+diff --git a/socket/Makefile b/socket/Makefile
+index 156eec6c85..2bde78387f 100644
+--- a/socket/Makefile
++++ b/socket/Makefile
+@@ -34,6 +34,7 @@ routines := accept bind connect getpeername getsockname getsockopt \
+ tests := \
+ tst-accept4 \
+ tst-sockopt \
++ tst-cmsghdr \
+ # tests
+
+ tests-internal := \
+diff --git a/socket/tst-cmsghdr-skeleton.c b/socket/tst-cmsghdr-skeleton.c
+new file mode 100644
+index 0000000000..4c6898569b
+--- /dev/null
++++ b/socket/tst-cmsghdr-skeleton.c
+@@ -0,0 +1,92 @@
++/* Test ancillary data header creation.
++ Copyright (C) 2022 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++/* We use the preprocessor to generate the function/macro tests instead of
++ using indirection because having all the macro expansions alongside
++ each other lets the compiler warn us about suspicious pointer
++ arithmetic across subsequent CMSG_{FIRST,NXT}HDR expansions. */
++
++#include <stdint.h>
++
++#define RUN_TEST_CONCAT(suffix) run_test_##suffix
++#define RUN_TEST_FUNCNAME(suffix) RUN_TEST_CONCAT (suffix)
++
++static void
++RUN_TEST_FUNCNAME (CMSG_NXTHDR_IMPL) (void)
++{
++ struct msghdr m = {0};
++ struct cmsghdr *cmsg;
++ char cmsgbuf[3 * CMSG_SPACE (sizeof (PAYLOAD))] = {0};
++
++ m.msg_control = cmsgbuf;
++ m.msg_controllen = sizeof (cmsgbuf);
++
++ /* First header should point to the start of the buffer. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++
++ /* If the first header length consumes the entire buffer, there is no
++ space remaining for additional headers. */
++ cmsg->cmsg_len = sizeof (cmsgbuf);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ /* The first header length is so big, using it would cause an overflow. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len = SIZE_MAX;
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ /* The first header leaves just enough space to hold another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len = sizeof (cmsgbuf) - sizeof (struct cmsghdr);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++
++ /* The first header leaves space but not enough for another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len ++;
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ /* The second header leaves just enough space to hold another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg->cmsg_len = CMSG_LEN (sizeof (PAYLOAD));
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++ cmsg->cmsg_len = sizeof (cmsgbuf)
++ - CMSG_SPACE (sizeof (PAYLOAD)) /* First header. */
++ - sizeof (struct cmsghdr);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++
++ /* The second header leaves space but not enough for another header. */
++ cmsg = CMSG_FIRSTHDR (&m);
++ TEST_VERIFY_EXIT ((char *) cmsg == cmsgbuf);
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg != NULL);
++ cmsg->cmsg_len ++;
++ cmsg = CMSG_NXTHDR_IMPL (&m, cmsg);
++ TEST_VERIFY_EXIT (cmsg == NULL);
++
++ return;
++}
+diff --git a/socket/tst-cmsghdr.c b/socket/tst-cmsghdr.c
+new file mode 100644
+index 0000000000..68c96d3c9d
+--- /dev/null
++++ b/socket/tst-cmsghdr.c
+@@ -0,0 +1,56 @@
++/* Test ancillary data header creation.
++ Copyright (C) 2022 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, see
++ <https://www.gnu.org/licenses/>. */
++
++#include <sys/socket.h>
++#include <gnu/lib-names.h>
++#include <support/xdlfcn.h>
++#include <support/check.h>
++
++#define PAYLOAD "Hello, World!"
++
++/* CMSG_NXTHDR is a macro that calls an inline function defined in
++ bits/socket.h. In case the function cannot be inlined, libc.so carries
++ a copy. Both versions need to be tested. */
++
++#define CMSG_NXTHDR_IMPL CMSG_NXTHDR
++#include "tst-cmsghdr-skeleton.c"
++#undef CMSG_NXTHDR_IMPL
++
++static struct cmsghdr * (* cmsg_nxthdr) (struct msghdr *, struct cmsghdr *);
++
++#define CMSG_NXTHDR_IMPL cmsg_nxthdr
++#include "tst-cmsghdr-skeleton.c"
++#undef CMSG_NXTHDR_IMPL
++
++static int
++do_test (void)
++{
++ static void *handle;
++
++ run_test_CMSG_NXTHDR ();
++
++ handle = xdlopen (LIBC_SO, RTLD_LAZY);
++ cmsg_nxthdr = (struct cmsghdr * (*) (struct msghdr *, struct cmsghdr *))
++ xdlsym (handle, "__cmsg_nxthdr");
++
++ run_test_cmsg_nxthdr ();
++
++ return 0;
++}
++
++#include <support/test-driver.c>
+diff --git a/sysdeps/mach/hurd/bits/socket.h b/sysdeps/mach/hurd/bits/socket.h
+index 5b35ea81ec..70fce4fb27 100644
+--- a/sysdeps/mach/hurd/bits/socket.h
++++ b/sysdeps/mach/hurd/bits/socket.h
+@@ -249,6 +249,12 @@ struct cmsghdr
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+ #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
++/* Given a length, return the additional padding necessary such that
++ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
++#define __CMSG_PADDING(len) ((sizeof (size_t) \
++ - ((len) & (sizeof (size_t) - 1))) \
++ & (sizeof (size_t) - 1))
++
+ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+ #ifdef __USE_EXTERN_INLINES
+@@ -258,18 +264,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ _EXTERN_INLINE struct cmsghdr *
+ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+ {
++ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
++ __mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of __cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
++ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
++
++ size_t __size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (__cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+ return (struct cmsghdr *) 0;
+
++ /* There isn't enough space between __cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
++ < __size_needed)
++ || ((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
++ - __size_needed)
++ < __cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
++
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+- + __mhdr->msg_controllen)
+- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+- /* No more entries. */
+- return (struct cmsghdr *) 0;
+ return __cmsg;
+ }
+ #endif /* Use `extern inline'. */
+diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
+index a139a16532..3ceda9fdbf 100644
+--- a/sysdeps/unix/sysv/linux/Makefile
++++ b/sysdeps/unix/sysv/linux/Makefile
+@@ -265,6 +265,14 @@ $(objpfx)tst-mount-consts.out: ../sysdeps/unix/sysv/linux/tst-mount-consts.py
+ < /dev/null > $@ 2>&1; $(evaluate-test)
+ $(objpfx)tst-mount-consts.out: $(sysdeps-linux-python-deps)
+
++tests-special += $(objpfx)tst-mount-compile.out
++$(objpfx)tst-mount-compile.out: ../sysdeps/unix/sysv/linux/tst-mount-compile.py
++ $(sysdeps-linux-python) \
++ ../sysdeps/unix/sysv/linux/tst-mount-compile.py \
++ $(sysdeps-linux-python-cc) \
++ < /dev/null > $@ 2>&1; $(evaluate-test)
++$(objpfx)tst-mount-compile.out: $(sysdeps-linux-python-deps)
++
+ tst-rseq-disable-ENV = GLIBC_TUNABLES=glibc.pthread.rseq=0
+
+ endif # $(subdir) == misc
+diff --git a/sysdeps/unix/sysv/linux/alpha/brk_call.h b/sysdeps/unix/sysv/linux/alpha/brk_call.h
+index b8088cf13f..0b851b6c86 100644
+--- a/sysdeps/unix/sysv/linux/alpha/brk_call.h
++++ b/sysdeps/unix/sysv/linux/alpha/brk_call.h
+@@ -21,8 +21,7 @@ __brk_call (void *addr)
+ {
+ unsigned long int result = INTERNAL_SYSCALL_CALL (brk, addr);
+ if (result == -ENOMEM)
+- /* Mimic the default error reporting behavior. */
+- return addr;
+- else
+- return (void *) result;
++ /* Mimic the generic error reporting behavior. */
++ result = INTERNAL_SYSCALL_CALL (brk, 0);
++ return (void *) result;
+ }
+diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
+index 4f1f810ea1..539b8d7716 100644
+--- a/sysdeps/unix/sysv/linux/bits/socket.h
++++ b/sysdeps/unix/sysv/linux/bits/socket.h
+@@ -307,6 +307,12 @@ struct cmsghdr
+ + CMSG_ALIGN (sizeof (struct cmsghdr)))
+ #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+
++/* Given a length, return the additional padding necessary such that
++ len + __CMSG_PADDING(len) == CMSG_ALIGN (len). */
++#define __CMSG_PADDING(len) ((sizeof (size_t) \
++ - ((len) & (sizeof (size_t) - 1))) \
++ & (sizeof (size_t) - 1))
++
+ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ struct cmsghdr *__cmsg) __THROW;
+ #ifdef __USE_EXTERN_INLINES
+@@ -316,18 +322,38 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ _EXTERN_INLINE struct cmsghdr *
+ __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
+ {
++ /* We may safely assume that __cmsg lies between __mhdr->msg_control and
++ __mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of __cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * __msg_control_ptr = (unsigned char *) __mhdr->msg_control;
++ unsigned char * __cmsg_ptr = (unsigned char *) __cmsg;
++
++ size_t __size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (__cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+ return (struct cmsghdr *) 0;
+
++ /* There isn't enough space between __cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr)
++ < __size_needed)
++ || ((size_t)
++ (__msg_control_ptr + __mhdr->msg_controllen - __cmsg_ptr
++ - __size_needed)
++ < __cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
++
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ + CMSG_ALIGN (__cmsg->cmsg_len));
+- if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+- + __mhdr->msg_controllen)
+- || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+- > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+- /* No more entries. */
+- return (struct cmsghdr *) 0;
+ return __cmsg;
+ }
+ #endif /* Use `extern inline'. */
+diff --git a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
+index 15b7a3a925..24f72b797a 100644
+--- a/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
++++ b/sysdeps/unix/sysv/linux/cmsg_nxthdr.c
+@@ -23,18 +23,38 @@
+ struct cmsghdr *
+ __cmsg_nxthdr (struct msghdr *mhdr, struct cmsghdr *cmsg)
+ {
++ /* We may safely assume that cmsg lies between mhdr->msg_control and
++ mhdr->msg_controllen because the user is required to obtain the first
++ cmsg via CMSG_FIRSTHDR, set its length, then obtain subsequent cmsgs
++ via CMSG_NXTHDR, setting lengths along the way. However, we don't yet
++ trust the value of cmsg->cmsg_len and therefore do not use it in any
++ pointer arithmetic until we check its value. */
++
++ unsigned char * msg_control_ptr = (unsigned char *) mhdr->msg_control;
++ unsigned char * cmsg_ptr = (unsigned char *) cmsg;
++
++ size_t size_needed = sizeof (struct cmsghdr)
++ + __CMSG_PADDING (cmsg->cmsg_len);
++
++ /* The current header is malformed, too small to be a full header. */
+ if ((size_t) cmsg->cmsg_len < sizeof (struct cmsghdr))
+- /* The kernel header does this so there may be a reason. */
+- return NULL;
++ return (struct cmsghdr *) 0;
++
++ /* There isn't enough space between cmsg and the end of the buffer to
++ hold the current cmsg *and* the next one. */
++ if (((size_t)
++ (msg_control_ptr + mhdr->msg_controllen - cmsg_ptr)
++ < size_needed)
++ || ((size_t)
++ (msg_control_ptr + mhdr->msg_controllen - cmsg_ptr
++ - size_needed)
++ < cmsg->cmsg_len))
++
++ return (struct cmsghdr *) 0;
+
++ /* Now, we trust cmsg_len and can use it to find the next header. */
+ cmsg = (struct cmsghdr *) ((unsigned char *) cmsg
+ + CMSG_ALIGN (cmsg->cmsg_len));
+- if ((unsigned char *) (cmsg + 1) > ((unsigned char *) mhdr->msg_control
+- + mhdr->msg_controllen)
+- || ((unsigned char *) cmsg + CMSG_ALIGN (cmsg->cmsg_len)
+- > ((unsigned char *) mhdr->msg_control + mhdr->msg_controllen)))
+- /* No more entries. */
+- return NULL;
+ return cmsg;
+ }
+ libc_hidden_def (__cmsg_nxthdr)
+diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
+index bf4be80f8d..202520ee25 100644
+--- a/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
++++ b/sysdeps/unix/sysv/linux/riscv/rv32/arch-syscall.h
+@@ -122,6 +122,7 @@
+ #define __NR_mbind 235
+ #define __NR_membarrier 283
+ #define __NR_memfd_create 279
++#define __NR_memfd_secret 447
+ #define __NR_migrate_pages 238
+ #define __NR_mincore 232
+ #define __NR_mkdirat 34
+diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
+index d656aedcc2..4e65f337d4 100644
+--- a/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
++++ b/sysdeps/unix/sysv/linux/riscv/rv64/arch-syscall.h
+@@ -127,6 +127,7 @@
+ #define __NR_mbind 235
+ #define __NR_membarrier 283
+ #define __NR_memfd_create 279
++#define __NR_memfd_secret 447
+ #define __NR_migrate_pages 238
+ #define __NR_mincore 232
+ #define __NR_mkdirat 34
+diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
+index f965986ba8..19841d0738 100644
+--- a/sysdeps/unix/sysv/linux/sys/mount.h
++++ b/sysdeps/unix/sysv/linux/sys/mount.h
+@@ -27,77 +27,113 @@
+ #include <stddef.h>
+ #include <sys/ioctl.h>
+
+-#define BLOCK_SIZE 1024
++#ifdef __has_include
++# if __has_include ("linux/mount.h")
++# include "linux/mount.h"
++# endif
++#endif
++
++
+ #define BLOCK_SIZE_BITS 10
++#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
+
+
+ /* These are the fs-independent mount-flags: up to 16 flags are
+ supported */
+ enum
+ {
++#undef MS_RDONLY
+ MS_RDONLY = 1, /* Mount read-only. */
+ #define MS_RDONLY MS_RDONLY
++#undef MS_NOSUID
+ MS_NOSUID = 2, /* Ignore suid and sgid bits. */
+ #define MS_NOSUID MS_NOSUID
++#undef MS_NODEV
+ MS_NODEV = 4, /* Disallow access to device special files. */
+ #define MS_NODEV MS_NODEV
++#undef MS_NOEXEC
+ MS_NOEXEC = 8, /* Disallow program execution. */
+ #define MS_NOEXEC MS_NOEXEC
++#undef MS_SYNCHRONOUS
+ MS_SYNCHRONOUS = 16, /* Writes are synced at once. */
+ #define MS_SYNCHRONOUS MS_SYNCHRONOUS
++#undef MS_REMOUNT
+ MS_REMOUNT = 32, /* Alter flags of a mounted FS. */
+ #define MS_REMOUNT MS_REMOUNT
++#undef MS_MANDLOCK
+ MS_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
+ #define MS_MANDLOCK MS_MANDLOCK
++#undef MS_DIRSYNC
+ MS_DIRSYNC = 128, /* Directory modifications are synchronous. */
+ #define MS_DIRSYNC MS_DIRSYNC
++#undef MS_NOSYMFOLLOW
+ MS_NOSYMFOLLOW = 256, /* Do not follow symlinks. */
+ #define MS_NOSYMFOLLOW MS_NOSYMFOLLOW
++#undef MS_NOATIME
+ MS_NOATIME = 1024, /* Do not update access times. */
+ #define MS_NOATIME MS_NOATIME
++#undef MS_NODIRATIME
+ MS_NODIRATIME = 2048, /* Do not update directory access times. */
+ #define MS_NODIRATIME MS_NODIRATIME
++#undef MS_BIND
+ MS_BIND = 4096, /* Bind directory at different place. */
+ #define MS_BIND MS_BIND
++#undef MS_MOVE
+ MS_MOVE = 8192,
+ #define MS_MOVE MS_MOVE
++#undef MS_REC
+ MS_REC = 16384,
+ #define MS_REC MS_REC
++#undef MS_SILENT
+ MS_SILENT = 32768,
+ #define MS_SILENT MS_SILENT
++#undef MS_POSIXACL
+ MS_POSIXACL = 1 << 16, /* VFS does not apply the umask. */
+ #define MS_POSIXACL MS_POSIXACL
++#undef MS_UNBINDABLE
+ MS_UNBINDABLE = 1 << 17, /* Change to unbindable. */
+ #define MS_UNBINDABLE MS_UNBINDABLE
++#undef MS_PRIVATE
+ MS_PRIVATE = 1 << 18, /* Change to private. */
+ #define MS_PRIVATE MS_PRIVATE
++#undef MS_SLAVE
+ MS_SLAVE = 1 << 19, /* Change to slave. */
+ #define MS_SLAVE MS_SLAVE
++#undef MS_SHARED
+ MS_SHARED = 1 << 20, /* Change to shared. */
+ #define MS_SHARED MS_SHARED
++#undef MS_RELATIME
+ MS_RELATIME = 1 << 21, /* Update atime relative to mtime/ctime. */
+ #define MS_RELATIME MS_RELATIME
++#undef MS_KERNMOUNT
+ MS_KERNMOUNT = 1 << 22, /* This is a kern_mount call. */
+ #define MS_KERNMOUNT MS_KERNMOUNT
++#undef MS_I_VERSION
+ MS_I_VERSION = 1 << 23, /* Update inode I_version field. */
+ #define MS_I_VERSION MS_I_VERSION
++#undef MS_STRICTATIME
+ MS_STRICTATIME = 1 << 24, /* Always perform atime updates. */
+ #define MS_STRICTATIME MS_STRICTATIME
++#undef MS_LAZYTIME
+ MS_LAZYTIME = 1 << 25, /* Update the on-disk [acm]times lazily. */
+ #define MS_LAZYTIME MS_LAZYTIME
++#undef MS_ACTIVE
+ MS_ACTIVE = 1 << 30,
+ #define MS_ACTIVE MS_ACTIVE
++#undef MS_NOUSER
+ MS_NOUSER = 1 << 31
+ #define MS_NOUSER MS_NOUSER
+ };
+
+ /* Flags that can be altered by MS_REMOUNT */
++#undef MS_RMT_MASK
+ #define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION \
+ |MS_LAZYTIME)
+
+
+ /* Magic mount flag number. Has to be or-ed to the flag values. */
+
++#undef MS_MGC_VAL
+ #define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
+ #define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
+
+@@ -106,20 +142,35 @@ enum
+ is probably as bad and I don't want to create yet another include
+ file. */
+
++#undef BLKROSET
+ #define BLKROSET _IO(0x12, 93) /* Set device read-only (0 = read-write). */
++#undef BLKROGET
+ #define BLKROGET _IO(0x12, 94) /* Get read-only status (0 = read_write). */
++#undef BLKRRPART
+ #define BLKRRPART _IO(0x12, 95) /* Re-read partition table. */
++#undef BLKGETSIZE
+ #define BLKGETSIZE _IO(0x12, 96) /* Return device size. */
++#undef BLKFLSBUF
+ #define BLKFLSBUF _IO(0x12, 97) /* Flush buffer cache. */
++#undef BLKRASET
+ #define BLKRASET _IO(0x12, 98) /* Set read ahead for block device. */
++#undef BLKRAGET
+ #define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
++#undef BLKFRASET
+ #define BLKFRASET _IO(0x12,100) /* Set filesystem read-ahead. */
++#undef BLKFRAGET
+ #define BLKFRAGET _IO(0x12,101) /* Get filesystem read-ahead. */
++#undef BLKSECTSET
+ #define BLKSECTSET _IO(0x12,102) /* Set max sectors per request. */
++#undef BLKSECTGET
+ #define BLKSECTGET _IO(0x12,103) /* Get max sectors per request. */
++#undef BLKSSZGET
+ #define BLKSSZGET _IO(0x12,104) /* Get block device sector size. */
++#undef BLKBSZGET
+ #define BLKBSZGET _IOR(0x12,112,size_t)
++#undef BLKBSZSET
+ #define BLKBSZSET _IOW(0x12,113,size_t)
++#undef BLKGETSIZE64
+ #define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size. */
+
+
+@@ -137,9 +188,6 @@ enum
+ };
+
+
+-/* fsopen flags. */
+-#define FSOPEN_CLOEXEC 0x00000001
+-
+ /* fsmount flags. */
+ #define FSMOUNT_CLOEXEC 0x00000001
+
+@@ -157,6 +205,7 @@ enum
+ #define MOUNT_ATTR_NOSYMFOLLOW 0x00200000 /* Do not follow symlinks. */
+
+
++#ifndef MOUNT_ATTR_SIZE_VER0
+ /* For mount_setattr. */
+ struct mount_attr
+ {
+@@ -165,6 +214,7 @@ struct mount_attr
+ uint64_t propagation;
+ uint64_t userns_fd;
+ };
++#endif
+
+ #define MOUNT_ATTR_SIZE_VER0 32 /* sizeof first published struct */
+
+@@ -185,26 +235,31 @@ struct mount_attr
+ #define FSPICK_EMPTY_PATH 0x00000008
+
+
++#ifndef FSOPEN_CLOEXEC
+ /* The type of fsconfig call made. */
+ enum fsconfig_command
+ {
+ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+-#define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
++# define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
+ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
+-#define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
++# define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
+ FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
+-#define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
++# define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
+ FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
+-#define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
++# define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
+ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
+-#define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
++# define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
+ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
+-#define FSCONFIG_SET_FD FSCONFIG_SET_FD
++# define FSCONFIG_SET_FD FSCONFIG_SET_FD
+ FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
+-#define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
++# define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
+ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
+-#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
++# define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
+ };
++#endif
++
++/* fsopen flags. */
++#define FSOPEN_CLOEXEC 0x00000001
+
+ /* open_tree flags. */
+ #define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
+diff --git a/sysdeps/unix/sysv/linux/syscall-names.list b/sysdeps/unix/sysv/linux/syscall-names.list
+index 6c7b2f7011..028ad3107a 100644
+--- a/sysdeps/unix/sysv/linux/syscall-names.list
++++ b/sysdeps/unix/sysv/linux/syscall-names.list
+@@ -21,8 +21,8 @@
+ # This file can list all potential system calls. The names are only
+ # used if the installed kernel headers also provide them.
+
+-# The list of system calls is current as of Linux 5.18.
+-kernel 5.18
++# The list of system calls is current as of Linux 5.19.
++kernel 5.19
+
+ FAST_atomic_update
+ FAST_cmpxchg
+diff --git a/sysdeps/unix/sysv/linux/tst-mount-compile.py b/sysdeps/unix/sysv/linux/tst-mount-compile.py
+new file mode 100755
+index 0000000000..0ec74d4e0b
+--- /dev/null
++++ b/sysdeps/unix/sysv/linux/tst-mount-compile.py
+@@ -0,0 +1,66 @@
++#!/usr/bin/python3
++# Check if glibc provided sys/mount.h can be used along related kernel
++# headers.
++# Copyright (C) 2022 Free Software Foundation, Inc.
++# This file is part of the GNU C Library.
++#
++# The GNU C Library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License as published by the Free Software Foundation; either
++# version 2.1 of the License, or (at your option) any later version.
++#
++# The GNU C Library is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# Lesser General Public License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with the GNU C Library; if not, see
++# <https://www.gnu.org/licenses/>.
++
++import argparse
++import sys
++
++import glibcextract
++
++
++def main():
++ """The main entry point."""
++ parser = argparse.ArgumentParser(
++ description='Check if glibc provided sys/mount.h can be '
++ ' used along related kernel headers.')
++ parser.add_argument('--cc', metavar='CC',
++ help='C compiler (including options) to use')
++ args = parser.parse_args()
++
++ if glibcextract.compile_c_snippet(
++ '#include <linux/mount.h>',
++ args.cc).returncode != 0:
++ sys.exit (77)
++
++ def check(testname, snippet):
++ # Add -Werror to catch macro redefinitions and _ISOMAC to avoid
++ # internal glibc definitions.
++ r = glibcextract.compile_c_snippet(snippet, args.cc,
++ '-Werror -D_ISOMAC')
++ if r.returncode != 0:
++ print('error: test {}:\n{}'.format(testname, r.output.decode()))
++ return r.returncode
++
++ status = max(
++ check("sys/mount.h + linux/mount.h",
++ "#include <sys/mount.h>\n"
++ "#include <linux/mount.h>"),
++ check("sys/mount.h + linux/fs.h",
++ "#include <sys/mount.h>\n"
++ "#include <linux/fs.h>"),
++ check("linux/mount.h + sys/mount.h",
++ "#include <linux/mount.h>\n"
++ "#include <sys/mount.h>"),
++ check("linux/fs.h + sys/mount.h",
++ "#include <linux/fs.h>\n"
++ "#include <sys/mount.h>"))
++ sys.exit(status)
++
++if __name__ == '__main__':
++ main()
+diff --git a/sysdeps/unix/sysv/linux/tst-mount-consts.py b/sysdeps/unix/sysv/linux/tst-mount-consts.py
+index a62f803123..be2ef2daf1 100755
+--- a/sysdeps/unix/sysv/linux/tst-mount-consts.py
++++ b/sysdeps/unix/sysv/linux/tst-mount-consts.py
+@@ -33,6 +33,11 @@ def main():
+ help='C compiler (including options) to use')
+ args = parser.parse_args()
+
++ if glibcextract.compile_c_snippet(
++ '#include <linux/mount.h>',
++ args.cc).returncode != 0:
++ sys.exit (77)
++
+ linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
+ # Constants in glibc were updated to match Linux v5.16. When glibc
+ # constants are updated this value should be updated to match the
+diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
+index 90cbb9be64..d732173abd 100644
+--- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
++++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py
+@@ -33,11 +33,13 @@ def main():
+ help='C compiler (including options) to use')
+ args = parser.parse_args()
+
+- linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
+- # Linux started to provide pidfd.h with 5.10.
+- if linux_version_headers < (5, 10):
++ if glibcextract.compile_c_snippet(
++ '#include <linux/pidfd.h>',
++ args.cc).returncode != 0:
+ sys.exit (77)
+- linux_version_glibc = (5, 18)
++
++ linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc)
++ linux_version_glibc = (5, 19)
+ sys.exit(glibcextract.compare_macro_consts(
+ '#include <sys/pidfd.h>\n',
+ '#include <asm/fcntl.h>\n'
+diff --git a/sysdeps/unix/sysv/linux/tst-pidfd.c b/sysdeps/unix/sysv/linux/tst-pidfd.c
+index 037af22290..5711d1c312 100644
+--- a/sysdeps/unix/sysv/linux/tst-pidfd.c
++++ b/sysdeps/unix/sysv/linux/tst-pidfd.c
+@@ -147,8 +147,11 @@ do_test (void)
+ may be denied if the process doesn't have CAP_SYS_PTRACE or
+ if a LSM security_ptrace_access_check denies access. */
+ if (fd == -1 && errno == EPERM)
+- FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, "
+- "skipping test");
++ {
++ TEST_COMPARE (pidfd_send_signal (pidfd, SIGKILL, NULL, 0), 0);
++ FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, "
++ "skipping test");
++ }
+ TEST_VERIFY (fd > 0);
+
+ char *path = xasprintf ("/proc/%d/fd/%d", pid, remote_fd);
+diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
+index e6b9e8743a..3d19d5556f 100644
+--- a/wcsmbs/Makefile
++++ b/wcsmbs/Makefile
+@@ -73,6 +73,8 @@ $(objpfx)tst-wcstol-locale.out: $(gen-locales)
+ $(objpfx)tst-wcstod-nan-locale.out: $(gen-locales)
+ $(objpfx)tst-c16-surrogate.out: $(gen-locales)
+ $(objpfx)tst-c32-state.out: $(gen-locales)
++$(objpfx)test-c8rtomb.out: $(gen-locales)
++$(objpfx)test-mbrtoc8.out: $(gen-locales)
+ endif
+
+ $(objpfx)tst-wcstod-round: $(libm)
+diff --git a/wcsmbs/uchar.h b/wcsmbs/uchar.h
+index c37e8619a0..5f7139f279 100644
+--- a/wcsmbs/uchar.h
++++ b/wcsmbs/uchar.h
+@@ -34,8 +34,16 @@
+ /* Declare the C2x char8_t typedef in C2x modes, but only if the C++
+ __cpp_char8_t feature test macro is not defined. */
+ #if __GLIBC_USE (ISOC2X) && !defined __cpp_char8_t
++#if __GNUC_PREREQ (10, 0) && defined __cplusplus
++/* Suppress the diagnostic regarding char8_t being a keyword in C++20. */
++# pragma GCC diagnostic push
++# pragma GCC diagnostic ignored "-Wc++20-compat"
++#endif
+ /* Define the 8-bit character type. */
+ typedef unsigned char char8_t;
++#if __GNUC_PREREQ (10, 0) && defined __cplusplus
++# pragma GCC diagnostic pop
++#endif
+ #endif
+
+ #ifndef __USE_ISOCXX11
+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 <sysdeps/generic/ldconfig.h>
+
+ #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 },
1
0
commit 2f6c28106b82b3b07bd1c38966c7c605fe3aecb9
Author: Tim Biermann <tbier(a)posteo.de>
Date: Mon Aug 22 19:24:55 2022 +0200
python3-poetry: 1.1.14 -> 1.1.15
diff --git a/python3-poetry/.footprint b/python3-poetry/.footprint
index 381b1a1ec..7070306b1 100644
--- a/python3-poetry/.footprint
+++ b/python3-poetry/.footprint
@@ -4,12 +4,12 @@ drwxr-xr-x root/root usr/bin/
drwxr-xr-x root/root usr/lib/
drwxr-xr-x root/root usr/lib/python3.9/
drwxr-xr-x root/root usr/lib/python3.9/site-packages/
-drwxr-xr-x root/root usr/lib/python3.9/site-packages/poetry-1.1.14.dist-info/
--rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.14.dist-info/LICENSE
--rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.14.dist-info/METADATA
--rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.14.dist-info/RECORD
--rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.14.dist-info/WHEEL
--rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.14.dist-info/entry_points.txt
+drwxr-xr-x root/root usr/lib/python3.9/site-packages/poetry-1.1.15.dist-info/
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.15.dist-info/LICENSE
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.15.dist-info/METADATA
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.15.dist-info/RECORD
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.15.dist-info/WHEEL
+-rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry-1.1.15.dist-info/entry_points.txt
drwxr-xr-x root/root usr/lib/python3.9/site-packages/poetry/
-rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry/__init__.py
-rw-r--r-- root/root usr/lib/python3.9/site-packages/poetry/__main__.py
diff --git a/python3-poetry/.signature b/python3-poetry/.signature
index ded283efe..a8e223269 100644
--- a/python3-poetry/.signature
+++ b/python3-poetry/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF38Q39STq6Y+wmJbBgvRphhl8H3SLKiPjQoEOksK+NNM7bBgIjzrrDIS5ZoigAPmIDykYY7TH45aud1ldxhDm7wk=
-SHA256 (Pkgfile) = ec7ddda1c51362fbf7cca67c2074a879c5dc4bdbd80a0741b5c86713301e5618
-SHA256 (.footprint) = fd0eb05211c9085987fb08c4b269404e3a00e469f892cbc027f47f41743b2f64
-SHA256 (python3-poetry-1.1.14.tar.gz) = b1f6f0e466d23ae32c0c4d54c2f4e3acc60c570e062fccfe544761098e3ff74f
+RWSagIOpLGJF30fTYbI8Kg0Iex3PaPXz1dsi/JDTfPizuM1ApiaVRlrkFSwLwlrRnOHhHyyAg36YNMNoDOg8bqJT+qedqdgBfAA=
+SHA256 (Pkgfile) = 90335943824ed2cc2a175758a07b5a5ac9e9044f5758f7558c5bafee7b0aaf6c
+SHA256 (.footprint) = badb1cd85409fe347c5966a4324997b4460066dbf82f6afd198bb251c844c7e8
+SHA256 (python3-poetry-1.1.15.tar.gz) = 806faa098b43e2264183bd1d45d7014e4f03e7e924d7b33e8cf3156be77e3c7b
diff --git a/python3-poetry/Pkgfile b/python3-poetry/Pkgfile
index 12c134a3a..aa5a070e4 100644
--- a/python3-poetry/Pkgfile
+++ b/python3-poetry/Pkgfile
@@ -4,7 +4,7 @@
# Depends on: python3-cachecontrol python3-cachy python3-cleo python3-html5lib python3-keyring python3-lockfile python3-pexpect python3-pkginfo python3-poetry-core python3-requests-toolbelt python3-shellingham python3-virtualenv
name=python3-poetry
-version=1.1.14
+version=1.1.15
release=1
source=(https://github.com/sdispater/poetry/archive/$version/$name-$version…
1
0
commit 7be56d1d49472ee7f1cf7909501ad4a268bc00c2
Author: Tim Biermann <tbier(a)posteo.de>
Date: Mon Aug 22 19:23:38 2022 +0200
rust-analyzer: 20220815 -> 20220822
diff --git a/rust-analyzer/.signature b/rust-analyzer/.signature
index 8749c8127..d050ee2c9 100644
--- a/rust-analyzer/.signature
+++ b/rust-analyzer/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF35sD0T8dZNyLUXY0ZKCmIUh9uB8Rop3kD/G+EmP1s6a4lxqAgI7Vm02TJy2XNhvzOxKs36hKHvV4T88tkhByIQE=
-SHA256 (Pkgfile) = ce1be6ff0f3af546bd142cc789ef28bd8df6c8859e1ef1768d06532d59afe1bd
+RWSagIOpLGJF380eH7uih2ilagvXM5n311bh/oYg3sDIYNw6ngnduHtbKnI28GIqgSYEs9Z2SrlgLxCW78DRzZLGcwEj2TpWYg0=
+SHA256 (Pkgfile) = 138a3a21b8061f1dd803986e23f0d357956c5d955ee379d46cd4f21437da44f1
SHA256 (.footprint) = 0b298544e01b8fbc5119583b3aa96f10232e4b267ef9f2d069810f8011b6ee34
-SHA256 (rust-analyzer-20220815.tar.gz) = d13d100c3835203c8660b430880ceb2716ded8aa7394674d5c39f14be9045649
+SHA256 (rust-analyzer-20220822.tar.gz) = 4ae1a6f0f674c74f20d11c9503c88f931eccfb9c53e10fbc91e0f7a1e6bf6f56
diff --git a/rust-analyzer/Pkgfile b/rust-analyzer/Pkgfile
index 1f84ccbf3..594512418 100644
--- a/rust-analyzer/Pkgfile
+++ b/rust-analyzer/Pkgfile
@@ -4,7 +4,7 @@
# Depends on: rust
name=rust-analyzer
-version=20220815
+version=20220822
_version=${version::4}-${version:4:2}-${version:6:2}
release=1
source=(https://github.com/rust-analyzer/rust-analyzer/archive/$_version/$n…
1
0
commit 2a2a7a47b771b3bc2bf562a4894862f4d4e3b899
Author: Tim Biermann <tbier(a)posteo.de>
Date: Mon Aug 22 17:55:26 2022 +0200
ncpamixer: fixed build
diff --git a/ncpamixer/.signature b/ncpamixer/.signature
index e01e55f88..f3883c5dc 100644
--- a/ncpamixer/.signature
+++ b/ncpamixer/.signature
@@ -1,6 +1,6 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF35PxM78+NeCUX2+in1t9uvADg8P2kfEK4cGAubKUDAIymiAt3hQH3NAKFFmt7rlU6VpFPKGH3XY3neTyT3/2BwQ=
-SHA256 (Pkgfile) = f79b60047de20ac5a39d85fd961b65a60a92f1c761ece238a416291a3bf74e25
+RWSagIOpLGJF3xiHWylukzJK474wsD1h7TGT/IGgrEfkTANC4Y7hlnzVDDbel2CPcAKFDN1dQJbbvGVgWBdjV3aRlExtPkXLZAk=
+SHA256 (Pkgfile) = 780fa5f17b964a73ef939a41aa123e017dfbc00908d401611c985e82cbb7e831
SHA256 (.footprint) = 9e08e0076af6c98e27353c88de914fbb4a9aea6dab1a365a9670e0e270aa3d25
SHA256 (ncpamixer-1.3.3.2.tar.gz) = 97f9398773ccfe4dd89284e695f88d337cd02a871d33650018a3d86134d877a6
SHA256 (ncpamixer.1) = b616e0707c75c6fd6162bd011baa37f7754946e5857f3ca814e5dab719bf358a
diff --git a/ncpamixer/Pkgfile b/ncpamixer/Pkgfile
index 195d77b8c..bf9a87173 100644
--- a/ncpamixer/Pkgfile
+++ b/ncpamixer/Pkgfile
@@ -16,7 +16,6 @@ build() {
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-Wno-dev
- ccmake build
cmake --build build
DESTDIR=$PKG cmake --install build
install -Dm644 $SRC/$name.1 $PKG/usr/share/man/man1/$name.1
1
0
commit 6cee110392d1ecd456f1edf1230a2423dd659f07
Author: Tim Biermann <tbier(a)posteo.de>
Date: Mon Aug 22 17:54:50 2022 +0200
fcft: 3.1.2 -> 3.1.3
diff --git a/fcft/.footprint b/fcft/.footprint
index 05d3f8d4d..e317de1f7 100644
--- a/fcft/.footprint
+++ b/fcft/.footprint
@@ -5,8 +5,8 @@ drwxr-xr-x root/root usr/include/fcft/
-rw-r--r-- root/root usr/include/fcft/stride.h
drwxr-xr-x root/root usr/lib/
lrwxrwxrwx root/root usr/lib/libfcft.so -> libfcft.so.4
-lrwxrwxrwx root/root usr/lib/libfcft.so.4 -> libfcft.so.4.1.2
--rwxr-xr-x root/root usr/lib/libfcft.so.4.1.2
+lrwxrwxrwx root/root usr/lib/libfcft.so.4 -> libfcft.so.4.1.3
+-rwxr-xr-x root/root usr/lib/libfcft.so.4.1.3
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/fcft.pc
drwxr-xr-x root/root usr/share/
diff --git a/fcft/.signature b/fcft/.signature
index afb9dbf79..b0ab37839 100644
--- a/fcft/.signature
+++ b/fcft/.signature
@@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF30TazYb/6p+1qvF53ehWvoG1+rx5VJMO135KiZ1B/bRwzf2PFcG77KtpjrKSzQTjUedsu7xyGLoJ1TMBk1eiOwA=
-SHA256 (Pkgfile) = 11cc649196c0c4c1140d2829e271c1011ad3fbb95881aaae83fa25ed714ee5c0
-SHA256 (.footprint) = 59f3a22d2de068a16739ab1c631d4b84a180d66c558853e434c006bb09c1f0e6
-SHA256 (fcft-3.1.2.tar.gz) = f571afe693d3fa11fe36e97c7a2ecbbf9313755ee31c1ec3dcc648796b8e6db0
+RWSagIOpLGJF33bYtGXieNliGUxECHrzXVqg4c36s68O+z4+YJIduYum4WMw3q1zy7hPFuDcoF7sGXOwfgDWZPL+sIn2baTnBQc=
+SHA256 (Pkgfile) = 8e4ed30a8abee7fdb1ab99e970bab9d38ff90722637273e236f41c0b34279f6c
+SHA256 (.footprint) = 72f8000a570cd5931ad87d966a3004b3580efa880ccf37d4e312966aab4bc981
+SHA256 (fcft-3.1.3.tar.gz) = d9bff464ae5c31fbaad0fb8a50b6db2fc168c48aae169d005066ad358b9d432d
diff --git a/fcft/Pkgfile b/fcft/Pkgfile
index d70145872..e8fdbbb73 100644
--- a/fcft/Pkgfile
+++ b/fcft/Pkgfile
@@ -5,7 +5,7 @@
# Optional: harfbuzz
name=fcft
-version=3.1.2
+version=3.1.3
release=1
source=(https://codeberg.org/dnkl/fcft/archive/$version.tar.gz)
renames=($name-$version.tar.gz)
@@ -17,7 +17,7 @@ build() {
--prefix=/usr \
--buildtype=plain \
--wrap-mode nodownload \
- -D b_lto=true \
+ -D b_lto=false \
-D b_pie=true \
-D test-text-shaping=true
meson compile -C build
1
0