lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 May 2022 10:06:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Lorenzo Bianconi <lorenzo@...nel.org>, bpf@...r.kernel.org
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org, ast@...nel.org,
        daniel@...earbox.net, andrii@...nel.org, davem@...emloft.net,
        kuba@...nel.org, edumazet@...gle.com, pabeni@...hat.com,
        pablo@...filter.org, fw@...len.de, netfilter-devel@...r.kernel.org,
        lorenzo.bianconi@...hat.com, brouer@...hat.com, toke@...hat.com,
        memxor@...il.com
Subject: Re: [PATCH v3 bpf-next 4/5] net: netfilter: add kfunc helper to add
 a new ct entry

Hi Lorenzo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Lorenzo-Bianconi/net-netfilter-add-kfunc-helper-to-update-ct-timeout/20220518-184654
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: s390-defconfig (https://download.01.org/0day-ci/archive/20220519/202205191006.OH1ukt9R-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 11.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/intel-lab-lkp/linux/commit/7427419a3d3ae771c69eed7318a9b5f5d582b488
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Lorenzo-Bianconi/net-netfilter-add-kfunc-helper-to-update-ct-timeout/20220518-184654
        git checkout 7427419a3d3ae771c69eed7318a9b5f5d582b488
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=s390 SHELL=/bin/bash net/netfilter/

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

All warnings (new ones prefixed by >>):

>> net/netfilter/nf_conntrack_bpf.c:99:1: warning: no previous prototype for '__bpf_nf_ct_alloc_entry' [-Wmissing-prototypes]
      99 | __bpf_nf_ct_alloc_entry(struct net *net, struct bpf_sock_tuple *bpf_tuple,
         | ^~~~~~~~~~~~~~~~~~~~~~~


vim +/__bpf_nf_ct_alloc_entry +99 net/netfilter/nf_conntrack_bpf.c

    97	
    98	struct nf_conn *
  > 99	__bpf_nf_ct_alloc_entry(struct net *net, struct bpf_sock_tuple *bpf_tuple,
   100				u32 tuple_len, u8 protonum, s32 netns_id, u32 timeout)
   101	{
   102		struct nf_conntrack_tuple otuple, rtuple;
   103		struct nf_conn *ct;
   104		int err;
   105	
   106		if (unlikely(netns_id < BPF_F_CURRENT_NETNS))
   107			return ERR_PTR(-EINVAL);
   108	
   109		err = bpf_nf_ct_tuple_parse(bpf_tuple, tuple_len, protonum,
   110					    IP_CT_DIR_ORIGINAL, &otuple);
   111		if (err < 0)
   112			return ERR_PTR(err);
   113	
   114		err = bpf_nf_ct_tuple_parse(bpf_tuple, tuple_len, protonum,
   115					    IP_CT_DIR_REPLY, &rtuple);
   116		if (err < 0)
   117			return ERR_PTR(err);
   118	
   119		if (netns_id >= 0) {
   120			net = get_net_ns_by_id(net, netns_id);
   121			if (unlikely(!net))
   122				return ERR_PTR(-ENONET);
   123		}
   124	
   125		ct = nf_conntrack_alloc(net, &nf_ct_zone_dflt, &otuple, &rtuple,
   126					GFP_ATOMIC);
   127		if (IS_ERR(ct))
   128			goto out;
   129	
   130		ct->timeout = timeout * HZ + jiffies;
   131		ct->status |= IPS_CONFIRMED;
   132	
   133		memset(&ct->proto, 0, sizeof(ct->proto));
   134		if (protonum == IPPROTO_TCP)
   135			ct->proto.tcp.state = TCP_CONNTRACK_ESTABLISHED;
   136	
   137		err = nf_conntrack_hash_check_insert(ct);
   138		if (err < 0) {
   139			nf_conntrack_free(ct);
   140			ct = ERR_PTR(err);
   141		}
   142	out:
   143		if (netns_id >= 0)
   144			put_net(net);
   145	
   146		return ct;
   147	}
   148	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ