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: <202212022052.munkjr4k-lkp@intel.com>
Date:   Fri, 2 Dec 2022 20:12:56 +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:   a4412fdd49dc011bcc2c0d81ac4cab7457092650
commit: e575d401583273a7ac5dfb27520e41c821e81816 mm/memcontrol: Replace the PREEMPT_RT conditionals
date:   2 months ago
config: loongarch-randconfig-s031-20221201
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 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: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: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: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: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

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://01.org/lkp

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ