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] [day] [month] [year] [list]
Date:   Fri, 30 Nov 2018 20:14:42 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Or Gerlitz <ogerlitz@...lanox.com>
Cc:     kbuild-all@...org, "David S. Miller" <davem@...emloft.net>,
        netdev@...r.kernel.org, Adi Nissim <adin@...lanox.com>,
        Oz Shlomo <ozsh@...lanox.com>, Jiri Pirko <jiri@...lanox.com>,
        ASAP_Direct_Dev@...lanox.com
Subject: Re: [PATCH net-next 1/2] net/sched: act_tunnel_key: Allow key-less
 tunnels

Hi Adi,

Thank you for the patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Or-Gerlitz/net-sched-act_tunnel_key-support-key-less-tunnels/20181130-194722
config: x86_64-randconfig-x006-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from include/net/udp_tunnel.h:5:0,
                    from include/net/geneve.h:5,
                    from net/sched/act_tunnel_key.c:16:
   net/sched/act_tunnel_key.c: In function 'tunnel_key_init':
>> include/net/ip_tunnels.h:195:14: warning: 'key_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
     key->tun_id = tun_id;
     ~~~~~~~~~~~~^~~~~~~~
   net/sched/act_tunnel_key.c:215:9: note: 'key_id' was declared here
     __be64 key_id;
            ^~~~~~
--
   In file included from include/net/udp_tunnel.h:5:0,
                    from include/net/geneve.h:5,
                    from net//sched/act_tunnel_key.c:16:
   net//sched/act_tunnel_key.c: In function 'tunnel_key_init':
>> include/net/ip_tunnels.h:195:14: warning: 'key_id' may be used uninitialized in this function [-Wmaybe-uninitialized]
     key->tun_id = tun_id;
     ~~~~~~~~~~~~^~~~~~~~
   net//sched/act_tunnel_key.c:215:9: note: 'key_id' was declared here
     __be64 key_id;
            ^~~~~~

vim +/key_id +195 include/net/ip_tunnels.h

c54419321 Pravin B Shelar 2013-03-25  188  
4c2227984 Pravin B Shelar 2015-08-30  189  static inline void ip_tunnel_key_init(struct ip_tunnel_key *key,
1d8fff907 Thomas Graf     2015-07-21  190  				      __be32 saddr, __be32 daddr,
134611446 Daniel Borkmann 2016-03-09  191  				      u8 tos, u8 ttl, __be32 label,
1d8fff907 Thomas Graf     2015-07-21  192  				      __be16 tp_src, __be16 tp_dst,
4c2227984 Pravin B Shelar 2015-08-30  193  				      __be64 tun_id, __be16 tun_flags)
1d8fff907 Thomas Graf     2015-07-21  194  {
4c2227984 Pravin B Shelar 2015-08-30 @195  	key->tun_id = tun_id;
4c2227984 Pravin B Shelar 2015-08-30  196  	key->u.ipv4.src = saddr;
4c2227984 Pravin B Shelar 2015-08-30  197  	key->u.ipv4.dst = daddr;
4c2227984 Pravin B Shelar 2015-08-30  198  	memset((unsigned char *)key + IP_TUNNEL_KEY_IPV4_PAD,
c1ea5d672 Jiri Benc       2015-08-20  199  	       0, IP_TUNNEL_KEY_IPV4_PAD_LEN);
4c2227984 Pravin B Shelar 2015-08-30  200  	key->tos = tos;
4c2227984 Pravin B Shelar 2015-08-30  201  	key->ttl = ttl;
134611446 Daniel Borkmann 2016-03-09  202  	key->label = label;
4c2227984 Pravin B Shelar 2015-08-30  203  	key->tun_flags = tun_flags;
1d8fff907 Thomas Graf     2015-07-21  204  
1d8fff907 Thomas Graf     2015-07-21  205  	/* For the tunnel types on the top of IPsec, the tp_src and tp_dst of
1d8fff907 Thomas Graf     2015-07-21  206  	 * the upper tunnel are used.
1d8fff907 Thomas Graf     2015-07-21  207  	 * E.g: GRE over IPSEC, the tp_src and tp_port are zero.
1d8fff907 Thomas Graf     2015-07-21  208  	 */
4c2227984 Pravin B Shelar 2015-08-30  209  	key->tp_src = tp_src;
4c2227984 Pravin B Shelar 2015-08-30  210  	key->tp_dst = tp_dst;
1d8fff907 Thomas Graf     2015-07-21  211  
1d8fff907 Thomas Graf     2015-07-21  212  	/* Clear struct padding. */
4c2227984 Pravin B Shelar 2015-08-30  213  	if (sizeof(*key) != IP_TUNNEL_KEY_SIZE)
4c2227984 Pravin B Shelar 2015-08-30  214  		memset((unsigned char *)key + IP_TUNNEL_KEY_SIZE,
4c2227984 Pravin B Shelar 2015-08-30  215  		       0, sizeof(*key) - IP_TUNNEL_KEY_SIZE);
1d8fff907 Thomas Graf     2015-07-21  216  }
1d8fff907 Thomas Graf     2015-07-21  217  

:::::: The code at line 195 was first introduced by commit
:::::: 4c22279848c531fc7f555d463daf3d0df963bd41 ip-tunnel: Use API to access tunnel metadata options.

:::::: TO: Pravin B Shelar <pshelar@...ira.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" (30285 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ