Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7365764pxb; Thu, 18 Feb 2021 08:15:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBjuX//pE24CT5LeH86IXWkqN3xVAmh84hipX2p67ePXsHDeJEQyTb1rT+QEwJkCGtyX2F X-Received: by 2002:a17:906:c9cc:: with SMTP id hk12mr4823748ejb.134.1613664929491; Thu, 18 Feb 2021 08:15:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613664929; cv=none; d=google.com; s=arc-20160816; b=UBVsNi+VCV7cvuO/cloAwW6N1JneC2s1ocPwfKk9SF0E/iMiXYIiuohWW/txQ4BfLy whQUVqYVXZlDYu1irpHTI8twi7BjPm6rLXHLHHceMOEyJMUaIe22YYn/5v2tPWM4mJl2 lDsMKpDrulSczj9RTCUJBHvCuCGMleJC1RNHawRgE18lQAbdooTGfec+0i0uHQYHtX+T AMN02TbNU/LfTM311iibaA2u4/0TT1o1r6tdtc6VTOSEtknD0/04VoTxDzzRZ9i8P6cV ZpCwufy8I59X0fXyfFXT9vaznpvs5HK3stetNGdbnyEJLtGBJdOKfzUGrdtn129Y7Sb6 LtyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LwJc5OvASzfvdbcGnjuZgUulTpqs+UTqZM4Fn7//J8E=; b=iO2/hMv1xIiaPxFd8VVjhSd07zDQeJuP7nE3LmnYH5NYK0tysYTBOwa7ketPceTKyh oH/oIg5I4ESdMpafxu2w2Me8f3hniERxzXmZFbK4av6y1TgMwu3EwtSVO8NYzNaoxUX4 oivvyQccsDrk+kVfXAEcjmn0WNlVAyCyVU/QTHsURpBj204NWAqjeX5s6Em9CIq7gnQl bKxPyBf8Lll97e3qMpmbeeR1HKUbMDQyRvu/gVW6pm/nYsJ1Fk59O0oXAVhx37gImw5m jZPXyP+xWH9+dC82duTLjsdecNT2LRIkHuJAaMuxQBvJvNa5SvwxKIz2SMezmRKGJuow +ioA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N1gGWWfA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si4040719edl.5.2021.02.18.08.15.02; Thu, 18 Feb 2021 08:15:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N1gGWWfA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233127AbhBRQM1 (ORCPT + 99 others); Thu, 18 Feb 2021 11:12:27 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41664 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231207AbhBRNeA (ORCPT ); Thu, 18 Feb 2021 08:34:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613655148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LwJc5OvASzfvdbcGnjuZgUulTpqs+UTqZM4Fn7//J8E=; b=N1gGWWfAnStOcXGdL7GviK2NIV0x871Iy21UnmwWKt4t6bIXeDUFvgb8GpMMf4KDCMqzPE pVhnoqG2fKtxTLU78KgxZMvda7tirtOUvdlz6ajAQ0OSR1cNl/VOmTyVbl1VZiOyEy7o/3 DL3hsA56ekh+x0PVwiPs2gPU8Y9aZSI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-zklqRn62Oc61Tka6IOZESw-1; Thu, 18 Feb 2021 08:28:55 -0500 X-MC-Unique: zklqRn62Oc61Tka6IOZESw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96C27100CCC0; Thu, 18 Feb 2021 13:28:53 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.10.110.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC66C60917; Thu, 18 Feb 2021 13:28:45 +0000 (UTC) Date: Thu, 18 Feb 2021 08:28:43 -0500 From: Richard Guy Briggs To: Florian Westphal Cc: Phil Sutter , LKML , Linux-Audit Mailing List , netfilter-devel@vger.kernel.org, twoerner@redhat.com, Eric Paris , tgraf@infradead.org Subject: Re: [PATCH ghak124 v3] audit: log nftables configuration change events Message-ID: <20210218132843.GP3141668@madcap2.tricolour.ca> References: <20210211151606.GX3158@orbyte.nwl.cc> <20210211202628.GP2015948@madcap2.tricolour.ca> <20210211220930.GC2766@breakpoint.cc> <20210217234131.GN3141668@madcap2.tricolour.ca> <20210218082207.GJ2766@breakpoint.cc> <20210218124211.GO3141668@madcap2.tricolour.ca> <20210218125248.GB22944@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210218125248.GB22944@breakpoint.cc> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-18 13:52, Florian Westphal wrote: > Richard Guy Briggs wrote: > > On 2021-02-18 09:22, Florian Westphal wrote: > > > No. There is a hierarchy, e.g. you can't add a chain without first > > > adding a table, BUT in case the table was already created by an earlier > > > transaction it can also be stand-alone. > > > > Ok, so there could be a stand-alone chain mod with one table, then a > > table add of a different one with a "higher ranking" op... > > Yes, that can happen. Ok, can I get one more clarification on this "hierarchy"? Is it roughly in the order they appear in nf_tables_commit() after step 3? It appears it might be mostly already. If it isn't already, would it be reasonable to re-order them? Would you suggest a different order? (snip GET bits, that's now clear, thank you) > > such that it would be desirable to filter them out > > to reduce noise in that single log line if it is attempted to list all > > the change ops? It almost sounds like it would be better to do one > > audit log line for each table for each family, and possibly for each op > > to avoid the need to change userspace. This would already be a > > significant improvement picking the highest ranking op. > > I think i understand what you'd like to do. Yes, that would reduce > the log output a lot. Would the generation change id be useful outside the kernel? What exactly does it look like? I don't quite understand the genmask purpose. - 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