Received: by 10.213.65.68 with SMTP id h4csp1306272imn; Thu, 29 Mar 2018 02:08:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+VV6HYjEXLFwLluiQxoXcaxuyp5TopHEvcV06aVgSYyylSlp2JZ4xo1uBJS3Y+TsXMP+H2 X-Received: by 2002:a17:902:96a:: with SMTP id 97-v6mr7433031plm.183.1522314490171; Thu, 29 Mar 2018 02:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522314490; cv=none; d=google.com; s=arc-20160816; b=kraQdULtgRgLgvegS0VncC8KvJVRpByZBNCI1H+2X4AhQ/EzYZx/iGjJhFwFuvaav3 8vLDVDGw+bQZIzWH1yLKFdzPloc7dqfgg0MmE8JAll6Oe/wujbddf0exv6QK4leMn+rP bN/3Sj6vTUvtO/vzmLEAppO3QzHcl6z/E9KIj4KUm+6jsx60AMggcYNknHD13l1Gyl2c gNEWKICs/IR1xiPnXukviujusHFW9p9zpXvbNOC576FtUbQB4epJB/Jlb1c4N30u+xWg whktxXczy3rHs7x9q1tCPls1KjzElac9l/w/Yj55d8qcAnr5fkVbyV5jF+MZ0P90zmaM ZqjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=hEZD19VYdcRxzHTr0N0p+J+J9x2G9AW0nziu+JngUo0=; b=lwGQzP8VgGLPDdJOFSXJraA6w/s+4yfaEgZi7HTyuc2Q61Yc4ACi3Gg63jEGIT8KLn U3nARqus6kMcMRQtiEIyUya/q13EcLc4+nPH+ESeio8jipgFUoIUnuGOoCirSYl056J4 E3xXCXrllGwKID1ZtIXNL0w1rKKxOe2z3BkWR1tPOEuAUyvXeAUtIrY+MCsvR4VeGeq0 hpMAM4CeWGudZbL5CBZ31id/mRZuo6pLUiWfEe7XIu/njGNzEpnQQEtIb38vbjKmGaHD dOz6Q8g3fAc3GCOsNhGvef5xgJzX5o04moqta8blO26bAURQAuXXOGq256ubcjmmjZNi vKqQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 s9-v6si5777425plk.490.2018.03.29.02.07.56; Thu, 29 Mar 2018 02:08: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752232AbeC2JHA (ORCPT + 99 others); Thu, 29 Mar 2018 05:07:00 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54788 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750946AbeC2JG6 (ORCPT ); Thu, 29 Mar 2018 05:06:58 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 511A4EAEB3; Thu, 29 Mar 2018 09:06:57 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-12.rdu2.redhat.com [10.10.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A439084440; Thu, 29 Mar 2018 09:06:44 +0000 (UTC) Date: Thu, 29 Mar 2018 05:01:32 -0400 From: Richard Guy Briggs To: Jonathan Corbet Cc: cgroups@vger.kernel.org, containers@lists.linux-foundation.org, linux-api@vger.kernel.org, Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, LKML , netdev@vger.kernel.org, luto@kernel.org, jlayton@redhat.com, carlos@redhat.com, viro@zeniv.linux.org.uk, dhowells@redhat.com, simo@redhat.com, eparis@parisplace.org, serge@hallyn.com, ebiederm@xmission.com, madzcar@gmail.com Subject: Re: [RFC PATCH ghak32 V2 01/13] audit: add container id Message-ID: <20180329090132.r3qfomigkw3hbwbw@madcap2.tricolour.ca> References: <20180328123912.49b11c98@lwn.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180328123912.49b11c98@lwn.net> User-Agent: NeoMutt/20171027 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 29 Mar 2018 09:06:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 29 Mar 2018 09:06:57 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'rgb@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-03-28 12:39, Jonathan Corbet wrote: > On Fri, 16 Mar 2018 05:00:28 -0400 > Richard Guy Briggs wrote: > > Implement the proc fs write to set the audit container ID of a process, > > emitting an AUDIT_CONTAINER record to document the event. > > A little detail, but still... I am understanding that you would prefer more context (as opposed to operational detail) in the description, laying out the use case for this patch(set)? > > +static int audit_set_containerid_perm(struct task_struct *task, u64 containerid) > > +{ > > + struct task_struct *parent; > > + u64 pcontainerid, ccontainerid; > > + > > + /* Don't allow to set our own containerid */ > > + if (current == task) > > + return -EPERM; > > + /* Don't allow the containerid to be unset */ > > + if (!cid_valid(containerid)) > > + return -EINVAL; > > I went looking for cid_valid(), but it turns out you don't add it until > patch 5. That, I expect, will not be good for bisectability (or patch > review). Nice catch, thanks Jon. That is very likely another victim of a git rebase to re-order afterthoughts in the right place. I'll need to be more careful of that class of bug, rethink my workflow, or script builds to verify each commit is compilable. > Thanks, > > jon - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635