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: <201708302124.bF9JXZzQ%fengguang.wu@intel.com>
Date:   Wed, 30 Aug 2017 21:46:53 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Tom Herbert <tom@...ntonium.net>
Cc:     kbuild-all@...org, davem@...emloft.net, netdev@...r.kernel.org,
        Tom Herbert <tom@...ntonium.net>
Subject: Re: [PATCH net-next 3/6] flow_dissector: Add protocol specific flow
 dissection offload

Hi Tom,

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

url:    https://github.com/0day-ci/linux/commits/Tom-Herbert/flow_dissector-Protocol-specific-flow-dissector-offload/20170830-210709
config: x86_64-randconfig-x006-201735 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   net//ipv4/route.c: In function 'fib_multipath_hash':
>> net//ipv4/route.c:1817:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
       struct flow_keys keys;
       ^~~~~~

vim +1817 net//ipv4/route.c

79a13159 Peter Nørlund       2015-09-30  1791  
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1792  /* if skb is set it will be used and fl4 can be NULL */
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1793  int fib_multipath_hash(const struct fib_info *fi, const struct flowi4 *fl4,
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1794  		       const struct sk_buff *skb)
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1795  {
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1796  	struct net *net = fi->fib_net;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1797  	struct flow_keys hash_keys;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1798  	u32 mhash;
79a13159 Peter Nørlund       2015-09-30  1799  
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1800  	switch (net->ipv4.sysctl_fib_multipath_hash_policy) {
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1801  	case 0:
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1802  		memset(&hash_keys, 0, sizeof(hash_keys));
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1803  		hash_keys.control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1804  		if (skb) {
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1805  			ip_multipath_l3_keys(skb, &hash_keys);
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1806  		} else {
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1807  			hash_keys.addrs.v4addrs.src = fl4->saddr;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1808  			hash_keys.addrs.v4addrs.dst = fl4->daddr;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1809  		}
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1810  		break;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1811  	case 1:
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1812  		/* skb is currently provided only when forwarding */
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1813  		if (skb) {
19a7c5ba Tom Herbert         2017-08-29  1814  			unsigned int flag = FLOW_DISSECTOR_F_STOP_AT_ENCAP |
19a7c5ba Tom Herbert         2017-08-29  1815  					    FLOW_DISSECTOR_F_STOP_AT_L4;
19a7c5ba Tom Herbert         2017-08-29  1816  ;
bf4e0a3d Nikolay Aleksandrov 2017-03-16 @1817  			struct flow_keys keys;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1818  
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1819  			/* short-circuit if we already have L4 hash present */
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1820  			if (skb->l4_hash)
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1821  				return skb_get_hash_raw(skb) >> 1;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1822  			memset(&hash_keys, 0, sizeof(hash_keys));
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1823  			skb_flow_dissect_flow_keys(skb, &keys, flag);
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1824  			hash_keys.addrs.v4addrs.src = keys.addrs.v4addrs.src;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1825  			hash_keys.addrs.v4addrs.dst = keys.addrs.v4addrs.dst;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1826  			hash_keys.ports.src = keys.ports.src;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1827  			hash_keys.ports.dst = keys.ports.dst;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1828  			hash_keys.basic.ip_proto = keys.basic.ip_proto;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1829  		} else {
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1830  			memset(&hash_keys, 0, sizeof(hash_keys));
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1831  			hash_keys.control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1832  			hash_keys.addrs.v4addrs.src = fl4->saddr;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1833  			hash_keys.addrs.v4addrs.dst = fl4->daddr;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1834  			hash_keys.ports.src = fl4->fl4_sport;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1835  			hash_keys.ports.dst = fl4->fl4_dport;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1836  			hash_keys.basic.ip_proto = fl4->flowi4_proto;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1837  		}
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1838  		break;
79a13159 Peter Nørlund       2015-09-30  1839  	}
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1840  	mhash = flow_hash_from_keys(&hash_keys);
79a13159 Peter Nørlund       2015-09-30  1841  
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1842  	return mhash >> 1;
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1843  }
bf4e0a3d Nikolay Aleksandrov 2017-03-16  1844  EXPORT_SYMBOL_GPL(fib_multipath_hash);
79a13159 Peter Nørlund       2015-09-30  1845  #endif /* CONFIG_IP_ROUTE_MULTIPATH */
79a13159 Peter Nørlund       2015-09-30  1846  

:::::: The code at line 1817 was first introduced by commit
:::::: bf4e0a3db97eb882368fd82980b3b1fa0b5b9778 net: ipv4: add support for ECMP hash policy choice

:::::: TO: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
:::::: CC: David S. Miller <davem@...emloft.net>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ