Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4818563imm; Sun, 22 Jul 2018 06:33:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf8ksuQutYh15uKsOy2I1jg1aJ1qQob9SEjMhG7eqcOzjJPICzAx+UUbrNzu0Z6eLEw5IT/ X-Received: by 2002:a17:902:622:: with SMTP id 31-v6mr9165407plg.153.1532266394990; Sun, 22 Jul 2018 06:33:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532266394; cv=none; d=google.com; s=arc-20160816; b=l1lrhceLQwugKWeSQi7VLcmV7HFnbhZnOoXn33UwYepFW2MnhFkpHL8oUdC7eQB07o xmyOaEQbdpTf0qyGKMXZ8iZ05NdtYkyKvwW/xk5lf0+pPGTWUhmDEEqsT9xyUBjFwh6c 3REi+Kbm0bDB+UVLR64tG4DFLYwDoJop9upHJt6CSM7ejawWqPJgP9LUa407Fec5I9Dd HZj3i7ymOIJsq0PPApCeEAodxjgm0YbMTDTAfubscUEToMI7IyoW+j30nnzWQnbl0kCj 5raXVSrj72i9jJoD24md5dOfTHuWuLt7tOCSosuYSsKEOKNyuFYVYysY3OZxvck2xcfX 3q6g== 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:arc-authentication-results; bh=pa3pDp+t09a/sHWQNQwijcy6vtaY5Z0gyvBETK2nSLc=; b=MAwNZbyQlGB4BY4m1bbV3RTzksrd1eiDjL1+u/osGK/10HfKBeJXMxkHMPLVVv5BEc W/U9q+SmP6+7A/Q3dVLeX7/JpSRBQENOw+GzcI406GRnj6akEKl5RfjifI2I9USjLuIO 8lTBUXRBqnukGP2WU2aPrZys4z7x4MHIb/rZ6/xrJ8fMaXS5Xm/YT0fXxFBmJFpc7ftU XWbtsfFo7N0FTeVINmz1Wq1IKdTBNDdWyhjfvEA1dxMy7KxvuYiiUOObN/cKF+FZlhRh /jD3sBz/J8a3HSzscGV49YpmDrfTnqFpa/2fyZ6fTGNm3d5desxMWN/3oZOksyaDc/tq 2dPA== 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 l4-v6si6051610plb.213.2018.07.22.06.32.59; Sun, 22 Jul 2018 06:33:14 -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 S1728383AbeGVO2v (ORCPT + 99 others); Sun, 22 Jul 2018 10:28:51 -0400 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 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 CDB1A81A4EA2; Sun, 22 Jul 2018 13:32:08 +0000 (UTC) Received: from x2.localnet (ovpn-120-204.rdu2.redhat.com [10.10.120.204]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7088C76C5; Sun, 22 Jul 2018 13:32:00 +0000 (UTC) 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> Organization: Red Hat 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" 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.8]); Sun, 22 Jul 2018 13:32:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Sun, 22 Jul 2018 13:32:08 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'sgrubb@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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