Linux-audit Archive on lore.kernel.org
 help / color / Atom feed
From: kernel test robot <lkp@intel.com>
To: Richard Guy Briggs <rgb@redhat.com>,
	Linux-Audit Mailing List <linux-audit@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	netfilter-devel@vger.kernel.org
Cc: kbuild-all@lists.01.org, Richard Guy Briggs <rgb@redhat.com>,
	Phil Sutter <phil@nwl.cc>, Florian Westphal <fw@strlen.de>,
	twoerner@redhat.com, Eric Paris <eparis@parisplace.org>
Subject: Re: [PATCH v4] audit: log nftables configuration change events once per table
Date: Thu, 25 Mar 2021 13:13:42 +0800
Message-ID: <202103251309.T1VmMOP2-lkp@intel.com> (raw)
In-Reply-To: <e7394a7e66a5ef3186055eb5fbef6d73fbc7edf6.1616641542.git.rgb@redhat.com>


[-- Attachment #1: Type: text/plain, Size: 4005 bytes --]

Hi Richard,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on nf/master]
[also build test WARNING on nf-next/master pcmoore-audit/next v5.12-rc4 next-20210324]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Richard-Guy-Briggs/audit-log-nftables-configuration-change-events-once-per-table/20210325-115438
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/e2632994acb2553a22a739b3a876a091d04f446c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Richard-Guy-Briggs/audit-log-nftables-configuration-change-events-once-per-table/20210325-115438
        git checkout e2632994acb2553a22a739b3a876a091d04f446c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> net/netfilter/nf_tables_api.c:7993:5: warning: no previous prototype for 'nf_tables_commit_audit_alloc' [-Wmissing-prototypes]
    7993 | int nf_tables_commit_audit_alloc(struct list_head *adl,
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/netfilter/nf_tables_api.c:8011:6: warning: no previous prototype for 'nf_tables_commit_audit_collect' [-Wmissing-prototypes]
    8011 | void nf_tables_commit_audit_collect(struct list_head *adl,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> net/netfilter/nf_tables_api.c:8030:6: warning: no previous prototype for 'nf_tables_commit_audit_log' [-Wmissing-prototypes]
    8030 | void nf_tables_commit_audit_log(struct list_head *adl, u32 generation)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/nf_tables_commit_audit_alloc +7993 net/netfilter/nf_tables_api.c

  7992	
> 7993	int nf_tables_commit_audit_alloc(struct list_head *adl,
  7994					 struct nft_table *table)
  7995	{
  7996		struct nft_audit_data *adp;
  7997	
  7998		list_for_each_entry(adp, adl, list) {
  7999			if (adp->table == table)
  8000				return 0;
  8001		}
  8002		adp = kzalloc(sizeof(*adp), GFP_KERNEL);
  8003		if (!adp)
  8004			return -ENOMEM;
  8005		adp->table = table;
  8006		INIT_LIST_HEAD(&adp->list);
  8007		list_add(&adp->list, adl);
  8008		return 0;
  8009	}
  8010	
> 8011	void nf_tables_commit_audit_collect(struct list_head *adl,
  8012					    struct nft_table *table, u32 op)
  8013	{
  8014		struct nft_audit_data *adp;
  8015	
  8016		list_for_each_entry(adp, adl, list) {
  8017			if (adp->table == table)
  8018				goto found;
  8019		}
  8020		WARN_ONCE("table=%s not expected in commit list", table->name);
  8021		return;
  8022	found:
  8023		adp->entries++;
  8024		if (!adp->op || adp->op > op)
  8025			adp->op = op;
  8026	}
  8027	
  8028	#define AUNFTABLENAMELEN (NFT_TABLE_MAXNAMELEN + 22)
  8029	
> 8030	void nf_tables_commit_audit_log(struct list_head *adl, u32 generation)
  8031	{
  8032		struct nft_audit_data *adp, *adn;
  8033		char aubuf[AUNFTABLENAMELEN];
  8034	
  8035		list_for_each_entry_safe(adp, adn, adl, list) {
  8036			snprintf(aubuf, AUNFTABLENAMELEN, "%s:%u", adp->table->name,
  8037				 generation);
  8038			audit_log_nfcfg(aubuf, adp->table->family, adp->entries,
  8039					nft2audit_op[adp->op], GFP_KERNEL);
  8040			list_del(&adp->list);
  8041			kfree(adp);
  8042		}
  8043	}
  8044	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67493 bytes --]

[-- Attachment #3: Type: text/plain, Size: 106 bytes --]

--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25  3:52 Richard Guy Briggs
2021-03-25  5:13 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202103251309.T1VmMOP2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=eparis@parisplace.org \
    --cc=fw@strlen.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    --cc=rgb@redhat.com \
    --cc=twoerner@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-audit Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-audit/0 linux-audit/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-audit linux-audit/ https://lore.kernel.org/linux-audit \
		linux-audit@redhat.com
	public-inbox-index linux-audit

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.redhat.linux-audit


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git