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  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:   Sat, 5 Dec 2020 14:10:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
        netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        secdev@...lsio.com, Vinay Kumar Yadav <vinay.yadav@...lsio.com>,
        Rohit Maheshwari <rohitm@...lsio.com>
Subject: Re: [PATCH net] net/tls: Fix kernel panic when socket is in tls toe
 mode

Hi Vinay,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Vinay-Kumar-Yadav/net-tls-Fix-kernel-panic-when-socket-is-in-tls-toe-mode/20201205-051743
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git bbe2ba04c5a92a49db8a42c850a5a2f6481e47eb
config: x86_64-randconfig-a014-20201204 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project fc7818f5d6906555cebad2c2e7c313a383b9cb82)
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 x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://github.com/0day-ci/linux/commit/293ac488f7830f7f2a6d8baa08d4c9240e8cbe38
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Vinay-Kumar-Yadav/net-tls-Fix-kernel-panic-when-socket-is-in-tls-toe-mode/20201205-051743
        git checkout 293ac488f7830f7f2a6d8baa08d4c9240e8cbe38
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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 >>):

>> net/tls/tls_toe.c:109:4: warning: variable 'err' is uninitialized when used here [-Wuninitialized]
                           err |= dev->hash(dev, sk);
                           ^~~
   net/tls/tls_toe.c:102:9: note: initialize the variable 'err' to silence this warning
           int err;
                  ^
                   = 0
   1 warning generated.

vim +/err +109 net/tls/tls_toe.c

08700dab816847 Jakub Kicinski 2019-10-03   98  
0eb8745e03c9ed Jakub Kicinski 2019-10-03   99  int tls_toe_hash(struct sock *sk)
08700dab816847 Jakub Kicinski 2019-10-03  100  {
08700dab816847 Jakub Kicinski 2019-10-03  101  	struct tls_toe_device *dev;
08700dab816847 Jakub Kicinski 2019-10-03  102  	int err;
08700dab816847 Jakub Kicinski 2019-10-03  103  
08700dab816847 Jakub Kicinski 2019-10-03  104  	spin_lock_bh(&device_spinlock);
08700dab816847 Jakub Kicinski 2019-10-03  105  	list_for_each_entry(dev, &device_list, dev_list) {
08700dab816847 Jakub Kicinski 2019-10-03  106  		if (dev->hash) {
08700dab816847 Jakub Kicinski 2019-10-03  107  			kref_get(&dev->kref);
08700dab816847 Jakub Kicinski 2019-10-03  108  			spin_unlock_bh(&device_spinlock);
08700dab816847 Jakub Kicinski 2019-10-03 @109  			err |= dev->hash(dev, sk);
08700dab816847 Jakub Kicinski 2019-10-03  110  			kref_put(&dev->kref, dev->release);
08700dab816847 Jakub Kicinski 2019-10-03  111  			spin_lock_bh(&device_spinlock);
08700dab816847 Jakub Kicinski 2019-10-03  112  		}
08700dab816847 Jakub Kicinski 2019-10-03  113  	}
08700dab816847 Jakub Kicinski 2019-10-03  114  	spin_unlock_bh(&device_spinlock);
08700dab816847 Jakub Kicinski 2019-10-03  115  
08700dab816847 Jakub Kicinski 2019-10-03  116  	if (err)
0eb8745e03c9ed Jakub Kicinski 2019-10-03  117  		tls_toe_unhash(sk);
08700dab816847 Jakub Kicinski 2019-10-03  118  	return err;
08700dab816847 Jakub Kicinski 2019-10-03  119  }
08700dab816847 Jakub Kicinski 2019-10-03  120  

---
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" (44966 bytes)

Powered by blists - more mailing lists