summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc_2.34.bb
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2021-08-29 06:52:35 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-31 20:51:05 +0100
commit234a3e84640c1bb6df5fa4d3d7089a854b19d108 (patch)
treeae6940a9dea4ae2ebf0b1a271173f0e6abc54e6d /meta/recipes-core/glibc/glibc_2.34.bb
parent1e18b514bf1f960d324a21db608c8e8e5af007ef (diff)
downloadopenembedded-core-3ac47c6470fefcbeba8ee5fa0b3e67fe9eaa8b08.tar.gz
glibc: fix create thread failed in unprivileged processuninative-3.4
Since upstream 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. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/glibc/glibc_2.34.bb')
-rw-r--r--meta/recipes-core/glibc/glibc_2.34.bb1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc_2.34.bb b/meta/recipes-core/glibc/glibc_2.34.bb
index eafc0216ff..6dc315c349 100644
--- a/meta/recipes-core/glibc/glibc_2.34.bb
+++ b/meta/recipes-core/glibc/glibc_2.34.bb
@@ -57,6 +57,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
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 \
"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build-${TARGET_SYS}"