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: <202212201850.ZHz89VEr-lkp@intel.com>
Date:   Tue, 20 Dec 2022 18:39:29 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yevhen Orlov <yevhen.orlov@...ision.eu>, netdev@...r.kernel.org
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>,
        Taras Chornyi <taras.chornyi@...ision.eu>,
        Mickey Rachamim <mickeyr@...vell.com>,
        Serhiy Pshyk <serhiy.pshyk@...ision.eu>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
        Stephen Hemminger <stephen@...workplumber.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v1 1/2] net: marvell: prestera: Add router ipv6
 ABI

Hi Yevhen,

Thank you for the patch! Perhaps something to improve:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Yevhen-Orlov/net-marvell-prestera-add-ipv6-routes-offloading/20221220-035326
patch link:    https://lore.kernel.org/r/Y5%2BRSF0Had10xizI%40yorlov.ow.s
patch subject: [PATCH net-next v1 1/2] net: marvell: prestera: Add router ipv6 ABI
config: x86_64-randconfig-a013-20221219
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/97d5847b7ceba4ba9aaa7402ae3cc3da3eac2725
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Yevhen-Orlov/net-marvell-prestera-add-ipv6-routes-offloading/20221220-035326
        git checkout 97d5847b7ceba4ba9aaa7402ae3cc3da3eac2725
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/i2c/ drivers/net/ethernet/marvell/prestera/

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

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/marvell/prestera/prestera_router_hw.c:675:11: warning: variable 'err' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           else if (key->addr.v == PRESTERA_IPV6)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/marvell/prestera/prestera_router_hw.c:682:6: note: uninitialized use occurs here
           if (err)
               ^~~
   drivers/net/ethernet/marvell/prestera/prestera_router_hw.c:675:7: note: remove the 'if' if its condition is always true
           else if (key->addr.v == PRESTERA_IPV6)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/marvell/prestera/prestera_router_hw.c:637:9: note: initialize the variable 'err' to silence this warning
           int err;
                  ^
                   = 0
   1 warning generated.


vim +675 drivers/net/ethernet/marvell/prestera/prestera_router_hw.c

   627	
   628	struct prestera_fib_node *
   629	prestera_fib_node_create(struct prestera_switch *sw,
   630				 struct prestera_fib_key *key,
   631				 enum prestera_fib_type fib_type,
   632				 struct prestera_nexthop_group_key *nh_grp_key)
   633	{
   634		struct prestera_fib_node *fib_node;
   635		u32 grp_id;
   636		struct prestera_vr *vr;
   637		int err;
   638	
   639		fib_node = kzalloc(sizeof(*fib_node), GFP_KERNEL);
   640		if (!fib_node)
   641			goto err_kzalloc;
   642	
   643		memcpy(&fib_node->key, key, sizeof(*key));
   644		fib_node->info.type = fib_type;
   645	
   646		vr = prestera_vr_get(sw, key->tb_id, NULL);
   647		if (IS_ERR(vr))
   648			goto err_vr_get;
   649	
   650		fib_node->info.vr = vr;
   651	
   652		switch (fib_type) {
   653		case PRESTERA_FIB_TYPE_TRAP:
   654			grp_id = PRESTERA_NHGR_UNUSED;
   655			break;
   656		case PRESTERA_FIB_TYPE_DROP:
   657			grp_id = PRESTERA_NHGR_DROP;
   658			break;
   659		case PRESTERA_FIB_TYPE_UC_NH:
   660			fib_node->info.nh_grp = prestera_nexthop_group_get(sw,
   661									   nh_grp_key);
   662			if (IS_ERR(fib_node->info.nh_grp))
   663				goto err_nh_grp_get;
   664	
   665			grp_id = fib_node->info.nh_grp->grp_id;
   666			break;
   667		default:
   668			pr_err("Unsupported fib_type %d", fib_type);
   669			goto err_nh_grp_get;
   670		}
   671	
   672		if (key->addr.v == PRESTERA_IPV4)
   673			err = prestera_hw_lpm_add(sw, vr->hw_vr_id, key->addr.u.ipv4,
   674						  key->prefix_len, grp_id);
 > 675		else if (key->addr.v == PRESTERA_IPV6)

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

View attachment "config" of type "text/plain" (155807 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ