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: <202204182229.GGvxHzBu-lkp@intel.com>
Date:   Mon, 18 Apr 2022 22:59:34 +0800
From:   kernel test robot <lkp@...el.com>
To:     Yury Norov <yury.norov@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [norov:bitmap 45/47] include/linux/bitmap.h:615:16: sparse: sparse:
 non size-preserving integer to pointer cast

tree:   https://github.com/norov/linux bitmap
head:   45a9e3feb171ccf077979b7ff6a0c6a732cfc17b
commit: 1a21df17d726b4f3c19a148e10d09ec632603f1c [45/47] lib: add bitmap_{from,to}_arr64
config: arm-randconfig-s032-20220417 (https://download.01.org/0day-ci/archive/20220418/202204182229.GGvxHzBu-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/norov/linux/commit/1a21df17d726b4f3c19a148e10d09ec632603f1c
        git remote add norov https://github.com/norov/linux
        git fetch --no-tags norov bitmap
        git checkout 1a21df17d726b4f3c19a148e10d09ec632603f1c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash kernel/events/

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


sparse warnings: (new ones prefixed by >>)
   kernel/events/core.c:1402:15: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:1402:15: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:1402:15: sparse:    struct perf_event_context *
   kernel/events/core.c:1415:28: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:1415:28: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:1415:28: sparse:    struct perf_event_context *
   kernel/events/core.c:3399:18: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:3399:18: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:3399:18: sparse:    struct perf_event_context *
   kernel/events/core.c:3400:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:3400:23: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:3400:23: sparse:    struct perf_event_context *
   kernel/events/core.c:3448:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:3448:25: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:3448:25: sparse:    struct perf_event_context *
   kernel/events/core.c:3449:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:3449:25: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:3449:25: sparse:    struct perf_event_context *
   kernel/events/core.c:4683:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:4683:25: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:4683:25: sparse:    struct perf_event_context *
   kernel/events/core.c:5948:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:5948:9: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:5948:9: sparse:    struct perf_buffer *
   kernel/events/core.c:5420:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __poll_t [usertype] events @@     got int @@
   kernel/events/core.c:5664:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:5664:22: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:5664:22: sparse:    struct perf_buffer *
   kernel/events/core.c:5788:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:5788:14: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:5788:14: sparse:    struct perf_buffer *
   kernel/events/core.c:5821:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:5821:14: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:5821:14: sparse:    struct perf_buffer *
   kernel/events/core.c:5878:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:5878:14: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:5878:14: sparse:    struct perf_buffer *
   kernel/events/core.c:5969:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:5969:14: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:5969:14: sparse:    struct perf_buffer *
   kernel/events/core.c:5985:14: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:5985:14: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:5985:14: sparse:    struct perf_buffer *
   kernel/events/core.c:7628:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:7628:23: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:7628:23: sparse:    struct perf_event_context *
   kernel/events/core.c:7680:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:7680:23: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:7680:23: sparse:    struct perf_event_context *
   kernel/events/core.c:7719:13: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:7719:13: sparse:    struct perf_buffer [noderef] __rcu *
   kernel/events/core.c:7719:13: sparse:    struct perf_buffer *
   kernel/events/core.c:7824:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct task_struct *p @@     got struct task_struct [noderef] __rcu *real_parent @@
   kernel/events/core.c:7824:61: sparse:     expected struct task_struct *p
   kernel/events/core.c:7824:61: sparse:     got struct task_struct [noderef] __rcu *real_parent
   kernel/events/core.c:7826:61: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct task_struct *p @@     got struct task_struct [noderef] __rcu *real_parent @@
   kernel/events/core.c:7826:61: sparse:     expected struct task_struct *p
   kernel/events/core.c:7826:61: sparse:     got struct task_struct [noderef] __rcu *real_parent
   kernel/events/core.c:8527:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:8527:23: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:8527:23: sparse:    struct perf_event_context *
   kernel/events/core.c:9521:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:9521:9: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:9521:9: sparse:    struct swevent_hlist *
   kernel/events/core.c:9560:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:9560:17: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:9560:17: sparse:    struct swevent_hlist *
   kernel/events/core.c:10920:1: sparse: sparse: symbol 'dev_attr_nr_addr_filters' was not declared. Should it be static?
   kernel/events/core.c:12724:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:12724:9: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:12724:9: sparse:    struct perf_event_context *
   kernel/events/core.c:12834:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:12834:17: sparse:    struct perf_event_context [noderef] __rcu *
   kernel/events/core.c:12834:17: sparse:    struct perf_event_context *
   kernel/events/core.c:13264:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:13264:17: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:13264:17: sparse:    struct swevent_hlist *
   kernel/events/core.c:167:9: sparse: sparse: context imbalance in 'perf_ctx_lock' - wrong count at exit
   kernel/events/core.c:175:17: sparse: sparse: context imbalance in 'perf_ctx_unlock' - unexpected unlock
   kernel/events/core.c: note: in included file (through include/linux/rculist.h, include/linux/dcache.h, include/linux/fs.h):
   include/linux/rcupdate.h:725:9: sparse: sparse: context imbalance in 'perf_lock_task_context' - different lock contexts for basic block
   kernel/events/core.c:1449:17: sparse: sparse: context imbalance in 'perf_pin_task_context' - unexpected unlock
   kernel/events/core.c:2772:9: sparse: sparse: context imbalance in '__perf_install_in_context' - wrong count at exit
   kernel/events/core.c:4655:17: sparse: sparse: context imbalance in 'find_get_context' - unexpected unlock
   kernel/events/core.c: note: in included file (through include/linux/cpumask.h, include/linux/smp.h, include/linux/lockdep.h, ...):
>> include/linux/bitmap.h:615:16: sparse: sparse: non size-preserving integer to pointer cast
   kernel/events/core.c: note: in included file:
   kernel/events/internal.h:197:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got void const *src @@
   kernel/events/core.c:9370:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:9370:17: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:9370:17: sparse:    struct swevent_hlist *
   kernel/events/core.c:9390:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:9390:17: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:9390:17: sparse:    struct swevent_hlist *
   kernel/events/core.c:9510:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:9510:16: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:9510:16: sparse:    struct swevent_hlist *
   kernel/events/core.c:9510:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:9510:16: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:9510:16: sparse:    struct swevent_hlist *
   kernel/events/core.c:9510:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   kernel/events/core.c:9510:16: sparse:    struct swevent_hlist [noderef] __rcu *
   kernel/events/core.c:9510:16: sparse:    struct swevent_hlist *

vim +615 include/linux/bitmap.h

   602	
   603	/**
   604	 * bitmap_from_u64 - Check and swap words within u64.
   605	 *  @mask: source bitmap
   606	 *  @dst:  destination bitmap
   607	 *
   608	 * In 32-bit Big Endian kernel, when using ``(u32 *)(&val)[*]``
   609	 * to read u64 mask, we will get the wrong word.
   610	 * That is ``(u32 *)(&val)[0]`` gets the upper 32 bits,
   611	 * but we expect the lower 32-bits of u64.
   612	 */
   613	static inline void bitmap_from_u64(unsigned long *dst, u64 mask)
   614	{
 > 615		return bitmap_from_arr64(dst, mask, 64);
   616	}
   617	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ