From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36248 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728056AbeGVO2v (ORCPT ); Sun, 22 Jul 2018 10:28:51 -0400 From: Steve Grubb To: Richard Guy Briggs Cc: Paul Moore , cgroups@vger.kernel.org, containers@lists.linux-foundation.org, linux-api@vger.kernel.org, linux-audit@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ebiederm@xmission.com, luto@kernel.org, carlos@redhat.com, dhowells@redhat.com, viro@zeniv.linux.org.uk, simo@redhat.com, Eric Paris , serge@hallyn.com Subject: Re: [RFC PATCH ghak90 (was ghak32) V3 02/10] audit: log container info of syscalls Date: Sun, 22 Jul 2018 09:32:00 -0400 Message-ID: <5467262.rd0RIe6TW9@x2> In-Reply-To: <20180721202930.a7rypxc5rxi3hyiv@madcap2.tricolour.ca> References: <20180721202930.a7rypxc5rxi3hyiv@madcap2.tricolour.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Saturday, July 21, 2018 4:29:30 PM EDT Richard Guy Briggs wrote: > > > + * audit_log_contid - report container info > > > + * @tsk: task to be recorded > > > + * @context: task or local context for record > > > + * @op: contid string description > > > + */ > > > +int audit_log_contid(struct task_struct *tsk, > > > + struct audit_context *context, char *op) > > > +{ > > > + struct audit_buffer *ab; > > > + > > > + if (!audit_contid_set(tsk)) > > > + return 0; > > > + /* Generate AUDIT_CONTAINER record with container ID */ > > > + ab = audit_log_start(context, GFP_KERNEL, AUDIT_CONTAINER); > > > + if (!ab) > > > + return -ENOMEM; > > > + audit_log_format(ab, "op=%s contid=%llu", > > > + op, audit_get_contid(tsk)); > > > > Can you explain your reason for including an "op" field in this record > > type? I've been looking at the rest of the patches in this patchset > > and it seems to be used more as an indicator of the record's > > generating context rather than any sort of audit container ID > > operation. > > "action" might work, but that's netfilter and numeric... "kind"? > Nothing else really seems to fit from a field name, type or lack of > searchability perspective. > > Steve, do you have an opinion? We only have 1 sample event where we have op=task. What are the other possible values? -Steve