Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp599103ybx; Fri, 1 Nov 2019 08:18:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMwid2xVMFOxFFI1YGg9+/Z6uWt3esHg7xOSweKnSb66xgvv/flyGZqxHIQ3TrxW5PgGIr X-Received: by 2002:a17:906:4891:: with SMTP id v17mr2804033ejq.110.1572621504038; Fri, 01 Nov 2019 08:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572621504; cv=none; d=google.com; s=arc-20160816; b=tqabs8LQbPgeJSKVt5yKYiS/8dqZOCZqCJGXZ4c8mpCnvjNcrIL8UA6Wb3FDYC7R2d NJ6a9wZlnFlZOKevJRGXZsMebGNk7CTGAia2n5CKbZuRDCN75lwtss7NlUf4k5clWhUr Y/hCxV7qX+qwaM6QoQ8tBuui4NegGq8CplSS++pbbrwS9cBS7u09dGaTzXzqrK4B6ov/ i0W26iTMa5ozFxuH/hfjaDEdIGXToB/WupJzcmKQIXDcD1oIfVGXyRLEuFahtB+1wKlV H0GUxen/mP3U4ryTxnuAs6ceTLBp+rFutt5RHulM9hX/WoTqybHuzKnLYqzFbQGOTigg tPfA== 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=luXHXJdFmIMPIk6jfSvlnkfMv6c6AfJ+truEUd44VG8=; b=iv9CXCWA6mACnGv3dmACjT94ruaGChYyK4xQ4gjstZGaLsvoUpjiiBX+3RCzw9K29j gC7YGvhj6VGBOoepXrMl3q2yHewSHWCRV4gbEHZlzbNa6ojtlFnI0DBTDxhmZC8/HRRj WJVrZj6ddEn8T/nDXIL6a6bhltR9tc8hWlyjLiaeTMUtJ/mizixWgoWNM2tLJYxqRT7b vE7VXv1oWfigop4JSXeq1YxNNRYhYSbGzqSiEpy/2LGYh1tDcSYv3MyxPFLVxfeo/T6I t2n1474hI4KPVVNUzsF+3CskLwTSeK+qUtj0IX4bq0BFhjl6RkI2jSWkiF/rVBa/Djc6 gMLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NzKItZg1; 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 gq18si6153771ejb.41.2019.11.01.08.17.58; Fri, 01 Nov 2019 08:18:24 -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=NzKItZg1; 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 S1728336AbfKAPOG (ORCPT + 99 others); Fri, 1 Nov 2019 11:14:06 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:56453 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727326AbfKAPOG (ORCPT ); Fri, 1 Nov 2019 11:14:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572621244; 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=luXHXJdFmIMPIk6jfSvlnkfMv6c6AfJ+truEUd44VG8=; b=NzKItZg1I9ZBMChKIZg7CLC5oBMbBqReN/etx2nAzvwobaUrpwf3OVRS2dQI2+EI8Eb5lq bCWK/dUChzuVvfSfbDY5JuGp1Eehce6z4vIyhuFvdoyKv2TCKlaZBSuGgwkPWu6HcDJtyo FpdC6jb34L1YC+OJhDsD0vY/WIlq89U= 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-214-Vi7mmKN8M8O4J34qRKFdng-1; Fri, 01 Nov 2019 11:13:59 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ADB25800A1E; Fri, 1 Nov 2019 15:13:56 +0000 (UTC) Received: from x2.localnet (ovpn-116-239.phx2.redhat.com [10.3.116.239]) by smtp.corp.redhat.com (Postfix) with ESMTP id 766295D6B7; Fri, 1 Nov 2019 15:13:47 +0000 (UTC) From: Steve Grubb To: Richard Guy Briggs Cc: 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 Subject: Re: [PATCH ghak90 V7 20/21] audit: add capcontid to set contid outside init_user_ns Date: Fri, 01 Nov 2019 11:13:45 -0400 Message-ID: <1592218.lpl3eoh2c6@x2> Organization: Red Hat In-Reply-To: <20191101150927.c5sf3n5ezfg2eano@madcap2.tricolour.ca> References: <3677995.NTHC7m0fHc@x2> <20191101150927.c5sf3n5ezfg2eano@madcap2.tricolour.ca> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-MC-Unique: Vi7mmKN8M8O4J34qRKFdng-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 On Friday, November 1, 2019 11:09:27 AM EDT 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. This also sounds good to me. But I still think loginuid and audit sessionid should get written in /proc//status so that all process information is consolidated in one place. -Steve