Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp593535ybl; Fri, 10 Jan 2020 03:42:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxtp3/O8vGC5AiXr5n5mlMkvQYEMq0eXHDin96+Dcl5L5N5yjJxSaPp3lGILReiKFWT4/UO X-Received: by 2002:aca:4ad1:: with SMTP id x200mr1789318oia.104.1578656529205; Fri, 10 Jan 2020 03:42:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578656529; cv=none; d=google.com; s=arc-20160816; b=Zg/RgwYhKN5AcfqXoCFRFnzYagHV9WJhbZlE4q1WHIoS5ZLb14m9Xn62qGFNwRoPxa 5mYl05pdlAUNnZatHsXMreVwoyeOer1YpHR5x+dezygfvUh5C+DqzKxheweWRullY+Kj bNTHU/q8b4tkG8zWrzpZVtBtC4yb5i4Gjj0EvbQztKY3jK3X1QePRtzq0S1OrKRjbZJ/ 8enb/O0TP6k9seJQxlKbpp2EHuqlpSYTQyJWOnc4SR9atv1MUzCbE61TKxeuVirIPJ3h s1ZMRZK+6mWK4GRabK/rf3VY5cwQW8TD8Hmt07oHOQkZv0dIC31IuZE2Phd+nFuFVcEZ 4f7g== 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=oTF1GalrQUAHzuqHVyE7FHohgt2Ugv2IMB4ULfwFt1w=; b=c3kvpxLTxHM/TpATmTWu7pL5DZD7fOuiPaja9yxaFrvSfJuBtEGekNoXJMC/RA8YfW JFMTKpzfQQdOOZjbzzZVL4yTt5yKL3y2qM5Z10PQLKFtGuT0Uc2UiU2TdiA3YfjOg3Me XLimQSbGQe98loFQ/iH15pQLfISIS6Hwqzi5UdL3L2LkXG1jJ4RGTk1SQWDbFrI1A1JK bYJhuw7VY8ggdGe4xt2AxEIqWlcFB/umpAMjhn/sofOyqzvwGYFrgADzZVrZEt+ye3ew 9xmm9sUowHHMiXehbJo3mNHvAgtjSJe2jTFt85xro2zHSHyNe2UqLfZVbiuQQiXSlfmg 20fw== 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 x142si914767oia.220.2020.01.10.03.41.56; Fri, 10 Jan 2020 03:42:09 -0800 (PST) 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 S1727821AbgAJLlC (ORCPT + 99 others); Fri, 10 Jan 2020 06:41:02 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:47166 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727689AbgAJLlC (ORCPT ); Fri, 10 Jan 2020 06:41:02 -0500 Received: from ip5f5bd663.dynamic.kabel-deutschland.de ([95.91.214.99] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ipsew-0007ZR-Fb; Fri, 10 Jan 2020 11:40:58 +0000 Date: Fri, 10 Jan 2020 12:40:57 +0100 From: Christian Brauner To: Sargun Dhillon Cc: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, tycho@tycho.ws, jannh@google.com, cyphar@cyphar.com, oleg@redhat.com, luto@amacapital.net, viro@zeniv.linux.org.uk, gpascutto@mozilla.com, ealvarez@mozilla.com, fweimer@redhat.com, jld@mozilla.com, arnd@arndb.de Subject: Re: [PATCH v9 0/4] Add pidfd_getfd syscall Message-ID: <20200110114056.zuc6ft2o4qspmbl6@wittgenstein> References: <20200107175927.4558-1-sargun@sargun.me> <20200107205449.5dcp7o3hplg7r3fw@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200107205449.5dcp7o3hplg7r3fw@wittgenstein> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 07, 2020 at 09:54:49PM +0100, Christian Brauner wrote: > On Tue, Jan 07, 2020 at 09:59:23AM -0800, Sargun Dhillon wrote: > > This patchset introduces a mechanism (pidfd_getfd syscall) to get file > > descriptors from other processes via pidfd. Although this can be achieved > > using SCM_RIGHTS, and parasitic code injection, this offers a more > > straightforward mechanism, with less overhead and complexity. The process > > under manipulation's fd still remains valid, and unmodified by the > > copy operation. > > > > It introduces a flags field. The flags field is reserved a the moment, > > but the intent is to extend it with the following capabilities: > > * Close the remote FD when copying it > > * Drop the cgroup data if it's a fd pointing a socket when copying it > > > > The syscall numbers were chosen to be one greater than openat2. > > > > Summary of history: > > This initially started as a ptrace command. It did not require the process > > to be stopped, and felt like kind of an awkward fit for ptrace. After that, > > it moved to an ioctl on the pidfd. Given the core functionality, it made > > sense to make it a syscall which did not require the process to be stopped. > > > > Previous versions: > > V8: https://lore.kernel.org/lkml/20200103162928.5271-1-sargun@sargun.me/ > > V7: https://lore.kernel.org/lkml/20191226180227.GA29389@ircssh-2.c.rugged-nimbus-611.internal/ > > V6: https://lore.kernel.org/lkml/20191223210823.GA25083@ircssh-2.c.rugged-nimbus-611.internal/ > > V5: https://lore.kernel.org/lkml/20191220232746.GA20215@ircssh-2.c.rugged-nimbus-611.internal/ > > V4: https://lore.kernel.org/lkml/20191218235310.GA17259@ircssh-2.c.rugged-nimbus-611.internal/ > > V3: https://lore.kernel.org/lkml/20191217005842.GA14379@ircssh-2.c.rugged-nimbus-611.internal/ > > V2: https://lore.kernel.org/lkml/20191209070446.GA32336@ircssh-2.c.rugged-nimbus-611.internal/ > > RFC V1: https://lore.kernel.org/lkml/20191205234450.GA26369@ircssh-2.c.rugged-nimbus-611.internal/ > > I don't see anything wrong with this series anymore: > > Acked-by: Christian Brauner > > Other Acked-bys/Reviewed-bys and reviews of course strongly encouraged! > Christian Fyi, I'm waiting a few days on a reply from Al. Depending on his input the intent rn is to move this into my for-next early next week. Christian