Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp729294ybx; Fri, 1 Nov 2019 10:17:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/1VATl3ch/dFhqhkt5zXRb/Mtpqgb77Ns6uJYhTPNUrthzr1PsLMwFYTsqK8UkzVDOPPq X-Received: by 2002:aa7:d945:: with SMTP id l5mr14127158eds.279.1572628633976; Fri, 01 Nov 2019 10:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572628633; cv=none; d=google.com; s=arc-20160816; b=vGc8mkr8DblN4msR9GOq2NCI4Z/tlnXzyiQWIuAoRH/4nD2OGwpyBVbJUt/sOaZ0lg YS7VPGsOrhaFA/9r/uvBBNJWBdUElCCyzx8VrEqx+NOlyJBADlP+uLp9nld2hNnUAuIr Ls81lXxhBgtCuSOi/MQee3MKt7gQ+Ofrlox2n16JJG6AVOuUwai/ulMVONkNhsU61t+U /6ssJqe29o9VgtVeXG9ihArrmB7/QuldJyZXbRssh7qbXbygsmWckHISeffQ5RgY5bjz HkLC3e4TsTGvUkfSQjBBRyVgkMgCpL3zl197B6866pGCq9C1Zez9x8DT7/iHI5VwqxvL 0huQ== 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=P52uQ/03xxtLBhBJNHvX72kCEGcrZADr6ibMXyDJZUc=; b=jelU7VTXpWqIWCRMJwKKLyhx7y4OXzzQqAUhqYtXTyzCtwqcM/17b9HoLAKjrZXbjc Em5irRL7tajBKuKz7HprabUxla/OkNbXNm7YnAskgDsgDqB0QmyHXlVIrL55sFOVdoWb 0KlNuUxWpLHC9kZhNf1EYN4jm+lsek3qaX/VbR7vrdmvgcqYZ0p9mW5Qlrw5JvidZS+a KHuGhpInemuU18vwjU9IyoVSpzCVn0nQL30TjljDToj/ayyh9NvNmZ0CFXivT+kcxAaY 8aN2Pmq48g+F85ePTXgu5Jvnc3+ZAu45weE7pXj3Zwi6i+vgnbJRvbB5usyF3iKNMRM6 51Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=jPDkkCiV; 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 nr20si6101542ejb.387.2019.11.01.10.16.50; Fri, 01 Nov 2019 10:17:13 -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=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=jPDkkCiV; 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 S1727411AbfKAQWZ (ORCPT + 99 others); Fri, 1 Nov 2019 12:22:25 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:40114 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727107AbfKAQWZ (ORCPT ); Fri, 1 Nov 2019 12:22:25 -0400 Received: by mail-lf1-f68.google.com with SMTP id f4so7625531lfk.7 for ; Fri, 01 Nov 2019 09:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P52uQ/03xxtLBhBJNHvX72kCEGcrZADr6ibMXyDJZUc=; b=jPDkkCiVQPhHdoqN3gETpPamjcSd0LaHORCRp24yq4o03d+MD9DpVGn/wq9II2U9Nk F3ZajoXsjiQ+TdEtY2Bez94BYUoVZ2Ob7wuMmMcKvjVBc1yts+OjP0vbSJcZRGtg6omT YCemZmox+cA9hxNDd/Y/Y8TMEssNiNI1lNDU1HfEkMYm7lrbQSIWBhRYL20eF3eXLaYB WMTxbN36cLWM60qesLy3Tn/AQ2PcPx+t9f3gzhWCvtPyWd+tP6kcAsulQfN2GFd/Xtqt WCCxWkMry213UO6vCKH9/7zUOLnXitsgv+cyTZe7wSQHdShLxWcJJIYMEpfpyafMdkns iHGw== 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=P52uQ/03xxtLBhBJNHvX72kCEGcrZADr6ibMXyDJZUc=; b=W8xv6wgI2zXkkCVAJXuMkxXwDrum+W5bzj41J+GXsPuV2YessHdgqVqZgn8tT8J0EF GvTjjSiXBY65Zik9DmxBItvQIdXZOnrOnHgviF3lUym66Z+1z40SlbHnOF37dgrcNCbr tjZydHHKaEh/TUg6MV52Kd3+ufoPpFcbaKflb/BbqLkGN3abB8uStnTC9LnzWk6mn/R4 y3XfbLkjlEUIKNJ30dYosjyaYppoJGk6ybNn+vt5hsjNgQJzZEsBjsuXW5QcKRKY/0mO RS+mKkIE/W2YPIYpULo2QOGgpoTFissY6HXTJ3E1R5bpKypEmFrol6zNTVU/Volasuvt 6g4A== X-Gm-Message-State: APjAAAUgOIlG5ca1fJj/PpvrMskhk/TscjYYQZRksNWy5EOnunlKNN0d MvO3DtNrhpmukevzH/c1Pgowp6zC/bFjWkdVxN0t X-Received: by 2002:ac2:5967:: with SMTP id h7mr7585007lfp.119.1572625342721; Fri, 01 Nov 2019 09:22:22 -0700 (PDT) MIME-Version: 1.0 References: <20191030220320.tnwkaj5gbzchcn7j@madcap2.tricolour.ca> <3677995.NTHC7m0fHc@x2> <20191101150927.c5sf3n5ezfg2eano@madcap2.tricolour.ca> In-Reply-To: <20191101150927.c5sf3n5ezfg2eano@madcap2.tricolour.ca> From: Paul Moore Date: Fri, 1 Nov 2019 12:22:11 -0400 Message-ID: Subject: Re: [PATCH ghak90 V7 20/21] audit: add capcontid to set contid outside init_user_ns To: Richard Guy Briggs Cc: Steve Grubb , nhorman@tuxdriver.com, linux-api@vger.kernel.org, containers@lists.linux-foundation.org, LKML , dhowells@redhat.com, Linux-Audit Mailing List , netfilter-devel@vger.kernel.org, ebiederm@xmission.com, simo@redhat.com, netdev@vger.kernel.org, linux-fsdevel@vger.kernel.org, Eric Paris , mpatel@redhat.com, Serge Hallyn 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 Fri, Nov 1, 2019 at 11:10 AM Richard Guy Briggs wrote: > On 2019-10-31 10:50, Steve Grubb wrote: > > Hello, > > > > TLDR; I see a lot of benefit to switching away from procfs for setting auid & > > sessionid. > > > > On Wednesday, October 30, 2019 6:03:20 PM EDT Richard Guy Briggs wrote: > > > > Also, for the record, removing the audit loginuid from procfs is not > > > > something to take lightly, if at all; like it or not, it's part of the > > > > kernel API. > > > > It can also be used by tools to iterate processes related to one user or > > session. I use this in my Intrusion Prevention System which will land in > > audit user space at some point in the future. > > > > > Oh, I'm quite aware of how important this change is and it was discussed > > > with Steve Grubb who saw the concern and value of considering such a > > > disruptive change. > > > > Actually, I advocated for syscall. I think the gist of Eric's idea was that / > > proc is the intersection of many nasty problems. By relying on it, you can't > > simplify the API to reduce the complexity. Almost no program actually needs > > access to /proc. ps does. But almost everything else is happy without it. For > > example, when you setup chroot jails, you may have to add /dev/random or / > > dev/null, but almost never /proc. What does force you to add /proc is any > > entry point daemon like sshd because it needs to set the loginuid. If we > > switch away from /proc, then sshd or crond will no longer /require/ procfs to > > be available which again simplifies the system design. > > > > > Removing proc support for auid/ses would be a > > > long-term deprecation if accepted. > > > > It might need to just be turned into readonly for a while. But then again, > > perhaps auid and session should be part of /proc//status? Maybe this can > > be done independently and ahead of the container work so there is a migration > > path for things that read auid or session. TBH, maybe this should have been > > done from the beginning. > > How about making loginuid/contid/capcontid writable only via netlink but > still provide the /proc interface for reading? Deprecation of proc can > be left as a decision for later. This way sshd/crond/getty don't need > /proc, but the info is still there for tools that want to read it. Just so there is no confusion for the next patchset: I think it would be a mistake to include any changes to loginuid in your next patchset, even as a "RFC" at the end. Also, barring some shocking comments from Eric relating to the imminent death of /proc in containers, I think it would also be a mistake to include the netlink API. Let's keep it small and focused :) -- paul moore www.paul-moore.com