From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbdJBXUo convert rfc822-to-8bit (ORCPT ); Mon, 2 Oct 2017 19:20:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46876 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbdJBXUn (ORCPT ); Mon, 2 Oct 2017 19:20:43 -0400 Date: Mon, 2 Oct 2017 16:20:41 -0700 From: Andrew Morton To: =?ISO-8859-1?Q?J=FCrg?= Billeter Cc: Oleg Nesterov , Linus Torvalds , Eric Biederman , Michael Kerrisk , Filipe Brandenburger , David Wilcox , "Adam H . Peterson" , hansecke@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH] prctl: add PR_[GS]ET_PDEATHSIG_PROC Message-Id: <20171002162041.a7cefe8af71327b8becd2347@linux-foundation.org> In-Reply-To: <20170929123058.48924-1-j@bitron.ch> References: <20170909094008.49983-1-j@bitron.ch> <20170929123058.48924-1-j@bitron.ch> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Sep 2017 14:30:58 +0200 Jürg Billeter wrote: > PR_SET_PDEATHSIG sets a parent death signal that the calling process > will get when its parent thread dies, even when the result of getppid() > doesn't change because the calling process is reparented to a different > thread in the same parent process. When managing multiple processes, a > process-based parent death signal is much more useful. E.g., to avoid > stray child processes. > > PR_SET_PDEATHSIG_PROC sets a process-based death signal. Unlike > PR_SET_PDEATHSIG, this is inherited across fork to allow killing a whole > subtree without race conditions. > > This can be used for sandboxing when combined with a seccomp filter. > > There have been previous attempts to support this by changing the > behavior of PR_SET_PDEATHSIG. However, that would break existing > applications. See https://marc.info/?l=linux-kernel&m=117621804801689 > and https://bugzilla.kernel.org/show_bug.cgi?id=43300 Are Eric and Oleg OK with this? A prctl manpage update will be needed, please (cc linux-api).