Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp835075yba; Sun, 31 Mar 2019 14:27:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1N7WYDc0J060WlPa3hv0RuxoqxjP3DJZ5P6rHNoj8aYiT5aaiIDZbsE2Mcx4C6vm/l3Zw X-Received: by 2002:a62:4602:: with SMTP id t2mr45129815pfa.26.1554067624505; Sun, 31 Mar 2019 14:27:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554067624; cv=none; d=google.com; s=arc-20160816; b=laGnBw6qu5iS/L+cc9b/ElEhcvd0kRGZxzLHmnlIlCe+uOjGjExlPlQ67e8FmiJD3t yIqE4mWTdRa4K1Z9cNOh4fqDb5onzKlhJ3F8VFAhT/KSq0enfQwM0KQFcuBDshT8u+dH BFgdjezMF0Y1PJ1sakzfvBr28PXF/rIqHkBOt1tjaFEHwSFlQUEkW3noby6A32MyIhIX UZeBWv85eKFHN2lWToUNmG0iRp3QESooOnh4SFocUYwtq56r45uJBOcUgx4ZRdXp9ppA FzyB9Tbr5zQX6m/NtGLDP+J3TiX/T4GTnF104Um+Zw+wKPW5OCBwcFveNQWc40QvcaqG 0zyQ== 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=QykvtwKNSA7Uszl/U2GAXS7tqZQaMfLNjJXLADD8ouU=; b=OmPp+nZrwqVeJhjGC1ISF40APGLlAWZJE1toPaiBakfKiqGkTD8S5oed9TXv4VSeUU TmRUSiTy8ghczdfO9Gk/Mn+swDCbu3sRItDhpbtg0kxuuKgoio4dLNM+KYcYR0gwIL0x kZfXr7X3t7uxy1KEIJ+8nR7PYh/UGecKDhcAqFZDUJUBfi8g6OZTqPjEkqJSpsSzZdUp RR3fehN2fXaMs5JFoDHHjO4Fn+j8I4vlT7lK65t4Ge7vC5OoK5CtfZezOB3QoWX8Z761 xwa3OHiGqu0DMjG2bvF0eycQh+fgT1DoSsZ2QwBDInugE9ryM8Gmi/nOvPj4Kcbkhi69 Rc5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Lk08/K+n"; 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 g90si7720745plb.51.2019.03.31.14.26.47; Sun, 31 Mar 2019 14:27:04 -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="Lk08/K+n"; 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 S1731364AbfCaV0J (ORCPT + 99 others); Sun, 31 Mar 2019 17:26:09 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42726 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731172AbfCaV0J (ORCPT ); Sun, 31 Mar 2019 17:26:09 -0400 Received: by mail-lf1-f68.google.com with SMTP id b7so4802368lfg.9 for ; Sun, 31 Mar 2019 14:26:08 -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=QykvtwKNSA7Uszl/U2GAXS7tqZQaMfLNjJXLADD8ouU=; b=Lk08/K+nKWPRv6fK0NepwcA1cTCEFTcQq3Itcl0wREPAY56rCAFih/74u/0CFEAFt3 tPMwvAacuIoyhUzZ8Twh3bZ9vnLesLddgYr6RabnJbhEoWNyvgptd7yauIJ4Z0WFWg13 iwIjWzyrxjxYLGh5rl8dKHv89NV0g4ckqn9I4= 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=QykvtwKNSA7Uszl/U2GAXS7tqZQaMfLNjJXLADD8ouU=; b=WZMokS4+MgWgFZ5f4osHx56GJcPnNIZqonffJwMd8E990QLzdWScag3ra3hRZrm8BI kts7woMzsdI3tg8KZrbLCJ8OtlLMN2h/UqbzQuHSWxgnNfsuVJ1hnpBV0oQOCMmxLFyM 7l4J8s+G4RYOfp5Uwvw8qND6zyNETqjdCuVk4mkq7fun6z45bFfWYzoLETilxyEICDSS AAj+vryOkXV2LX1jffV/o//aOyYKky2SQhNJ+BknXWeMHn4lpHRvyvDRieWqvWMX90et lcP1N4nUeYVnhnVliZ3ofS5FqsXpCkDlX2fjtY4r9kPNcIrshRNDMP3VtOCPde/oe7jt Zhdg== X-Gm-Message-State: APjAAAUw30pkre3N153z5GeEnjJ+lvONWNBlXPbl3jvU5jGEQmPbQReE URnhXwn9PsXNLZ4dKiF0PW36ja0mlBw= X-Received: by 2002:a19:520b:: with SMTP id m11mr32987155lfb.156.1554067567017; Sun, 31 Mar 2019 14:26:07 -0700 (PDT) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id x20sm1465341lfc.94.2019.03.31.14.26.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Mar 2019 14:26:06 -0700 (PDT) Received: by mail-lf1-f48.google.com with SMTP id y18so4823296lfe.1 for ; Sun, 31 Mar 2019 14:26:06 -0700 (PDT) X-Received: by 2002:ac2:4424:: with SMTP id w4mr30415952lfl.148.1554067084754; Sun, 31 Mar 2019 14:18:04 -0700 (PDT) MIME-Version: 1.0 References: <20190329155425.26059-1-christian@brauner.io> <20190330171215.3yrfxwodstmgzmxy@brauner.io> <132107F4-F56B-4D6E-9E00-A6F7C092E6BD@amacapital.net> <20190331211041.vht7dnqg4e4bilr2@brauner.io> In-Reply-To: <20190331211041.vht7dnqg4e4bilr2@brauner.io> From: Linus Torvalds Date: Sun, 31 Mar 2019 14:17:48 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Christian Brauner Cc: Andy Lutomirski , Daniel Colascione , 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 Sun, Mar 31, 2019 at 2:10 PM Christian Brauner wrote: > > I don't think that we want or can make them equivalent since that would > mean we depend on procfs. Sure we can. If /proc is enabled, then you always do that dance YOU ALREADY WROTE THE CODE FOR to do the stupid ioctl. And if /procfs isn't enabled, then you don't do that. Ta-daa. Done. No stupid ioctl, and now /proc and pidfd_open() return the same damn thing. And guess what? If /proc isn't enabled, then obviously pidfd_open() gives you the /proc-less thing, but at least there is no crazy "two different file descriptors for the same thing" situation, because then the /proc one doesn't exist. Notice? No incompatibility. No crazy stupid new "convert one to the other", because "the other model" NEVER EXISTS. There is only one pidfd - it might be proc-less if CONFIG_PROC isn't there, but let's face it, nobody even cares, because nobody ever disabled /proc anyway. And no need for some new "convert" interface (ioctl or other). Problem solved. Linus