Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3900772yba; Tue, 9 Apr 2019 07:08:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIAQlgoyoTN6Hhi0D3xe//tIUY11quRX2ciZHnagTbhvgZxcZiwmjVdhc9LQRz0O3UGqUD X-Received: by 2002:a17:902:47c2:: with SMTP id d2mr37217980plh.277.1554818912834; Tue, 09 Apr 2019 07:08:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554818912; cv=none; d=google.com; s=arc-20160816; b=ccsmMc7E+vUvDxHDuIHAGtrbmPGDqW6V9ddOp3aqFi2ClibHRLO2MDituJWyLxuV8A UatXfJdRgtVxv211DpTjI+Of5lnZPbGXWq0QWyqhFUlG/LSlpByXcZlV6KKuzx8b76sx IrPpeUlG31+FTILm8lmu8d6T2KwykiXhBsiawnPYXbdbFSP7M0v/soz4AvRuhvluaFyy qTbVy6eZ54MBnqGP8RXOXhmXKrB0N/MRRK5bRFTIiLzYjc9bPQ9O+iggNKAvr2GmClVA HU9Cb1XYRMkUMGOaTJGB9CFE8mLjVZeufXFgtadGi8EOyxBUM5mwgD8VL5E40bGsGMBj 7dDw== 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:dkim-signature; bh=UQxJMSZMCM3zKcDpRRfm0HzVbtFnEegjOT3D0Jsz53o=; b=M74YFNyE4uKfRoR94ly9sZVKAIhhk38T5C8OiOVVH0ncoewj01ngx4FH3qP++TDQnA Oq+MC5wRczJAo9BXvEqU9BTcvWj5D5Mpky3OrutnVbEC1BXE2mOCeFKV2WrTuVJ6rz14 /+NsxjZVOt3tTWckbJEfLAhO6OmF4B/ZWeWO2QP88XvpsGq6bwLbomZBE4snN03HOpwt A4S7YgR1xGPcMCUdw7YNVmldCW5YAaX5KpgNIsEgrbscQf6TsMKUIcwUq6ZStvTeI/WJ jR8nFEi2SU7V73ga1M9YPTgfplFhxLpa1hn1v12XWGcjBPB0Css3XnN3h2UXO7sAgpbF CFjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=TJF+s2Rh; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j65si29271890pge.48.2019.04.09.07.08.16; Tue, 09 Apr 2019 07:08:32 -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=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=TJF+s2Rh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726466AbfDIOHg (ORCPT + 99 others); Tue, 9 Apr 2019 10:07:36 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:37478 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726471AbfDIOHg (ORCPT ); Tue, 9 Apr 2019 10:07:36 -0400 Received: by mail-lj1-f195.google.com with SMTP id v13so14576446ljk.4 for ; Tue, 09 Apr 2019 07:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UQxJMSZMCM3zKcDpRRfm0HzVbtFnEegjOT3D0Jsz53o=; b=TJF+s2Rh3KaDaWciSpvRfu5kfPblnXMMZ136vWoCaUsQQF2c7PN9rSIpCeiG27E307 jrNVOiiACI5M/apRlWCXc0OE5bXix2BwUtVDiV0vRm/4or5lruqN4xtLiWisx+EiPtkj Lu0iWDZWt3IiIJO6b2MO7E/fI4NMGhpy+bXK9mtECKza8SMr05XajqZJv/wa05GNmu6f HmqRwvvUe7hdIr/I0wMo7Ht+CEiSfXXp9pUNg5B4uUHkq8+h0OUlKYVdgEax9DRan8Vs IMDS/y8mbiUPiCAjn9m0duONEAWQvRFgBW1B9hS0f0H8dp/PQGiCB8kJbRFBuwOmcg7J 9sbQ== 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=UQxJMSZMCM3zKcDpRRfm0HzVbtFnEegjOT3D0Jsz53o=; b=ChtcVcHY+lZb7zQ5BmByEavWRRaHf3zwvyAAALEX5x8p8ejlJSgZgptsjQ5dWo/6u5 Z50B+bUYJi3DTu48+1sD/9Qqqo9Sq+LrJ7HMRVSR4dYRHZdXcNiZTWkchm5HVUktxKtI NoPmWH7KexKySG0CwQLrRh4HN0Keq3whIxl11+at2ZQwVpX6cL3vq0nMZ9b00LR4D0mY byu1e4rxS9e/7w/xqO+v2Fr06FY0pMxUXIFOF5aQdrmqAPM+GahwAvxWqCvNHf6fovBz xd1HQaLiSRwBhuzotLGGMsLav7Dm5JjMwUF3YSbFiOH8DTn+igTElwOR0QJ9hiAYQaEA auOA== X-Gm-Message-State: APjAAAWn0OGTypiblWMzLAs+NFv5i8QkSLPK0iwL81oIYceQ9B6egFTx xwvmS+yPr04A4nRHm0WK4JXnmFqVLTZPk5VhKYIj X-Received: by 2002:a2e:88c1:: with SMTP id a1mr19600298ljk.78.1554818854001; Tue, 09 Apr 2019 07:07:34 -0700 (PDT) MIME-Version: 1.0 References: <20190409134852.GB15660@hmswarspite.think-freely.org> In-Reply-To: <20190409134852.GB15660@hmswarspite.think-freely.org> From: Paul Moore Date: Tue, 9 Apr 2019 10:07:22 -0400 Message-ID: Subject: Re: [PATCH ghak90 V6 05/10] audit: add contid support for signalling the audit daemon To: Neil Horman Cc: Ondrej Mosnacek , 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 9:49 AM 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. You've likely missed all the conversations around this from some time ago, but this is the direction I want us to go towards eventually, and yes, this is a huge undertaking (much larger than the audit container ID work) that will need to be done in stages. The first step is moving away from audit_log_format() to an in-kernel audit API that separates the data from the record format; I've got a lot of ideas on that, but as I said earlier, it's mostly on the back burner so it doesn't hold up the audit container ID work. -- paul moore www.paul-moore.com