Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2948060imu; Mon, 19 Nov 2018 08:28:52 -0800 (PST) X-Google-Smtp-Source: AJdET5f6sZLNUvycvJUs+yir+QDP5c1/itLZSknJSwfP/iv9Jbw8cONdiHfZ7MheR+3nYTXJPQCN X-Received: by 2002:a62:6c89:: with SMTP id h131-v6mr23518611pfc.12.1542644932798; Mon, 19 Nov 2018 08:28:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542644932; cv=none; d=google.com; s=arc-20160816; b=WBNLrHMjbdLbfId7bv+zF3mYZZprgSYMVDcK5I+BdW5g2eSAbVrObCS1ukRRlHTELa w5duztEbxCCp9WVPLo/C/W8PGpQafcnVxlpGblPxSIAdBQmHWG9DGTxsK9IxN6qs5HZH smfd8VBtEhvb0yxoK0UdOoqHxeFLkzrUSjpQPvlDZ1bvoWTi2Mf7qwXi6YG8ivQ0P7Ab zbLWE4Wavi1tP2qiuUe04eOH6dE32jJxOxMoc7m/BPuo2hQ848J6w1ZN4RjP2iVCj9h9 8CSxZDunW6K0/cOFcwN4THDEx8OeuABiSk92pdwJeDgc0+goLWYfEeF35+Z9PrUkioef WfhA== 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 :references:in-reply-to:mime-version:dkim-signature; bh=rjT56Y3Hb0xyMumXvOFYWzCrqANEbDFkwo4obTq7yfk=; b=Z2NrnqnOKa/u4UAzceXt7G0IaL3A3mhbyRIt2qlI41ySPrdQdnm0DDGMhFLRUpYW4I a2ZNxsIGLh2Xhgqa7fohxZJYd5jx7C+JM6lW9yflGANcNQP8JZp3kdQOh+mOzmbI4RpJ t4IK6nyRxKZ/5BIfP2AONYb81+oCWwnMnpImmFcpKLaItvv+hQ5ivq53lHiik+Ilak1X 1atyjpcgf4SjgQ4EzOMJqrgA6jZM3jwuf8BFa0gfayso8pSAl/4jYrxByBUbddepZyIt YT2lWK01cXkGqLSC2H5S5o8HcE6yvwHuhMNR6v6iVcbSbiMBR7/rkCYo5QGRFZyWkqod Cmiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Xcwy3LzZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q21-v6si40390545plr.359.2018.11.19.08.28.37; Mon, 19 Nov 2018 08:28:52 -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=@google.com header.s=20161025 header.b=Xcwy3LzZ; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730030AbeKTCwG (ORCPT + 99 others); Mon, 19 Nov 2018 21:52:06 -0500 Received: from mail-ua1-f65.google.com ([209.85.222.65]:33057 "EHLO mail-ua1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729879AbeKTCwG (ORCPT ); Mon, 19 Nov 2018 21:52:06 -0500 Received: by mail-ua1-f65.google.com with SMTP id t8so3201500uap.0 for ; Mon, 19 Nov 2018 08:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rjT56Y3Hb0xyMumXvOFYWzCrqANEbDFkwo4obTq7yfk=; b=Xcwy3LzZQAQptpw75ewDX0jCn/iH+12JD/wHMlzH0HE4lfy6sp/acdgVgcirIsLU5M HNLFmXCEig3Tj+ZHco3Rsj0epRg+KkIJQwgMfIJO5EGTXDATjvtGPa+C7YhjJVtRgGtj pEGyTmij6v3T/msenqK26G1CKqgvsqMpu0sOrr6g33SCKvGiezICRmazN6GoMYA7z4jx /ZAm/MpKIv2dl6eWu6X+HA8L4/rHJXaQt63yB1V3d24kHvpftquzS03HfbcWs9bZYTX0 uf6zBQqtdlNo1bxTIJJsbglfEOloNhg5vVsOeZayYhHp2JDjy4hQlvy/K6Dv2b5YEVSr +xzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rjT56Y3Hb0xyMumXvOFYWzCrqANEbDFkwo4obTq7yfk=; b=JwssZcPmjgmS0spdxtGAqTPsLNNkVpkAxP6F5jWU0jILlBZ+9jdwRpHeb7+2tywQDQ JJtfHSNlLSi5eccZlcc0L1R2SeAde46YJYNxyrcwDVS7Cv8dxsLCdRcgmXFgOeeVxmQz mQGZ9C2cuVizsEUQC4KNUs3IPDoJUKrcjUZZSpwQc3OUcU6dyfWjuHYkL9tuor+QfYRp dQgQlNbUjtiadvoxfrDWkgEcOPMp5jePmW836i7Fvc/pvAlME1vaO8iyRFuUmfKecPKk Ib8qb74BU6pi/0XqpHF1/QOx4kJDUxLWamDZuSLD2FOATL0p2iQjOqXIMqzYe2VrfZ/k cfqA== X-Gm-Message-State: AGRZ1gILjQYmZOknVUM+7tzjqnHDTXXKPKJm4Kl4C/bJrJFI5cGmYWXr +IhKxBQWDMRS19nH96FPpLJ2lu10bg/chYqW1ow/Cg== X-Received: by 2002:a9f:2b44:: with SMTP id q4mr7066521uaj.126.1542644878352; Mon, 19 Nov 2018 08:27:58 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a67:f48d:0:0:0:0:0 with HTTP; Mon, 19 Nov 2018 08:27:57 -0800 (PST) In-Reply-To: References: <20181118111751.6142-1-christian@brauner.io> From: Daniel Colascione Date: Mon, 19 Nov 2018 08:27:57 -0800 Message-ID: Subject: Re: [PATCH] proc: allow killing processes via file descriptors To: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Andy Lutomirski , Randy Dunlap , Christian Brauner , "Eric W. Biederman" , open list , Serge Hallyn , Jann Horn , Andrew Morton , Oleg Nesterov , Aleksa Sarai , Al Viro , Linux FS Devel , Linux API , Tim Murray , Kees Cook , Jan Engelhardt , Andrei Vagin 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 8:13 AM, Dmitry Safonov <0x7f454c46@gmail.com> wrote: > I wonder how fast it would be holding a pid with another open()ed fd. > And then you need to read comm (or how you filter whom to kill). > It seems to me that procfs will be even slower with this safe-way. > But I might misunderstand the idea, excuses. > > So, I just wanted to gently remind about procfs with netlink socket[1]. We discussed netlink was extensively on the thread about /proc/pid/kill. For numerous reasons, it's not suitable for fundamental process management. We really need an FD-based interface to processes, just like we have FD-based interfaces to other resource types. We need something consistent and reliable, not an abuse of a monitoring interface. > Probably, if it's time to add a new API for procfs, netlink may be more > desirable. Definitely not.