Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp826323yba; Sun, 31 Mar 2019 14:09:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqy85pgJDEJaAnD8oTKPySzLWtS+8RX9pcTgsNNK98z60XjAUz5X9WE1AvOXXgTMonrUJMLa X-Received: by 2002:a17:902:f08a:: with SMTP id go10mr46866830plb.121.1554066591590; Sun, 31 Mar 2019 14:09:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554066591; cv=none; d=google.com; s=arc-20160816; b=Idy07+AIyhgR11qK8i/jBZJn8fg2c3BA9Ebzyu4R0tmiBC3zoElEqTGdm+vwsh0Yy3 dNhexLCgIDs1U7FVOKVTbXhd/57kHyplRkourX1geCwtiAjZVF0D0KrJlxE61UtNHacs nfIyi95xjyYCAWzGnnzPQLxisSw6U/iOgjtMQVH5WkQu65LfsRNrL9XoeyYOsYt8nkyp NYsrXJB2cQanHtHWeUcMayfehnwC5gZQrnSprmuKTNxXcFGU8559litI90sonQ2W9giK 85INr/jqyKxH7LnWQ1gPqCTiTPh4PnhyT2ooCT/h3r6Ls93rPIg/Bv6P9mW0fB29x12p 7UqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NZ6pzV6QHfbHCL8L+ezA32HXQct3ZB9v5O//edAOK4I=; b=qlpuwNNong50FBgqY9ImF+bVWTxHgEL0g1IBC8nHUqpgIDkUi2a1H2rI8m9gZOYk6K B/QTdaIaHrekovjXxUaNCmmlmOI1RNEIltiygUg+6axK2TGuAkSa+5J2U4awjRH4uZmm Yf/aZGNWIWDKqrHQYgiHqGzAH8eyIvtThHnmxLFsK4JQ4sCkVu6hG8NrlXGvPmhadTa1 +F1gm5HKOtwFX73g20+XFjxTZjztL/nW4N+FWzL7srufdIuXgssJmPoGG3LLDI6xp8AV YYJQgnC4syrN9hF5GP0vyO+mlT/cDO0VAlNEuKgnIn/hSW1VXaIMUyGPV3v6mS+c8bNr 39Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=EZUihtkG; 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 a12si7006532pls.209.2019.03.31.14.09.34; Sun, 31 Mar 2019 14:09:51 -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=EZUihtkG; 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 S1731382AbfCaVI4 (ORCPT + 99 others); Sun, 31 Mar 2019 17:08:56 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:43753 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731172AbfCaVIz (ORCPT ); Sun, 31 Mar 2019 17:08:55 -0400 Received: by mail-lj1-f194.google.com with SMTP id f18so6257844lja.10 for ; Sun, 31 Mar 2019 14:08:54 -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:content-transfer-encoding; bh=NZ6pzV6QHfbHCL8L+ezA32HXQct3ZB9v5O//edAOK4I=; b=EZUihtkGeKLmRMhGIeuSik8uxrcGxdsIQ/fjmtKQiBsK39R01RVJ6NZHgEprrOmAVh L+yrS8FMizlaNeCysFug8AUXaROL1GIavFYLb/5FkkZ3TS4wnD9Dib9605c/iO+6mWn8 yIPOoaQ3MVt4RTenKDqBuWKSqkXsYgnzFoaMg= 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:content-transfer-encoding; bh=NZ6pzV6QHfbHCL8L+ezA32HXQct3ZB9v5O//edAOK4I=; b=frIkq06Fhy1HuLq7zPwdz1RA2DbsUbxwtu+G6duQADO92z2sEEtigoFiytv+DTKXap 6YD1aNlznHwlK3o1/ApCBIXqj1RxX1TKjzR1iuFKcM3oy7G0FJQovoLm+6u+a7fVDEj8 1B2wMzk8sVXcSzz3T9xLcvmk64h1i09LBBCmIfKI7qLv/zTklPdrX2zKA+bCbRazUdT7 pqvWGjtET4ol5eYT3/H1KtGQUe7wI/9MTS+WItK14VQlVZ9AduWhFunQCiu/o5JgtwDf xDpIHsPDv0a/i6k0aRSMO4615LGJka39BKWnvOCJKrxZCCxoVGmx0TQeDZY6i5RoEh3k XB5A== X-Gm-Message-State: APjAAAUlIfPURY1m2Q4kPupW2e5/8+r31+bN10e5KkvFmJuW7THiqtD+ VVWHLg3Y7NhvxrnCrviL26YEf9+IdRU= X-Received: by 2002:a2e:128a:: with SMTP id 10mr35782903ljs.170.1554066533507; Sun, 31 Mar 2019 14:08:53 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id c64sm1450702lfg.70.2019.03.31.14.08.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Mar 2019 14:08:53 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id t4so6287939ljc.2 for ; Sun, 31 Mar 2019 14:08:52 -0700 (PDT) X-Received: by 2002:a2e:960b:: with SMTP id v11mr22820985ljh.135.1554066221711; Sun, 31 Mar 2019 14:03:41 -0700 (PDT) MIME-Version: 1.0 References: <20190329155425.26059-1-christian@brauner.io> <20190330171215.3yrfxwodstmgzmxy@brauner.io> <132107F4-F56B-4D6E-9E00-A6F7C092E6BD@amacapital.net> In-Reply-To: <132107F4-F56B-4D6E-9E00-A6F7C092E6BD@amacapital.net> From: Linus Torvalds Date: Sun, 31 Mar 2019 14:03:25 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Andy Lutomirski Cc: Christian Brauner , 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" Content-Transfer-Encoding: quoted-printable 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 1:38 PM Andy Lutomirski wrote= : > > openat(fd to pidfd=E2=80=99s proc directory, =E2=80=9Cstatus=E2=80=9D, ..= .); > > And we want a non-utterly-crappy way to do this. The ioctl is certainly = ugly, but it *works*. It's beyond clunky. It's a disgrace. If people really want equivalency between open("/proc/%d") and some new pidfd_open(), then just *make* the two equivalent. No effing crappy ioctl idiocy to create one from the other. Just make the damn things be the exact same thing (and then if we extend clone() to return one, make that return the same exact thing too). Btw, we have several clone bits left: - if we don't have CLONE_PARENT set, the low 8 bits are still available - ignoring that, wehave bit #12 free: It used to be CLONE_IDLETASK long long ago, but it was always kernel-only so it's never been exposed as a user space bit. Linus