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>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 9 Oct 2021 22:20:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: [rt-devel:linux-5.15.y-rt-rebase 85/155] drivers/md/raid5.c:2222:20:
 sparse: sparse: incorrect type in argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.15.y-rt-rebase
head:   d2f311fe375d0cf3b1f03bae1251036c93741332
commit: d227bdbf286b7591de778ab979d1e2343f41135b [85/155] md: raid5: Make raid5_percpu handling RT aware
config: alpha-randconfig-s032-20211009 (attached as .config)
compiler: alpha-linux-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://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=d227bdbf286b7591de778ab979d1e2343f41135b
        git remote add rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git
        git fetch --no-tags rt-devel linux-5.15.y-rt-rebase
        git checkout d227bdbf286b7591de778ab979d1e2343f41135b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha 

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 >>)
   drivers/md/raid5.c: note: in included file:
   drivers/md/raid5.h:270:14: sparse: sparse: array of flexible structures
   drivers/md/raid5.c:641:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:641:40: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:641:40: sparse:    struct md_rdev *
   drivers/md/raid5.c:643:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:643:32: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:643:32: sparse:    struct md_rdev *
   drivers/md/raid5.c:667:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:667:40: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:667:40: sparse:    struct md_rdev *
   drivers/md/raid5.c:669:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:669:32: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:669:32: sparse:    struct md_rdev *
   drivers/md/raid5.c:1101:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:1101:25: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:1101:25: sparse:    struct md_rdev *
   drivers/md/raid5.c:1103:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:1103:24: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:1103:24: sparse:    struct md_rdev *
>> drivers/md/raid5.c:2222:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __percpu * @@
   drivers/md/raid5.c:2222:20: sparse:     expected struct spinlock [usertype] *lock
   drivers/md/raid5.c:2222:20: sparse:     got struct spinlock [noderef] __percpu *
   drivers/md/raid5.c:2281:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __percpu * @@
   drivers/md/raid5.c:2281:22: sparse:     expected struct spinlock [usertype] *lock
   drivers/md/raid5.c:2281:22: sparse:     got struct spinlock [noderef] __percpu *
   drivers/md/raid5.c:3565:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:3565:32: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:3565:32: sparse:    struct md_rdev *
   drivers/md/raid5.c:3691:48: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:3691:48: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:3691:48: sparse:    struct md_rdev *
   drivers/md/raid5.c:3698:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:3698:32: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:3698:32: sparse:    struct md_rdev *
   drivers/md/raid5.c:3720:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:3720:16: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:3720:16: sparse:    struct md_rdev *
   drivers/md/raid5.c:4648:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:4648:24: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:4648:24: sparse:    struct md_rdev *
   drivers/md/raid5.c:4659:32: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:4659:32: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:4659:32: sparse:    struct md_rdev *
   drivers/md/raid5.c:4706:49: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:4706:49: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:4706:49: sparse:    struct md_rdev *
   drivers/md/raid5.c:4719:49: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:4719:49: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:4719:49: sparse:    struct md_rdev *
   drivers/md/raid5.c:4728:49: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:4728:49: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:4728:49: sparse:    struct md_rdev *
   drivers/md/raid5.c:4750:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:4750:40: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:4750:40: sparse:    struct md_rdev *
   drivers/md/raid5.c:5421:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:5421:16: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:5421:16: sparse:    struct md_rdev *
   drivers/md/raid5.c:5424:24: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:5424:24: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:5424:24: sparse:    struct md_rdev *
   drivers/md/raid5.c:7107:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct spinlock [usertype] *lock @@     got struct spinlock [noderef] __percpu * @@
   drivers/md/raid5.c:7107:9: sparse:     expected struct spinlock [usertype] *lock
   drivers/md/raid5.c:7107:9: sparse:     got struct spinlock [noderef] __percpu *
   drivers/md/raid5.c:7813:40: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:7813:40: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:7813:40: sparse:    struct md_rdev *
   drivers/md/raid5.c:8026:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:8026:25: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:8026:25: sparse:    struct md_rdev *
   drivers/md/raid5.c:8042:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   drivers/md/raid5.c:8042:25: sparse:    struct md_rdev [noderef] __rcu *
   drivers/md/raid5.c:8042:25: sparse:    struct md_rdev *
   drivers/md/raid5.c:1476:16: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:1476:39: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:2208:54: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:2421:16: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:2423:9: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:2424:9: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7033:23: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7033:23: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7034:9: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7035:16: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7036:9: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7041:34: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7042:17: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7043:22: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:7107:9: sparse: sparse: dereference of noderef expression
   drivers/md/raid5.c:97:9: sparse: sparse: context imbalance in 'raid5_quiesce' - different lock contexts for basic block

vim +2222 drivers/md/raid5.c

  2210	
  2211	static void raid_run_ops(struct stripe_head *sh, unsigned long ops_request)
  2212	{
  2213		int overlap_clear = 0, i, disks = sh->disks;
  2214		struct dma_async_tx_descriptor *tx = NULL;
  2215		struct r5conf *conf = sh->raid_conf;
  2216		int level = conf->level;
  2217		struct raid5_percpu *percpu;
  2218		unsigned long cpu;
  2219	
  2220		cpu = get_cpu_light();
  2221		percpu = per_cpu_ptr(conf->percpu, cpu);
> 2222		spin_lock(&percpu->lock);
  2223		if (test_bit(STRIPE_OP_BIOFILL, &ops_request)) {
  2224			ops_run_biofill(sh);
  2225			overlap_clear++;
  2226		}
  2227	
  2228		if (test_bit(STRIPE_OP_COMPUTE_BLK, &ops_request)) {
  2229			if (level < 6)
  2230				tx = ops_run_compute5(sh, percpu);
  2231			else {
  2232				if (sh->ops.target2 < 0 || sh->ops.target < 0)
  2233					tx = ops_run_compute6_1(sh, percpu);
  2234				else
  2235					tx = ops_run_compute6_2(sh, percpu);
  2236			}
  2237			/* terminate the chain if reconstruct is not set to be run */
  2238			if (tx && !test_bit(STRIPE_OP_RECONSTRUCT, &ops_request))
  2239				async_tx_ack(tx);
  2240		}
  2241	
  2242		if (test_bit(STRIPE_OP_PREXOR, &ops_request)) {
  2243			if (level < 6)
  2244				tx = ops_run_prexor5(sh, percpu, tx);
  2245			else
  2246				tx = ops_run_prexor6(sh, percpu, tx);
  2247		}
  2248	
  2249		if (test_bit(STRIPE_OP_PARTIAL_PARITY, &ops_request))
  2250			tx = ops_run_partial_parity(sh, percpu, tx);
  2251	
  2252		if (test_bit(STRIPE_OP_BIODRAIN, &ops_request)) {
  2253			tx = ops_run_biodrain(sh, tx);
  2254			overlap_clear++;
  2255		}
  2256	
  2257		if (test_bit(STRIPE_OP_RECONSTRUCT, &ops_request)) {
  2258			if (level < 6)
  2259				ops_run_reconstruct5(sh, percpu, tx);
  2260			else
  2261				ops_run_reconstruct6(sh, percpu, tx);
  2262		}
  2263	
  2264		if (test_bit(STRIPE_OP_CHECK, &ops_request)) {
  2265			if (sh->check_state == check_state_run)
  2266				ops_run_check_p(sh, percpu);
  2267			else if (sh->check_state == check_state_run_q)
  2268				ops_run_check_pq(sh, percpu, 0);
  2269			else if (sh->check_state == check_state_run_pq)
  2270				ops_run_check_pq(sh, percpu, 1);
  2271			else
  2272				BUG();
  2273		}
  2274	
  2275		if (overlap_clear && !sh->batch_head)
  2276			for (i = disks; i--; ) {
  2277				struct r5dev *dev = &sh->dev[i];
  2278				if (test_and_clear_bit(R5_Overlap, &dev->flags))
  2279					wake_up(&sh->raid_conf->wait_for_overlap);
  2280			}
  2281		spin_unlock(&percpu->lock);
  2282		put_cpu_light();
  2283	}
  2284	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (32727 bytes)

Powered by blists - more mailing lists