All of lore.kernel.org
 help / color / mirror / Atom feed
* arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
@ 2021-02-27 17:53 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-02-27 17:53 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kbuild-all, linux-kernel, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 3122 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5 KVM: SVM: Move SEV code to separate file
date:   11 months ago
config: x86_64-randconfig-s022-20210228 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-241-geaceeafa-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
   arch/x86/kvm/svm/sev.c:360:17: sparse: sparse: undefined identifier 'release_pages'
   arch/x86/kvm/svm/sev.c:371:9: sparse: sparse: undefined identifier 'release_pages'
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:695:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:715:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression

vim +672 arch/x86/kvm/svm/sev.c

   646	
   647	static int __sev_dbg_decrypt_user(struct kvm *kvm, unsigned long paddr,
   648					  unsigned long __user dst_uaddr,
   649					  unsigned long dst_paddr,
   650					  int size, int *err)
   651	{
   652		struct page *tpage = NULL;
   653		int ret, offset;
   654	
   655		/* if inputs are not 16-byte then use intermediate buffer */
   656		if (!IS_ALIGNED(dst_paddr, 16) ||
   657		    !IS_ALIGNED(paddr,     16) ||
   658		    !IS_ALIGNED(size,      16)) {
   659			tpage = (void *)alloc_page(GFP_KERNEL);
   660			if (!tpage)
   661				return -ENOMEM;
   662	
   663			dst_paddr = __sme_page_pa(tpage);
   664		}
   665	
   666		ret = __sev_dbg_decrypt(kvm, paddr, dst_paddr, size, err);
   667		if (ret)
   668			goto e_free;
   669	
   670		if (tpage) {
   671			offset = paddr & 15;
 > 672			if (copy_to_user((void __user *)(uintptr_t)dst_uaddr,
   673					 page_address(tpage) + offset, size))
   674				ret = -EFAULT;
   675		}
   676	
   677	e_free:
   678		if (tpage)
   679			__free_page(tpage);
   680	
   681		return ret;
   682	}
   683	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34248 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
@ 2021-02-27 17:53 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-02-27 17:53 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3200 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   3fb6d0e00efc958d01c2f109c8453033a2d96796
commit: eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5 KVM: SVM: Move SEV code to separate file
date:   11 months ago
config: x86_64-randconfig-s022-20210228 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-241-geaceeafa-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"sparse warnings: (new ones prefixed by >>)"
   arch/x86/kvm/svm/sev.c:360:17: sparse: sparse: undefined identifier 'release_pages'
   arch/x86/kvm/svm/sev.c:371:9: sparse: sparse: undefined identifier 'release_pages'
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:695:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:715:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression

vim +672 arch/x86/kvm/svm/sev.c

   646	
   647	static int __sev_dbg_decrypt_user(struct kvm *kvm, unsigned long paddr,
   648					  unsigned long __user dst_uaddr,
   649					  unsigned long dst_paddr,
   650					  int size, int *err)
   651	{
   652		struct page *tpage = NULL;
   653		int ret, offset;
   654	
   655		/* if inputs are not 16-byte then use intermediate buffer */
   656		if (!IS_ALIGNED(dst_paddr, 16) ||
   657		    !IS_ALIGNED(paddr,     16) ||
   658		    !IS_ALIGNED(size,      16)) {
   659			tpage = (void *)alloc_page(GFP_KERNEL);
   660			if (!tpage)
   661				return -ENOMEM;
   662	
   663			dst_paddr = __sme_page_pa(tpage);
   664		}
   665	
   666		ret = __sev_dbg_decrypt(kvm, paddr, dst_paddr, size, err);
   667		if (ret)
   668			goto e_free;
   669	
   670		if (tpage) {
   671			offset = paddr & 15;
 > 672			if (copy_to_user((void __user *)(uintptr_t)dst_uaddr,
   673					 page_address(tpage) + offset, size))
   674				ret = -EFAULT;
   675		}
   676	
   677	e_free:
   678		if (tpage)
   679			__free_page(tpage);
   680	
   681		return ret;
   682	}
   683	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34248 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
@ 2020-09-23  1:30 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-09-23  1:30 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kbuild-all, linux-kernel, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 2977 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   805c6d3c19210c90c109107d189744e960eae025
commit: eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5 KVM: SVM: Move SEV code to separate file
date:   6 months ago
config: x86_64-randconfig-s022-20200922 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-201-g24bdaac6-dirty
        git checkout eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:695:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:715:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
vim +672 arch/x86/kvm/svm/sev.c

   646	
   647	static int __sev_dbg_decrypt_user(struct kvm *kvm, unsigned long paddr,
   648					  unsigned long __user dst_uaddr,
   649					  unsigned long dst_paddr,
   650					  int size, int *err)
   651	{
   652		struct page *tpage = NULL;
   653		int ret, offset;
   654	
   655		/* if inputs are not 16-byte then use intermediate buffer */
   656		if (!IS_ALIGNED(dst_paddr, 16) ||
   657		    !IS_ALIGNED(paddr,     16) ||
   658		    !IS_ALIGNED(size,      16)) {
   659			tpage = (void *)alloc_page(GFP_KERNEL);
   660			if (!tpage)
   661				return -ENOMEM;
   662	
   663			dst_paddr = __sme_page_pa(tpage);
   664		}
   665	
   666		ret = __sev_dbg_decrypt(kvm, paddr, dst_paddr, size, err);
   667		if (ret)
   668			goto e_free;
   669	
   670		if (tpage) {
   671			offset = paddr & 15;
 > 672			if (copy_to_user((void __user *)(uintptr_t)dst_uaddr,
   673					 page_address(tpage) + offset, size))
   674				ret = -EFAULT;
   675		}
   676	
   677	e_free:
   678		if (tpage)
   679			__free_page(tpage);
   680	
   681		return ret;
   682	}
   683	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34620 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
@ 2020-09-23  1:30 ` kernel test robot
  0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2020-09-23  1:30 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3055 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   805c6d3c19210c90c109107d189744e960eae025
commit: eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5 KVM: SVM: Move SEV code to separate file
date:   6 months ago
config: x86_64-randconfig-s022-20200922 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-201-g24bdaac6-dirty
        git checkout eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
>> arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:695:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:701:59: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:715:14: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression
   arch/x86/kvm/svm/sev.c:740:70: sparse: sparse: dereference of noderef expression

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout eaf78265a4ab33935d3a0f1407ce4a91aac4d4d5
vim +672 arch/x86/kvm/svm/sev.c

   646	
   647	static int __sev_dbg_decrypt_user(struct kvm *kvm, unsigned long paddr,
   648					  unsigned long __user dst_uaddr,
   649					  unsigned long dst_paddr,
   650					  int size, int *err)
   651	{
   652		struct page *tpage = NULL;
   653		int ret, offset;
   654	
   655		/* if inputs are not 16-byte then use intermediate buffer */
   656		if (!IS_ALIGNED(dst_paddr, 16) ||
   657		    !IS_ALIGNED(paddr,     16) ||
   658		    !IS_ALIGNED(size,      16)) {
   659			tpage = (void *)alloc_page(GFP_KERNEL);
   660			if (!tpage)
   661				return -ENOMEM;
   662	
   663			dst_paddr = __sme_page_pa(tpage);
   664		}
   665	
   666		ret = __sev_dbg_decrypt(kvm, paddr, dst_paddr, size, err);
   667		if (ret)
   668			goto e_free;
   669	
   670		if (tpage) {
   671			offset = paddr & 15;
 > 672			if (copy_to_user((void __user *)(uintptr_t)dst_uaddr,
   673					 page_address(tpage) + offset, size))
   674				ret = -EFAULT;
   675		}
   676	
   677	e_free:
   678		if (tpage)
   679			__free_page(tpage);
   680	
   681		return ret;
   682	}
   683	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34620 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-27 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27 17:53 arch/x86/kvm/svm/sev.c:672:60: sparse: sparse: dereference of noderef expression kernel test robot
2021-02-27 17:53 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-09-23  1:30 kernel test robot
2020-09-23  1:30 ` kernel test robot

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.