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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202208171521.JiKYmnhP-lkp@intel.com>
Date:   Wed, 17 Aug 2022 16:13:50 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>, yin31149@...il.com
Cc:     kbuild-all@...ts.01.org, Jakub Kicinski <kuba@...nel.org>,
        netdev@...r.kernel.org, dhowells@...hat.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: Fix suspicious RCU usage in
 bpf_sk_reuseport_detach()

Hi David,

I love your patch! Yet something to improve:

[auto build test ERROR on net/master]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Howells/net-Fix-suspicious-RCU-usage-in-bpf_sk_reuseport_detach/20220816-212744
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git ae806c7805571a9813e41bf6763dd08d0706f4ed
config: x86_64-rhel-8.3-kvm (https://download.01.org/0day-ci/archive/20220817/202208171521.JiKYmnhP-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/fe74fdc1e7fe8aa84006265deb7b55f40bcc8736
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review David-Howells/net-Fix-suspicious-RCU-usage-in-bpf_sk_reuseport_detach/20220816-212744
        git checkout fe74fdc1e7fe8aa84006265deb7b55f40bcc8736
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

   ld: kernel/bpf/reuseport_array.o: in function `bpf_sk_reuseport_detach':
>> kernel/bpf/reuseport_array.c:28: undefined reference to `lockdep_is_held'


vim +28 kernel/bpf/reuseport_array.c

    20	
    21	/* The caller must hold the reuseport_lock */
    22	void bpf_sk_reuseport_detach(struct sock *sk)
    23	{
    24		struct sock __rcu **socks;
    25	
    26		write_lock_bh(&sk->sk_callback_lock);
    27		socks = __rcu_dereference_sk_user_data_with_flags_check(
  > 28			sk, SK_USER_DATA_BPF, lockdep_is_held(&sk->sk_callback_lock));
    29		if (socks) {
    30			WRITE_ONCE(sk->sk_user_data, NULL);
    31			/*
    32			 * Do not move this NULL assignment outside of
    33			 * sk->sk_callback_lock because there is
    34			 * a race with reuseport_array_free()
    35			 * which does not hold the reuseport_lock.
    36			 */
    37			RCU_INIT_POINTER(*socks, NULL);
    38		}
    39		write_unlock_bh(&sk->sk_callback_lock);
    40	}
    41	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ