From: kernel test robot <lkp@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [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)
Date: Mon, 14 Sep 2026 04:29:20 +0800 [thread overview]
Message-ID: <202609140425.EfV7ukei-lkp@intel.com> (raw)
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
reply other threads:[~2026-09-13 20:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609140425.EfV7ukei-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.