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>] [day] [month] [year] [list]
Message-ID: <202512111034.9udHScZy-lkp@intel.com>
Date: Thu, 11 Dec 2025 10:22:54 +0800
From: kernel test robot <lkp@...el.com>
To: Kumar Kartikeya Dwivedi <memxor@...il.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Alexei Starovoitov <ast@...nel.org>
Subject: kernel/bpf/rqspinlock.c:100:39: sparse: sparse: incorrect type in
 initializer (different address spaces)

Hi Kumar,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   8c8081cc599fcafa25371d50959c17e154f9fd08
commit: e2082e32fd57976e811086708043c136ee596978 rqspinlock: Add entry to Makefile, MAINTAINERS
date:   9 months ago
config: x86_64-randconfig-121-20251211 (https://download.01.org/0day-ci/archive/20251211/202512111034.9udHScZy-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251211/202512111034.9udHScZy-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512111034.9udHScZy-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> kernel/bpf/rqspinlock.c:100:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct rqspinlock_held * @@
   kernel/bpf/rqspinlock.c:100:39: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/bpf/rqspinlock.c:100:39: sparse:     got struct rqspinlock_held *
   kernel/bpf/rqspinlock.c:122:39: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct rqspinlock_held * @@
   kernel/bpf/rqspinlock.c:122:39: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/bpf/rqspinlock.c:122:39: sparse:     got struct rqspinlock_held *
   kernel/bpf/rqspinlock.c:135:51: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct rqspinlock_held * @@
   kernel/bpf/rqspinlock.c:135:51: sparse:     expected void const [noderef] __percpu *__vpp_verify
   kernel/bpf/rqspinlock.c:135:51: sparse:     got struct rqspinlock_held *

vim +100 kernel/bpf/rqspinlock.c

31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15   96  
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15   97  static noinline int check_deadlock_AA(rqspinlock_t *lock, u32 mask,
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15   98  				      struct rqspinlock_timeout *ts)
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15   99  {
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15 @100  	struct rqspinlock_held *rqh = this_cpu_ptr(&rqspinlock_held_locks);
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  101  	int cnt = min(RES_NR_HELD, rqh->cnt);
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  102  
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  103  	/*
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  104  	 * Return an error if we hold the lock we are attempting to acquire.
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  105  	 * We'll iterate over max 32 locks; no need to do is_lock_released.
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  106  	 */
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  107  	for (int i = 0; i < cnt - 1; i++) {
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  108  		if (rqh->locks[i] == lock)
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  109  			return -EDEADLK;
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  110  	}
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  111  	return 0;
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  112  }
31158ad02ddbed Kumar Kartikeya Dwivedi 2025-03-15  113  

:::::: The code at line 100 was first introduced by commit
:::::: 31158ad02ddbed2b0672c9701a0a2f3e5b3bc01a rqspinlock: Add deadlock detection and recovery

:::::: TO: Kumar Kartikeya Dwivedi <memxor@...il.com>
:::::: CC: Alexei Starovoitov <ast@...nel.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ