Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp857264img; Wed, 20 Mar 2019 12:20:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDcAkEBhYwWv4SAcX48tCD78xJSlCluSVifkb8as+Ong6nbNWN/qH03SvjRd2Xxc51UErx X-Received: by 2002:a62:1d8c:: with SMTP id d134mr9656791pfd.185.1553109650521; Wed, 20 Mar 2019 12:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553109650; cv=none; d=google.com; s=arc-20160816; b=eg5iGGR5x3+AKs/inC20qEbUw7l2ULoPrmBA7RCqBgdRXViPrgHJoXOvpr8OYbkwKi A1HdINf8kBD2NkxWU5K10mRspac4HizqvHOplj2/adZAsDmsWpfH1meri/Dx3F88M07K fNDFf+mDyh6y4dHj4EpczvxfexO9BJw3As4CKl/gwT5uXgm+EpYgqzGCPcTz0GaZt4cg sPSIge9Nsk03x/iQuPcX4fIROhPKYYedq8MQVsw/oSQA7slKfLUzhAeZU70APDxEeJIp 6EcsxyEi/XQ7w/NluHfz0DTiKFtIXjwpJOH6j6y1iFcTWekCnnuxyv3TpYQIoU64I4nf u05A== 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:dkim-signature; bh=5mMC0KQfG735C164EcTD+oEbBbnx3mNbSvIp42P1/ag=; b=sGYQwOc3FXpc6DjLggIscpm4bkhrRAuPZeUKRlKuJUw2lAEr7qERmwaPCc+rICo3nM hp0652UNQcmjV8HWuNulcyEID0oxG/p15nbApMfx08BqpyandaEC1tVbgydUphCe2GUJ uXv3EHawSH3BPZk0Ya56i7H51P3R1Rg4dhNVo/6aOn6xJPwtIglZ8HBTXPh6xq/ZAUHC e1OcqsES3W3qLYraA/OTDyR/2K5sAgPZlJ4zykC18NvUisa4xQ0l6ZFmK7bYGI1numaG ItQ9ez4xwQGXQAfO9ZXTudov3O7VcFqAXGyOzYFMvwC9FYVjGjoXgXMxOLm9ulDAkIsD wkOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=QmPJbJMB; 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 e9si2227827pgs.450.2019.03.20.12.20.34; Wed, 20 Mar 2019 12:20:50 -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=@joelfernandes.org header.s=google header.b=QmPJbJMB; 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 S1726767AbfCTTTi (ORCPT + 99 others); Wed, 20 Mar 2019 15:19:38 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:46998 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbfCTTTi (ORCPT ); Wed, 20 Mar 2019 15:19:38 -0400 Received: by mail-qt1-f196.google.com with SMTP id z17so2875887qts.13 for ; Wed, 20 Mar 2019 12:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5mMC0KQfG735C164EcTD+oEbBbnx3mNbSvIp42P1/ag=; b=QmPJbJMB9wKLf1bmnt3tiF7HqCc3zU327h3UXi5c8JGotzjL+VOVDTOEXl3wAoaEIu 9lAq+U7AMe3JsNkD/QoqLqLNVTcrH/nV+0YJxKHOpRootWoI8oATCWHjdDIFomwmlko/ uW0bKGgZvqQgDsmQl8QAYmYpsrgerWnYApdp8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5mMC0KQfG735C164EcTD+oEbBbnx3mNbSvIp42P1/ag=; b=l1750zSrWsSzM71GwJ8Z9fgcVd6PavMxXt5Io5ZfFctCe9COJlpPawLdlmJN1zjANC tzL2oXfGgrQ8e4/mnO24v45MclZmOmdbOgtAOHPrpBKVSXdWXUS/86ZecReCSafX/5Mj PFtN23OSQGQYHwdfbixSi0aIT0VpeOcyv0zqmBS66zFDDThr54svX0PSQKRD8ufGoA4P 8mXtFnCnnJQbIv3diYDrVFAiKKCVE4azVPIl4KjSltZBMubLY/2CycSNUI2Nr+aNwRdm a+0b0Zn8I4i/wyktfqGWys+2ZSLTWibkhA6prlHAVKDIHH/knnM7l6WPHgfnUYoKFFCU O+hQ== X-Gm-Message-State: APjAAAWtiZn4lxQolQYKVz/9vhTWYFRpwmQ2PhgX+rHQp6aGGnHF6Q2r wJJD4AHPWPBpSfYDNU+SbaesyA== X-Received: by 2002:ac8:3a63:: with SMTP id w90mr7586860qte.233.1553109577350; Wed, 20 Mar 2019 12:19:37 -0700 (PDT) Received: from localhost ([2620:0:1004:1100:cca9:fccc:8667:9bdc]) by smtp.gmail.com with ESMTPSA id 33sm1829081qtm.28.2019.03.20.12.19.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Mar 2019 12:19:36 -0700 (PDT) Date: Wed, 20 Mar 2019 15:19:35 -0400 From: Joel Fernandes To: Christian Brauner Cc: Daniel Colascione , Suren Baghdasaryan , Steven Rostedt , Sultan Alsawaf , Tim Murray , Michal Hocko , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Ingo Molnar , Peter Zijlstra , LKML , "open list:ANDROID DRIVERS" , linux-mm , kernel-team , Oleg Nesterov , Andy Lutomirski , "Serge E. Hallyn" , Kees Cook Subject: Re: pidfd design Message-ID: <20190320191935.GB76715@google.com> References: <20190319231020.tdcttojlbmx57gke@brauner.io> <20190320015249.GC129907@google.com> <20190320035953.mnhax3vd47ya4zzm@brauner.io> <4A06C5BB-9171-4E70-BE31-9574B4083A9F@joelfernandes.org> <20190320182649.spryp5uaeiaxijum@brauner.io> <20190320185156.7bq775vvtsxqlzfn@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190320185156.7bq775vvtsxqlzfn@brauner.io> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 20, 2019 at 07:51:57PM +0100, Christian Brauner wrote: [snip] > > > translate_pid() should just return you a pidfd. Having it return a pidfd > > > and a status fd feels like stuffing too much functionality in there. If > > > you're fine with it I'll finish prototyping what I had in mind. As I > > > said in previous mails I'm already working on this. > > > > translate_pid also needs to *accept* pidfds, at least optionally. > > Unless you have a function from pidfd to pidfd, you race. > > You're misunderstanding. Again, I said in my previous mails it should > accept pidfds optionally as arguments, yes. But I don't want it to > return the status fds that you previously wanted pidfd_wait() to return. > I really want to see Joel's pidfd_wait() patchset and have more people > review the actual code. No problem, pidfd_wait is also fine with me and we can change it later to translate_pid or something else if needed. Agreed that lets get to some code writing now that (I hope) we are all on the same page and discuss on actual code. - Joel