This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH v3 1/2] clone3: add CLONE_CLEAR_SIGHAND
- From: Christian Brauner <christian dot brauner at ubuntu dot com>
- To: Oleg Nesterov <oleg at redhat dot com>
- Cc: linux-kernel at vger dot kernel dot org, Florian Weimer <fweimer at redhat dot com>, Arnd Bergmann <arnd at arndb dot de>, libc-alpha at sourceware dot org, David Howells <dhowells at redhat dot com>, Jann Horn <jannh at google dot com>, Ingo Molnar <mingo at redhat dot com>, Peter Zijlstra <peterz at infradead dot org>, Juri Lelli <juri dot lelli at redhat dot com>, Vincent Guittot <vincent dot guittot at linaro dot org>, Dietmar Eggemann <dietmar dot eggemann at arm dot com>, Steven Rostedt <rostedt at goodmis dot org>, Ben Segall <bsegall at google dot com>, Mel Gorman <mgorman at suse dot de>, Shuah Khan <shuah at kernel dot org>, Andrew Morton <akpm at linux-foundation dot org>, Michal Hocko <mhocko at suse dot com>, Elena Reshetova <elena dot reshetova at intel dot com>, Thomas Gleixner <tglx at linutronix dot de>, Roman Gushchin <guro at fb dot com>, Andrea Arcangeli <aarcange at redhat dot com>, Al Viro <viro at zeniv dot linux dot org dot uk>, Aleksa Sarai <cyphar at cyphar dot com>, "Dmitry V. Levin" <ldv at altlinux dot org>, linux-kselftest at vger dot kernel dot org, linux-api at vger dot kernel dot org
- Date: Mon, 21 Oct 2019 21:42:53 +0200
- Subject: Re: [PATCH v3 1/2] clone3: add CLONE_CLEAR_SIGHAND
- References: <firstname.lastname@example.org> <20191021144633.GA2720@redhat.com>
On Mon, Oct 21, 2019 at 04:46:33PM +0200, Oleg Nesterov wrote:
> On 10/14, Christian Brauner wrote:
> > The child helper process on Linux posix_spawn must ensure that no signal
> > handlers are enabled, so the signal disposition must be either SIG_DFL
> > or SIG_IGN. However, it requires a sigprocmask to obtain the current
> > signal mask and at least _NSIG sigaction calls to reset the signal
> > handlers for each posix_spawn call
> Plus the caller has to block/unblock all signals around clone(VM|VFORK).
> Can this justify the new CLONE_ flag? Honestly, I have no idea. But the
> patch is simple and looks technically correct to me. FWIW,
> Reviewed-by: Oleg Nesterov <email@example.com>
The problem is not just the number of syscalls but also that the
sigaction logic is already quite complicated and would need to be even
more complicated without this flag. That's covered mostly in the glibc
thread though. Even just the ability to avoid potentially _NSIG syscalls
is enough justification especially since were not scarce on flags.
Thanks! I'll pick this up for 5.5.