oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [openeuler:OLK-6.6 2528/7513] fs/proc/etmem_scan.c:737:16: sparse: sparse: cast removes address space '__rcu' of expression
@ 2024-04-24  2:44 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-24  2:44 UTC (permalink / raw
  To: kernel, Yuchen Tang; +Cc: oe-kbuild-all

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   1bab7be76541fb1208df75a4e4e00beb09be471f
commit: 5d3b64fd78b80ec49285f2186e7b5ac5850f76e4 [2528/7513] etmem: add etmem scan feature
config: arm64-randconfig-r131-20240424 (https://download.01.org/0day-ci/archive/20240424/202404241001.LouXWxwt-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240424/202404241001.LouXWxwt-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404241001.LouXWxwt-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   fs/proc/etmem_scan.c:269:18: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __user *buf @@     got void *buf @@
   fs/proc/etmem_scan.c:269:18: sparse:     expected void [noderef] __user *buf
   fs/proc/etmem_scan.c:269:18: sparse:     got void *buf
>> fs/proc/etmem_scan.c:737:16: sparse: sparse: cast removes address space '__rcu' of expression
   fs/proc/etmem_scan.c:1361:40: sparse: sparse: incorrect type in assignment (incompatible argument 2 (different address spaces)) @@     expected long ( *extern [addressable] [assigned] [toplevel] read )( ... ) @@     got long ( * )( ... ) @@
   fs/proc/etmem_scan.c:1361:40: sparse:     expected long ( *extern [addressable] [assigned] [toplevel] read )( ... )
   fs/proc/etmem_scan.c:1361:40: sparse:     got long ( * )( ... )
   fs/proc/etmem_scan.c:697:46: sparse: sparse: self-comparison always evaluates to false
   fs/proc/etmem_scan.c:720:46: sparse: sparse: self-comparison always evaluates to false

vim +/__rcu +737 fs/proc/etmem_scan.c

   724	
   725	static int arm_page_range(struct page_idle_ctrl *pic,
   726							   unsigned long addr,
   727							   unsigned long end)
   728	{
   729		pgd_t *pgd;
   730		unsigned long next;
   731		struct kvm *kvm = pic->kvm;
   732		int err = 0;
   733	
   734		WARN_ON(addr >= end);
   735	
   736		read_lock(&pic->kvm->mmu_lock);
 > 737		pgd = (pgd_t *)kvm->arch.mmu.pgt->pgd + pgd_index(addr) * PTRS_PER_PTE;
   738		read_unlock(&pic->kvm->mmu_lock);
   739	
   740		local_irq_disable();
   741		do {
   742			next = pgd_addr_end(addr, end);
   743			if (!pgd_present(*pgd)) {
   744				set_restart_gpa(next, "PGD_HOLE");
   745				continue;
   746			}
   747	
   748			err = arm_p4d_range(pic, pgd, addr, next);
   749			if (err)
   750				break;
   751		} while (pgd++, addr = next, addr != end);
   752	
   753		local_irq_enable();
   754		return err;
   755	}
   756	#endif
   757	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-24  2:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-24  2:44 [openeuler:OLK-6.6 2528/7513] fs/proc/etmem_scan.c:737:16: sparse: sparse: cast removes address space '__rcu' of expression kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).