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:   Mon, 31 May 2021 20:44:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Simon Horman <simon.horman@...igine.com>,
        David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        netdev@...r.kernel.org, oss-drivers@...igine.com,
        Louis Peens <louis.peens@...igine.com>,
        Yinjun Zhang <yinjun.zhang@...igine.com>,
        Simon Horman <simon.horman@...igine.com>
Subject: Re: [PATCH net-next 8/8] nfp: flower-ct: add tc merge functionality

Hi Simon,

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/Simon-Horman/Introduce-conntrack-offloading-to-the-nfp-driver/20210528-224456
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git af9207adb6d9986be6ed64e76705cf513087e724
config: arm64-randconfig-r022-20210531 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project bc6799f2f79f0ae87e9f1ebf9d25ba799fbd25a9)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/ddeb710e846c772a8cb45e071c15e37bdbd2000c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Simon-Horman/Introduce-conntrack-offloading-to-the-nfp-driver/20210528-224456
        git checkout ddeb710e846c772a8cb45e071c15e37bdbd2000c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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

All warnings (new ones prefixed by >>):

>> drivers/net/ethernet/netronome/nfp/flower/conntrack.c:364:11: warning: variable 'ct_list' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
           else if (ct_entry1->type == CT_TYPE_POST_CT)
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/netronome/nfp/flower/conntrack.c:367:46: note: uninitialized use occurs here
           list_for_each_entry_safe(ct_entry2, ct_tmp, ct_list,
                                                       ^~~~~~~
   include/linux/list.h:715:30: note: expanded from macro 'list_for_each_entry_safe'
           for (pos = list_first_entry(head, typeof(*pos), member),        \
                                       ^~~~
   include/linux/list.h:522:14: note: expanded from macro 'list_first_entry'
           list_entry((ptr)->next, type, member)
                       ^~~
   include/linux/list.h:511:15: note: expanded from macro 'list_entry'
           container_of(ptr, type, member)
                        ^~~
   include/linux/kernel.h:703:26: note: expanded from macro 'container_of'
           void *__mptr = (void *)(ptr);                                   \
                                   ^~~
   drivers/net/ethernet/netronome/nfp/flower/conntrack.c:364:7: note: remove the 'if' if its condition is always true
           else if (ct_entry1->type == CT_TYPE_POST_CT)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/net/ethernet/netronome/nfp/flower/conntrack.c:360:27: note: initialize the variable 'ct_list' to silence this warning
           struct list_head *ct_list;
                                    ^
                                     = NULL
   1 warning generated.


vim +364 drivers/net/ethernet/netronome/nfp/flower/conntrack.c

   353	
   354	static void
   355	nfp_ct_merge_tc_entries(struct nfp_fl_ct_flow_entry *ct_entry1,
   356				struct nfp_fl_ct_zone_entry *zt_src,
   357				struct nfp_fl_ct_zone_entry *zt_dst)
   358	{
   359		struct nfp_fl_ct_flow_entry *ct_entry2, *ct_tmp;
   360		struct list_head *ct_list;
   361	
   362		if (ct_entry1->type == CT_TYPE_PRE_CT)
   363			ct_list = &zt_src->post_ct_list;
 > 364		else if (ct_entry1->type == CT_TYPE_POST_CT)
   365			ct_list = &zt_src->pre_ct_list;
   366	
   367		list_for_each_entry_safe(ct_entry2, ct_tmp, ct_list,
   368					 list_node) {
   369			nfp_ct_do_tc_merge(zt_dst, ct_entry2, ct_entry1);
   370		}
   371	}
   372	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ