Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4448175img; Tue, 26 Mar 2019 09:34:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVuLuxDC9g3CnVRpehGMdYilFlPlpTkRENA9qa54bFVCfkGcnaztJ8bLRq+LEK5kJPBraf X-Received: by 2002:a62:2c91:: with SMTP id s139mr30781765pfs.196.1553618057884; Tue, 26 Mar 2019 09:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553618057; cv=none; d=google.com; s=arc-20160816; b=JedRSDlrWtJIhfITv+laxSv2B8fZOYTAAyVpF6NzLH63NeJ+sSceLxZYDljxBRRtVF RAdOoY8E0/iTCiHvwkylrQl9mmwfTmv5yGH+GGtKwfmVeUL9R56o1MIj6wVsz5CPWmrf +LSN8RAJAXdyAZ+uriqzvNaLZkTdJcDaXVeCy7lajpWE20FQRHN1GteQsdF1htaLB3+9 fxd4J+3rjEyYs9LFiiPPQOBuMQoTwbZvIAovRC6e02vJ4O6SnIE+zDH0nXaslIphYweu RhQwpvOhDXcoN1izLWdh9+4vLmdzPvYePpBUZIibvP510POGyn9x8C+Z3nc7pKWRCnni 2fEg== 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=KCnacKrc8DFlLRcPU7Ki/x6yPvPH4stxBokp6jHB87I=; b=1LbxOUJtku96+C6fQ8pUoaLc3mxbX7CmGDUqBUfCBbE6e0BmgAgMVaxg/j0E0RBfoX e6NCmd2yw9xH/ViboatYmgT6bmgHW/mt/u7R0A77h3lQtxxvaaj3a9UvgZeio/e0c6bP yDzaLUqeWJVKzph7W+FThqSZSQJg/5DBODeh+5MIDv4lqVcqR4u+nMicWbq0Fh3APSq+ xIbQ3/agodqgnof8CvwVMUfqkTZWw07kIzSTWBR3nb5rJbB38ylHXEtGVwh104z0stEh 1mzu1CnNUigFWJRkroMRkoSwzwy3AUCZ+sBEQcDdmhIfmxLQfcQbaSIBMxGV1zA0RhBX YheA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=WAdfCSi7; 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 gn6si6092128plb.167.2019.03.26.09.34.01; Tue, 26 Mar 2019 09:34:17 -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=@brauner.io header.s=google header.b=WAdfCSi7; 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 S1731901AbfCZQbs (ORCPT + 99 others); Tue, 26 Mar 2019 12:31:48 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:40861 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730697AbfCZQbs (ORCPT ); Tue, 26 Mar 2019 12:31:48 -0400 Received: by mail-ed1-f65.google.com with SMTP id h22so11332117edw.7 for ; Tue, 26 Mar 2019 09:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KCnacKrc8DFlLRcPU7Ki/x6yPvPH4stxBokp6jHB87I=; b=WAdfCSi7Z4am1r0dJAr7cAl5FLgFwRjXhX+3WR07yfRNXBXd7bJHeQe88mlwGncbG5 NSDhZIIPcaWgQr1auVMPeWfJOc4hF2BbJeBIuFOLc/q05DprgpFg/9PJs2QGMvldxUNG pj/eJE2UafShwf6zoQcfhHhbokZ6xIa9oi+YlT1CqNU8J7dtCfDtC26r2LufEpl/PsA7 DFfJArN+sBkfIxiUyD6N2Lo1aAd9RiFsxMQmi1KSaaq1lJfnIa9UmIhA0czzH5hC7kSU MFFx70ZF0G2KtfRxu5fEje78SXKPcbokoLjRLkgHg44lnx16hJlt/XjUNR1zdN9RMRaD zcLw== 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=KCnacKrc8DFlLRcPU7Ki/x6yPvPH4stxBokp6jHB87I=; b=t9TgpjA0/A4hspsKQ/U63wSu/ZgBqaVK87ePE2PoUWEfqAwo+GovlVAGFMHep1kwrD jTwineM0eMw1DbcHOUA41f/3DAe6XVcv4Bzs7D5m7wjSjK3ok4UviI/vxR9UiefBibMd EnPSYL57Eelor2BooDsQM+4GhSKYH5w5owoJ1yaK49dqY4QN5+HINkZ2nIvhzmh42O88 bS5AMB1HXYM+Ls0uQPTygZvEAvUeSdrh5SR22PmxiZRydlXReLq1aKmPgqGUhlNi/N84 wRraFJ0BTvs13RmcCfHb2C0rl9Y+Tmx8BKQ76KSguynrjMxeVJqm+OTg2vekNZ8EHDLS fD+A== X-Gm-Message-State: APjAAAWJ7ipbQ0r92HEqUwJmrnuSgFbPEzulJb4E3m0AjDS3bxu5D4I1 PDpGxfztR+K3dc33KE5kCTJ0Gw== X-Received: by 2002:a17:906:3482:: with SMTP id g2mr18064953ejb.214.1553617906280; Tue, 26 Mar 2019 09:31:46 -0700 (PDT) Received: from brauner.io (x59cc895e.dyn.telefonica.de. [89.204.137.94]) by smtp.gmail.com with ESMTPSA id d23sm1663882eja.42.2019.03.26.09.31.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 26 Mar 2019 09:31:45 -0700 (PDT) Date: Tue, 26 Mar 2019 17:31:43 +0100 From: Christian Brauner To: Daniel Colascione Cc: Jann Horn , Konstantin Khlebnikov , Andy Lutomirski , David Howells , "Serge E. Hallyn" , "Eric W. Biederman" , Linux API , linux-kernel , Arnd Bergmann , Kees Cook , Alexey Dobriyan , Thomas Gleixner , Michael Kerrisk-manpages , Jonathan Kowalski , "Dmitry V. Levin" , Andrew Morton , Oleg Nesterov , Nagarathnam Muthusamy , Aleksa Sarai , Al Viro , Joel Fernandes Subject: Re: [PATCH v1 2/4] pid: add pidctl() Message-ID: <20190326163142.4eh5qpgiqvygf26w@brauner.io> References: <20190326155513.26964-1-christian@brauner.io> <20190326155513.26964-3-christian@brauner.io> <20190326162337.o256x7hiodu2qfyg@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190326162337.o256x7hiodu2qfyg@brauner.io> 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, Mar 26, 2019 at 05:23:37PM +0100, Christian Brauner wrote: > On Tue, Mar 26, 2019 at 09:17:07AM -0700, Daniel Colascione wrote: > > Thanks for the patch. > > > > On Tue, Mar 26, 2019 at 8:55 AM Christian Brauner wrote: > > > > > > The pidctl() syscalls builds on, extends, and improves translate_pid() [4]. > > > I quote Konstantins original patchset first that has already been acked and > > > picked up by Eric before and whose functionality is preserved in this > > > syscall: > > > > We still haven't had a much-needed conversation about splitting this > > system call into smaller logical operations. It's important that we > > address this point before this patch is merged and becomes permanent > > kernel ABI. > > I don't particularly mind splitting this into an additional syscall like > e.g. pidfd_open() but then we have - and yes, I know you'll say > syscalls are cheap - translate_pid(), and pidfd_open(). What I like > about this rn is that it connects both apis in a single syscall > and allows pidfd retrieval across pid namespaces. So I guess we'll see > what other people think. There's something to be said for pidfd_open(pid_t pid, int pidfd, unsigned int flags); /* get pidfd */ int pidfd = pidfd_open(1234, -1, 0); /* convert to procfd */ int procfd = pidfd_open(-1, 4, 0); /* convert to pidfd */ int pidfd = pidfd_open(4, -1, 0);