From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EDD61385840D; Thu, 1 Jun 2023 18:46:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDD61385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1685645207; bh=hsajLjUluPehS5bKuF+qpcaaLYdDgnv5YtGFO5RqlGo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=JklQjlX3kbqICiYqgUEjjrOKKgmBHSC4VDUUkqZ8/FhlOrT4nq3JO03IIGl3Gybt0 OYFLz5sx/gRFB9z70zffLKq9M6Vk/RdLQ5U+3g+201wPmHmCUTU0tztIrIGA4NUDBo rgcjsa+h9/7UrjF7lRZAwdG5kwxEuwMfTA8QBIhU= From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/26371] [RFE] please add clone3() wrapper (in particular the CLONE_INTO_CGROUP feature of it) Date: Thu, 01 Jun 2023 18:46:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D26371 --- Comment #11 from Carlos O'Donell --- (In reply to Luca Boccassi from comment #9) > Hi, are there any news on this? We are looking again at using clone3 in > systemd, but it seems there is a lot of hairiness around prepping the sta= ck > before it can be used. Was there any progress in adding a wrapper in glib= c? (In reply to Luca Boccassi from comment #10) > Note that we will no longer need to do any work/syscalls in the child at > all, apart from opening and immediately execv'ing another program, that w= ill > do all the setup that were mentioned earlier in the thread. >=20 > So what we really need is 'just' a wrapper that sets up the stack correct= ly, > like the clone() wrapper does. Some progress, we need assembly wrappers for all clone3() calls first, and there is ongoing review for adding an internal-clone3 wrapper for use with posix_spawn [1], but nothing proposed to be exported as an external interfa= ce like requested here. At least when we complete the internal assembly calling sequences it should= be easier to mock up a prototype solution. We owe the community a clone3() syscall wrapper because it can't be used without coordination with glibc and we should not block users from being ab= le to use the functionality directly. The consensus case for adding syscall wrappers holds true [2]. Originally in this bug we were talking about a fork-like wrapper, but it so= unds like you don't need that now, which makes it simple to implement. [1] https://patchwork.sourceware.org/project/glibc/list/?series=3D16730 [2] https://sourceware.org/glibc/wiki/Consensus#WIP:_Kernel_syscalls_wrappe= rs --=20 You are receiving this mail because: You are on the CC list for the bug.=