From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 59E4415808B for ; Sat, 16 Apr 2022 11:54:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36848E0995; Sat, 16 Apr 2022 11:54:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4E547E0985 for ; Sat, 16 Apr 2022 11:54:18 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 67BD3341981 for ; Sat, 16 Apr 2022 11:54:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9CD913AB for ; Sat, 16 Apr 2022 11:54:11 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1650110038.f39616921f4130213a87fade84a4ba2e17604986.dilfridge@gentoo> Subject: [gentoo-commits] proj/toolchain/glibc-patches:master commit in: 9999/ X-VCS-Repository: proj/toolchain/glibc-patches X-VCS-Files: 9999/0020-make-clone3-syscall-optional.patch X-VCS-Directories: 9999/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: f39616921f4130213a87fade84a4ba2e17604986 X-VCS-Branch: master Date: Sat, 16 Apr 2022 11:54:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 59e1e338-eafc-49d3-9f9c-a5c16cefe3d8 X-Archives-Hash: 5fac4072489810b4d1da88b8b947f878 commit: f39616921f4130213a87fade84a4ba2e17604986 Author: Andreas K. Hüttel gentoo org> AuthorDate: Sat Apr 16 11:51:16 2022 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Sat Apr 16 11:53:58 2022 +0000 URL: https://gitweb.gentoo.org/proj/toolchain/glibc-patches.git/commit/?id=f3961692 Revert "Drop clone3 patch" This reverts commit 9ea49f5686889168627984b71eb6a2721bad712d. Signed-off-by: Andreas K. Hüttel gentoo.org> 9999/0020-make-clone3-syscall-optional.patch | 48 ++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/9999/0020-make-clone3-syscall-optional.patch b/9999/0020-make-clone3-syscall-optional.patch new file mode 100644 index 0000000..4654f06 --- /dev/null +++ b/9999/0020-make-clone3-syscall-optional.patch @@ -0,0 +1,48 @@ +From 57babb0afaa90263a7ea416aa9dc3734bb8ceacc Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 1 Dec 2021 14:58:40 +0000 +Subject: [PATCH 06/14] 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 +--- + 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(GENTOO_USE_CLONE3) + /* Try clone3 first. */ + int saved_errno = errno; + ret = __clone3 (cl_args, sizeof (*cl_args), func, arg); +-- +2.34.1 +