Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1049983ybl; Wed, 14 Aug 2019 09:56:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxnw1dZ/GW+yb6Kth995MhNlrKPzLefRbyB0VAOLCN2UoDtQ7pOEloOTEpt0wconGsbqV9E X-Received: by 2002:a17:90a:1b0d:: with SMTP id q13mr686153pjq.102.1565801807684; Wed, 14 Aug 2019 09:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565801807; cv=none; d=google.com; s=arc-20160816; b=wvOQ0/xSBE44iaga16UwaCj92vDVNxEJpM5KVCa08lzH90HZlakktejsQ5Gdagi9dV 0RGtlq1K9lNOLoJ+Srh8mPbYulbO85EUSLSCWBBN/nQYLmZm9SiX1zYkzZblbH+AJ6hh pE1CvUTnn+ZKuzedfwAhVslw7jcxS5LelNu44prLgertd2r2/PXK5wxYRpUg9LVAp7w4 SGb755UZcIRNCCjwTBr3ITB3GmEYUXrSDZzZI6m2Slmr0bBQkR2zH00kmSeStFbwWx2C CzCcf6fz4SZvt+2f1FWZ36fH78PoiVjLY8/IoYJ9k4eTeNEVk1dkA/xwa8vEtYyZJZKV 4hNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Ze9Lg4u7RDS5D9uiXdF7SyIdJcceIAlWnWHIL2thk9E=; b=fSFN7a+ukOF+RGnkQ03beFnebBRb5GerDlyk8Yhvf9wN7tkJ2aFH7lU+TR2NZvN7W3 7/LLcQz1nkZuQ+mJTPBxnYiRYmK+5PQAu983bU5njaDQ3nsTbPruirBGKrf1/WELa//Z jVGPvJnNnep8p57anQzBwFHtBAvAE6F2kbN9ihk0IUjuFkwBeiGNJ6CsP66Iq6gx3Dp/ qrTMAjw/cvDQX6lJ1Rc280SKqi1SGnUw/Axc76GIZTq6UVk7y0wwp3xoZeBHdpbdGxBr ehUQQH01VnouXpZ7zIkSkIcSoF7BkRMpHu2oPbNRyFLZngkBgqTjjLSyDnFbgO6qY4zM Kq8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d27si148534pgd.328.2019.08.14.09.56.32; Wed, 14 Aug 2019 09:56:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728053AbfHNQzS (ORCPT + 99 others); Wed, 14 Aug 2019 12:55:18 -0400 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:47288 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726951AbfHNQzS (ORCPT ); Wed, 14 Aug 2019 12:55:18 -0400 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1hxwY9-0005gO-00; Wed, 14 Aug 2019 16:55:01 +0000 Date: Wed, 14 Aug 2019 12:55:01 -0400 From: Rich Felker To: Christian Brauner Cc: Oleg Nesterov , linux-kernel@vger.kernel.org, libc-alpha@sourceware.org, alistair23@gmail.com, ebiederm@xmission.com, arnd@arndb.de, torvalds@linux-foundation.org, adhemerval.zanella@linaro.org, fweimer@redhat.com, palmer@sifive.com, macro@wdc.com, zongbox@gmail.com, akpm@linux-foundation.org, viro@zeniv.linux.org.uk, hpa@zytor.com Subject: Re: [PATCH v3 1/1] waitid: Add support for waiting for the current process group Message-ID: <20190814165501.GJ9017@brightrain.aerifal.cx> References: <20190814154400.6371-1-christian.brauner@ubuntu.com> <20190814154400.6371-2-christian.brauner@ubuntu.com> <20190814160917.GG11595@redhat.com> <20190814161517.ldbn62mulk2pmqo5@wittgenstein> <20190814163443.6odsksff4jbta7be@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190814163443.6odsksff4jbta7be@wittgenstein> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 14, 2019 at 06:34:44PM +0200, Christian Brauner wrote: > On Wed, Aug 14, 2019 at 06:15:17PM +0200, Christian Brauner wrote: > > On Wed, Aug 14, 2019 at 06:09:17PM +0200, Oleg Nesterov wrote: > > > On 08/14, Christian Brauner wrote: > > > > > > > > and a signal could come in between the system call that > > > > retrieved the process gorup and the call to waitid that changes the > > > ^^^^^ > > > > current process group. > > > > > > I noticed this typo only because I spent 2 minutes or more trying to > > > understand this sentence ;) But yes, a signal handler or another thread > > > > I'll try to rewrite it. :) > > Ok, here's what I changed it to: > > It was recently discovered that the linux version of waitid is not a > superset of the other wait functions because it does not include > support for waiting for the current process group. This has two > downsides: > 1. An extra system call is needed to get the current process group. > 2. After the current process group is received and before it is passed > to waitid a signal could arrive causing the current process group to change. I don't think "downsides" sufficiently conveys that this is hard breakage of a requirement for waitpid. How about something like the following? "It was recently discovered that the linux version of waitid is not a superset of the other wait functions because it does not include support for waiting for the current process group. Userspace cannot simply emulate this functionality with an additional getpgid syscall due to inherent race conditions that violate the async-signal safety requirements for waitpid." Rich