From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57EA5EE14D0 for ; Wed, 6 Sep 2023 21:39:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244599AbjIFVjw (ORCPT ); Wed, 6 Sep 2023 17:39:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233528AbjIFVjv (ORCPT ); Wed, 6 Sep 2023 17:39:51 -0400 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F27619B3; Wed, 6 Sep 2023 14:39:44 -0700 (PDT) Received: from n0-1 by orbyte.nwl.cc with local (Exim 4.94.2) (envelope-from ) id 1qe0FR-0002HV-90; Wed, 06 Sep 2023 23:39:41 +0200 Date: Wed, 6 Sep 2023 23:39:41 +0200 From: Phil Sutter To: Paul Moore Cc: Pablo Neira Ayuso , Florian Westphal , netfilter-devel@vger.kernel.org, audit@vger.kernel.org Subject: Re: [PATCH nf] netfilter: nf_tables: Unbreak audit log reset Message-ID: Mail-Followup-To: Phil Sutter , Paul Moore , Pablo Neira Ayuso , Florian Westphal , netfilter-devel@vger.kernel.org, audit@vger.kernel.org References: <20230906094202.1712-1-pablo@netfilter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: audit@vger.kernel.org Hi Paul, On Wed, Sep 06, 2023 at 03:56:41PM -0400, Paul Moore wrote: > On Wed, Sep 6, 2023 at 2:46 PM Pablo Neira Ayuso wrote: > > On Wed, Sep 06, 2023 at 07:08:40PM +0200, Phil Sutter wrote: > > [...] > > > The last six come from the 'reset rules table t1' command. While on one > > > hand it looks like nftables fits only three rules into a single skb, > > > your fix seems to have a problem in that it doesn't subtract s_idx from > > > *idx. > > > > Please, feel free to follow up to refine, thanks. > > Forgive me if I'm wrong, but it sounds as though Phil was pointing out > a bug and not an area of refinement, is that correct Phil? >From my point of view, yes. Though the third parameter "nentries" to audit_log_nfcfg() is sometimes used in rather creative ways, nf_tables_dump_obj() for instance passes the handle of the object being reset instead of a count. So I assume whoever parses audit logs won't rely too much upon the 'entries=NNN' part, anyway. > If it is a bug, please submit a fix for this as soon as possible Pablo. Thanks for your support, but I can take over, too. The number of notifications emitted even for a small ruleset is not ideal, also. It's just a bit sad that I ACKed the patch already and so it went out the door. Florian, can we still put a veto there? Cheers, Phil