Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1064979ybl; Wed, 14 Aug 2019 10:08:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwq4StiMFMwYy9N/D1Hmz7lBT6KcBCLzVhQ2+J8ZYj/nGM+8plIwdYpUil+0f6xLX79OxJR X-Received: by 2002:a17:902:ac88:: with SMTP id h8mr364511plr.77.1565802519524; Wed, 14 Aug 2019 10:08:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802519; cv=none; d=google.com; s=arc-20160816; b=uR/ewFgSZ4+ZP5OPPW9SFzJCVCCMdcfYfCc6TdA5Vry9HaSQ3EPoIskosK804tPORy W2Xn6e5eEyp3l0U81O2CBMt8eaaUAGgXX/5jD7ybdcuc7K5FtNhHXUVgf1/t61Hznt8C +m54hQYXoRJukfraX7yqcmP7Rh6i76YiN+bgUAa4kNxC+Rq1bjZuB3nTCbzfVfW1yV32 kpNZMAFW6WTSKxWQmOZ8PiX1/p9pBcoed8RH76ng6Bk29uFfJFyww5UCtm5KkiD7DZ7G TCGWenDa1C+iubgeYy4K7kG6kwXM2WNkHdMkdHwTF8hXrA0uST1+ZfYcjPaRJ0f/00sd jXtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qmLXQ1DX4enCLG/blcVpIzNK/UzBgUaIlDbRYanVvW4=; b=Ih+Dw1H/x+u+WJsS6l/ezy/I6oR9gcsOtH+cP2qv2AT9hq7DBJYEetBHqbGGM8Pz3Q CCzK/jAkjy9DNN5LYAJZBvWUVrERuIten8HSRLiIuR3E3SRQ7Wl/BjAxdbaLZuqKPMn0 j/+mGWVpl7SRwgpHrKGe7bwlOrFfRaYJTROCf//B+7l1RMzHchd13Ylm68V9DNfUMJUd jf7e/ArL5JykPgWsx/C1uAgZOej8fQY7vMl9namxKPuKq4srXw06a/zrIHXZ4FfAipRY 2spIHmb4MJgITaEXCToC5LNuMG4cMP+8ecFqtv/d6xyWnytfsHzwTpHwSUrTxRthy/FE W7gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Csf25Hiu; 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 q10si84655pfc.85.2019.08.14.10.08.23; Wed, 14 Aug 2019 10:08:39 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Csf25Hiu; 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 S1729256AbfHNRGm (ORCPT + 99 others); Wed, 14 Aug 2019 13:06:42 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:44981 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729698AbfHNRGk (ORCPT ); Wed, 14 Aug 2019 13:06:40 -0400 Received: by mail-lj1-f196.google.com with SMTP id e24so8774151ljg.11 for ; Wed, 14 Aug 2019 10:06:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qmLXQ1DX4enCLG/blcVpIzNK/UzBgUaIlDbRYanVvW4=; b=Csf25HiuxApDjXUxMS0pWtKyfLzVjYG4VXzOleml//uHgzP+qL0YwcJqGaQuNRQpl+ 2SYQ8+b2PWgohIGByl+o5JyIcIk29Yc8tix8B3PRd7owe8Qz46sqgTFXQlaKOw2YUepA ZDOaJE5DMkDYDpikit2AFTUhw9j/S3D2wNmEE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qmLXQ1DX4enCLG/blcVpIzNK/UzBgUaIlDbRYanVvW4=; b=BmSvlvynodXA151rMDSIWgg2dYkVL2HlwYvWMeftyk0W6TRb8aDnkZf7HaLImpHZa5 k5u+fVU7LwTdTgxWQmFMaUmClQMuCh4+yHLM97uDXq8csh+y5q/upog3Jw40CmLFmA4K FJ+ziPmrT0kWqo9/NXHGIkj4tsvvlqyY2CAdM35JcM9RBWcHRFtdkGs3DlwcbXZLu2AR 9/lZ6KA0iCvVM97b8ktNLygDGcNNiAHFJ6SbgMvXOoRlX82QuTWeFhHt9PuxoGlYFw9u vM9X8FK6+x6ZZEGPqOQ1h1qs15b472syYy80oQ8Kx/08+xOevAcHlqAqIrNZrY3Z0IJJ biCA== X-Gm-Message-State: APjAAAUEnKqhOJEzYilWRKE2DBGW/VyUG1g6HZ0XJhA9PctzLO3I8NHn ky5O8EPVku8kxMonPKuDcpSBv9yhUTY= X-Received: by 2002:a2e:22c4:: with SMTP id i187mr403887lji.41.1565802397607; Wed, 14 Aug 2019 10:06:37 -0700 (PDT) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com. [209.85.167.49]) by smtp.gmail.com with ESMTPSA id a15sm23537lfl.44.2019.08.14.10.06.36 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Aug 2019 10:06:36 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id x3so26094270lfn.6 for ; Wed, 14 Aug 2019 10:06:36 -0700 (PDT) X-Received: by 2002:ac2:4c12:: with SMTP id t18mr235524lfq.134.1565802395958; Wed, 14 Aug 2019 10:06:35 -0700 (PDT) MIME-Version: 1.0 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> <20190814165501.GJ9017@brightrain.aerifal.cx> In-Reply-To: <20190814165501.GJ9017@brightrain.aerifal.cx> From: Linus Torvalds Date: Wed, 14 Aug 2019 10:06:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/1] waitid: Add support for waiting for the current process group To: Rich Felker Cc: Christian Brauner , Oleg Nesterov , Linux List Kernel Mailing , GNU C Library , Alistair Francis , "Eric W. Biederman" , Arnd Bergmann , Adhemerval Zanella , Florian Weimer , Palmer Dabbelt , macro@wdc.com, Zong Li , Andrew Morton , Al Viro , Peter Anvin Content-Type: text/plain; charset="UTF-8" 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 9:55 AM Rich Felker wrote: > > I don't think "downsides" sufficiently conveys that this is hard > breakage of a requirement for waitpid. Well, let's be honest here. Who has _ever_ seen a signal handler changing the current process group? In fact, the SYSV version of setpgid() takes a process ID to set it *for somebody else*, so the signal safety is not even necessarily relevant, since it might be racing with _another_ thread doing it (which even the kernel side won't fix - it's just user space doing odd things). So yes - it's technically true that it's impossible to emulate properly in user space. But I doubt it makes _any_ difference what-so-ever, and glibc might as well do something like ret = waitid(P_PGID, 0, ..); if (ret == -EINVAL) { do the emulation } which makes it work with older kernels, and has zero downside in practice. Hmm? Linus