* [sean-jc:x86/uaccess_bad_mm 1/9] arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:35: sparse: sparse: incorrect type in argument 2 (different address spaces)
@ 2026-09-13 20:29 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-13 20:29 UTC (permalink / raw)
To: Sean Christopherson; +Cc: oe-kbuild-all
tree: https://github.com/sean-jc/linux x86/uaccess_bad_mm
head: 5e20baf271c570712cb8efe0d9400725d6c04386
commit: 44888a116c641f3d2a458a9f6b5f6e41c2611125 [1/9] KVM: Reject user accesses to guest memory if current->mm != kvm->mm
config: loongarch-randconfig-r133-20260913 (https://download.01.org/0day-ci/archive/20260914/202609140425.EfV7ukei-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 96295a1412f9afbee9d4a3c2701e83f5a529a9cc)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260914/202609140425.EfV7ukei-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/202609140425.EfV7ukei-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __user *to @@ got void *data @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:35: sparse: expected void [noderef] __user *to
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:35: sparse: got void *data
>> arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:61: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void const *from @@ got void [noderef] __user * @@
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:61: sparse: expected void const *from
arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:61: sparse: got void [noderef] __user *
vim +3207 arch/loongarch/kvm/../../../virt/kvm/kvm_main.c
3193
3194 /* Copy @len bytes from guest memory at '(@gfn * PAGE_SIZE) + @offset' to @data */
3195 static int __kvm_read_guest_page(struct kvm *kvm, struct kvm_memory_slot *slot,
3196 gfn_t gfn, void *data, int offset, int len)
3197 {
3198 int r;
3199 unsigned long addr;
3200
3201 if (WARN_ON_ONCE(offset + len > PAGE_SIZE))
3202 return -EFAULT;
3203
3204 addr = gfn_to_hva_memslot_prot(slot, gfn, NULL);
3205 if (kvm_is_error_hva(addr))
3206 return -EFAULT;
> 3207 r = kvm_copy_to_user(kvm, data, (void __user *)addr + offset, len);
3208 if (r)
3209 return -EFAULT;
3210 return 0;
3211 }
3212
--
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:[~2026-09-13 20:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13 20:29 [sean-jc:x86/uaccess_bad_mm 1/9] arch/loongarch/kvm/../../../virt/kvm/kvm_main.c:3207:35: sparse: sparse: incorrect type in argument 2 (different address spaces) 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