Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2611124ybb; Sat, 30 Mar 2019 09:10:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwull2ASFmDxxZBRFcDns2Vz4HRqw8VRne5KmG66wlK++3tO5idr7q5haqXymXRTETXV7Mg X-Received: by 2002:a65:62c9:: with SMTP id m9mr46403929pgv.309.1553962253654; Sat, 30 Mar 2019 09:10:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553962253; cv=none; d=google.com; s=arc-20160816; b=p0M1/mHUF/cONwkyTmp6z6wL1vV5966Ze9YuFo36Pc4IfR2hgSWLyllnC7Txn7Sv2G Kycw8tJfmu+2WuKrhECOevQj9Olg8wPBBnreRIX321KQfRLOLpZNthhY6VD6fmE3hWJx CfWoiHlYvmjS0K811SSnZGfJoads88D7wVDiJHmATA9+5aXBaVM8x6fiSX1X7VaAeFFd O5rNq5WIJscAibPO5hstzK+pofBmmRbYkfWT85lg09JhkNZfg95HlcDm+yjbuI64ylsD Mi/zqYgcSu70h+K9cXQHO5dI/cN9qOw/o7VYQeAqgs4eisLy5RRGhbmp+NgbVIAN0m1z fNvw== 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=ZoGUtS9aezEjh657hTxl/2nLS7gtTCX3mBgWFI/otHk=; b=Ksj7uilRZNkXYjYIBgYTmCC6feNoQ65yDeOBTGxrg8ewTOvaGb3P+LwwKWlS2Od5BE 5A2E4stfXCEJNbdDKwS+tcCC23OFgLesFkLoNW9cjOmtNokkduEspKx/qjJZkPWQBPBA zh34lRw+hMfcVoPuUye00eBR6SOsmp2fXux8WxbZvU6zuoiKUAMPT7tXeor3U320xPZY TczyTM3Qn76P3UA8Rb9374HIz5/wQaMNtcNt5v/8ZTgG9btnZ47p0WM1p93z2yIAc8CH 2KpWOqa1GC+xzDOZEaLXtyOm9eypx2PRzcdSsTCl/NuYGJ04EwEvr9kAeDLx+E6XMgBH 1cHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=KWq5bClZ; 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 l91si4756910plb.336.2019.03.30.09.10.38; Sat, 30 Mar 2019 09:10: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=@linux-foundation.org header.s=google header.b=KWq5bClZ; 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 S1730938AbfC3QJ3 (ORCPT + 99 others); Sat, 30 Mar 2019 12:09:29 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:35247 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730733AbfC3QJ3 (ORCPT ); Sat, 30 Mar 2019 12:09:29 -0400 Received: by mail-lj1-f195.google.com with SMTP id t4so4516497ljc.2 for ; Sat, 30 Mar 2019 09:09:27 -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=ZoGUtS9aezEjh657hTxl/2nLS7gtTCX3mBgWFI/otHk=; b=KWq5bClZrtD2QuethBOJCCzwEJppfjZBsZLTGiLsWKEQKxLFPm9Xm2Jgtw6niIyN4i xwpVwq7Kqs15vLxyPXGNPBTsXJgjs76055HvxZxOkiAlk2qimGBSO22Uo5f9x2+NB8qF MuIV/iWYvCJHqrfU/luhOrxNr+ZysZ4NZXswA= 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=ZoGUtS9aezEjh657hTxl/2nLS7gtTCX3mBgWFI/otHk=; b=W/6pcIRQ5mOz9nc/FmTN3vlUZ5gakeDLEPelz4a07JeNAkR3HYE5B5f4oofdclwZuN HDcKcfdsU3O08UFOseZHOq1eqqXvZXResQux7PqhJ5tZhXufpy3M9bukslCjcTCPvMVy e5/GWN3RlhodAAVzw7hRIUmQq1ASNu25qU7n10+2Wc+DwnNZ64rTydGR/XZLLxGHYyje rZmPYrd3GeVv807yH7nmFPGU3MVkXi9bsUp+m2439ZUdClpOyUd6Fm5ikKjj7OPp3o1B LqJLi7WO3xweYT3b5mfDXAuRo4JSH2Ni/SMlLvFTnbGD02FNc4aSh+0xNsvYzdBfpNQt U18w== X-Gm-Message-State: APjAAAXjHb0Mlc0EtwQ5pNeb1b7pfExlkRHbwXUrjTt3C0S6asTPFgjT +s8fAgsxrrLKrV9oPL6uNkrHxFUL9bQ= X-Received: by 2002:a2e:974d:: with SMTP id f13mr29782703ljj.140.1553962167062; Sat, 30 Mar 2019 09:09:27 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id h14sm999402ljg.10.2019.03.30.09.09.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Mar 2019 09:09:26 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id h16so4466809ljg.11 for ; Sat, 30 Mar 2019 09:09:26 -0700 (PDT) X-Received: by 2002:a2e:3e0e:: with SMTP id l14mr23470417lja.125.1553962166079; Sat, 30 Mar 2019 09:09:26 -0700 (PDT) MIME-Version: 1.0 References: <20190329155425.26059-1-christian@brauner.io> In-Reply-To: <20190329155425.26059-1-christian@brauner.io> From: Linus Torvalds Date: Sat, 30 Mar 2019 09:09:10 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Christian Brauner Cc: Jann Horn , Andrew Lutomirski , David Howells , serge@hallyn.com, Linux API , Linux List Kernel Mailing , Arnd Bergmann , "Eric W. Biederman" , Konstantin Khlebnikov , Kees Cook , Alexey Dobriyan , Thomas Gleixner , Michael Kerrisk-manpages , bl0pbl33p@gmail.com, "Dmitry V. Levin" , Andrew Morton , Oleg Nesterov , nagarathnam.muthusamy@oracle.com, Aleksa Sarai , Al Viro , Joel Fernandes , dancol@google.com 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 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. Linus