Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10034468ybi; Wed, 24 Jul 2019 14:37:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdE7h5KsS3USQkibbR076HY1TS8nOJAhp9gJ6e+O1nR758ZhfA/oVaib6C1KqK/rsYVwO6 X-Received: by 2002:a17:90a:e397:: with SMTP id b23mr89843097pjz.117.1564004233376; Wed, 24 Jul 2019 14:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564004233; cv=none; d=google.com; s=arc-20160816; b=j3UoCS1v/bh3/PnPoUoUdMpLOSan+mDgLf8ALxaVcf5kRkS0i/HFlSxbAaGmG4xTqK jhSSRTOBd/UG+yVeqEuzBkDnBXTyInwJNKkxbFXp8cqVTZc9oxVhT9Y0tG9b2lbO9fwn mCQnOICAfwZHni/YVAEO2eY/eTvaUtLS+xQFyOsWoaZljUykf7ey6naFkxs1TFPSIXaf 2sjDSMkGpubczLSbZ7c/8HmWV0uein7bE/RldQcGvn9tabXP4VCOVk+RIIIge/+M3WwN tSOlzpoqzJJtryl18vKA7XSHzKdauG8dXht18ECahZK+uGriOrYJvmtcHZ5oPvFNLXwZ 1LYQ== 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=95+Ojj8whLDzTQfSvFpUfZPQNS2ad16YlfE2wY3FNvs=; b=V1SaUZr7Znw8NXcGfZesjvHC8iiGAsKPfUs8ir/11YnS+f3VD0DuoXw+KSoRUgE6qw AKG+5WMjB1n5yO2wpKUvH4F2ptrTGR8TKIuF3nz7mBiI9RMWrRFpFQYW0007Nw0RFdkj /PfRuGHL6RtnGRBRXgSlpwFX5o7BWFrYB7EZKCvY0+TkXm64MiqWkrGDRpDU9aAuN8ST a9d6BxrN6YG7IDrtK4BbbTPfiwyKkkE1y6cLlKfWUu+wYkEy/Jvfdo4syxlSkyKDwZYz /CnsbZ14TZ5h5jDHNxLsZ1GuzlLS7M5lNLV5fzhdDXqZfS62IWVtLVsUWogZVdiiFaFv QcRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Q1otmVXy; 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 w17si14533760plp.404.2019.07.24.14.36.57; Wed, 24 Jul 2019 14:37:13 -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=Q1otmVXy; 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 S1728278AbfGXRvM (ORCPT + 99 others); Wed, 24 Jul 2019 13:51:12 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:42295 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbfGXRvM (ORCPT ); Wed, 24 Jul 2019 13:51:12 -0400 Received: by mail-lf1-f66.google.com with SMTP id s19so32566348lfb.9 for ; Wed, 24 Jul 2019 10:51:10 -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=95+Ojj8whLDzTQfSvFpUfZPQNS2ad16YlfE2wY3FNvs=; b=Q1otmVXyrcOvARrNHCq3mme+hGOPc0EnMeptu7eG3VCcjT/HkP54TR+dyDnM4qL9d5 FonTz95jDa6pthaSmRyHWkpw1Tde3zEXeGdzrSTuS5RS8pvNtLbrl34+D57HnUjtTzDS e7q295+fYzIVl3K0F+jR//YtMKvddGwPmrsD4= 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=95+Ojj8whLDzTQfSvFpUfZPQNS2ad16YlfE2wY3FNvs=; b=UgrKL4R/VQVw9nGFsrPn/C7UaG2TM8LIcgjTDsyXKEjRfVLYQKmqvt2tV5sHnK5JB4 L9bMpRPbB2rprlb/3TTizddTvrC0UKEVpXmdrkpEys6aPP2E4ZxLHfTLM/9mYaawuguw LMBOHAOtlriu4aznk3+YNn/iqbcDI0+ELoqhAP2PF2wL1Cu8Rozu83fQsP52Lu8s8Cff KX75sGAsRSQdYJ9p3GRyH680otVF82bZsNMrnfTsWxnV7EHGru64xAEe3JcSyRYBQXW+ 61gWyqMCU2Wy3J87CY3SF9qLP7nGT6iOk+vlWiqyN5EN13T8WqmqppAwNtay/n91mgFC SU9g== X-Gm-Message-State: APjAAAVxIKC1WIba/Tyw4xXneoyIcyJulsSMrwojbmu+Z/7RwHG6KMGL avhI0dSZDuEMRk816uFSFdP7L0cAsHE= X-Received: by 2002:a19:c7ca:: with SMTP id x193mr37923518lff.151.1563990669551; Wed, 24 Jul 2019 10:51:09 -0700 (PDT) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id p5sm8697586ljb.91.2019.07.24.10.51.09 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2019 10:51:09 -0700 (PDT) Received: by mail-lj1-f180.google.com with SMTP id x25so45406839ljh.2 for ; Wed, 24 Jul 2019 10:51:09 -0700 (PDT) X-Received: by 2002:a2e:9bc6:: with SMTP id w6mr44841672ljj.156.1563990354068; Wed, 24 Jul 2019 10:45:54 -0700 (PDT) MIME-Version: 1.0 References: <20190724144651.28272-1-christian@brauner.io> <20190724144651.28272-3-christian@brauner.io> In-Reply-To: <20190724144651.28272-3-christian@brauner.io> From: Linus Torvalds Date: Wed, 24 Jul 2019 10:45:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/5] pidfd: add pidfd_wait() To: Christian Brauner Cc: Linux List Kernel Mailing , Oleg Nesterov , Arnd Bergmann , "Eric W. Biederman" , Kees Cook , Joel Fernandes , Thomas Gleixner , Tejun Heo , David Howells , Jann Horn , Andrew Lutomirski , Andrew Morton , Aleksa Sarai , Al Viro , Android Kernel Team , Linux API 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, Jul 24, 2019 at 7:47 AM Christian Brauner wrote: > > This adds the pidfd_wait() syscall. I despise this patch. Why can't this just be a new P_PIDFD flag, and then use "waitid(P_PIDFD, pidfd, ...);" Yes, yes, yes, I realize that "pidfd" is of type "int", and waitid() takes an argument of type pid_t, but it's the same type in the end, and it does seem like the whole *point* of "waitid()" is that "idtype_t idtype" which tells you what kind of ID you're passing it. Linus