From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A24C5C43381 for ; Sat, 30 Mar 2019 17:06:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 682BB217F5 for ; Sat, 30 Mar 2019 17:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553965561; bh=mIKvZh9CJ1i9Vx+2Q8/0zJnfmDx7ehV5+KlWUiTu6DI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=IGRU5/YGoFfrAW/BunYoziWWlLpYKfLgc7QsD65LrzyU6zN1VdGCrcri1OHdfkjsZ dBAWHOtb/pq0cwYwFRTGecxk6tCGpNKnJBIBE+v35kR2BQZ9h6Lt+3OHTGIkpYhbCq gX7qEjzzTwzljGvK+51Rt4xgwZ7I+SLlXiAEuJvc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730565AbfC3REx (ORCPT ); Sat, 30 Mar 2019 13:04:53 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36453 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730154AbfC3REw (ORCPT ); Sat, 30 Mar 2019 13:04:52 -0400 Received: by mail-lj1-f194.google.com with SMTP id r24so4579034ljg.3 for ; Sat, 30 Mar 2019 10:04:51 -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=MN10xuYvsg8+eHsG3Gm0v0OowWhETkrtz1/BCJnHmYw=; b=FUNTAiDipswLqNNPgeZ7vSuRVYSCtnYlT1nREDZfpW5iyUe1cAvLGZVjNFkFAbsdYy 62yWD1QS9vwDjoExF1XdMZua/vOAHABjX9srfjwpHNBocdifxMUdR4KlABofZewPh1bU +43++QHC2Y0jRsuxIVSSGNCrq0CO24XohHaQ4= 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=MN10xuYvsg8+eHsG3Gm0v0OowWhETkrtz1/BCJnHmYw=; b=f1f3LehTMVb63UOeFM+jHdKmGJeAzS4tSYX1MU5DX1AoXzj2EJxb1pI4KmyS2ADNMV 6EqVjFhKI2LJEh9lzQ2k85JHaSI6emHA5K6orhmqNqr2I5d79fTzcQhVuwqRLCIbxEy2 Oq6WELK+LHB1hLs7DuNtudD5apAOPbDhIN0pJ0VzFMYabIDNzeDAuyw18bG5jPtcmZmO VaSQl/D5zY+z01Ffmy7BHfZ/S0Rs/1L6yzsfFdYNKQuBdTTvtX0zKJUEkAlrZmz+083d CCQ/1hqN/RKsTohbV1XurTGTe0qNathY8ZROrY2z1cSszmGYrbxt7yqY90BhGvfv9pGR 25rw== X-Gm-Message-State: APjAAAWCngnfpDe9+qXhgDp2PapErm1Hs5gWw7VOcObY9nVNhB2c9GAg o5YfjQDjDl8N55I7ol7vep/ax0/fdi8= X-Google-Smtp-Source: APXvYqx3r4koB7Swj3EVEgB9PYjNcf3PUqqhYNYJ8wiDX6dL0AHGjSmbu4Ra/F63l6rGs3ljlMsMBQ== X-Received: by 2002:a2e:4e12:: with SMTP id c18mr25396424ljb.3.1553965490686; Sat, 30 Mar 2019 10:04:50 -0700 (PDT) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id k90sm1017553ljb.89.2019.03.30.10.04.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Mar 2019 10:04:50 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id k8so4557669lja.8 for ; Sat, 30 Mar 2019 10:04:49 -0700 (PDT) X-Received: by 2002:a2e:8149:: with SMTP id t9mr29953441ljg.2.1553965489694; Sat, 30 Mar 2019 10:04:49 -0700 (PDT) MIME-Version: 1.0 References: <20190329155425.26059-1-christian@brauner.io> In-Reply-To: From: Linus Torvalds Date: Sat, 30 Mar 2019 10:04:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Daniel Colascione 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:34 AM Daniel Colascione wrote: > > Just to be clear, I'm not proposing granting secret access to procfs, > and as far as I can see, nobody else is either. We've been talking > about making it easier to avoid races when you happen to want a pidfd > and a procfs fd that point to the same process So I thought that was the whole point of just opening /proc/. Exactly because that way you can then use openat() from there on. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() Date: Sat, 30 Mar 2019 10:04:33 -0700 Message-ID: References: <20190329155425.26059-1-christian@brauner.io> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Daniel Colascione 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 List-Id: linux-api@vger.kernel.org On Sat, Mar 30, 2019 at 9:34 AM Daniel Colascione wrote: > > Just to be clear, I'm not proposing granting secret access to procfs, > and as far as I can see, nobody else is either. We've been talking > about making it easier to avoid races when you happen to want a pidfd > and a procfs fd that point to the same process So I thought that was the whole point of just opening /proc/. Exactly because that way you can then use openat() from there on. Linus