Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3083817imu; Mon, 19 Nov 2018 10:22:00 -0800 (PST) X-Google-Smtp-Source: AJdET5d4vYnCJFSKy57eQZ06d68dYRYNfHRrdLKcGHexQ2z1+yoLgBLWhpppdd7uZJj64H0OTQUy X-Received: by 2002:a63:f74f:: with SMTP id f15mr21243084pgk.190.1542651720201; Mon, 19 Nov 2018 10:22:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542651720; cv=none; d=google.com; s=arc-20160816; b=x6hoEngbXnhnQ33MIRskz9D3AV1I8tqqXTr8J+ofKl21/BOiMQ0hXD1qOpXMiq/jq+ mK7zs7QzKjenHGqYit6cAwfPUEFfub2obVd7/qmJ7mciUlrQtaa6IkGMECeHJzcYc3Wl QNTFYfx1g+xPTbV7+NkxMqmXI/MFW5M/OLpt95NgpeyNEQlbmOvWJcrLlekEuLSe6F9Z yxAzq5jQFMz6360a/zvtno97HvWz1SoCEacGXeoqWcAOD1Ug0LnmJnRuQimcGFVL7x/R 9PWi4STNxA5V8DIR+IyxTaQcK1vbp1etfpoMg770xvPnZAUrORdpfIuxLr+U3Avb9aWL RVyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=cetOeM3wNE+xbTkSnfOy05RV8vvE0VAiYl8MZym5BT8=; b=BuSt7KNvMkPti+j9DKSHTwCgdXIrtFQPwBcA0wm+Z+Fpwzn7hs/GhYOvYP5x/+C/+y MiLyEDgqUrftVX9AEZx76/PvsxiI6hih4PdxWl8YLJENODVHWN2wTOkO8ZTWnHzceRcJ epTV8ASth7C0YsTtvBmis/onQ1neeMDsqDhAHixokdIej+QQTm/YjJsPQYcsNXFwIuva 8XlUm7Q/dQqqWADsn807Mt54Xs0FQKjFblRta/ZCnkPq0bRNbh8VE7ZaPUg9P9/HQYug QQvnKd6waA6gNdyUhwoHWqortqvdk3N1ojmzpRtMbq57BXYSuO8u56ydaWS1pD+Skqjf Wngg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brauner.io header.s=google header.b=Yn9TWYXG; 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 j195si1497485pfd.165.2018.11.19.10.21.44; Mon, 19 Nov 2018 10:22:00 -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=@brauner.io header.s=google header.b=Yn9TWYXG; 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 S1730203AbeKTEpe (ORCPT + 99 others); Mon, 19 Nov 2018 23:45:34 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:40144 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730128AbeKTEpe (ORCPT ); Mon, 19 Nov 2018 23:45:34 -0500 Received: by mail-pf1-f193.google.com with SMTP id i12so1959847pfo.7 for ; Mon, 19 Nov 2018 10:20:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brauner.io; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=cetOeM3wNE+xbTkSnfOy05RV8vvE0VAiYl8MZym5BT8=; b=Yn9TWYXGlwx6yJ6chj1YMJ/mJSLXfbvvEvL3JRCFf6Ul9ygDyYa9s9BJpXwf3avJfj tAzQz0DRWRnhKefy9/tiw7rTbVdUEfJeS/X3zgiOOQQ1un/y5Oeu03ErOvoePn5oCPNN 6rTf52+Wc/yc9JjSL8ZYO3A0S3b8iFK2LWbOtUnDYOuyVZ4JKBoqnoEDvR5QCJlk7Ob9 WznPiEX7fl5/QlqgjTRnh3RjpnwkXr1RJaIeHdTyX4ZlsHu+ycSzhORl8VQp11kmQkM/ YLX7KukI3VR6Agt7/i3znGfK3jV0HOwq6XQl+2u/LYfsPUdhHm8YrsaZwZbR3WtD2uHI GVjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=cetOeM3wNE+xbTkSnfOy05RV8vvE0VAiYl8MZym5BT8=; b=FMZtFn6ifqLj2kIKFCfdXf45RhQq9RJmzyz2zLKzLVL04hBXb1exOElTgFwwWR48lJ vI1w8aphfRYRjcidvAtZFQDIzBv64LUVw3Y5CY2DKmHbGBwRX88pvnSs4Sb9ZPFZhD8a KIs0pXthZXw7pyHzyE1iqotr4iwrgm8fup3cfCgUMEvclslpPue5/j+Het9GKLQN/rwB tjnNoCS/TNYj+dd/bk1+9IVqN6QQ4C+wMJZdROvXL13iRP/uFfQ0HNIRUiPpMPgAabx+ pFYoebf3ncy4yPPy/HSXK0t53hBd26LoYm5XwkqztKd+Z+sHYSuUPlyRIdziBG+mq/+c YJ4w== X-Gm-Message-State: AGRZ1gJBJOmUs2zF9s3WfA5Mfwt0a6flQGRVbuQPOi+3Ae/YJ0Knf2y5 9JJfHzGomwsMDI+dVjTNwBU5Zg== X-Received: by 2002:a62:995c:: with SMTP id d89-v6mr23838079pfe.11.1542651652808; Mon, 19 Nov 2018 10:20:52 -0800 (PST) Received: from brauner.io ([2404:4404:133a:4500:9d11:de0b:446c:8485]) by smtp.gmail.com with ESMTPSA id v89sm8814419pfk.12.2018.11.19.10.20.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Nov 2018 10:20:51 -0800 (PST) Date: Mon, 19 Nov 2018 19:20:43 +0100 From: Christian Brauner To: Andy Lutomirski Cc: "Eric W. Biederman" , LKML , "Serge E. Hallyn" , Jann Horn , Andrew Morton , Oleg Nesterov , Aleksa Sarai , Al Viro , Linux FS Devel , Linux API , Daniel Colascione , Tim Murray , linux-man , Kees Cook Subject: Re: [PATCH v1 1/2] proc: get process file descriptor from /proc/ Message-ID: <20181119182038.27obrbpxp54rhfxt@brauner.io> References: <20181119103241.5229-1-christian@brauner.io> <20181119103241.5229-2-christian@brauner.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 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 07:32:33AM -0800, Andy Lutomirski wrote: > 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()? I'm sorry, I am missing the context around proc_pid()?. Are you talking about the the proc_pid() function in "internal.h"? What exactly is the proc_pid() mechanism?