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]
Message-ID: <201911130721.o9Vc4RaP%lkp@intel.com>
Date:   Wed, 13 Nov 2019 07:31:54 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Pablo Neira Ayuso <pablo@...filter.org>
Cc:     kbuild-all@...ts.01.org, netfilter-devel@...r.kernel.org,
        davem@...emloft.net, netdev@...r.kernel.org, paulb@...lanox.com,
        ozsh@...lanox.com, majd@...lanox.com, saeedm@...lanox.com
Subject: Re: [PATCH net-next 6/6] netfilter: nf_flow_table: hardware offload
 support

Hi Pablo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on next-20191112]
[cannot apply to v5.4-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-flowtable-hardware-offload/20191113-052213
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git ca22d6977b9b4ab0fd2e7909b57e32ba5b95046f
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=mips 

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

All warnings (new ones prefixed by >>):

   net/netfilter/nf_flow_table_offload.c: In function 'nf_flow_rule_match':
>> net/netfilter/nf_flow_table_offload.c:80:21: warning: large integer implicitly truncated to unsigned type [-Woverflow]
      mask->tcp.flags = TCP_FLAG_RST | TCP_FLAG_FIN;
                        ^~~~~~~~~~~~

vim +80 net/netfilter/nf_flow_table_offload.c

    46	
    47	#define NF_FLOW_DISSECTOR(__match, __type, __field)	\
    48		(__match)->dissector.offset[__type] =		\
    49			offsetof(struct nf_flow_key, __field)
    50	
    51	static int nf_flow_rule_match(struct nf_flow_match *match,
    52				      const struct flow_offload_tuple *tuple)
    53	{
    54		struct nf_flow_key *mask = &match->mask;
    55		struct nf_flow_key *key = &match->key;
    56	
    57		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_CONTROL, control);
    58		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_BASIC, basic);
    59		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_IPV4_ADDRS, ipv4);
    60		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_TCP, tcp);
    61		NF_FLOW_DISSECTOR(match, FLOW_DISSECTOR_KEY_PORTS, tp);
    62	
    63		switch (tuple->l3proto) {
    64		case AF_INET:
    65			key->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
    66			key->basic.n_proto = htons(ETH_P_IP);
    67			key->ipv4.src = tuple->src_v4.s_addr;
    68			mask->ipv4.src = 0xffffffff;
    69			key->ipv4.dst = tuple->dst_v4.s_addr;
    70			mask->ipv4.dst = 0xffffffff;
    71			break;
    72		default:
    73			return -EOPNOTSUPP;
    74		}
    75		mask->basic.n_proto = 0xffff;
    76	
    77		switch (tuple->l4proto) {
    78		case IPPROTO_TCP:
    79			key->tcp.flags = 0;
  > 80			mask->tcp.flags = TCP_FLAG_RST | TCP_FLAG_FIN;
    81			match->dissector.used_keys |= BIT(FLOW_DISSECTOR_KEY_TCP);
    82			break;
    83		case IPPROTO_UDP:
    84			break;
    85		default:
    86			return -EOPNOTSUPP;
    87		}
    88	
    89		key->basic.ip_proto = tuple->l4proto;
    90		mask->basic.ip_proto = 0xff;
    91	
    92		key->tp.src = tuple->src_port;
    93		mask->tp.src = 0xffff;
    94		key->tp.dst = tuple->dst_port;
    95		mask->tp.dst = 0xffff;
    96	
    97		match->dissector.used_keys |= BIT(FLOW_DISSECTOR_KEY_CONTROL) |
    98					      BIT(FLOW_DISSECTOR_KEY_BASIC) |
    99					      BIT(FLOW_DISSECTOR_KEY_IPV4_ADDRS) |
   100					      BIT(FLOW_DISSECTOR_KEY_PORTS);
   101		return 0;
   102	}
   103	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (62097 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ