Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp430131yba; Mon, 1 Apr 2019 09:09:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlmXg1axkojwV7LY50ESim9vpKDdiL3pudHbuG7C8jome4qRkY/1BLk1nA3G9QkLfyPJlo X-Received: by 2002:a17:902:a7:: with SMTP id a36mr65416645pla.267.1554134950142; Mon, 01 Apr 2019 09:09:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554134950; cv=none; d=google.com; s=arc-20160816; b=bbGou3Zw1YXCbFYMbhH5wh1b1PwZhZOxsyLckYAQu8Wm6BKGj/JiDWEg3xgxBxIQrt zyuBeXIWW+Kp5xqJzr29nLlv92GOEQ0dj5iqWhD3iv1EKSNEqW124PG4T86ZNt7Ji8ak QrCg8GT1LyFx4wlUG527SynDY7ef6Tv+J+u/3h0bShMrT5SvEs+H0yPA0bVpaKo+OSne FjIDkND3NhQvZZJkr19SqJnNBDJZ8XYiVnQ6Kte7Zd0LtP1KtLJgFDvhlOMxwbdFobhT qW+8tvpkX4nIsGfIlMJ9dvFYtk/gBNogbP6v3heomtfhUR3D4fgAWRddD0VnKVCD3HMS iOBg== 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=9zX6pW+dmmCXMEz4jCv0a4w3jGqqO84SK/D3MDTDCm0=; b=vmKp8XHVrPi2elyCE6UFCTctuYpxBa4Q9rTkKfCJKCQ5/EgvzCihCn0VffJe4Y9p+i K9kwXwhgQfM5q7iZsWRoBvgKzavmi0LmNtFPjZPf5OsuU8IxPe3OpKKauHsdoFrNVZPT 4Ej8/BxZtq7vW15/6Yh752HZfhMgfDT+Z4CqrMyBagZcERa+94IWyp08hQYRMft+ANHe JsS6IdRup8NYIdDJ3ghQDd2lOodWNskmaxMmidFdEia7DXcRwVoOW6TjoL+Nqk/0ALcF Nly9rcdEnRY08KkYY1NCzCh/kYfmNisTLITJpm+SytFKpiFL/KU28UOQ7JTHege71Wb8 lOmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MY6OYHwH; 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 c19si9095569pfi.230.2019.04.01.09.08.54; Mon, 01 Apr 2019 09:09:10 -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=MY6OYHwH; 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 S1728661AbfDAQIS (ORCPT + 99 others); Mon, 1 Apr 2019 12:08:18 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38061 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726854AbfDAQIR (ORCPT ); Mon, 1 Apr 2019 12:08:17 -0400 Received: by mail-lj1-f193.google.com with SMTP id p14so8707866ljg.5 for ; Mon, 01 Apr 2019 09:08:16 -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=9zX6pW+dmmCXMEz4jCv0a4w3jGqqO84SK/D3MDTDCm0=; b=MY6OYHwH/K9pFTSK+Hc6dMo3sYWaw5y4092j+7NxrZKSktB0Oq4qHjylDxqIpcNsZE vkrHIMPlIhCVYnn6kn7Ba5j7ru7eDu2I5IeR71OkYEZ4hWg7DtspqAGlIsm9nF99BPph Uh/OZMGeyTZkmrke+z/G/mSg01N+vKgcqyjCU= 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=9zX6pW+dmmCXMEz4jCv0a4w3jGqqO84SK/D3MDTDCm0=; b=jspQt8W2HqHZjH3pOnXrgaySa4T0q9Hyxf1vkBKXxnnDBpfUFjuzJPfdUA1bk8HVHa SKChPch03zS50oP/EyYHg792usu9puhISprZxtrCYYtPzKL6YQzXaQGHeE6Qtw1FlS1E s7aLMjk0bouUi8cf2rvD9ML0utR4i7cBN9NCCY3TWS1fAAbBeAd4IbzPJeDCuV6t1gI3 ajbz2bU/mFIHRsdqKEOF1blzlT8p6CzRwr77j26k2VzQf0rgSGD+oq2le3SOJyYj/pqe L/q8pZeJMn3FYtaJYfKUUFVRav0PWbT97i0NTJqVezrGb3YaM4nqC3Z1oM34eXCGTaw6 3w/A== X-Gm-Message-State: APjAAAXqFNQmtl1XhH8HUFKxi2WRQ1JYWpUlVLdteCGCE3NA9o++ICyX sZAklZ5YwhSkQTmb5HR1GvcqLooK1Oo= X-Received: by 2002:a2e:9b48:: with SMTP id o8mr561819ljj.51.1554134895557; Mon, 01 Apr 2019 09:08:15 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id f25sm1461606lfk.69.2019.04.01.09.08.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Apr 2019 09:08:15 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id l7so8695400ljg.6 for ; Mon, 01 Apr 2019 09:08:15 -0700 (PDT) X-Received: by 2002:a2e:9a91:: with SMTP id p17mr33165967lji.127.1554134506239; Mon, 01 Apr 2019 09:01:46 -0700 (PDT) MIME-Version: 1.0 References: <20190330171215.3yrfxwodstmgzmxy@brauner.io> <132107F4-F56B-4D6E-9E00-A6F7C092E6BD@amacapital.net> <20190331211041.vht7dnqg4e4bilr2@brauner.io> <18C7FCB9-2CBA-4237-94BB-9C4395A2106B@amacapital.net> <20190401114059.7gdsvcqyoz2o5bbz@yavin> In-Reply-To: From: Linus Torvalds Date: Mon, 1 Apr 2019 09:01:29 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/5] pid: add pidfd_open() To: Daniel Colascione Cc: Aleksa Sarai , Andy Lutomirski , 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 , 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 Mon, Apr 1, 2019 at 8:55 AM Daniel Colascione wrote: > > > > I wonder if we really want a fill procfs2, or maybe we could just make > > the pidfd readable (yes, it's a directory file descriptor, but we > > could allow reading). > > What would read(2) read? We could make it read anything, but it would have to be something people agree is sufficient (and not so expensive to create that rare users of that data would find the overhead excessive). Eg we could make it return the same thing that /proc//status reads right now. But it sounds like you need pretty much all of /proc//xyz: > We do a lot of process state inspection and manipulation, including > reading and writing the oom killer adjustment score, reading smaps, > and the occasional cgroup manipulation. More generally, I'd also like > to be able to write a race-free pkill(1) I suspect most of what pkill wants is indeed in that 'status' file, but other things aren't. Linus