Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2612663ybb; Sat, 30 Mar 2019 09:12:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwF3cF0ZGZNaPSE+XXX2+nh+k6ASLcQ2yPF44grYDis0Hxf+YZgh3w63wVbneS5t3xJ1rN6 X-Received: by 2002:a63:1064:: with SMTP id 36mr24518336pgq.155.1553962373971; Sat, 30 Mar 2019 09:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553962373; cv=none; d=google.com; s=arc-20160816; b=Qe0O5nPBQ6qSOlTm6vUR1AV589i95M22Bt8+UbJnUkizRrRUMh9ru02Mxs0pQGFTUe pnnUtpYWWt9a9kfZFbrnuW0OXpB5eD0wgVRX9MM7oh2dinFZ55I+meSsRl8IeNXMneBY KQhlyxec28/D6qg03Hoh8Iebtp9wRzzu5JyLCjkBcJN7xKFx8avFs1lApLTQvGoAHVBx KiZeM/uDQq9iRL0Ma1eSEQIG+5oXyFvpkDQbN1hmFMyINmL2vZwYeXGjCgLF14wEXSO5 zIJ7p/OxX02vLjPUdxnlI67vhYj72hFYKrr1PSF3OnDa86TmWKsspaY3uAKLW2Uw+Hzh tH6A== 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=CpNOyL6dpK2H4PEQwORzPIg3umPBEXnJBvIn35JJ+is=; b=jEQxFLpcnIx+sJ8JY1A/0HDVCUewm2ZKB+vzP6sbLqOQt9r+XHb/jG84UReOYlt39Y IvkrPcs0Xm4AswOyR3JprxclnFv1Amd5pV3vzn2dxthoilROWF76h8uR0CJEOJuRB0hm 04HgFYwnIcBbUgSi6bVbtK9Su0tIPC4oihF5pumktkhz5duz6NYfzgm+5ouLWIdUqps3 k+nhXf1yAcBh02hdtzvT9EjyzONFnPk7tXOgZ0PFbRcQjS4RLy+i+X+LmdBW1mS+Pwlt k7rBBXrp1ohGK5JH44qDyED47n7NXZEMEEMlsR4L4NBcEIM6SzbHJvKO52qpF6oVOg5H eiuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=AR4Fl6t+; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si4603111plo.216.2019.03.30.09.12.38; Sat, 30 Mar 2019 09:12:53 -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=@google.com header.s=20161025 header.b=AR4Fl6t+; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730966AbfC3QLg (ORCPT + 99 others); Sat, 30 Mar 2019 12:11:36 -0400 Received: from mail-ua1-f66.google.com ([209.85.222.66]:44037 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730957AbfC3QLf (ORCPT ); Sat, 30 Mar 2019 12:11:35 -0400 Received: by mail-ua1-f66.google.com with SMTP id p13so1692733uaa.11 for ; Sat, 30 Mar 2019 09:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=CpNOyL6dpK2H4PEQwORzPIg3umPBEXnJBvIn35JJ+is=; b=AR4Fl6t+Wkeu1wHtC+pMv+KsiC0g6jXGbma0v5GisnpIy7q8avmvwhvijuc7vXlU+O KFoOWewTAkyQiVx5QUy9Q0RYsNXsDBuJO+/RTpCOcgL0FjywfU7H6rFIFvBK4DYyo+R+ vj5Z6Ljz7CRZtjP7A8+lorapM6Ku2MEo/1Lb2UR464TBZgK1d6/QXzpYdQaexEz8d5/5 cdC5F9ekPUvTNDayj6O+r4EYpCPIghHSMqs9+VxZzEnbu1XJYWaz/kn/RRmYWwCmUVmK llF/2Fw3DR3cWK0ftW/6dFpepZufp+wguzwE0PXnVZCXEixPVnqefmwO4/DwXQGRGzoq O7jQ== 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=CpNOyL6dpK2H4PEQwORzPIg3umPBEXnJBvIn35JJ+is=; b=mTjT4W5/RANAMVmVStAm4isc3S2AacIoAiz4J24tAR3SvJTbg8WeGOqm8+pcCAws2f z9wu8QBykj9YdJQGrVoAaThm9o2WX9je4IGN2f0a4E8UTYgWw2vQMDBVfQKKAYwOzOrd LbZ61O2AZgjZzI03zrh+9p5iYU1hbOZv2Kszp0nnWgP5HhgUwsmOYOKzkZrtDmEwQBqZ 6xwbGqlISXjEV4k3wswzOaLt8BIJOCjS5+L7KE6BwrSmVM3kLXq4JybXJ4n40bmc5bZf ZgFKkQxfuEePgLydjViX3HKCGfPFsf9JkQn2wGGtgZfQl/HD5qUd/kaIW/JvWqP3NIwG zb2A== X-Gm-Message-State: APjAAAWcGko5geD/3NHan2gJjwdD5l/pjWo4JHxXrX7SwJEEOaMP+XEN 7ezWFDPzH5Mh2Bi6WCwcTUzgZeEkE2+UTVGq2ItkZA== X-Received: by 2002:ab0:73d3:: with SMTP id m19mr32438404uaq.46.1553962293959; Sat, 30 Mar 2019 09:11:33 -0700 (PDT) MIME-Version: 1.0 References: <20190329155425.26059-1-christian@brauner.io> In-Reply-To: From: Daniel Colascione Date: Sat, 30 Mar 2019 09:11:22 -0700 Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Linus Torvalds Cc: Christian Brauner , Jann Horn , Andrew Lutomirski , David Howells , "Serge E. Hallyn" , Linux API , Linux List Kernel Mailing , Arnd Bergmann , "Eric W. Biederman" , Konstantin Khlebnikov , 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 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 Sat, Mar 30, 2019 at 9:09 AM Linus Torvalds wrote: > > On Fri, Mar 29, 2019 at 8:54 AM Christian Brauner wrote: > > > > /* Introduction */ > > This adds the pidfd_open() syscall. > > pidfd_open() allows to retrieve file descriptors for a given pid. This > > includes both file descriptors for processes and file descriptors for > > threads. > > I'm ok with the pidfd_open() call to just get a pidfd, but that > "pidfd_to_profs()" needs to go away. > > If you want to open the /proc//status file, then just do that. > This whole "do one and convert to the other" needs to die. No, no, no. How do you propose that someone open the /proc//status file in a race-free manner starting with the result of calling pidfd_open?