diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2021-12-01 17:16:49 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2021-12-01 17:16:49 +0100 |
commit | a322f1dc93f32dcf4af8441f7bc7214e8694290c (patch) | |
tree | 458c269fa0a0f43ecbf67a61fbd41a5e2f0426dd /9999 | |
parent | Regenerate patches at 2.34 release (diff) | |
download | glibc-patches-a322f1dc93f32dcf4af8441f7bc7214e8694290c.tar.gz glibc-patches-a322f1dc93f32dcf4af8441f7bc7214e8694290c.tar.bz2 glibc-patches-a322f1dc93f32dcf4af8441f7bc7214e8694290c.zip |
Add patch to make clone3 optional
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to '9999')
-rw-r--r-- | 9999/0020-make-clone3-syscall-optional.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/9999/0020-make-clone3-syscall-optional.patch b/9999/0020-make-clone3-syscall-optional.patch new file mode 100644 index 0000000..33aa08f --- /dev/null +++ b/9999/0020-make-clone3-syscall-optional.patch @@ -0,0 +1,48 @@ +From 1f714c474eb248b3fa2c84f3b0f22cc509c0e6c9 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Wed, 1 Dec 2021 14:58:40 +0000 +Subject: [PATCH] clone-internal.c: make clone3 syscall optional + +We're disabling clone3 for now _CONDITIONALLY_ (not by default) to allow +compatibility with applications using older Electron. + +Use -DGENTOO_USE_CLONE3 to enable clone3 for now. In future, we will +revert back to always using clone3. + +This was impacting e.g. Discord and Skype. This patch stops glibc from using +clone3 internally (which is the only real use of it) and falls back to the old +behaviour. + +Specifically, we want https://github.com/electron/electron/pull/31091 +to work its way downstream to various Electron applications. + +https://bugs.gentoo.org/819045 +https://bugs.gentoo.org/827386 + +https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/glibc/plain/debian/patches/ubuntu/disable-clone3.patch + +This is the same as the patch that was considered but ultimately rejected +for 2.34 because Docker got sorted out in time: +https://patchwork.ozlabs.org/project/glibc/patch/87eebkf8ph.fsf@oldenburg.str.redhat.com/. + +Signed-off-by: Sam James <sam@gentoo.org> +--- + sysdeps/unix/sysv/linux/clone-internal.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sysdeps/unix/sysv/linux/clone-internal.c b/sysdeps/unix/sysv/linux/clone-internal.c +index 979f7880be..c5566daf73 100644 +--- a/sysdeps/unix/sysv/linux/clone-internal.c ++++ b/sysdeps/unix/sysv/linux/clone-internal.c +@@ -48,7 +48,7 @@ __clone_internal (struct clone_args *cl_args, + int (*func) (void *arg), void *arg) + { + int ret; +-#ifdef HAVE_CLONE3_WRAPPER ++#if defined(HAVE_CLONE3_WRAPPER) && defined(GENTOO_USE_CLONE3) + /* Try clone3 first. */ + int saved_errno = errno; + ret = __clone3 (cl_args, sizeof (*cl_args), func, arg); +-- +2.32.0 + |