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: <202601110728.MK2SXeDp-lkp@intel.com>
Date: Sun, 11 Jan 2026 07:21:10 +0800
From: kernel test robot <lkp@...el.com>
To: Marco Elver <elver@...gle.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
 x86@...nel.org, Peter Zijlstra <peterz@...radead.org>
Subject: [tip:locking/core 22/43] lib/test_context-analysis.c:483:9:
 sparse: sparse: incorrect type in argument 1 (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
head:   a45026cef17d1080c985adf28234d6c8475ad66f
commit: d3febf16dee28a74b01ba43195ee4965edb6208f [22/43] locking/local_lock: Support Clang's context analysis
config: riscv-randconfig-r123-20260111 (https://download.01.org/0day-ci/archive/20260111/202601110728.MK2SXeDp-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 9b8addffa70cee5b2acc5454712d9cf78ce45710)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260111/202601110728.MK2SXeDp-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/202601110728.MK2SXeDp-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   WARNING: invalid argument to '-march': '_zacas_zabha'
   lib/test_context-analysis.c: note: in included file (through include/linux/local_lock.h):
   include/linux/local_lock_internal.h:332:40: sparse: sparse: multiple definitions for function '__this_cpu_local_lock'
   include/linux/local_lock_internal.h:326:37: sparse:  the previous one is here
   lib/test_context-analysis.c:148:1: sparse: sparse: undefined identifier '__cond_acquire'
>> lib/test_context-analysis.c:483:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:483:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:483:9: sparse:     got struct local_lock [noderef] __percpu *
>> lib/test_context-analysis.c:483:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:483:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:483:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:485:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:485:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:485:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:485:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:485:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:485:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:487:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:487:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:487:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:487:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:487:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:487:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:489:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:489:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:489:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:489:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:489:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:489:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:491:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:491:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:491:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:491:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:491:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:491:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:493:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:493:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:493:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:493:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:493:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:493:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:495:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:495:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:495:9: sparse:     got struct local_lock [noderef] __percpu *
>> lib/test_context-analysis.c:495:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_lock [usertype] *l @@     got struct local_trylock [usertype] * @@
   lib/test_context-analysis.c:495:9: sparse:     expected struct local_lock [usertype] *l
   lib/test_context-analysis.c:495:9: sparse:     got struct local_trylock [usertype] *
   lib/test_context-analysis.c:497:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] __percpu * @@
   lib/test_context-analysis.c:497:9: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   lib/test_context-analysis.c:497:9: sparse:     got struct local_lock [noderef] __percpu *
   lib/test_context-analysis.c:497:9: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_lock [usertype] *l @@     got struct local_trylock [usertype] * @@
   lib/test_context-analysis.c:497:9: sparse:     expected struct local_lock [usertype] *l
   lib/test_context-analysis.c:497:9: sparse:     got struct local_trylock [usertype] *
   lib/test_context-analysis.c:83:1: sparse: sparse: context imbalance in 'test_raw_spinlock_guard' - wrong count at exit
   lib/test_context-analysis.c:90:20: sparse: sparse: context imbalance in 'test_raw_spinlock_trylock_extra' - wrong count at exit
   lib/test_context-analysis.c:107:1: sparse: sparse: context imbalance in 'test_spinlock_guard' - wrong count at exit
   lib/test_context-analysis.c:114:20: sparse: sparse: context imbalance in 'test_spinlock_trylock_extra' - wrong count at exit
   lib/test_context-analysis.c:131:1: sparse: sparse: context imbalance in 'test_write_lock_guard' - wrong count at exit
   lib/test_context-analysis.c:148:1: sparse: sparse: context imbalance in 'test_read_lock_guard' - wrong count at exit
   lib/test_context-analysis.c:188:17: sparse: sparse: context imbalance in 'test_mutex_trylock' - unexpected unlock
   lib/test_context-analysis.c:203:20: sparse: sparse: context imbalance in 'test_mutex_guard' - wrong count at exit
   lib/test_context-analysis.c:209:20: sparse: sparse: context imbalance in 'test_mutex_cond_guard' - wrong count at exit
   lib/test_context-analysis.c:263:9: sparse: sparse: context imbalance in 'test_seqlock_scoped' - wrong count at exit
   lib/test_context-analysis.c:286:17: sparse: sparse: context imbalance in 'test_rwsem_reader' - unexpected unlock
   lib/test_context-analysis.c:304:17: sparse: sparse: context imbalance in 'test_rwsem_writer' - unexpected unlock
   lib/test_context-analysis.c:315:20: sparse: sparse: context imbalance in 'test_rwsem_guard' - wrong count at exit
   lib/test_context-analysis.c:321:20: sparse: sparse: context imbalance in 'test_rwsem_cond_guard' - wrong count at exit
   lib/test_context-analysis.c:461:53: sparse: sparse: context imbalance in 'test_srcu_guard' - wrong count at exit
   lib/test_context-analysis.c: note: in included file:
>> include/linux/local_lock.h:86:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock @@
   include/linux/local_lock.h:86:1: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   include/linux/local_lock.h:86:1: sparse:     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock
>> include/linux/local_lock.h:86:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock @@
   include/linux/local_lock.h:86:1: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   include/linux/local_lock.h:86:1: sparse:     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock
   include/linux/local_lock.h:89:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock @@
   include/linux/local_lock.h:89:1: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   include/linux/local_lock.h:89:1: sparse:     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock
   include/linux/local_lock.h:89:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock @@
   include/linux/local_lock.h:89:1: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   include/linux/local_lock.h:89:1: sparse:     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock
   include/linux/local_lock.h:92:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock @@
   include/linux/local_lock.h:92:1: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   include/linux/local_lock.h:92:1: sparse:     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock
   include/linux/local_lock.h:92:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock @@
   include/linux/local_lock.h:92:1: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   include/linux/local_lock.h:92:1: sparse:     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock
   include/linux/local_lock.h:103:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_trylock [noderef] [usertype] __percpu *base @@     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock @@
   include/linux/local_lock.h:103:1: sparse:     expected struct local_trylock [noderef] [usertype] __percpu *base
   include/linux/local_lock.h:103:1: sparse:     got struct local_lock [noderef] [usertype] __percpu *[usertype] lock
>> include/linux/local_lock.h:103:1: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected struct local_lock [usertype] *l @@     got struct local_trylock [usertype] * @@
   include/linux/local_lock.h:103:1: sparse:     expected struct local_lock [usertype] *l
   include/linux/local_lock.h:103:1: sparse:     got struct local_trylock [usertype] *
   lib/test_context-analysis.c: note: in included file (through include/linux/local_lock.h):
   include/linux/local_lock_internal.h:46:9: sparse: sparse: context imbalance in 'test_local_lock_guard' - wrong count at exit
   lib/test_context-analysis.c:530:17: sparse: sparse: context imbalance in 'test_local_trylock' - unexpected unlock

vim +483 lib/test_context-analysis.c

   478	
   479	static void __used test_local_lock(void)
   480	{
   481		unsigned long flags;
   482	
 > 483		local_lock(&test_local_lock_data.lock);
   484		this_cpu_add(test_local_lock_data.counter, 1);
   485		local_unlock(&test_local_lock_data.lock);
   486	
   487		local_lock_irq(&test_local_lock_data.lock);
   488		this_cpu_add(test_local_lock_data.counter, 1);
   489		local_unlock_irq(&test_local_lock_data.lock);
   490	
   491		local_lock_irqsave(&test_local_lock_data.lock, flags);
   492		this_cpu_add(test_local_lock_data.counter, 1);
   493		local_unlock_irqrestore(&test_local_lock_data.lock, flags);
   494	
 > 495		local_lock_nested_bh(&test_local_lock_data.lock);
   496		this_cpu_add(test_local_lock_data.counter, 1);
   497		local_unlock_nested_bh(&test_local_lock_data.lock);
   498	}
   499	

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