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: <202411041426.V8jDSyDo-lkp@intel.com>
Date: Mon, 4 Nov 2024 14:30:33 +0800
From: kernel test robot <lkp@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>
Subject: arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast
 truncates bits from constant value (ffffffff becomes ff)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   59b723cd2adbac2a34fc8e12c74ae26ae45bf230
commit: 0e34600ac9317dbe5f0a7bfaa3d7187d757572ed sched: Misc cleanups
date:   1 year, 2 months ago
config: arm64-randconfig-r123-20241104 (https://download.01.org/0day-ci/archive/20241104/202411041426.V8jDSyDo-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20241104/202411041426.V8jDSyDo-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/202411041426.V8jDSyDo-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/sched/core.c:2226:68: sparse:     expected struct task_struct *tsk
   kernel/sched/core.c:2226:68: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/core.c:3721:17: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct sched_domain *[assigned] sd @@     got struct sched_domain [noderef] __rcu *parent @@
   kernel/sched/core.c:3721:17: sparse:     expected struct sched_domain *[assigned] sd
   kernel/sched/core.c:3721:17: sparse:     got struct sched_domain [noderef] __rcu *parent
   kernel/sched/core.c:3929:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct const *p @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/core.c:3929:36: sparse:     expected struct task_struct const *p
   kernel/sched/core.c:3929:36: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/core.c:9379:43: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *push_task @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/core.c:9379:43: sparse:     expected struct task_struct *push_task
   kernel/sched/core.c:9379:43: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/core.c:5625:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct task_struct *curr @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/core.c:5625:38: sparse:     expected struct task_struct *curr
   kernel/sched/core.c:5625:38: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/core.c:6569:14: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct task_struct *prev @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/core.c:6569:14: sparse:     expected struct task_struct *prev
   kernel/sched/core.c:6569:14: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/core.c:7095:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:7095:17: sparse:    struct task_struct *
   kernel/sched/core.c:7095:17: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/core.c:7310:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:7310:22: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/core.c:7310:22: sparse:    struct task_struct *
   kernel/sched/core.c:11435:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct *p @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/core.c:11435:25: sparse:     expected struct task_struct *p
   kernel/sched/core.c:11435:25: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/core.c: note: in included file:
   kernel/sched/sched.h:1340:17: sparse: sparse: self-comparison always evaluates to true
   kernel/sched/core.c:551:6: sparse: sparse: context imbalance in 'raw_spin_rq_lock_nested' - wrong count at exit
   kernel/sched/sched.h:1340:17: sparse: sparse: self-comparison always evaluates to true
   kernel/sched/core.c:576:6: sparse: sparse: context imbalance in 'raw_spin_rq_trylock' - wrong count at exit
   kernel/sched/core.c:600:6: sparse: sparse: context imbalance in 'raw_spin_rq_unlock' - unexpected unlock
   kernel/sched/core.c:638:36: sparse: sparse: context imbalance in '__task_rq_lock' - wrong count at exit
   kernel/sched/core.c:679:36: sparse: sparse: context imbalance in 'task_rq_lock' - wrong count at exit
   kernel/sched/core.c: note: in included file:
   kernel/sched/pelt.h:97:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct task_struct const *p @@     got struct task_struct [noderef] __rcu *curr @@
   kernel/sched/pelt.h:97:13: sparse:     expected struct task_struct const *p
   kernel/sched/pelt.h:97:13: sparse:     got struct task_struct [noderef] __rcu *curr
   kernel/sched/core.c:796:11: sparse: sparse: dereference of noderef expression
   kernel/sched/core.c:1086:5: sparse: sparse: context imbalance in 'get_nohz_timer_target' - wrong count at exit
   kernel/sched/core.c:1481:13: sparse: sparse: context imbalance in 'uclamp_update_util_min_rt_default' - wrong count at exit
   kernel/sched/core.c:1775:13: sparse: sparse: context imbalance in 'uclamp_update_root_tg' - wrong count at exit
   kernel/sched/core.c:1813:9: sparse: sparse: context imbalance in 'uclamp_sync_util_min_rt_default' - wrong count at exit
   kernel/sched/core.c:2217:33: sparse: sparse: dereference of noderef expression
   kernel/sched/core.c:2218:19: sparse: sparse: dereference of noderef expression
   kernel/sched/core.c:2219:18: sparse: sparse: dereference of noderef expression
   kernel/sched/core.c:2272:15: sparse: sparse: context imbalance in 'wait_task_inactive' - different lock contexts for basic block
   kernel/sched/core.c: note: in included file:
   kernel/sched/sched.h:2138:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2302:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct *
   kernel/sched/core.c:2192:38: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/core.c:2192:38: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/core.c:2192:38: sparse:    struct task_struct const *
   kernel/sched/sched.h:2138:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2302:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2302:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2138:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2302:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2138:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2302:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct *
   kernel/sched/sched.h:2138:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2302:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct *
   kernel/sched/core.c:8241:5: sparse: sparse: context imbalance in 'dl_task_check_affinity' - wrong count at exit
   kernel/sched/core.c:8345:9: sparse: sparse: context imbalance in 'sched_setaffinity' - different lock contexts for basic block
   kernel/sched/core.c:8407:6: sparse: sparse: context imbalance in 'sched_getaffinity' - wrong count at exit
   kernel/sched/core.c: note: in included file (through include/linux/mmu_context.h, include/linux/cpuset.h):
   arch/arm64/include/asm/mmu_context.h:252:22: sparse: sparse: self-comparison always evaluates to true
   arch/arm64/include/asm/mmu_context.h:221:20: sparse: sparse: self-comparison always evaluates to true
   arch/arm64/include/asm/mmu_context.h:221:20: sparse: sparse: self-comparison always evaluates to true
   kernel/sched/core.c: note: in included file:
   kernel/sched/sched.h:2138:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2138:25: sparse:    struct task_struct *
   kernel/sched/sched.h:2302:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct [noderef] __rcu *
   kernel/sched/sched.h:2302:9: sparse:    struct task_struct *
   kernel/sched/core.c:11600:5: sparse: sparse: context imbalance in '__sched_mm_cid_migrate_from_fetch_cid' - different lock contexts for basic block
   kernel/sched/core.c: note: in included file (through arch/arm64/include/asm/atomic.h, include/linux/atomic.h, include/asm-generic/bitops/atomic.h, ...):
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ff)
>> arch/arm64/include/asm/cmpxchg.h:171:1: sparse: sparse: cast truncates bits from constant value (ffffffff becomes ffff)

vim +171 arch/arm64/include/asm/cmpxchg.h

10b663aef1c247 Catalin Marinas 2012-03-05  167  
305d454aaa292b Will Deacon     2015-10-08  168  __CMPXCHG_GEN()
305d454aaa292b Will Deacon     2015-10-08  169  __CMPXCHG_GEN(_acq)
305d454aaa292b Will Deacon     2015-10-08  170  __CMPXCHG_GEN(_rel)
305d454aaa292b Will Deacon     2015-10-08 @171  __CMPXCHG_GEN(_mb)
10b663aef1c247 Catalin Marinas 2012-03-05  172  

:::::: The code at line 171 was first introduced by commit
:::::: 305d454aaa292be3a09a9d674e6c35f5b4249a13 arm64: atomics: implement native {relaxed, acquire, release} atomics

:::::: TO: Will Deacon <will.deacon@....com>
:::::: CC: Catalin Marinas <catalin.marinas@....com>

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