summaryrefslogtreecommitdiffstats
path: root/source/l/glibc/patches
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2022-02-22 21:24:29 +0000
committer Eric Hameleers <alien@slackware.com>2022-02-23 06:59:41 +0100
commitcd1ecf258bacc64f59cb86fc762c0e97ed06611c (patch)
tree46cd3ed67f78a3f3ca92172f91b769363041721c /source/l/glibc/patches
parent32fa88b60c4d872b057e9e7651b351d54affa40e (diff)
downloadcurrent-cd1ecf258bacc64f59cb86fc762c0e97ed06611c.tar.gz
current-cd1ecf258bacc64f59cb86fc762c0e97ed06611c.tar.xz
Tue Feb 22 21:24:29 UTC 202220220222212429
a/aaa_glibc-solibs-2.35-x86_64-2.txz: Rebuilt. l/glibc-2.35-x86_64-2.txz: Rebuilt. Disable clone3() unless built with -DSLACKWARE_USE_CLONE3, since this is causing sandbox failures with applications using Electron (and others). Thanks to Sam James of Gentoo for the patch. Unfortunately, this doesn't solve the issues with kmail/falkon/konqueror, but we'll keep testing glibc-2.35 for now. l/glibc-i18n-2.35-x86_64-2.txz: Rebuilt. l/glibc-profile-2.35-x86_64-2.txz: Rebuilt.
Diffstat (limited to '')
-rw-r--r--source/l/glibc/patches/0011-clone-internal.c-make-clone3-syscall-optional.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/source/l/glibc/patches/0011-clone-internal.c-make-clone3-syscall-optional.patch b/source/l/glibc/patches/0011-clone-internal.c-make-clone3-syscall-optional.patch
new file mode 100644
index 000000000..661cd770f
--- /dev/null
+++ b/source/l/glibc/patches/0011-clone-internal.c-make-clone3-syscall-optional.patch
@@ -0,0 +1,50 @@
+From 06b01dfa4e29b5a6838dd9050f3e9418c5dc77f5 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 1 Dec 2021 14:58:40 +0000
+Subject: [PATCH 11/29] clone-internal.c: make clone3 syscall optional
+
+[MODIFIED FOR SLACKWARE]
+
+We're disabling clone3 for now _CONDITIONALLY_ (not by default) to allow
+compatibility with applications using older Electron.
+
+Use -DSLACKWARE_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 a71effcbd3..60efe1f453 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(SLACKWARE_USE_CLONE3)
+ /* Try clone3 first. */
+ int saved_errno = errno;
+ ret = __clone3 (cl_args, sizeof (*cl_args), func, arg);
+--
+2.34.1
+