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: <202301070118.xW9tG4b6-lkp@intel.com>
Date:   Sat, 7 Jan 2023 01:14:42 +0800
From:   kernel test robot <lkp@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Muchun Song <songmuchun@...edance.com>
Subject: mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1
 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1f5abbd77e2c1787e74b7c2caffac97def78ba52
commit: e575d401583273a7ac5dfb27520e41c821e81816 mm/memcontrol: Replace the PREEMPT_RT conditionals
date:   4 months ago
config: loongarch-randconfig-s043-20230106
compiler: loongarch64-linux-gcc (GCC) 12.1.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-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e575d401583273a7ac5dfb27520e41c821e81816
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e575d401583273a7ac5dfb27520e41c821e81816
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch SHELL=/bin/bash

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

sparse warnings: (new ones prefixed by >>)
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got unsigned int [noderef] __percpu *
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got unsigned int [noderef] __percpu *
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got unsigned int [noderef] __percpu *
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got unsigned int [noderef] __percpu *
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got int [noderef] __percpu *
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got int [noderef] __percpu *
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got int [noderef] __percpu *
>> mm/memcontrol.c:600:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:600:9: sparse:     expected void *ptr
   mm/memcontrol.c:600:9: sparse:     got int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got unsigned int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got unsigned int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got unsigned int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got unsigned int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got unsigned int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got int [noderef] __percpu *
   mm/memcontrol.c:606:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got int [noderef] __percpu * @@
   mm/memcontrol.c:606:9: sparse:     expected void *ptr
   mm/memcontrol.c:606:9: sparse:     got int [noderef] __percpu *
   mm/memcontrol.c:4109:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4109:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4109:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4111:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4111:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4111:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4267:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4267:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4267:9: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4361:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4361:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4361:9: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:5991:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:5991:23: sparse:    struct task_struct [noderef] __rcu *
   mm/memcontrol.c:5991:23: sparse:    struct task_struct *
   mm/memcontrol.c:914:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   mm/memcontrol.c:914:24: sparse:     expected void *ptr
   mm/memcontrol.c:914:24: sparse:     got struct mem_cgroup *[noderef] __percpu *
   mm/memcontrol.c:914:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   mm/memcontrol.c:914:24: sparse:     expected void *ptr
   mm/memcontrol.c:914:24: sparse:     got struct mem_cgroup *[noderef] __percpu *
   mm/memcontrol.c:914:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   mm/memcontrol.c:914:24: sparse:     expected void *ptr
   mm/memcontrol.c:914:24: sparse:     got struct mem_cgroup *[noderef] __percpu *
   mm/memcontrol.c:914:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   mm/memcontrol.c:914:24: sparse:     expected void *ptr
   mm/memcontrol.c:914:24: sparse:     got struct mem_cgroup *[noderef] __percpu *
   mm/memcontrol.c: note: in included file:
   include/linux/memcontrol.h:754:9: sparse: sparse: context imbalance in 'folio_lruvec_lock' - wrong count at exit
   include/linux/memcontrol.h:754:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irq' - wrong count at exit
   include/linux/memcontrol.h:754:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irqsave' - wrong count at exit
   mm/memcontrol.c:2027:6: sparse: sparse: context imbalance in 'folio_memcg_lock' - wrong count at exit
   mm/memcontrol.c:2079:17: sparse: sparse: context imbalance in '__folio_memcg_unlock' - unexpected unlock
   mm/memcontrol.c: note: in included file (through include/linux/xarray.h, include/linux/list_lru.h, include/linux/fs.h, ...):
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:384:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:384:17: sparse:     expected void *ptr
   include/linux/sched/mm.h:384:17: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:384:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:384:17: sparse:     expected void *ptr
   include/linux/sched/mm.h:384:17: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:384:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:384:17: sparse:     expected void *ptr
   include/linux/sched/mm.h:384:17: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:384:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:384:17: sparse:     expected void *ptr
   include/linux/sched/mm.h:384:17: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:383:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:383:23: sparse:     expected void *ptr
   include/linux/sched/mm.h:383:23: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:384:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@
   include/linux/sched/mm.h:384:17: sparse:     expected void *ptr
   include/linux/sched/mm.h:384:17: sparse:     got struct mem_cgroup *[noderef] __percpu *
   include/linux/sched/mm.h:384:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *ptr @@     got struct mem_cgroup *[noderef] __percpu * @@

vim +600 mm/memcontrol.c

   591	
   592	/*
   593	 * Accessors to ensure that preemption is disabled on PREEMPT_RT because it can
   594	 * not rely on this as part of an acquired spinlock_t lock. These functions are
   595	 * never used in hardirq context on PREEMPT_RT and therefore disabling preemtion
   596	 * is sufficient.
   597	 */
   598	static void memcg_stats_lock(void)
   599	{
 > 600		preempt_disable_nested();
   601		VM_WARN_ON_IRQS_ENABLED();
   602	}
   603	

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

View attachment "config" of type "text/plain" (182718 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ