Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2886945imu; Mon, 19 Nov 2018 07:35:42 -0800 (PST) X-Google-Smtp-Source: AJdET5fWG+6EA5j4M3lJ5KH67z/n9HjqQc/BzcfwqczRNjO1grBk6cod4aGCtLecy07RsFIM5otj X-Received: by 2002:a63:a401:: with SMTP id c1mr20612894pgf.403.1542641742286; Mon, 19 Nov 2018 07:35:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542641742; cv=none; d=google.com; s=arc-20160816; b=rz54H2d7A0vFIIQlHBrCet0hSutmdQvSCcgGLl1OlKV1tM3uAm7impMY4EKZBrR4ZT Aw7lHVS/VZEGOGvX7oDH59JXPtUrl+9VNth3ZpXjVan5576EwXIbJ/zkOmGbhl7bvwwF D1Pal0nBC/ZnQGOjGDH1rZJMSjyVSfimZEWlvwQYH+I3Q6OLnbXtyfERazV8M1xIrqOr kXAjvKLzMkP3yyMvgBMNuR7Ga9za3kXH8AJBL4X3TxjfDZpalYl2Sruz8GktCUY16auX FneyO/E9z4ztMumhSdz2tBy11FajEMKT9HzC35n4SNrocQlUmcGttsDo1bsUa+AeXv4w eo3g== 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=sHwkhBNkvftHJBS1ehPM4ASXBhRQU8qt95++KWUYPpQ=; b=v+UPdqWcItUvcwsOUSHts3Y2m3QnQH/ZztbtUyKaOCQaj457D5cPAfbJi+ikcRx3X9 QWt11F1p7+ylvqzsQMKgWM3xfiu3DKMPT0i9fZLpqdnhwjbWFnWjf4KeDV01tMHXUMyu UTfGfJZ4/vNeFy98+mdscnFOQRgRuymd3++3MUXLyHs58uf34m8cyO+gSOauxx25QPhj RJx9hSiuSsGjnRLHCEJJLFA64dzM6mv+l3cNre/MsOYH+GETs4BXOiFmghMbAFDTdoPh OlvxjmNyQgzeyyHQ1MbFDDPA91cH4unbVbW3ZswLc7HxCEDPsQtTHnVxsr/mjz/Zy0Mg rVMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nci0wZ8e; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i66-v6si43683099pfc.173.2018.11.19.07.35.26; Mon, 19 Nov 2018 07:35:42 -0800 (PST) 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=@kernel.org header.s=default header.b=nci0wZ8e; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729851AbeKTB4o (ORCPT + 99 others); Mon, 19 Nov 2018 20:56:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:57416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729762AbeKTB4n (ORCPT ); Mon, 19 Nov 2018 20:56:43 -0500 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 554A92146D for ; Mon, 19 Nov 2018 15:32:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542641566; bh=sHwkhBNkvftHJBS1ehPM4ASXBhRQU8qt95++KWUYPpQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nci0wZ8eHuR+UqxtTGNohjioV+zwGyTDpvvw3HtWdE/lfB0maBtfmneJ/gGwWClJE 2uolBazKzL1/ONYTpuaOFwyk6juwAmO2cIYUpe90jvEAIJwwiEnA9S5sZm567LYpeB 6VkJ1KrlK+1e9ule5m/Skwty8xKIz9S33CADxI+g= Received: by mail-wr1-f45.google.com with SMTP id u5-v6so27239602wrn.9 for ; Mon, 19 Nov 2018 07:32:46 -0800 (PST) X-Gm-Message-State: AA+aEWatc7+uTeH3SgX58z7H0c19FiZ6nWK5pBC/cOBrIiiwHVXaSfMa roMPiqX1iFmna74mrj7aZRR/+DkgOx2qXSw9qahqdw== X-Received: by 2002:adf:ea81:: with SMTP id s1mr216821wrm.309.1542641564760; Mon, 19 Nov 2018 07:32:44 -0800 (PST) MIME-Version: 1.0 References: <20181119103241.5229-1-christian@brauner.io> <20181119103241.5229-2-christian@brauner.io> In-Reply-To: <20181119103241.5229-2-christian@brauner.io> From: Andy Lutomirski Date: Mon, 19 Nov 2018 07:32:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/2] proc: get process file descriptor from /proc/ To: Christian Brauner Cc: "Eric W. Biederman" , LKML , "Serge E. Hallyn" , Jann Horn , Andrew Lutomirski , Andrew Morton , Oleg Nesterov , Aleksa Sarai , Al Viro , Linux FS Devel , Linux API , Daniel Colascione , Tim Murray , linux-man , Kees Cook 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 Mon, Nov 19, 2018 at 2:33 AM Christian Brauner wrote: > > With this patch an open() call on /proc/ will give userspace a handle > to struct pid of the process associated with /proc/. This allows to > maintain a stable handle on a process. > I have been discussing various approaches extensively during technical > conferences this year culminating in a long argument with Eric at Linux > Plumbers. The general consensus was that having a handle on a process > should be something that is very simple and easy to maintain with the > option of being extensible via a more advanced api if the need arises. I > believe that this patch is the most simple, dumb, and therefore > maintainable solution. How does the mechanism you're adding here differ from proc_pid()?