Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3894282yba; Tue, 9 Apr 2019 07:02:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKEt96Ls6OF1Gml3J5ckAwaLdsbZVS7yb5lvpyKBFy/GPIu7/dWurvTg70vTfjLWVDFdSF X-Received: by 2002:a65:6144:: with SMTP id o4mr34652265pgv.247.1554818540640; Tue, 09 Apr 2019 07:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554818540; cv=none; d=google.com; s=arc-20160816; b=VbOuQrOI4vnooRg5729YOh5hSmjyeEYH11tzXGnEkoU7Tmasnuz9ybdGh4zwQ01eb4 brAv0cEmmLoou1CLRA3WgPwHaD08eKhc7OeEYjgS719MqwNXc2MFFOWCj1q6Jvj8ciIQ Pa+wUrDyq5+4hugK0bRmr94jOwiIdmexO4Y6egaH3YD+oYHCkcHlguTfr5v60WVtsNZw hR3A5F9m0cBv6/lggg20rEZf8Ua3gMVA5SVvzCeWvDLsAou+I08n2AJ1XAJrK0OTM0Xz KaJEtcahl9iMCBWZphNJ6Y0tnO7ZqwPZ8U87oDtT8riCL2mpP2Z13Bye5fv8rf6NlD8k J5hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=84zlGAP1TXPZoscHpIelfxKCxDv/074dG8oVeQkrcfo=; b=lIi6K6/nGkO7sVMMNe2tn9mAwUiD9PS9uqHoIQmbE2auf4C6jKaCKn5+/UmEWMas2Q qOvAbEjMAnlGWtA7pibGY8088yeZvZqeLDYj4Ft38QJN3eRfHiMdqnGIJk8rHjq+n6sR 1kIj0ddaT5EiR3CaC0WoPsVvWOaO6DYOPSijUuglWsMCI9YchrSDYR09Ex1rQdQ0hY3D GY4J0sAYWYL38OKBPyelBXcgxYAhRUbKhlwPtBtmtMhICUsh2I2x7sloQjtV8GACCTfN WavfwC5cIFshp3uTT98Yd2t5nay2Q4/TpMsydmg45kMUEY+VyhYsKHka/MHtVTi4NzVM szMA== 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 h191si11581083pge.342.2019.04.09.07.01.43; Tue, 09 Apr 2019 07:02:20 -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 S1726517AbfDIOBC (ORCPT + 99 others); Tue, 9 Apr 2019 10:01:02 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37273 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfDIOBB (ORCPT ); Tue, 9 Apr 2019 10:01:01 -0400 Received: by mail-ot1-f66.google.com with SMTP id c16so15640253otn.4 for ; Tue, 09 Apr 2019 07:01:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=84zlGAP1TXPZoscHpIelfxKCxDv/074dG8oVeQkrcfo=; b=lylflTRPkKT6P2Uq6O4QQiX2ojCFaaqcOeAk0kw34LNDRsCXRf1o17QcepqDd4k0AN u7nAtmu/oR7OQBvBRr0zJQLmNiakX8QK8eNS1Xqmb+d6AyB/rfIIjfbZt+4PQQA/ZeGM Iz+wYSQXX5wxCQYHwzpdeDlZh0knYD3dxl14V839pWBlIm2HVQib0R83KfRHoMinHuI/ Kxq8L2/IqGVPYhCDCCrH0oP9ItcTQz8MxCnxvedFEiSrv/Sa429zK3KN+ylsSc+BpkYZ Y67wENXzJTa0YGHiixisil7UfCqQo4eyQcTnaWTNoWSi7XjqSPo78T2bLShGPcEQsg0G s+ZA== X-Gm-Message-State: APjAAAU8r1vRooApcMQNEAIJGKlUoFD2FJMnbkCSUNpL4umtA7WqUWGD zeZuQHvLxsGsnuc8lSquOvyVK3xcp2rtQOWEJqq8IA== X-Received: by 2002:a9d:6941:: with SMTP id p1mr23464533oto.64.1554818459654; Tue, 09 Apr 2019 07:00:59 -0700 (PDT) MIME-Version: 1.0 References: <20190409134852.GB15660@hmswarspite.think-freely.org> In-Reply-To: <20190409134852.GB15660@hmswarspite.think-freely.org> From: Ondrej Mosnacek Date: Tue, 9 Apr 2019 16:00:49 +0200 Message-ID: Subject: Re: [PATCH ghak90 V6 05/10] audit: add contid support for signalling the audit daemon To: Neil Horman Cc: Paul Moore , Richard Guy Briggs , 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, Steve Grubb , David Howells , Simo Sorce , Eric Paris , "Serge E. Hallyn" , "Eric W . Biederman" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 9, 2019 at 3:49 PM Neil Horman wrote: > On Tue, Apr 09, 2019 at 09:40:58AM -0400, Paul Moore wrote: > > On Tue, Apr 9, 2019 at 8:58 AM Ondrej Mosnacek wrote: > > > > > > On Tue, Apr 9, 2019 at 5:40 AM Richard Guy Briggs wrote: > > > > Add audit container identifier support to the action of signalling the > > > > audit daemon. > > > > > > > > Since this would need to add an element to the audit_sig_info struct, > > > > a new record type AUDIT_SIGNAL_INFO2 was created with a new > > > > audit_sig_info2 struct. Corresponding support is required in the > > > > userspace code to reflect the new record request and reply type. > > > > An older userspace won't break since it won't know to request this > > > > record type. > > > > > > > > Signed-off-by: Richard Guy Briggs > > > > > > This looks good to me. > > > > > > Reviewed-by: Ondrej Mosnacek > > > > > > Although I'm wondering if we shouldn't try to future-proof the > > > AUDIT_SIGNAL_INFO2 format somehow, so that we don't need to add > > > another AUDIT_SIGNAL_INFO3 when the need arises to add yet-another > > > identifier to it... The simplest solution I can come up with is to add > > > a "version" field at the beginning (set to 2 initially), then v_len > > > at the beginning of data for version . But maybe this is too > > > complicated for too little gain... > > > > FWIW, I believe the long term solution to this is the fabled netlink > > attribute approach that we haven't talked about in some time, but I > > keep dreaming about (it has been mostly on the back burner becasue 1) > > time and 2) didn't want to impact the audit container ID work). While > > I'm not opposed to trying to make things like this a bit more robust > > by adding version fields and similar things, there are still so many > > (so very many) problems with the audit kernel/userspace interface that > > still need to be addressed. > > > > Agreed, this change as-is is in keeping with the message structure that audit > has today, and so is ok with me, but the long term goal should be a conversion > to netlink attributes for all audit messages. Thats a big undertaking and > should be addressed separately though. Yeah, you both have a good point that doing it now and only for this message is not necessarily better than not doing it at all. And doing a general overhaul is out of scope for this series, obviously. I didn't really mind the current solution before and I mind it even less now, so consider me satisfied :) I was really just thinking out loud... -- Ondrej Mosnacek Software Engineer, Security Technologies Red Hat, Inc.