:::::: :::::: Manual check reason: "low confidence bisect report" :::::: Manual check reason: "low confidence static check first_new_problem: include/linux/bitmap.h:266:24: warning: use of uninitialized value '((const long unsigned int *)p)[16]' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]" ::::::
BCC: [email protected] CC: [email protected] CC: [email protected] TO: Alexander Lobakin <[email protected]> tree: https://github.com/alobakin/linux ip_tunnel head: 5d8054afed13f6faea01f1940458165a8868dded commit: 8b558c42c5837bf174f1fd6416a013308162ac97 [7/12] ip_tunnel: convert __be16 tunnel flags to bitmaps :::::: branch date: 2 days ago :::::: commit date: 2 days ago config: arm-randconfig-c002-20220828 (https://download.01.org/0day-ci/archive/20220829/[email protected]/config) compiler: arm-linux-gnueabi-gcc (GCC) 12.1.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/alobakin/linux/commit/8b558c42c5837bf174f1fd6416a013308162ac97 git remote add alobakin https://github.com/alobakin/linux git fetch --no-tags alobakin ip_tunnel git checkout 8b558c42c5837bf174f1fd6416a013308162ac97 # save the config file COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross ARCH=arm KBUILD_USERCFLAGS='-fanalyzer -Wno-error' If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <[email protected]> gcc-analyzer warnings: (new ones prefixed by >>) In file included from include/linux/cpumask.h:12, from include/linux/mm_types_task.h:14, from include/linux/mm_types.h:5, from include/linux/buildid.h:5, from include/linux/module.h:14, from net/ipv6/ip6_gre.c:11: In function 'bitmap_copy', inlined from 'ip6gre_tnl_copy_tnl_parm' at net/ipv6/ip6_gre.c:1221:2: >> include/linux/bitmap.h:266:24: warning: use of uninitialized value '((const >> long unsigned int *)p)[16]' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 266 | *dst = *src; | ^~~~ 'ip6gre_changelink': events 1-3 | |net/ipv6/ip6_gre.c:2080:12: | 2080 | static int ip6gre_changelink(struct net_device *dev, struct nlattr *tb[], | | ^~~~~~~~~~~~~~~~~ | | | | | (1) entry to 'ip6gre_changelink' |...... | 2086 | struct __ip6_tnl_parm p; | | ~ | | | | | (2) region created on stack here | 2087 | | 2088 | t = ip6gre_changelink_common(dev, tb, data, &p, extack); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (3) calling 'ip6gre_changelink_common' from 'ip6gre_changelink' | +--> 'ip6gre_changelink_common': events 4-10 | | 2047 | ip6gre_changelink_common(struct net_device *dev, struct nlattr *tb[], | | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) entry to 'ip6gre_changelink_common' |...... | 2056 | if (dev == ign->fb_tunnel_dev) | | ~ | | | | | (5) following 'false' branch... |...... | 2059 | if (ip6gre_netlink_encap_parms(data, &ipencap)) { | | ~~ ~ | | | | | | | (7) following 'true' branch... | | (6) ...to here | 2060 | int err = ip6_tnl_encap_setup(nt, &ipencap); | | ~~~ | | | | | (8) ...to here | 2061 | | 2062 | if (err < 0) | | ~ | | | | | (9) following 'true' branch (when 'err < 0')... | 2063 | return ERR_PTR(err); | | ~~~~~~ | | | | | (10) ...to here | <------+ | 'ip6gre_changelink': events 11-14 | | 2088 | t = ip6gre_changelink_common(dev, tb, data, &p, extack); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (11) returning to 'ip6gre_changelink' from 'ip6gre_changelink_common' | 2089 | if (IS_ERR(t)) | | ~ | | | | | (12) following 'false' branch... |...... | 2092 | ip6gre_tunnel_unlink_md(ign, t); | | ~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (13) ...to here | 2093 | ip6gre_tunnel_unlink(ign, t); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (14) calling 'ip6gre_tunnel_unlink' from 'ip6gre_changelink' | +--> 'ip6gre_tunnel_unlink': events 15-16 | | 295 | return __ip6gre_bucket(ign, &t->parms); | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (16) calling '__ip6gre_bucket' from 'ip6gre_tunnel_unlink' |...... | 306 | static void ip6gre_tunnel_unlink(struct ip6gre_net *ign, struct ip6_tnl *t) | | ^~~~~~~~~~~~~~~~~~~~ | | | | | (15) entry to 'ip6gre_tunnel_unlink' | +--> '__ip6gre_bucket': events 17-19 | | 249 | static struct ip6_tnl __rcu **__ip6gre_bucket(struct ip6gre_net *ign, | | ^~~~~~~~~~~~~~~ | | | | | (17) entry to '__ip6gre_bucket' |...... | 257 | if (!ipv6_addr_any(local)) | | ~ | | | | | (18) following 'false' branch... | 258 | prio |= 1; | 259 | if (!ipv6_addr_any(remote) && !ipv6_addr_is_multicast(remote)) { | | ~~ | | | vim +266 include/linux/bitmap.h ^1da177e4c3f41 Linus Torvalds 2005-04-16 259 ^1da177e4c3f41 Linus Torvalds 2005-04-16 260 static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, 8b4daad52fee77 Rasmus Villemoes 2015-02-12 261 unsigned int nbits) ^1da177e4c3f41 Linus Torvalds 2005-04-16 262 { 8b4daad52fee77 Rasmus Villemoes 2015-02-12 263 unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); 3e7e5baaaba780 Alexander Lobakin 2022-06-24 264 3e7e5baaaba780 Alexander Lobakin 2022-06-24 265 if (small_const_nbits(nbits)) 3e7e5baaaba780 Alexander Lobakin 2022-06-24 @266 *dst = *src; 3e7e5baaaba780 Alexander Lobakin 2022-06-24 267 else ^1da177e4c3f41 Linus Torvalds 2005-04-16 268 memcpy(dst, src, len); ^1da177e4c3f41 Linus Torvalds 2005-04-16 269 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 270 :::::: The code at line 266 was first introduced by commit :::::: 3e7e5baaaba78075a7f3a57432609e363bf2a486 bitmap: don't assume compiler evaluates small mem*() builtins calls :::::: TO: Alexander Lobakin <[email protected]> :::::: CC: Yury Norov <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
