Skip to contentSkip to conversation

glibc: Upgrade to 2.35 (RFC)

PATCH In review Khem Raj 5 participants 15 messages Feb 8, 2022 – Feb 17, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v3 1/3 glibc: Upgrade to 2.35 (RFC)

From: Richard Purdie <[email protected]>

Package /usr/bin/ld.so in a separate package

ld.so is a new tool which is added as a symlink to original dynamic linker so make it available with same name across architectures which is useful to leveral features like --preload, --audit, and --list-diagnostics more accessible to end users

---
 meta/conf/distro/include/tcmode-default.inc   |   2 +-
 ...2.34.bb => cross-localedef-native_2.35.bb} |  16 +-
 meta/recipes-core/glibc/glibc-common.inc      |   2 +-
 ...bc-locale_2.34.bb => glibc-locale_2.35.bb} |   0
 ...bc-mtrace_2.34.bb => glibc-mtrace_2.35.bb} |   0
 meta/recipes-core/glibc/glibc-package.inc     |   4 +-
 ...-scripts_2.34.bb => glibc-scripts_2.35.bb} |   0
 ...libc-tests_2.34.bb => glibc-tests_2.35.bb} |   0
 ...tsuite_2.34.bb => glibc-testsuite_2.35.bb} |   0
 meta/recipes-core/glibc/glibc-version.inc     |   8 +-
 .../glibc/glibc/0001-CVE-2021-38604.patch     |  43 ---
 .../glibc/glibc/0001-CVE-2021-3998.patch      | 282 --------------
 .../glibc/glibc/0001-CVE-2021-3999.patch      |  36 --
 .../glibc/glibc/0001-CVE-2022-23218.patch     | 178 ---------
 .../glibc/glibc/0001-CVE-2022-23219.patch     |  55 ---
 ...d-failed-in-unprivileged-process-BZ-.patch |  79 ----
 ...dd-hardlink-resolver-from-util-linux.patch |   2 +-
 .../glibc/glibc/0002-CVE-2021-38604.patch     | 150 --------
 .../glibc/glibc/0002-CVE-2021-3998.patch      | 138 -------
 .../glibc/glibc/0002-CVE-2021-3999.patch      | 357 ------------------
 .../glibc/glibc/0002-CVE-2022-23218.patch     | 126 -------
 .../glibc/glibc/0002-CVE-2022-23219.patch     |  89 -----
 ...-fix-ups-hardlink-to-make-it-compile.patch |   2 +-
 ...Look-for-host-system-ld.so.cache-as-.patch |   8 +-
 ...Fix-buffer-overrun-with-a-relocated-.patch |   6 +-
 ...Raise-the-size-of-arrays-containing-.patch |  18 +-
 ...k-glibc-Allow-64-bit-atomics-for-x86.patch |  14 +-
 ...Make-relocatable-install-for-locales.patch |  16 +-
 ...Fall-back-to-faccessat-on-faccess2-r.patch |   2 +-
 ...he-path-sets-wrong-config-variables.patch} |   2 +-
 ...s-building-and-testing-instructions.patch} |   2 +-
 ...libc-Help-bootstrap-cross-toolchain.patch} |   8 +-
 ...glibc-Resolve-__fpscr_values-on-SH4.patch} |   2 +-
 ...ort-cross-locale-generation-support.patch} |  66 ++--
 ...archive-uses-a-hard-coded-locale-pa.patch} |  10 +-
 ...ybe-uninitialized-errors-with-Os-BZ.patch} |   6 +-
 ...E_KNOWN_INTERPRETER_NAMES-to-known-.patch} |   6 +-
 ...-the-header-between-arm-and-aarch64.patch} |  19 +-
 ...o-not-ask-compiler-for-finding-arch.patch} |   2 +-
 ...-printf-builtin-in-nscd-init-script.patch} |  47 ++-
 ...gure.ac-Set-libc_cv_rootsbindir-onl.patch} |  16 +-
 ...ll-interpreter-overridable-in-tzsel.patch} |  11 +-
 ...it-no-lines-in-bison-generated-files.patch |  31 --
 .../glibc/glibc/CVE-2021-43396.patch          | 184 ---------
 .../glibc/{glibc_2.34.bb => glibc_2.35.bb}    |  39 +-
 45 files changed, 172 insertions(+), 1912 deletions(-)
 rename meta/recipes-core/glibc/{cross-localedef-native_2.34.bb => cross-localedef-native_2.35.bb} (76%)
 rename meta/recipes-core/glibc/{glibc-locale_2.34.bb => glibc-locale_2.35.bb} (100%)
 rename meta/recipes-core/glibc/{glibc-mtrace_2.34.bb => glibc-mtrace_2.35.bb} (100%)
 rename meta/recipes-core/glibc/{glibc-scripts_2.34.bb => glibc-scripts_2.35.bb} (100%)
 rename meta/recipes-core/glibc/{glibc-tests_2.34.bb => glibc-tests_2.35.bb} (100%)
 rename meta/recipes-core/glibc/{glibc-testsuite_2.34.bb => glibc-testsuite_2.35.bb} (100%)
 delete mode 100644 meta/recipes-core/glibc/glibc/0001-CVE-2021-38604.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0001-CVE-2021-3998.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0001-CVE-2021-3999.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0001-CVE-2022-23218.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0001-CVE-2022-23219.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0002-CVE-2021-38604.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0002-CVE-2021-3998.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0002-CVE-2021-3999.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0002-CVE-2022-23218.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/0002-CVE-2022-23219.patch
 rename meta/recipes-core/glibc/glibc/{0016-yes-within-the-path-sets-wrong-config-variables.patch => 0009-yes-within-the-path-sets-wrong-config-variables.patch} (99%)
 rename meta/recipes-core/glibc/glibc/{0019-eglibc-Cross-building-and-testing-instructions.patch => 0010-eglibc-Cross-building-and-testing-instructions.patch} (99%)
 rename meta/recipes-core/glibc/glibc/{0020-eglibc-Help-bootstrap-cross-toolchain.patch => 0011-eglibc-Help-bootstrap-cross-toolchain.patch} (93%)
 rename meta/recipes-core/glibc/glibc/{0021-eglibc-Resolve-__fpscr_values-on-SH4.patch => 0012-eglibc-Resolve-__fpscr_values-on-SH4.patch} (96%)
 rename meta/recipes-core/glibc/glibc/{0022-eglibc-Forward-port-cross-locale-generation-support.patch => 0013-eglibc-Forward-port-cross-locale-generation-support.patch} (90%)
 rename meta/recipes-core/glibc/glibc/{0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch => 0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch} (90%)
 rename meta/recipes-core/glibc/glibc/{0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch => 0016-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch} (92%)
 rename meta/recipes-core/glibc/glibc/{0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch => 0017-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch} (82%)
 rename meta/recipes-core/glibc/glibc/{0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch => 0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch} (78%)
 rename meta/recipes-core/glibc/glibc/{0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch => 0019-powerpc-Do-not-ask-compiler-for-finding-arch.patch} (96%)
 rename meta/recipes-core/glibc/glibc/{0018-Remove-bash-dependency-for-nscd-init-script.patch => 0021-Replace-echo-with-printf-builtin-in-nscd-init-script.patch} (52%)
 rename meta/recipes-core/glibc/glibc/{0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch => 0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch} (61%)
 rename meta/recipes-core/glibc/glibc/{0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch => 0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch} (86%)
 delete mode 100644 meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch
 delete mode 100644 meta/recipes-core/glibc/glibc/CVE-2021-43396.patch
 rename meta/recipes-core/glibc/{glibc_2.34.bb => glibc_2.35.bb} (73%)
meta/conf/distro/include/tcmode-default.inc +1 -1
index 372f8fe59a0..adaa11e0f8f 100644
@@ -20,7 +20,7 @@ GCCVERSION ?= "11.%"
 SDKGCCVERSION ?= "${GCCVERSION}"
 BINUVERSION ?= "2.37%"
 GDBVERSION ?= "11.%"
-GLIBCVERSION ?= "2.34"
+GLIBCVERSION ?= "2.35"
 LINUXLIBCVERSION ?= "5.16%"
 QEMUVERSION ?= "6.2%"
 GOVERSION ?= "1.17%"
meta/recipes-core/glibc/cross-localedef-native_2.35.bb renamed from meta/recipes-core/glibc/cross-localedef-native_2.34.bb +8 -8
similarity index 76%
rename from meta/recipes-core/glibc/cross-localedef-native_2.34.bb
rename to meta/recipes-core/glibc/cross-localedef-native_2.35.bb
index c37814ee24e..893d3764592 100644
@@ -25,14 +25,14 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://0001-localedef-Add-hardlink-resolver-from-util-linux.patch \
            file://0002-localedef-fix-ups-hardlink-to-make-it-compile.patch \
            \
-           file://0018-Remove-bash-dependency-for-nscd-init-script.patch \
-           file://0019-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
-           file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
-           file://0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch \
-"
+           file://0010-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0012-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0013-eglibc-Forward-port-cross-locale-generation-support.patch \
+           file://0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
+           file://0021-Replace-echo-with-printf-builtin-in-nscd-init-script.patch \
+           file://0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \
+           "
 # Makes for a rather long rev (22 characters), but...
 #
 SRCREV_FORMAT = "glibc_localedef"
meta/recipes-core/glibc/glibc-common.inc +1 -1
index f695cd6a4af..098ebbc932d 100644
@@ -22,4 +22,4 @@ ARM_INSTRUCTION_SET:armv6 = "arm"
 #
 COMPATIBLE_HOST:libc-musl:class-target = "null"
 
-PV = "2.34"
+PV = "2.35"
meta/recipes-core/glibc/glibc-locale_2.35.bb renamed from meta/recipes-core/glibc/glibc-locale_2.34.bb +0 -0
similarity index 100%
rename from meta/recipes-core/glibc/glibc-locale_2.34.bb
rename to meta/recipes-core/glibc/glibc-locale_2.35.bb
meta/recipes-core/glibc/glibc-mtrace_2.35.bb renamed from meta/recipes-core/glibc/glibc-mtrace_2.34.bb +0 -0
similarity index 100%
rename from meta/recipes-core/glibc/glibc-mtrace_2.34.bb
rename to meta/recipes-core/glibc/glibc-mtrace_2.35.bb
meta/recipes-core/glibc/glibc-package.inc +3 -1
index 54e2a08906a..ca9d6e0531e 100644
@@ -1,6 +1,6 @@
 INHIBIT_SYSROOT_STRIP = "1"
 
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd tzcode glibc-thread-db ${PN}-pic libmemusage malloc-debug libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src"
+PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd ldso tzcode glibc-thread-db ${PN}-pic libmemusage malloc-debug libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src"
 
 # The ld.so in this glibc supports the GNU_HASH
 RPROVIDES:${PN} = "eglibc rtld(GNU_HASH)"
@@ -23,12 +23,14 @@ ARCH_DYNAMIC_LOADER:aarch64 = "ld-linux-${TARGET_ARCH}.so.1"
 libc_baselibs:append = " ${@oe.utils.conditional('ARCH_DYNAMIC_LOADER', '', '', '${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}', d)}"
 INSANE_SKIP:${PN}:append:aarch64 = " libdir"
 INSANE_SKIP:${PN}-dev += "staticdev"
+INSANE_SKIP:ldso:append = " dev-so"
 
 FILES:${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf"
 RRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)}"
 FILES:ldconfig = "${base_sbindir}/ldconfig"
 FILES:ldd = "${bindir}/ldd"
 FILES:libsegfault = "${base_libdir}/libSegFault*"
+FILES:ldso = "${bindir}/ld.so"
 FILES:libmemusage = "${base_libdir}/libmemusage.so"
 FILES:malloc-debug = "${base_libdir}/libc_malloc_debug.so.0"
 FILES:libnss-db = "${base_libdir}/libnss_db.so.* ${base_libdir}/libnss_db-*.so ${localstatedir}/db/Makefile ${localstatedir}/db/makedbs.sh"
meta/recipes-core/glibc/glibc-scripts_2.35.bb renamed from meta/recipes-core/glibc/glibc-scripts_2.34.bb +0 -0
similarity index 100%
rename from meta/recipes-core/glibc/glibc-scripts_2.34.bb
rename to meta/recipes-core/glibc/glibc-scripts_2.35.bb
meta/recipes-core/glibc/glibc-tests_2.35.bb renamed from meta/recipes-core/glibc/glibc-tests_2.34.bb +0 -0
similarity index 100%
rename from meta/recipes-core/glibc/glibc-tests_2.34.bb
rename to meta/recipes-core/glibc/glibc-tests_2.35.bb
meta/recipes-core/glibc/glibc-testsuite_2.35.bb renamed from meta/recipes-core/glibc/glibc-testsuite_2.34.bb +0 -0
similarity index 100%
rename from meta/recipes-core/glibc/glibc-testsuite_2.34.bb
rename to meta/recipes-core/glibc/glibc-testsuite_2.35.bb
meta/recipes-core/glibc/glibc-version.inc +4 -4
index 281df7ecda8..080e905b6e1 100644
@@ -1,7 +1,7 @@
-SRCBRANCH ?= "release/2.34/master"
-PV = "2.34"
-SRCREV_glibc ?= "ae37d06c7d127817ba43850f0f898b793d42aea7"
-SRCREV_localedef ?= "95c0221703ad970a52445e9eaf91c4aff35eebef"
+SRCBRANCH ?= "release/2.35/master"
+PV = "2.35"
+SRCREV_glibc ?= "24962427071fa532c3c48c918e9d64d719cc8a6c"
+SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87"
 
 GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
 
meta/recipes-core/glibc/glibc/0001-CVE-2021-38604.patch deleted +0 -43

43 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0001-CVE-2021-3998.patch deleted +0 -282

282 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0001-CVE-2021-3999.patch deleted +0 -36
deleted file mode 100644
index 64749390b57..00000000000
@@ -1,36 +0,0 @@
-From 8c8a71c85f2ed5cc90d08d82ce645513fc907cb6 Mon Sep 17 00:00:00 2001
-From: Siddhesh Poyarekar <[email protected]>
-Date: Mon, 24 Jan 2022 10:57:09 +0530
-Subject: [PATCH] tst-realpath-toolong: Fix hurd build
-
-Define PATH_MAX to a constant if it isn't already defined, like in hurd.
-
-Signed-off-by: Siddhesh Poyarekar <[email protected]>
-(cherry picked from commit 976db046bc3a3738f69255ae00b0a09b8e77fd9c)
-
-Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=8c8a71c85f2ed5cc90d08d82ce645513fc907cb6]
-CVE: CVE-2021-3999
-
-Signed-off-by: Pgowda <[email protected]>
----
- stdlib/tst-realpath-toolong.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/stdlib/tst-realpath-toolong.c b/stdlib/tst-realpath-toolong.c
-index 8bed772460..4388890294 100644
---- a/stdlib/tst-realpath-toolong.c
-+++ b/stdlib/tst-realpath-toolong.c
-@@ -29,6 +29,10 @@
- 
- #define BASENAME "tst-realpath-toolong."
- 
-+#ifndef PATH_MAX
-+# define PATH_MAX 1024
-+#endif
-+
- int
- do_test (void)
- {
--- 
-2.27.0
-
meta/recipes-core/glibc/glibc/0001-CVE-2022-23218.patch deleted +0 -178

178 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0001-CVE-2022-23219.patch deleted +0 -55

55 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -79

79 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0001-localedef-Add-hardlink-resolver-from-util-linux.patch +1 -1
index 3ff485b1e3b..546fe582149 100644
@@ -1,4 +1,4 @@
-From d34ba0833cd811f8869a6262044af55f9e7b59d8 Mon Sep 17 00:00:00 2001
+From 8778429a3345bb5c0361332cf5103f394717a396 Mon Sep 17 00:00:00 2001
 From: Jason Wessel <[email protected]>
 Date: Sat, 7 Dec 2019 09:59:22 -0800
 Subject: [PATCH] localedef: Add hardlink resolver from util-linux
meta/recipes-core/glibc/glibc/0002-CVE-2021-38604.patch deleted +0 -150

150 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0002-CVE-2021-3998.patch deleted +0 -138

138 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0002-CVE-2021-3999.patch deleted +0 -357

357 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0002-CVE-2022-23218.patch deleted +0 -126

126 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0002-CVE-2022-23219.patch deleted +0 -89

89 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0002-localedef-fix-ups-hardlink-to-make-it-compile.patch +1 -1
index 2445aa56b34..94a05cf954d 100644
@@ -1,4 +1,4 @@
-From d7bb36a9a27e5e4c3be6378493b41286513750e9 Mon Sep 17 00:00:00 2001
+From 87a69126d97bb8d5d52e34e451b4a7076efd6bed Mon Sep 17 00:00:00 2001
 From: Jason Wessel <[email protected]>
 Date: Sat, 7 Dec 2019 10:01:37 -0800
 Subject: [PATCH] localedef: fix-ups hardlink to make it compile
meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch +4 -4
index 210cc1076c4..9a605078b93 100644
@@ -1,4 +1,4 @@
-From 776a53db6afba8a7ff4412aba88b0679227877f9 Mon Sep 17 00:00:00 2001
+From 752b0d32fc96728ee624dbd62bf23e034d8d2aed Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 01:48:24 +0000
 Subject: [PATCH] nativesdk-glibc: Look for host system ld.so.cache as well
@@ -30,10 +30,10 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index a08df001af..d09daf9e41 100644
+index 721593135e..39c4657fa2 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -2196,6 +2196,14 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2208,6 +2208,14 @@ _dl_map_object (struct link_map *loader, const char *name,
              }
          }
  
@@ -48,7 +48,7 @@ index a08df001af..d09daf9e41 100644
  #ifdef USE_LDCONFIG
        if (fd == -1
  	  && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2254,14 +2262,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2266,14 +2274,6 @@ _dl_map_object (struct link_map *loader, const char *name,
  	}
  #endif
  
meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch +3 -3
index 010b816e113..da288d6ccfc 100644
@@ -1,4 +1,4 @@
-From df18bae1eeee55ecb9db36d13fe67c58355682eb Mon Sep 17 00:00:00 2001
+From 2f7407697f2a905fedb98037152e7830f73bc6c6 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 01:50:00 +0000
 Subject: [PATCH] nativesdk-glibc: Fix buffer overrun with a relocated SDK
@@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 12 insertions(+)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index d09daf9e41..2c6270e2a7 100644
+index 39c4657fa2..daa3af6c51 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -1892,7 +1892,19 @@ open_path (const char *name, size_t namelen, int mode,
+@@ -1904,7 +1904,19 @@ open_path (const char *name, size_t namelen, int mode,
         given on the command line when rtld is run directly.  */
      return -1;
  
meta/recipes-core/glibc/glibc/0005-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch +9 -9
index bf9f3e36cac..14bcaf3ef9e 100644
@@ -1,4 +1,4 @@
-From 6af8ce8eceed86addbc188f773a2d36d83ee4042 Mon Sep 17 00:00:00 2001
+From 88a31cd08801df53249963f3b26c7dbcee6ae2f8 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 01:51:38 +0000
 Subject: [PATCH] nativesdk-glibc: Raise the size of arrays containing dl paths
@@ -41,10 +41,10 @@ index 2b8da8650d..3d9787bda4 100644
  _dl_cache_libcmp (const char *p1, const char *p2)
  {
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 2c6270e2a7..23018d2f7e 100644
+index daa3af6c51..e323952993 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -115,8 +115,8 @@ enum { ncapstr = 1, max_capstrlen = 0 };
+@@ -117,8 +117,8 @@ enum { ncapstr = 1, max_capstrlen = 0 };
     gen-trusted-dirs.awk.  */
  #include "trusted-dirs.h"
  
@@ -98,10 +98,10 @@ index 91966702ca..dc86c20e83 100644
 +const char __invoke_dynamic_linker__[4096] __attribute__ ((section (".interp")))
    = RUNTIME_LINKER;
 diff --git a/elf/ldconfig.c b/elf/ldconfig.c
-index 1037e8d0cf..ffdac84952 100644
+index 101d56ac8e..33debef60a 100644
 --- a/elf/ldconfig.c
 +++ b/elf/ldconfig.c
-@@ -177,6 +177,9 @@ static struct argp argp =
+@@ -176,6 +176,9 @@ static struct argp argp =
    options, parse_opt, NULL, doc, NULL, more_help, NULL
  };
  
@@ -112,10 +112,10 @@ index 1037e8d0cf..ffdac84952 100644
     a platform.  */
  static int
 diff --git a/elf/rtld.c b/elf/rtld.c
-index fbbd60b446..fce9940f80 100644
+index 4b09e84b0d..56d93ff616 100644
 --- a/elf/rtld.c
 +++ b/elf/rtld.c
-@@ -185,6 +185,7 @@ dso_name_valid_for_suid (const char *p)
+@@ -193,6 +193,7 @@ dso_name_valid_for_suid (const char *p)
      }
    return *p != '\0';
  }
@@ -124,10 +124,10 @@ index fbbd60b446..fce9940f80 100644
  static void
  audit_list_init (struct audit_list *list)
 diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
-index 62bee28769..67b60dc88c 100644
+index 077082af66..46b6152455 100644
 --- a/iconv/gconv_conf.c
 +++ b/iconv/gconv_conf.c
-@@ -36,7 +36,7 @@
+@@ -35,7 +35,7 @@
  #include <gconv_parseconfdir.h>
  
  /* This is the default path where we look for module lists.  */
meta/recipes-core/glibc/glibc/0006-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch +9 -5
index 3a37f7af722..493b2daad37 100644
@@ -1,4 +1,4 @@
-From b30f380cd88ae181a4a6a3a4784206ffe3ccd19b Mon Sep 17 00:00:00 2001
+From a1fbd7ef1da02f334ff72c52cb11116164649067 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Thu, 31 Dec 2015 14:35:35 -0800
 Subject: [PATCH] nativesdk-glibc: Allow 64 bit atomics for x86
@@ -13,14 +13,14 @@ Signed-off-by: Juro Bystricky <[email protected]>
 Signed-off-by: Richard Purdie <[email protected]>
 Signed-off-by: Khem Raj <[email protected]>
 ---
- sysdeps/x86/atomic-machine.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
+ sysdeps/x86/atomic-machine.h | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
 
 diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h
-index 695222e4fa..9d39bfdbd5 100644
+index 2692d94a92..9d39bfdbd5 100644
 --- a/sysdeps/x86/atomic-machine.h
 +++ b/sysdeps/x86/atomic-machine.h
-@@ -52,15 +52,14 @@ typedef uintmax_t uatomic_max_t;
+@@ -52,19 +52,14 @@ typedef uintmax_t uatomic_max_t;
  #define LOCK_PREFIX "lock;"
  
  #define USE_ATOMIC_COMPILER_BUILTINS	1
@@ -33,6 +33,10 @@ index 695222e4fa..9d39bfdbd5 100644
  # define BR_CONSTRAINT			"q"
  # define IBR_CONSTRAINT			"iq"
  #else
+-/* Since the Pentium, i386 CPUs have supported 64-bit atomics, but the
+-   i386 psABI supplement provides only 4-byte alignment for uint64_t
+-   inside structs, so it is currently not possible to use 64-bit
+-   atomics on this platform.  */
 -# define __HAVE_64B_ATOMICS		0
  # define SP_REG				"esp"
  # define SEG_REG			"gs"
meta/recipes-core/glibc/glibc/0007-nativesdk-glibc-Make-relocatable-install-for-locales.patch +8 -8
index d763178f213..b40d2bdef69 100644
@@ -1,4 +1,4 @@
-From 24bffe9c2645cd6542e29cb57786dc703cced07b Mon Sep 17 00:00:00 2001
+From bf1603b3d73f64de777be00f7e55f2cfef596102 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 3 Aug 2018 09:55:12 -0700
 Subject: [PATCH] nativesdk-glibc: Make relocatable install for locales
@@ -19,10 +19,10 @@ Signed-off-by: Khem Raj <[email protected]>
  4 files changed, 8 insertions(+), 7 deletions(-)
 
 diff --git a/locale/findlocale.c b/locale/findlocale.c
-index ab09122b0c..f42cc75780 100644
+index 5986373edd..856ba9afc0 100644
 --- a/locale/findlocale.c
 +++ b/locale/findlocale.c
-@@ -56,7 +56,7 @@ struct __locale_data *const _nl_C[] attribute_hidden =
+@@ -55,7 +55,7 @@ struct __locale_data *const _nl_C[] attribute_hidden =
     which are somehow addressed.  */
  struct loaded_l10nfile *_nl_locale_file_list[__LC_LAST];
  
@@ -31,7 +31,7 @@ index ab09122b0c..f42cc75780 100644
  
  /* Checks if the name is actually present, that is, not NULL and not
     empty.  */
-@@ -166,7 +166,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
+@@ -165,7 +165,7 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
  
        /* Nothing in the archive.  Set the default path to search below.  */
        locale_path = _nl_default_locale_path;
@@ -67,10 +67,10 @@ index b3d4da0185..22f9dc1140 100644
  /* Load the locale data for CATEGORY from the file specified by *NAME.
     If *NAME is "", use environment variables as specified by POSIX, and
 diff --git a/locale/programs/locale.c b/locale/programs/locale.c
-index ca0a95be99..6b98895203 100644
+index e9275d6b83..a9109155e5 100644
 --- a/locale/programs/locale.c
 +++ b/locale/programs/locale.c
-@@ -632,6 +632,7 @@ nameentcmp (const void *a, const void *b)
+@@ -631,6 +631,7 @@ nameentcmp (const void *a, const void *b)
  		  ((const struct nameent *) b)->name);
  }
  
@@ -78,7 +78,7 @@ index ca0a95be99..6b98895203 100644
  
  static int
  write_archive_locales (void **all_datap, char *linebuf)
-@@ -645,7 +646,7 @@ write_archive_locales (void **all_datap, char *linebuf)
+@@ -644,7 +645,7 @@ write_archive_locales (void **all_datap, char *linebuf)
    int fd, ret = 0;
    uint32_t cnt;
  
@@ -87,7 +87,7 @@ index ca0a95be99..6b98895203 100644
    if (fd < 0)
      return 0;
  
-@@ -700,8 +701,8 @@ write_archive_locales (void **all_datap, char *linebuf)
+@@ -699,8 +700,8 @@ write_archive_locales (void **all_datap, char *linebuf)
  	  if (cnt)
  	    putchar_unlocked ('\n');
  
meta/recipes-core/glibc/glibc/0008-nativesdk-glibc-Fall-back-to-faccessat-on-faccess2-r.patch +1 -1
index f4fc1d68c42..a47dd5331a5 100644
@@ -1,4 +1,4 @@
-From 2761400989bcbf11e10bc85f90c3a2ba1305c4ae Mon Sep 17 00:00:00 2001
+From 78b2e81940561069faf7698931a033784f794e40 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 6 Mar 2021 14:48:56 -0800
 Subject: [PATCH] nativesdk-glibc: Fall back to faccessat on faccess2 returns
meta/recipes-core/glibc/glibc/0009-yes-within-the-path-sets-wrong-config-variables.patch renamed from meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch +1 -1
similarity index 99%
rename from meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch
rename to meta/recipes-core/glibc/glibc/0009-yes-within-the-path-sets-wrong-config-variables.patch
index f7e7f1cd104..77644a2ee31 100644
@@ -1,4 +1,4 @@
-From 7be3e82b66394a7b242e56c6fc609e858b8e2436 Mon Sep 17 00:00:00 2001
+From f6e96a95212bc1fef57b9594a7dddc0c20639873 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 00:31:06 +0000
 Subject: [PATCH] 'yes' within the path sets wrong config variables
meta/recipes-core/glibc/glibc/0010-eglibc-Cross-building-and-testing-instructions.patch renamed from meta/recipes-core/glibc/glibc/0019-eglibc-Cross-building-and-testing-instructions.patch +1 -1
similarity index 99%
rename from meta/recipes-core/glibc/glibc/0019-eglibc-Cross-building-and-testing-instructions.patch
rename to meta/recipes-core/glibc/glibc/0010-eglibc-Cross-building-and-testing-instructions.patch
index 8fb9182d980..295fa315d89 100644
@@ -1,4 +1,4 @@
-From db9674ffc6583a508da1a3cb044c3ccf3febaea1 Mon Sep 17 00:00:00 2001
+From d6300e80c7c010fa7ca33e36e826151558cec498 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 00:42:58 +0000
 Subject: [PATCH] eglibc: Cross building and testing instructions
meta/recipes-core/glibc/glibc/0011-eglibc-Help-bootstrap-cross-toolchain.patch renamed from meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch +4 -4
similarity index 93%
rename from meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch
rename to meta/recipes-core/glibc/glibc/0011-eglibc-Help-bootstrap-cross-toolchain.patch
index 9b76cfd3b84..9e00da894db 100644
@@ -1,4 +1,4 @@
-From 7856684f76c100155cad11b5b236fb31234b6e28 Mon Sep 17 00:00:00 2001
+From 1c8044544d2cbdc529910a3ed6eba4b0ce7ae549 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 00:49:28 +0000
 Subject: [PATCH] eglibc: Help bootstrap cross toolchain
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <[email protected]>
  create mode 100644 include/stubs-bootstrap.h
 
 diff --git a/Makefile b/Makefile
-index f98d5a9e67..c36d04da0f 100644
+index a49870d3d1..81673d7645 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -79,9 +79,18 @@ subdir-dirs = include
@@ -52,7 +52,7 @@ index f98d5a9e67..c36d04da0f 100644
  ifeq (yes,$(build-shared))
  headers += gnu/lib-names.h
  endif
-@@ -415,6 +424,16 @@ others: $(common-objpfx)testrun.sh $(common-objpfx)debugglibc.sh
+@@ -420,6 +429,16 @@ others: $(common-objpfx)testrun.sh $(common-objpfx)debugglibc.sh
  
  subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
  
@@ -69,7 +69,7 @@ index f98d5a9e67..c36d04da0f 100644
  ifndef abi-variants
  installed-stubs = $(inst_includedir)/gnu/stubs.h
  else
-@@ -441,6 +460,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
+@@ -446,6 +465,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
  
  install-others-nosubdir: $(installed-stubs)
  endif
meta/recipes-core/glibc/glibc/0012-eglibc-Resolve-__fpscr_values-on-SH4.patch renamed from meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch +1 -1
similarity index 96%
rename from meta/recipes-core/glibc/glibc/0021-eglibc-Resolve-__fpscr_values-on-SH4.patch
rename to meta/recipes-core/glibc/glibc/0012-eglibc-Resolve-__fpscr_values-on-SH4.patch
index 74c8c10661f..03c81bfbd77 100644
@@ -1,4 +1,4 @@
-From 111ab95a85314d1e70fb159a14250354cc69d899 Mon Sep 17 00:00:00 2001
+From e5999ffd1b8690c2902a6406c07f51023a6bf7ec Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 00:55:53 +0000
 Subject: [PATCH] eglibc: Resolve __fpscr_values on SH4
meta/recipes-core/glibc/glibc/0013-eglibc-Forward-port-cross-locale-generation-support.patch renamed from meta/recipes-core/glibc/glibc/0022-eglibc-Forward-port-cross-locale-generation-support.patch +33 -33

233 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch renamed from meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch +5 -5
similarity index 90%
rename from meta/recipes-core/glibc/glibc/0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
rename to meta/recipes-core/glibc/glibc/0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch
index 50c2e147357..eae1ee89074 100644
@@ -1,4 +1,4 @@
-From 13bc0e53cc91e102472d532f28b3d44c30d291fc Mon Sep 17 00:00:00 2001
+From 32c2e23ad29f63f57f544daf1a59259147cd1008 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 3 Aug 2018 09:42:06 -0700
 Subject: [PATCH] localedef --add-to-archive uses a hard-coded locale path
@@ -18,10 +18,10 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 25 insertions(+), 10 deletions(-)
 
 diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
-index f38e835c52..8d8f8699b2 100644
+index 477499bd40..fe7b5ff60c 100644
 --- a/locale/programs/locarchive.c
 +++ b/locale/programs/locarchive.c
-@@ -340,12 +340,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
+@@ -339,12 +339,24 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
    struct namehashent *oldnamehashtab;
    struct locarhandle new_ah;
    size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
@@ -51,7 +51,7 @@ index f38e835c52..8d8f8699b2 100644
    strcpy (stpcpy (fname, archivefname), ".XXXXXX");
  
    /* Not all of the old file has to be mapped.  Change this now this
-@@ -569,10 +581,13 @@ open_archive (struct locarhandle *ah, bool readonly)
+@@ -568,10 +580,13 @@ open_archive (struct locarhandle *ah, bool readonly)
    /* If ah has a non-NULL fname open that otherwise open the default.  */
    if (archivefname == NULL)
      {
@@ -69,7 +69,7 @@ index f38e835c52..8d8f8699b2 100644
      }
  
    while (1)
-@@ -585,7 +600,7 @@ open_archive (struct locarhandle *ah, bool readonly)
+@@ -584,7 +599,7 @@ open_archive (struct locarhandle *ah, bool readonly)
  	     the default locale archive we ignore the failure and
  	     list an empty archive, otherwise we print an error
  	     and exit.  */
meta/recipes-core/glibc/glibc/0016-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch renamed from meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch +3 -3
similarity index 92%
rename from meta/recipes-core/glibc/glibc/0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
rename to meta/recipes-core/glibc/glibc/0016-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch
index 2bfa2aaa069..4e51036ce58 100644
@@ -1,4 +1,4 @@
-From 3190ada9ecaec915794886a608221655c120f90c Mon Sep 17 00:00:00 2001
+From c59bc6eb421ad3310c43951a11d2561bbf34e95e Mon Sep 17 00:00:00 2001
 From: Martin Jansa <[email protected]>
 Date: Mon, 17 Dec 2018 21:36:18 +0000
 Subject: [PATCH] locale: prevent maybe-uninitialized errors with -Os [BZ
@@ -33,10 +33,10 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 7 insertions(+)
 
 diff --git a/locale/weight.h b/locale/weight.h
-index 723e1fefda..f5798d379a 100644
+index 076529c0ba..2ac83657f7 100644
 --- a/locale/weight.h
 +++ b/locale/weight.h
-@@ -28,7 +28,14 @@ findidx (const int32_t *table,
+@@ -27,7 +27,14 @@ findidx (const int32_t *table,
  	 const unsigned char *extra,
  	 const unsigned char **cpp, size_t len)
  {
meta/recipes-core/glibc/glibc/0017-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch renamed from meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch +3 -3
similarity index 82%
rename from meta/recipes-core/glibc/glibc/0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
rename to meta/recipes-core/glibc/glibc/0017-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index 8042caaeae9..77a2bab87db 100644
@@ -1,4 +1,4 @@
-From 5d201a75918a0e181ee6206f701901fdb91baf81 Mon Sep 17 00:00:00 2001
+From 9f4fcec5662bfa6f8aa6a36dda6f4c05f6e30e51 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 00:11:22 +0000
 Subject: [PATCH] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known names
@@ -16,10 +16,10 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 1 insertion(+)
 
 diff --git a/elf/readlib.c b/elf/readlib.c
-index 7383c23249..e97ea9449d 100644
+index 64b20d7804..50318158fb 100644
 --- a/elf/readlib.c
 +++ b/elf/readlib.c
-@@ -51,6 +51,7 @@ static struct known_names interpreters[] =
+@@ -49,6 +49,7 @@ static struct known_names interpreters[] =
  #ifdef SYSDEP_KNOWN_INTERPRETER_NAMES
    SYSDEP_KNOWN_INTERPRETER_NAMES
  #endif
meta/recipes-core/glibc/glibc/0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch renamed from meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch +15 -4
similarity index 78%
rename from meta/recipes-core/glibc/glibc/0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
rename to meta/recipes-core/glibc/glibc/0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch
index ece792509ee..63f7749ecbd 100644
@@ -1,7 +1,7 @@
-From baba3c6021340a9070b734f931a15cea4cfe6c31 Mon Sep 17 00:00:00 2001
+From 4d6bce6b106d9d9a629aadba74d74cd8a500ccbf Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 15 May 2020 17:05:45 -0700
-Subject: [PATCH] wordsize.h: Unify the header between arm and aarch64
+Subject: [PATCH 18/24] wordsize.h: Unify the header between arm and aarch64
 
 This helps OE multilibs to not sythesize this header which causes all
 kind of recursions and other issues since wordsize is fundamental header
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <[email protected]>
  copy sysdeps/{aarch64 => arm}/bits/wordsize.h (80%)
 
 diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/aarch64/bits/wordsize.h
-index 91da566b74..9a754514b3 100644
+index 4635431f0e..5ef0ed21f3 100644
 --- a/sysdeps/aarch64/bits/wordsize.h
 +++ b/sysdeps/aarch64/bits/wordsize.h
 @@ -17,12 +17,16 @@
@@ -43,9 +43,17 @@ diff --git a/sysdeps/aarch64/bits/wordsize.h b/sysdeps/arm/bits/wordsize.h
 similarity index 80%
 copy from sysdeps/aarch64/bits/wordsize.h
 copy to sysdeps/arm/bits/wordsize.h
-index 91da566b74..34fcdef1f1 100644
+index 4635431f0e..34fcdef1f1 100644
 --- a/sysdeps/aarch64/bits/wordsize.h
 +++ b/sysdeps/arm/bits/wordsize.h
+@@ -1,6 +1,6 @@
+ /* Determine the wordsize from the preprocessor defines.
+ 
+-   Copyright (C) 2016-2022 Free Software Foundation, Inc.
++   Copyright (C) 2016-2020 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
 @@ -17,12 +17,16 @@
     License along with the GNU C Library; if not, see
     <https://www.gnu.org/licenses/>.  */
@@ -65,3 +73,6 @@ index 91da566b74..34fcdef1f1 100644
  #endif
  
  #define __WORDSIZE_TIME64_COMPAT32	0
+-- 
+2.34.1
+
meta/recipes-core/glibc/glibc/0019-powerpc-Do-not-ask-compiler-for-finding-arch.patch renamed from meta/recipes-core/glibc/glibc/0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch +1 -1
similarity index 96%
rename from meta/recipes-core/glibc/glibc/0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch
rename to meta/recipes-core/glibc/glibc/0019-powerpc-Do-not-ask-compiler-for-finding-arch.patch
index 22df820aedf..4313c6860fc 100644
@@ -1,4 +1,4 @@
-From 60aa53f547911163b42a1c436d695a15c87f34ee Mon Sep 17 00:00:00 2001
+From eb44466ec976d800bb697b10775efa28f22ec216 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Fri, 7 Aug 2020 14:31:16 -0700
 Subject: [PATCH] powerpc: Do not ask compiler for finding arch
meta/recipes-core/glibc/glibc/0021-Replace-echo-with-printf-builtin-in-nscd-init-script.patch renamed from meta/recipes-core/glibc/glibc/0018-Remove-bash-dependency-for-nscd-init-script.patch +27 -20

94 lines not on this page · raw message

meta/recipes-core/glibc/glibc/0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch renamed from meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch +8 -8
similarity index 61%
rename from meta/recipes-core/glibc/glibc/0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
rename to meta/recipes-core/glibc/glibc/0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch
index 1b99af7110d..5ac9d6d3a13 100644
@@ -1,11 +1,11 @@
-From b4613f814ba7ba5db95d18116172f81a83ac8f5b Mon Sep 17 00:00:00 2001
+From 5d1384d86fc44404ca32c6fda2d46ec357337c91 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH] sysdeps/gnu/configure.ac: handle correctly
- $libc_cv_rootsbindir
+Subject: [PATCH] sysdeps/gnu/configure.ac: Set libc_cv_rootsbindir only if its empty
 
-Upstream-Status: Pending
+This ensures that it can be set in build environment
 
+Upstream-Status: Submitted [https://patchwork.sourceware.org/project/glibc/patch/[email protected]/]
 Signed-off-by: Matthieu Crapet <[email protected]>
 Signed-off-by: Khem Raj <[email protected]>
 ---
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <[email protected]>
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
-index c15d1087e8..37cc983f2a 100644
+index c15d1087e8..d30d6e37ae 100644
 --- a/sysdeps/gnu/configure
 +++ b/sysdeps/gnu/configure
 @@ -32,6 +32,6 @@ case "$prefix" in
@@ -22,11 +22,11 @@ index c15d1087e8..37cc983f2a 100644
      libc_cv_localstatedir=$localstatedir
     fi
 -  libc_cv_rootsbindir=/sbin
-+  test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
++  libc_cv_rootsbindir=${libc_cv_rootsbindir:=/sbin}
    ;;
  esac
 diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac
-index 634fe4de2a..3db1697f4f 100644
+index 634fe4de2a..492112e0fd 100644
 --- a/sysdeps/gnu/configure.ac
 +++ b/sysdeps/gnu/configure.ac
 @@ -21,6 +21,6 @@ case "$prefix" in
@@ -34,6 +34,6 @@ index 634fe4de2a..3db1697f4f 100644
      libc_cv_localstatedir=$localstatedir
     fi
 -  libc_cv_rootsbindir=/sbin
-+  test -n "$libc_cv_rootsbindir" || libc_cv_rootsbindir=/sbin
++  libc_cv_rootsbindir=${libc_cv_rootsbindir:=/sbin}
    ;;
  esac
meta/recipes-core/glibc/glibc/0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch renamed from meta/recipes-core/glibc/glibc/0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch +4 -7
similarity index 86%
rename from meta/recipes-core/glibc/glibc/0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch
rename to meta/recipes-core/glibc/glibc/0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch
index 0480c47b498..e5e6ceba60c 100644
@@ -1,7 +1,7 @@
-From 76d170fbbfd07b26a0288212201e5d15558db36f Mon Sep 17 00:00:00 2001
+From c0f251c58655e3377fe1c67a026c21ef68d2abcf Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Thu, 9 Dec 2021 15:14:42 -0800
-Subject: [PATCH] Make shell interpreter overridable in tzselect.ksh
+Subject: [PATCH] timezone: Make shell interpreter overridable in tzselect.ksh
 
 define new macro called KSHELL which can be used to define default shell
 use Bash by default
@@ -14,10 +14,10 @@ Signed-off-by: Khem Raj <[email protected]>
  2 files changed, 10 insertions(+)
 
 diff --git a/Makeconfig b/Makeconfig
-index 3fa2f13003..a1ea5d5571 100644
+index 775bf12b65..7b9a8f0a94 100644
 --- a/Makeconfig
 +++ b/Makeconfig
-@@ -292,6 +292,15 @@ ifndef sysincludedir
+@@ -293,6 +293,15 @@ ifndef sysincludedir
  sysincludedir = /usr/include
  endif
  
@@ -45,6 +45,3 @@ index c624a189b3..dc8f5277de 100644
  	    < $< > [email protected]
  	chmod 555 [email protected]
  	mv -f [email protected] $@
--- 
-2.34.1
-
meta/recipes-core/glibc/glibc/0026-intl-Emit-no-lines-in-bison-generated-files.patch deleted +0 -31
deleted file mode 100644
index 998db39b47c..00000000000
@@ -1,31 +0,0 @@
-From 99ab34278a6ebec134267412b4f619f43e278dea Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 3 Aug 2018 09:44:00 -0700
-Subject: [PATCH] intl: Emit no lines in bison generated files
-
-Improve reproducibility:
-Do not put any #line preprocessor commands in bison generated files.
-These lines contain absolute paths containing file locations on
-the host build machine.
-
-Upstream-Status: Pending
-
-Signed-off-by: Juro Bystricky <[email protected]>
-Signed-off-by: Khem Raj <[email protected]>
----
- intl/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/intl/Makefile b/intl/Makefile
-index 93478d87e8..b27a7935eb 100644
---- a/intl/Makefile
-+++ b/intl/Makefile
-@@ -155,7 +155,7 @@ $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
- 
- CPPFLAGS += -D'LOCALEDIR="$(localedir)"' \
- 	    -D'LOCALE_ALIAS_PATH="$(localedir)"'
--BISONFLAGS = --yacc --name-prefix=__gettext --output
-+BISONFLAGS = --yacc --no-lines --name-prefix=__gettext --output
- 
- $(inst_localedir)/locale.alias: locale.alias $(+force)
- 	$(do-install)
meta/recipes-core/glibc/glibc/CVE-2021-43396.patch deleted +0 -184

184 lines not on this page · raw message

meta/recipes-core/glibc/glibc_2.35.bb renamed from meta/recipes-core/glibc/glibc_2.34.bb +13 -26
similarity index 73%
rename from meta/recipes-core/glibc/glibc_2.34.bb
rename to meta/recipes-core/glibc/glibc_2.35.bb
index 67464d6ce0c..2903a4001fd 100644
@@ -34,32 +34,19 @@ SRC_URI =  "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
            file://makedbs.sh \
            \
            ${NATIVESDKFIXES} \
-           file://0015-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
-           file://0016-yes-within-the-path-sets-wrong-config-variables.patch \
-           file://0018-Remove-bash-dependency-for-nscd-init-script.patch \
-           file://0019-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0021-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0022-eglibc-Forward-port-cross-locale-generation-support.patch \
-           file://0024-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
-           file://0026-intl-Emit-no-lines-in-bison-generated-files.patch \
-           file://0027-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
-           file://0028-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
-           file://0029-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
-           file://0030-powerpc-Do-not-ask-compiler-for-finding-arch.patch \
-           file://0001-CVE-2021-38604.patch \
-           file://0002-CVE-2021-38604.patch \
-           file://0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch \
-           file://CVE-2021-43396.patch \
-           file://0001-Make-shell-interpreter-overridable-in-tzselect.ksh.patch \
-           file://0001-CVE-2022-23218.patch \
-           file://0002-CVE-2022-23218.patch \
-           file://0001-CVE-2022-23219.patch \
-           file://0002-CVE-2022-23219.patch \
-           file://0001-CVE-2021-3998.patch \
-           file://0002-CVE-2021-3998.patch \
-           file://0001-CVE-2021-3999.patch \
-           file://0002-CVE-2021-3999.patch \
+           file://0009-yes-within-the-path-sets-wrong-config-variables.patch \
+           file://0010-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0011-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0012-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0013-eglibc-Forward-port-cross-locale-generation-support.patch \
+           file://0014-localedef-add-to-archive-uses-a-hard-coded-locale-pa.patch \
+           file://0016-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \
+           file://0017-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+           file://0018-wordsize.h-Unify-the-header-between-arm-and-aarch64.patch \
+           file://0019-powerpc-Do-not-ask-compiler-for-finding-arch.patch \
+           file://0021-Replace-echo-with-printf-builtin-in-nscd-init-script.patch \
+           file://0022-sysdeps-gnu-configure.ac-Set-libc_cv_rootsbindir-onl.patch \
+           file://0023-timezone-Make-shell-interpreter-overridable-in-tzsel.patch \
            "
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.35.1
author
#1 lore raw

PATCH v3 2/3 meta: Remove libsegfault and catchsegv

Glibc has dropped them starting with 2.35 see [1]

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=65ccd641bacea33be23d51da737c2de7543d0f5e

---
 meta/conf/distro/include/tclibc-glibc.inc | 2 +-
 meta/recipes-core/glibc/glibc-package.inc | 5 +----
 meta/recipes-core/musl/musl_git.bb        | 2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)
meta/conf/distro/include/tclibc-glibc.inc +1 -1
index 32464909972..f4855dce111 100644
@@ -16,7 +16,7 @@ PREFERRED_PROVIDER_virtual/libc-locale ?= "glibc-locale"
 
 CXXFLAGS += "-fvisibility-inlines-hidden"
 
-LIBC_DEPENDENCIES = "libsegfault \
+LIBC_DEPENDENCIES = "\
 		     glibc \
 		     glibc-dbg \
 		     glibc-dev \
meta/recipes-core/glibc/glibc-package.inc +1 -4
index ca9d6e0531e..b8095f25158 100644
@@ -1,6 +1,6 @@
 INHIBIT_SYSROOT_STRIP = "1"
 
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldconfig ldd ldso tzcode glibc-thread-db ${PN}-pic libmemusage malloc-debug libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src"
+PACKAGES = "${PN}-dbg sln nscd ldconfig ldd ldso tzcode glibc-thread-db ${PN}-pic libmemusage malloc-debug libnss-db ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}-src"
 
 # The ld.so in this glibc supports the GNU_HASH
 RPROVIDES:${PN} = "eglibc rtld(GNU_HASH)"
@@ -29,7 +29,6 @@ FILES:${PN} = "${libc_baselibs} ${libexecdir}/* ${sysconfdir}/ld.so.conf"
 RRECOMMENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)}"
 FILES:ldconfig = "${base_sbindir}/ldconfig"
 FILES:ldd = "${bindir}/ldd"
-FILES:libsegfault = "${base_libdir}/libSegFault*"
 FILES:ldso = "${bindir}/ld.so"
 FILES:libmemusage = "${base_libdir}/libmemusage.so"
 FILES:malloc-debug = "${base_libdir}/libc_malloc_debug.so.0"
@@ -48,8 +47,6 @@ FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_system_unitdi
 FILES:${PN}-mtrace = "${bindir}/mtrace"
 FILES:tzcode = "${bindir}/tzselect ${sbindir}/zic ${bindir}/zdump"
 FILES:${PN}-utils = "${bindir}/* ${sbindir}/*"
-FILES:catchsegv = "${bindir}/catchsegv"
-RDEPENDS:catchsegv = "libsegfault"
 FILES:${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
 FILES:glibc-thread-db = "${base_libdir}/libthread_db.so.* ${base_libdir}/libthread_db-*.so"
 RPROVIDES:${PN}-dev += "libc-dev"
meta/recipes-core/musl/musl_git.bb +1 -1
index 34f4c1e98d6..1e33ad5317b 100644
@@ -78,7 +78,7 @@ FILES:${PN}-dev =+ "${libdir}/libcrypt.a ${libdir}/libdl.a ${libdir}/libm.a \
 
 RDEPENDS:${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev"
 RPROVIDES:${PN}-dev += "libc-dev virtual-libc-dev"
-RPROVIDES:${PN} += "ldd libsegfault rtld(GNU_HASH)"
+RPROVIDES:${PN} += "ldd rtld(GNU_HASH)"
 
 LEAD_SONAME = "libc.so"
 INSANE_SKIP:${PN}-dev = "staticdev"
Signature · 1 line
2.35.1
author
#2 lore raw

PATCH v3 3/3 perl: Help resolving WNOHANG and _exit in Posix module

In reply to Khem Raj
---
 ...01-ipc-force-POSIX-WNOHANG-resolving.patch | 57 +++++++++++++++++++
 meta/recipes-devtools/perl/perl_5.34.0.bb     |  1 +
 2 files changed, 58 insertions(+)
 create mode 100644 meta/recipes-devtools/perl/files/0001-ipc-force-POSIX-WNOHANG-resolving.patch
meta/recipes-devtools/perl/files/0001-ipc-force-POSIX-WNOHANG-resolving.patch new file +57 -0
new file mode 100644
index 00000000000..9f8cbd8ad82
@@ -0,0 +1,57 @@
+From 0d8c411ef7e8b4452007c77eee3d83d227b86bb4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 8 Feb 2022 14:05:22 -0800
+Subject: [PATCH] ipc: force POSIX::WNOHANG resolving
+
+It seems POSIX module is special and may not have autovivified (resolved) WNOHANG.
+see [1]
+
+Fixes
+ Bareword "POSIX::WNOHANG" not allowed while "strict subs"
+
+[1] https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/78eb0e39454ab3ca8e7ef77f1d014b50b3632fb9
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ lib/IPC/Cmd.pm | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/IPC/Cmd.pm b/lib/IPC/Cmd.pm
+index 88ed295..ccdf343 100644
+--- a/lib/IPC/Cmd.pm
++++ b/lib/IPC/Cmd.pm
+@@ -499,7 +499,7 @@ sub kill_gently {
+         next;
+     }
+ 
+-    my $waitpid = waitpid($pid, POSIX::WNOHANG);
++    my $waitpid = waitpid($pid, POSIX::WNOHANG());
+ 
+     if ($waitpid eq -1) {
+         $child_finished = 1;
+@@ -619,10 +619,10 @@ sub open3_run {
+           #
+           kill(-9, $$);
+ 
+-          POSIX::_exit 1;
++          POSIX::_exit(1);
+         }
+ 
+-        my $waitpid = waitpid($pid, POSIX::WNOHANG);
++        my $waitpid = waitpid($pid, POSIX::WNOHANG());
+ 
+         # child finished, catch it's exit status
+         if ($waitpid ne 0 && $waitpid ne -1) {
+@@ -1005,7 +1005,7 @@ sub run_forked {
+           $child_finished = 1;
+         }
+ 
+-        my $waitpid = waitpid($pid, POSIX::WNOHANG);
++        my $waitpid = waitpid($pid, POSIX::WNOHANG());
+ 
+         # child finished, catch it's exit status
+         if ($waitpid ne 0 && $waitpid ne -1) {
+-- 
+2.35.1
+
meta/recipes-devtools/perl/perl_5.34.0.bb +1 -0
index e4bcfe3ce69..48d755744fe 100644
@@ -20,6 +20,7 @@ SRC_URI = "https://www.cpan.org/src/5.0/perl-${PV}.tar.gz;name=perl \
            file://aacd2398e766500cb5d83c4d76b642fcf31d997a.patch \
            file://ea57297a58b8f10ab885c19eec48ea076116cc1f.patch \
            file://5bc1e5fdd87aa205011512cd1e6cc655bcf677fd.patch \
+           file://0001-ipc-force-POSIX-WNOHANG-resolving.patch \
            "
 SRC_URI:append:class-native = " \
            file://perl-configpm-switch.patch \
Signature · 1 line
2.35.1
#3 lore raw
In reply to Khem Raj
Quoted 9 lines · Khem Raj

From: Richard Purdie <[email protected]>

Package /usr/bin/ld.so in a separate package

ld.so is a new tool which is added as a symlink to original dynamic linker so make it available with same name across architectures which is useful to leveral features like --preload, --audit, and --list-diagnostics more accessible to end users

There is still a QA error with this for multilib:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/4735/steps/11/logs/stdio

Cheers,

Richard

author
#4 lore raw
Quoted 12 lines · Richard Purdie
Quoted 9 lines · Khem Raj

From: Richard Purdie <[email protected]>

Package /usr/bin/ld.so in a separate package

ld.so is a new tool which is added as a symlink to original dynamic linker so make it available with same name across architectures which is useful to leveral features like --preload, --audit, and --list-diagnostics more accessible to end users

Quoted 4 lines

There is still a QA error with this for multilib:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/4735/steps/11/logs/stdio

yeah, I think I needed to add multilib prefix and also rename the symlink so they can coexist.
I have made this change and pushed the update to kraj/poky-next

Quoted 7 lines

Cheers,

Richard

#5 lore raw
In reply to Khem Raj

On 2/9/22 06:53, Khem Raj wrote:

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -21
deleted file mode 100644
index 3283dd7ad8a..00000000000
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]><mailto:[email protected]>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged process [BZ #28287]
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and clone3]
-applied, start a unprivileged container (docker run without --privileged),
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is defined.  If
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.
-
-As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html
-
-So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could
-fix the issue. Here are the test steps:
-

Hi RP,

I found this local patch was removed from glibc, we have to get it back and regenerate uninative to avoid the thread creation failure in unprivileged container

//Hongxu

#6 lore raw
Quoted 36 lines · Hongxu
Quoted 23 lines · Khem Raj
(quoted diff) +0 -0

unprivileged-process-BZ-.patch b/meta/recipes-core/glibc/glibc/0001-fix- create-thread-failed-in-unprivileged-process-BZ-.patch deleted file mode 100644
index 3283dd7ad8a..00000000000
--- a/meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in- unprivileged-process-BZ-.patch
+++ /dev/null

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -4
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged process [BZ

#28287]

(quoted diff) +0 -2
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and

clone3]

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -4
-applied, start a unprivileged container (docker run without --privileged),
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is defined. 

If

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -1
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch line 21

Quoted 10 lines
meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -10
-
-As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html
-
-So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could
-fix the issue. Here are the test steps:
-

Hi RP,

Quoted 3 lines

I found this local patch was removed from glibc, we have to get it back and regenerate uninative to avoid the thread creation failure in  unprivileged container

Sorry about that. Assuming Khem agrees, could you send a patch to add it back please? I'll then try and sort out a new uninative release.

I wish we had better sanity testing :/.

Thanks,

Richard

author
#7 lore raw
In reply to Jia, Hongxu
Quoted 31 lines · Hongxu

On 2/9/22 06:53, Khem Raj wrote:

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -21
deleted file mode 100644
index 3283dd7ad8a..00000000000
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged process [BZ #28287]
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and clone3]
-applied, start a unprivileged container (docker run without --privileged),
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is defined.  If
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.
-
-As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html
-
-So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could
-fix the issue. Here are the test steps:
-
Quoted 5 lines

Hi RP,

I found this local patch was removed from glibc, we have to get it back and regenerate uninative to avoid the thread creation failure in unprivileged container

I intentionally dropped it since upstream glibc will not accept this patch since its not glibc problem but
rather container runtime problem. Can you investigate that path before we reapply it. Maintaining a rejected patch is last thing we want to do.

Quoted 2 lines

//Hongxu

#8 lore raw

Hi khem,

Upstream glibc reject it because the latest docker has supported it[1], and upstream glibc does not backward compatibility with old docker[2]

In order to build Yocto with uninative in old docker, we need this local patch

[1] https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594
[https://opengraph.githubassets.com/39826b3fbb1d3173df4f3f7c60083a77b78982520c3e85e8308a1d94b902de16/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594]<https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594>
seccomp: add support for "clone3" syscall in default policy · moby/moby@9f6b562<https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594>
If no seccomp policy is requested, then the built-in default policy in dockerd applies. This has no rule for &quot;clone3&quot; defined, nor any default errno defined. So when runc receives the con... github.com

[2]https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html

//Hongxu
________________________________
From: Khem Raj <[email protected]>
Sent: Wednesday, February 16, 2022 12:17 AM
To: Jia, Hongxu <[email protected]>
Cc: [email protected] <[email protected]>; Richard Purdie <[email protected]>
Subject: Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC)

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 31 lines · Hongxu

On 2/9/22 06:53, Khem Raj wrote:

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -21
deleted file mode 100644
index 3283dd7ad8a..00000000000
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged process [BZ #28287]
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and clone3]
-applied, start a unprivileged container (docker run without --privileged),
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is defined.  If
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.
-
-As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html
-
-So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could
-fix the issue. Here are the test steps:
-
Quoted 5 lines

Hi RP,

I found this local patch was removed from glibc, we have to get it back and regenerate uninative to avoid the thread creation failure in unprivileged container

I intentionally dropped it since upstream glibc will not accept this patch since its not glibc problem but
rather container runtime problem. Can you investigate that path before we reapply it. Maintaining a rejected patch is last thing we want to do.

Quoted 2 lines

//Hongxu

author
#9 lore raw
Quoted 8 lines · Hongxu

Hi khem,

Upstream glibc reject it because the latest docker has supported it[1], and upstream glibc does not backward compatibility with old docker[2]

In order to build Yocto with uninative in old docker, we need this local patch

How old is the docker and I assume
It’s some distribution needing it ?

Quoted 86 lines

[1]
https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594

<https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594>
seccomp: add support for "clone3" syscall in default policy · moby/moby@9f6b562
<https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594>
If no seccomp policy is requested, then the built-in default policy in dockerd applies. This has no rule for &quot;clone3&quot; defined, nor any default errno defined. So when runc receives the con... github.com
**

[2]https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html

//Hongxu
------------------------------
*From:* Khem Raj <[email protected]>
*Sent:* Wednesday, February 16, 2022 12:17 AM
*To:* Jia, Hongxu <[email protected]>
*Cc:* [email protected] < [email protected]>; Richard Purdie < [email protected]>
*Subject:* Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC)

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 4 lines · Hongxu

On 2/9/22 06:53, Khem Raj wrote:

diff --git

a/meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch b/meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch

Quoted 3 lines

deleted file mode 100644
index 3283dd7ad8a..00000000000
---

a/meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch line 4

Quoted 6 lines

+++ /dev/null

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -4
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged process [BZ

#28287]

Review line 6

Quoted 2 lines
(quoted diff) +0 -2
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and

clone3]

Review line 7

Quoted 1 line
(quoted diff) +0 -1
-applied, start a unprivileged container (docker run without

--privileged),

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch

Quoted 3 lines
meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -3
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is

defined. If

Quoted 12 lines
meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -11
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.
-
-As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html
-
-So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could
-fix the issue. Here are the test steps:
-
Quoted 4 lines

Hi RP,

I found this local patch was removed from glibc, we have to get it back

and regenerate uninative to avoid the thread creation failure in unprivileged container

Quoted 1 line

I intentionally dropped it since upstream glibc will not accept this patch since its not glibc problem but
rather container runtime problem. Can you investigate that path before we reapply it. Maintaining a rejected patch is last thing we want to do.

Quoted 2 lines

//Hongxu

#10 lore raw

From upstream docker github [1]

The issue was found in 20.10.7, the the fix was merged in v20.10.10-rc1 [2] From docker release notes, it was published in version 20.10.10 at 2021-10-25[3]

In ubuntu 20.04.2, the docker version is 20.10.7 (20.10.7-0ubuntu1~20.04.2) [4],

From [5], Ubuntu 21.10 and Fedora 35 has the issue

[1] https://github.com/moby/moby/issues/42680
[https://opengraph.githubassets.com/a41091aebf5cd0f5794a29a43ef7a6208fa5df0cd2824ada79ffc1b7fb467028/moby/moby/issues/42680]<https://github.com/moby/moby/issues/42680>
seccomp filter breaks latest glibc (in fedora rawhide) by blocking clone3 with EPERM · Issue #42680 · moby/moby · GitHub<https://github.com/moby/moby/issues/42680>
Client: Version: 20.10.7 API version: 1.41 Go version: go1.16.6 Git commit: f0df350 Built: Mon Jul 26 16:34:29 2021 OS/Arch: linux/amd64 Context: default Experimental ... github.com

[2] https://github.com/moby/moby/commit/6835d15f5523063f0a04a86d4810a637c6010d62
[https://opengraph.githubassets.com/232bea6d1440bb915cda2ac46a719e5ee82b3efe10f8d273c2e772d9c12759ad/moby/moby/commit/6835d15f5523063f0a04a86d4810a637c6010d62]<https://github.com/moby/moby/commit/6835d15f5523063f0a04a86d4810a637c6010d62>
[20.10] update containerd binary to v1.4.10 · moby/moby@6835d15<https://github.com/moby/moby/commit/6835d15f5523063f0a04a86d4810a637c6010d62>
- Update runc to v1.0.2 - Update hcsshim to v0.8.21 - Support &quot;clone3&quot; in default seccomp profile - Fix panic in metadata content writer on copy error Signed-off-by: Sebastiaan van Stijn... github.com

[3] https://docs.docker.com/engine/release-notes/#201010
Docker Engine release notes - Docker Documentation<https://docs.docker.com/engine/release-notes/#201010>
Docker Engine release notes. This document describes the latest changes, additions, known issues, and fixes for Docker Engine. Note: The client and container runtime are now in separate packages from the daemon in Docker Engine 18.09. Users should install and update all three packages at the same time to get the latest patch releases. docs.docker.com

[4] https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1948361
Bug #1948361 “docker.io - error adding seccomp filter rule for s... : Bugs : docker.io package : Ubuntu<https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1948361>
Encountered the following error using the docker.io package in focal-proposed running the autotest-client-test/ubuntu_performance_deep_learning test. "docker: Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall clone3: permission denied: unknown." This test essentially pulls down a nvidia tensorflow docker container, runs the container and triggers the preloaded ... bugs.launchpad.net

[5] https://pascalroeleven.nl/2021/09/09/ubuntu-21-10-and-fedora-35-in-docker/
Ubuntu 21.10 and Fedora 35 in Docker – Pascal Roeleven<https://pascalroeleven.nl/2021/09/09/ubuntu-21-10-and-fedora-35-in-docker/>
Here I am, back again with another post which I think the internet needs. It took me days to figure it out and I can’t imagine there aren’t more people who are running into the same issue. pascalroeleven.nl

//Hongxu
________________________________
From: Khem Raj <[email protected]>
Sent: Wednesday, February 16, 2022 12:08 PM
To: Jia, Hongxu <[email protected]>
Cc: Richard Purdie <[email protected]>; [email protected] <[email protected]>
Subject: Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC)

[Please note: This e-mail is from an EXTERNAL e-mail address]

On Tue, Feb 15, 2022 at 6:28 PM Jia, Hongxu <[email protected]<mailto:[email protected]>> wrote:
Hi khem,

Upstream glibc reject it because the latest docker has supported it[1], and upstream glibc does not backward compatibility with old docker[2]

In order to build Yocto with uninative in old docker, we need this local patch

How old is the docker and I assume
It’s some distribution needing it ?

[1] https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594<https://urldefense.com/v3/__https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u16jFNv8$>
[X]<https://urldefense.com/v3/__https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u16jFNv8$>
seccomp: add support for "clone3" syscall in default policy · moby/moby@9f6b562<https://urldefense.com/v3/__https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u16jFNv8$> If no seccomp policy is requested, then the built-in default policy in dockerd applies. This has no rule for &quot;clone3&quot; defined, nor any default errno defined. So when runc receives the con... github.com<https://urldefense.com/v3/__http://github.com__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u_GA6nFS$>

[2]https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html<https://urldefense.com/v3/__https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u54oSjL_$>

//Hongxu
________________________________
From: Khem Raj <[email protected]<mailto:[email protected]>>
Sent: Wednesday, February 16, 2022 12:17 AM
To: Jia, Hongxu <[email protected]<mailto:[email protected]>>
Cc: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Richard Purdie <[email protected]<mailto:[email protected]>>
Subject: Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC)

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 31 lines · On Tue, Feb 15, 2022 at 12:25 AM Jia, Hongxu…

On 2/9/22 06:53, Khem Raj wrote:

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -21
deleted file mode 100644
index 3283dd7ad8a..00000000000
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]<mailto:[email protected]>>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged process [BZ #28287]
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and clone3]
-applied, start a unprivileged container (docker run without --privileged),
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is defined.  If
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.
-
-As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html<https://urldefense.com/v3/__https://man7.org/linux/man-pages/man2/clone3.2.html__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u3AyFyV8$>
-
-So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could
-fix the issue. Here are the test steps:
-
Quoted 5 lines

Hi RP,

I found this local patch was removed from glibc, we have to get it back and regenerate uninative to avoid the thread creation failure in unprivileged container

I intentionally dropped it since upstream glibc will not accept this patch since its not glibc problem but
rather container runtime problem. Can you investigate that path before we reapply it. Maintaining a rejected patch is last thing we want to do.

Quoted 2 lines

//Hongxu

#11 lore raw

Ubuntu patched their docker.io package shortly after upgrading to glibc-2.34 in Ubuntu-21.10, see:
http://changelogs.ubuntu.com/changelogs/pool/universe/d/docker.io/docker.io_20.10.7-0ubuntu5~20.04.2/changelog

docker.io (20.10.7-0ubuntu4) impish; urgency=medium

* d/p/seccomp-add-support-for-clone3-syscall-in-default-policy.patch: Fix failure with new glibc clone3 syscall adding it to the default seccomp policy (LP: #1943049).

-- Lucas Kanashiro <[email protected]> Fri, 10 Sep 2021 15:34:38 -0300

AFAIK Ubuntu isn't affected anymore, I've updated
https://bugzilla.yoctoproject.org/show_bug.cgi?id=1711 and I'm fine with dropping the patch now (it was useful before, but now distributions had enough time to prepare for 2.34 changes).

Quoted 200 lines · hongxu

From upstream docker github [1]

The issue was found in 20.10.7, the the fix was merged in v20.10.10-rc1
[2]
From docker release notes, it was published in version 20.10.10 at 2021-10-25[3]

In ubuntu 20.04.2, the docker version is 20.10.7 (20.10.7-0ubuntu1~ 20.04.2) [4],

From [5], Ubuntu 21.10 and Fedora 35 has the issue

[1] https://github.com/moby/moby/issues/42680
<https://github.com/moby/moby/issues/42680>
seccomp filter breaks latest glibc (in fedora rawhide) by blocking clone3 with EPERM · Issue #42680 · moby/moby · GitHub
<https://github.com/moby/moby/issues/42680>
Client: Version: 20.10.7 API version: 1.41 Go version: go1.16.6 Git
commit: f0df350 Built: Mon Jul 26 16:34:29 2021 OS/Arch: linux/amd64
Context: default Experimental ...
github.com
**
[2]
https://github.com/moby/moby/commit/6835d15f5523063f0a04a86d4810a637c6010d62

<https://github.com/moby/moby/commit/6835d15f5523063f0a04a86d4810a637c6010d62>
[20.10] update containerd binary to v1.4.10 · moby/moby@6835d15
<https://github.com/moby/moby/commit/6835d15f5523063f0a04a86d4810a637c6010d62>
- Update runc to v1.0.2 - Update hcsshim to v0.8.21 - Support &quot;clone3&quot; in default seccomp profile - Fix panic in metadata content writer on copy error Signed-off-by: Sebastiaan van Stijn... github.com
**

[3] https://docs.docker.com/engine/release-notes/#201010
Docker Engine release notes - Docker Documentation
<https://docs.docker.com/engine/release-notes/#201010>
Docker Engine release notes. This document describes the latest changes, additions, known issues, and fixes for Docker Engine. Note: The client and container runtime are now in separate packages from the daemon in Docker Engine 18.09. Users should install and update all three packages at the same time to get the latest patch releases.
docs.docker.com

[4] https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1948361
Bug #1948361 “docker.io - error adding seccomp filter rule for s... : Bugs : docker.io package : Ubuntu
<https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1948361>
Encountered the following error using the docker.io package in focal-proposed running the autotest-client-test/ubuntu_performance_deep_learning test. "docker: Error response from daemon: failed to create shim: OCI runtime create failed:
container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall clone3: permission denied: unknown." This test essentially pulls down a nvidia tensorflow docker container, runs the container and triggers the preloaded ...
bugs.launchpad.net
**

[5]
https://pascalroeleven.nl/2021/09/09/ubuntu-21-10-and-fedora-35-in-docker/
Ubuntu 21.10 and Fedora 35 in Docker – Pascal Roeleven
<https://pascalroeleven.nl/2021/09/09/ubuntu-21-10-and-fedora-35-in-docker/>
Here I am, back again with another post which I think the internet needs. It took me days to figure it out and I can’t imagine there aren’t more people who are running into the same issue.
pascalroeleven.nl

//Hongxu
------------------------------
*From:* Khem Raj <[email protected]>
*Sent:* Wednesday, February 16, 2022 12:08 PM
*To:* Jia, Hongxu <[email protected]>
*Cc:* Richard Purdie <[email protected]>; [email protected] < [email protected]>
*Subject:* Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC)

[Please note: This e-mail is from an EXTERNAL e-mail address]

On Tue, Feb 15, 2022 at 6:28 PM Jia, Hongxu <[email protected]> wrote:

Hi khem,

Upstream glibc reject it because the latest docker has supported it[1], and upstream glibc does not backward compatibility with old docker[2]

In order to build Yocto with uninative in old docker, we need this local patch

How old is the docker and I assume
It’s some distribution needing it ?

[1]
https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594
<https://urldefense.com/v3/__https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u16jFNv8$>

<https://urldefense.com/v3/__https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u16jFNv8$>
seccomp: add support for "clone3" syscall in default policy · moby/moby@9f6b562
<https://urldefense.com/v3/__https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u16jFNv8$>
If no seccomp policy is requested, then the built-in default policy in dockerd applies. This has no rule for &quot;clone3&quot; defined, nor any default errno defined. So when runc receives the con... github.com
<https://urldefense.com/v3/__http://github.com__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u_GA6nFS$>
**

[2]https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html
<https://urldefense.com/v3/__https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u54oSjL_$>

//Hongxu
------------------------------
*From:* Khem Raj <[email protected]>
*Sent:* Wednesday, February 16, 2022 12:17 AM
*To:* Jia, Hongxu <[email protected]>
*Cc:* [email protected] < [email protected]>; Richard Purdie < [email protected]>
*Subject:* Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC)

[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 4 lines · Hongxu

On 2/9/22 06:53, Khem Raj wrote:

diff --git

a/meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch b/meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch

Quoted 3 lines

deleted file mode 100644
index 3283dd7ad8a..00000000000
---

a/meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch line 4

Quoted 6 lines

+++ /dev/null

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -4
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <[email protected]>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged process [BZ

#28287]

Review line 6

Quoted 2 lines
(quoted diff) +0 -2
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone, clone2 and

clone3]

Review line 7

Quoted 1 line
(quoted diff) +0 -1
-applied, start a unprivileged container (docker run without

--privileged),

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch

Quoted 3 lines
meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -3
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER is

defined. If

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch line 17

Quoted 7 lines
meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -7
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.
-
-As known from [1], cloneXXX fails with EPERM if CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html

<https://urldefense.com/v3/__https://man7.org/linux/man-pages/man2/clone3.2.html__;!!AjveYdw8EvQ!JrdILWjxfDiWHnl5n9iunsdZlqM0OsXFKtRci3uAgclNV9L6va0Ic-5IjAs7u3AyFyV8$>

Quoted 9 lines
meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -4
-
-So if __clone3 returns -1 with EPERM, fall back to clone or clone2 could
-fix the issue. Here are the test steps:
-

Hi RP,

I found this local patch was removed from glibc, we have to get it back

and regenerate uninative to avoid the thread creation failure in unprivileged container

Quoted 1 line

I intentionally dropped it since upstream glibc will not accept this patch since its not glibc problem but
rather container runtime problem. Can you investigate that path before we reapply it. Maintaining a rejected patch is last thing we want to do.

Quoted 2 lines

//Hongxu

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#161771):
https://lists.openembedded.org/g/openembedded-core/message/161771
Mute This Topic: https://lists.openembedded.org/mt/89009276/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#12 lore raw
Quoted 12 lines · Martin Jansa

Ubuntu patched their docker.io package shortly after upgrading to glibc-2.34 in Ubuntu-21.10, see:
http://changelogs.ubuntu.com/changelogs/pool/universe/d/docker.io/docker.io_20.10.7-0ubuntu5~20.04.2/changelog

docker.io (20.10.7-0ubuntu4) impish; urgency=medium

  * d/p/seccomp-add-support-for-clone3-syscall-in-default- policy.patch: Fix
    failure with new glibc clone3 syscall adding it to the default seccomp
    policy (LP: #1943049).

Quoted 7 lines

 -- Lucas Kanashiro <[email protected]>  Fri, 10 Sep 2021 15:34:38 -0300

AFAIK Ubuntu isn't affected anymore, I've
updated https://bugzilla.yoctoproject.org/show_bug.cgi?id=1711 and I'm fine with dropping the patch now (it was useful before, but now distributions had enough time to prepare for 2.34 changes).

In case the uninative upgrade is merged in stable/LTS branches, it might start showing up failures for people building on older distributions that aren't being updated any more.

Thanks,

Anuj

Quoted 204 lines
Quoted 86 lines · hongxu

From upstream docker github [1]
The issue was found in 20.10.7, the the fix was merged in v20.10.10-rc1 [2]
From docker release notes, it was published in version 20.10.10 at 2021-10-25[3]

In ubuntu 20.04.2, the docker version is 20.10.7 (20.10.7- 0ubuntu1~20.04.2) [4],

From [5], Ubuntu 21.10 and Fedora 35 has the issue

[1] https://github.com/moby/moby/issues/42680

seccomp filter breaks latest glibc (in fedora rawhide) by blocking clone3 with EPERM · Issue #42680 · moby/moby · GitHub
Client: Version: 20.10.7 API version: 1.41 Go version: go1.16.6 Git
commit: f0df350 Built: Mon Jul 26 16:34:29 2021 OS/Arch:
linux/amd64 Context: default Experimental ...
github.com

[2]
https://github.com/moby/moby/commit/6835d15f5523063f0a04a86d4810a63
7c6010d62

[20.10] update containerd binary to v1.4.10 · moby/moby@6835d15
- Update runc to v1.0.2 - Update hcsshim to v0.8.21 - Support &quot;clone3&quot; in default seccomp profile - Fix panic in metadata content writer on copy error Signed-off-by: Sebastiaan van Stijn...
github.com

[3] https://docs.docker.com/engine/release-notes/#201010
Docker Engine release notes - Docker Documentation Docker Engine release notes. This document describes the latest changes, additions, known issues, and fixes for Docker Engine.
Note: The client and container runtime are now in separate packages from the daemon in Docker Engine 18.09. Users should install and update all three packages at the same time to get the latest patch releases.
docs.docker.com

[4]
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1948361
Bug #1948361 “docker.io - error adding seccomp filter rule for s... : Bugs : docker.io package : Ubuntu
Encountered the following error using the docker.io package in focal-proposed running the autotest-client- test/ubuntu_performance_deep_learning test. "docker: Error response from daemon: failed to create shim: OCI runtime create failed:
container_linux.go:380: starting container process caused: error adding seccomp filter rule for syscall clone3: permission denied:
unknown." This test essentially pulls down a nvidia tensorflow docker container, runs the container and triggers the preloaded ... bugs.launchpad.net

[5]
https://pascalroeleven.nl/2021/09/09/ubuntu-21-10-and-fedora-35-in-
docker/
Ubuntu 21.10 and Fedora 35 in Docker – Pascal Roeleven Here I am, back again with another post which I think the internet needs. It took me days to figure it out and I can’t imagine there aren’t more people who are running into the same issue. pascalroeleven.nl

//Hongxu
From: Khem Raj <[email protected]>
Sent: Wednesday, February 16, 2022 12:08 PM
To: Jia, Hongxu <[email protected]>
Cc: Richard Purdie <[email protected]>; [email protected] <[email protected]>
Subject: Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC) [Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 6 lines · Hongxu

Hi khem,

Upstream glibc reject it because the latest docker has supported it[1], and upstream glibc does not backward compatibility with old docker[2]

Quoted 103 lines
Quoted 2 lines

In order to build Yocto with uninative in old docker, we need this local patch

How old is the docker and I assume
It’s some distribution needing it ?

Quoted 95 lines

[1]
https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6
477790a6594

seccomp: add support for "clone3" syscall in default policy · moby/moby@9f6b562
If no seccomp policy is requested, then the built-in default policy in dockerd applies. This has no rule for &quot;clone3&quot; defined, nor any default errno defined. So when runc receives the con...
github.com

[2]
https://sourceware.org/pipermail/libc-alpha/2021-August/130590.ht
ml

//Hongxu
From: Khem Raj <[email protected]>
Sent: Wednesday, February 16, 2022 12:17 AM
To: Jia, Hongxu <[email protected]>
Cc: [email protected] <[email protected]>; Richard Purdie <[email protected]>
Subject: Re: [OE-core] [PATCH v3 1/3] glibc: Upgrade to 2.35 (RFC)
[Please note: This e-mail is from an EXTERNAL e-mail address]

Quoted 44 lines · Hongxu

On 2/9/22 06:53, Khem Raj wrote:

(quoted diff) +0 -0

thread-failed-in-unprivileged-process-BZ-.patch b/meta/recipes- core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged- process-BZ-.patch
deleted file mode 100644
index 3283dd7ad8a..00000000000
--- a/meta/recipes-core/glibc/glibc/0001-fix-create-thread- failed-in-unprivileged-process-BZ-.patch
+++ /dev/null

(quoted diff) +0 -1
@@ -1,79 +0,0 @@
-From a8bc44936202692edcd82a48c07d7cf27d6ed8ee Mon Sep 17

00:00:00 2001

(quoted diff) +0 -3
-From: Hongxu Jia <[email protected]>
-Date: Sun, 29 Aug 2021 20:49:16 +0800
-Subject: [PATCH] fix create thread failed in unprivileged

process [BZ #28287]

(quoted diff) +0 -2
-
-Since commit [d8ea0d0168 Add an internal wrapper for clone,

clone2 and clone3]
-applied, start a unprivileged container (docker run without -- privileged),

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -3
-it creates a thread failed in container.
-
-In commit d8ea0d0168, it calls __clone3 if HAVE_CLONE3_WAPPER

is defined.  If

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -3
-__clone3 returns -1 with ENOSYS, fall back to clone or clone2.
-
-As known from [1], cloneXXX fails with EPERM if

CLONE_NEWCGROUP,
-CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS
-was specified by an unprivileged process (process without CAP_SYS_ADMIN)

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -4
-
-[1] https://man7.org/linux/man-pages/man2/clone3.2.html
-
-So if __clone3 returns -1 with EPERM, fall back to clone or

clone2 could

meta/recipes-core/glibc/glibc/0001-fix-create-thread-failed-in-unprivileged-process-BZ-.patch deleted +0 -2
-fix the issue. Here are the test steps:
-
Quoted 7 lines

Hi RP,

I found this local patch was removed from glibc, we have to get it back and regenerate uninative to avoid the thread creation failure in  unprivileged container

I intentionally dropped it since upstream glibc will not accept this
patch since its not glibc problem but
rather container runtime problem. Can you investigate that path before
we reapply it. Maintaining a rejected patch is last thing we want to
do.

Quoted 2 lines

//Hongxu

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#161772):
https://lists.openembedded.org/g/openembedded-core/message/161772
Mute This Topic: https://lists.openembedded.org/mt/89009276/3616702
Group Owner: [email protected] Unsubscribe:
https://lists.openembedded.org/g/openembedded-core/unsub [
[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#13 lore raw
Quoted 16 lines · Anuj
Quoted 15 lines · Martin Jansa

Ubuntu patched their docker.io package shortly after upgrading to glibc-2.34 in Ubuntu-21.10, see:
http://changelogs.ubuntu.com/changelogs/pool/universe/d/docker.io/docker.io_20.10.7-0ubuntu5~20.04.2/changelog

docker.io (20.10.7-0ubuntu4) impish; urgency=medium

  * d/p/seccomp-add-support-for-clone3-syscall-in-default- policy.patch: Fix
    failure with new glibc clone3 syscall adding it to the default seccomp
    policy (LP: #1943049).

 -- Lucas Kanashiro <[email protected]>  Fri, 10 Sep 2021 15:34:38 -0300

Quoted 8 lines
Quoted 4 lines

AFAIK Ubuntu isn't affected anymore, I've
updated https://bugzilla.yoctoproject.org/show_bug.cgi?id=1711 and I'm fine with dropping the patch now (it was useful before, but now distributions had enough time to prepare for 2.34 changes).

In case the uninative upgrade is merged in stable/LTS branches, it might start showing up failures for people building on older distributions that aren't being updated any more.

I think you're right, you have a good point here and we need to do something about this. Reviewing the discussion upstream, I think they proposed a different way of handling the patch so we need to look into that.

I will look at taking our other workaround short term but we need a bug opened and someone to look at trying to get a proper patch into glibc IMO...

Cheers,

Richard

#14 lore raw
In reply to Jia, Hongxu
Quoted 18 lines · Hongxu

Hi khem,

Upstream glibc reject it because the latest docker has supported it[1], and upstream glibc does not backward compatibility with old docker[2]

In order to build Yocto with uninative in old docker, we need this local patch

[1]
https://github.com/moby/moby/commit/9f6b562dd12ef7b1f9e2f8e6f2ab6477790a6594

seccomp: add support for "clone3" syscall in default policy · moby/moby@9f6b562
If no seccomp policy is requested, then the built-in default policy in dockerd applies. This has no rule for &quot;clone3&quot; defined, nor any default errno defined. So when runc receives the con...
github.com

Quoted 1 line

[2]https://sourceware.org/pipermail/libc-alpha/2021-August/130590.html

The way I read that upstream suggested a different way of making the patch? Could we try doing something like they suggested?

Cheers,

Richard