Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1252709ybx; Thu, 31 Oct 2019 07:53:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTRZGmbPmJSTSHMvnHAat3TN4OFtfw7wELc5csES4PIMbwx5DNyOrx3Kjhalj5bMT6XlIU X-Received: by 2002:a05:6402:304c:: with SMTP id bu12mr6369072edb.230.1572533584854; Thu, 31 Oct 2019 07:53:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572533584; cv=none; d=google.com; s=arc-20160816; b=DHvDNhszLqp+p6bMu2s2QKyWpR71WxvhR1LN3qClcJ/TOfz5zdNcKI372Nwqz4etXv x60Ral29EQ/WRkIegEuRxMRAR5VkYlKKnmXvZAyD+WVVgreb53/Hkga5IaBVe9WABV9A T10xsGzuiPdh5o9I+stK85TIvtHhPEXrb4bz8f6d+TTzZPMnAKnLoacFwr6N10Y3DjwI D+fWOd0L2Hdk4Gg0ssjLttH9oWIptcVZQfezPzfBafCjMKkjddJGMckyDQrRu2qcBiC+ JPYMIrt2p0gLLe8k7PCc+VdPXY5rMRHlk3hw/b03vp/e8Ft1wesi2uY2NW1Ma5LPQSQ3 ON0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=3K6sCYQs8K5ApEcQ+TEBEBei1xOeMj1fQR7m/w4Dyos=; b=aYB6RQSZlA7/mYSyuSyk9WUpKLp+lynk/Jof4riWh5iRojZsV9Pnn6rfi+dUetjm2x 8xEdDyB2hSkdgD1xSE1p3EAAMDzZfUPxy4HDbaJ3PycPWIzPOqPS5RMKz0aYRLRCBeDo 5nX/1W51Q9OvVd9Ql6eAmqcBk/HtnZTn0QixsUO9tDTptcufyHi+xt9OI9t5ijrl6BQO 6Do4VWr7CvZZunUPo9Lhe3MQXj9meENZC7Rz4pLOsKudZjyzRIboxh+MgVVHv4ed2Mo3 ZpUk9cGjlH+EN71Dfz8Rbrr4c5uhTPArRvL5XgXJ3CE00B6NMEQCEM3ZVEcC3d7UZMij IySQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QRUNOzgg; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g19si3654761ejj.120.2019.10.31.07.52.41; Thu, 31 Oct 2019 07:53:04 -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=@redhat.com header.s=mimecast20190719 header.b=QRUNOzgg; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728141AbfJaOvS (ORCPT + 99 others); Thu, 31 Oct 2019 10:51:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:40535 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727995AbfJaOvS (ORCPT ); Thu, 31 Oct 2019 10:51:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572533476; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3K6sCYQs8K5ApEcQ+TEBEBei1xOeMj1fQR7m/w4Dyos=; b=QRUNOzggGbN5+k5bXOwQAKgFPb9ESz4KSnbo1rWcI4zzoYKewrrAR9XivJjs0jda4rrH8a Q3q3MKYRUAHdqLouGOoGKygRbuwRNwaRabaIiMxfBON6CRCOn9rifNH8UMEaF3KXNj0A44 FPDRhW2FIaMaDMbSThg0Si7YE4YP0wY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-230-piStzJfuPfqkyHSzRDB-TQ-1; Thu, 31 Oct 2019 10:51:14 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13D9E1800D6B; Thu, 31 Oct 2019 14:51:13 +0000 (UTC) Received: from x2.localnet (ovpn-117-13.phx2.redhat.com [10.3.117.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B3E160878; Thu, 31 Oct 2019 14:50:58 +0000 (UTC) From: Steve Grubb To: Richard Guy Briggs Cc: Paul Moore , containers@lists.linux-foundation.org, linux-api@vger.kernel.org, Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, LKML , netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, omosnace@redhat.com, dhowells@redhat.com, simo@redhat.com, Eric Paris , Serge Hallyn , ebiederm@xmission.com, nhorman@tuxdriver.com, Dan Walsh , mpatel@redhat.com Subject: Re: [PATCH ghak90 V7 20/21] audit: add capcontid to set contid outside init_user_ns Date: Thu, 31 Oct 2019 10:50:57 -0400 Message-ID: <3677995.NTHC7m0fHc@x2> Organization: Red Hat In-Reply-To: <20191030220320.tnwkaj5gbzchcn7j@madcap2.tricolour.ca> References: <20191030220320.tnwkaj5gbzchcn7j@madcap2.tricolour.ca> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: piStzJfuPfqkyHSzRDB-TQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 7Bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -Steve