linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2020-08-09  7:25 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-09  7:25 UTC (permalink / raw)
  To: Alex Deucher; +Cc: kbuild-all, linux-kernel, Dave Airlie

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
commit: 9555152beb1143c85c03f9b9de59863cbbe89f4b Merge tag 'amd-drm-next-5.9-2020-07-01' of git://people.freedesktop.org/~agd5f/linux into drm-next
date:   5 weeks ago
config: powerpc64-randconfig-s032-20200808 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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.2-118-ge1578773-dirty
        git checkout 9555152beb1143c85c03f9b9de59863cbbe89f4b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64 

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 >>)

>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned long long [noderef] __user *__gu_addr @@     got unsigned long long [usertype] * @@
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse:     expected unsigned long long [noderef] __user *__gu_addr
   drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse:     got unsigned long long [usertype] *

vim +172 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c

b42902f4af8fec Yong Zhao   2020-02-05  155  
d69fd951e60ae4 Mukul Joshi 2020-06-24  156  int read_sdma_queue_counter(uint64_t q_rptr, uint64_t *val)
32cb59f3136248 Mukul Joshi 2020-05-26  157  {
32cb59f3136248 Mukul Joshi 2020-05-26  158  	int ret;
32cb59f3136248 Mukul Joshi 2020-05-26  159  	uint64_t tmp = 0;
32cb59f3136248 Mukul Joshi 2020-05-26  160  
d69fd951e60ae4 Mukul Joshi 2020-06-24  161  	if (!val)
32cb59f3136248 Mukul Joshi 2020-05-26  162  		return -EINVAL;
32cb59f3136248 Mukul Joshi 2020-05-26  163  	/*
32cb59f3136248 Mukul Joshi 2020-05-26  164  	 * SDMA activity counter is stored at queue's RPTR + 0x8 location.
32cb59f3136248 Mukul Joshi 2020-05-26  165  	 */
d69fd951e60ae4 Mukul Joshi 2020-06-24  166  	if (!access_ok((const void __user *)(q_rptr +
32cb59f3136248 Mukul Joshi 2020-05-26  167  					sizeof(uint64_t)), sizeof(uint64_t))) {
32cb59f3136248 Mukul Joshi 2020-05-26  168  		pr_err("Can't access sdma queue activity counter\n");
32cb59f3136248 Mukul Joshi 2020-05-26  169  		return -EFAULT;
32cb59f3136248 Mukul Joshi 2020-05-26  170  	}
32cb59f3136248 Mukul Joshi 2020-05-26  171  
d69fd951e60ae4 Mukul Joshi 2020-06-24 @172  	ret = get_user(tmp, (uint64_t *)(q_rptr + sizeof(uint64_t)));
32cb59f3136248 Mukul Joshi 2020-05-26  173  	if (!ret) {
32cb59f3136248 Mukul Joshi 2020-05-26  174  		*val = tmp;
32cb59f3136248 Mukul Joshi 2020-05-26  175  	}
32cb59f3136248 Mukul Joshi 2020-05-26  176  
32cb59f3136248 Mukul Joshi 2020-05-26  177  	return ret;
32cb59f3136248 Mukul Joshi 2020-05-26  178  }
32cb59f3136248 Mukul Joshi 2020-05-26  179  

:::::: The code at line 172 was first introduced by commit
:::::: d69fd951e60ae48c8dd100aa8ceb799ab965f9b3 drm/amdkfd: Fix circular locking dependency warning

:::::: TO: Mukul Joshi <mukul.joshi@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

---
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: 32213 bytes --]

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

* drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2020-08-22 16:03 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-22 16:03 UTC (permalink / raw)
  To: Alex Deucher; +Cc: kbuild-all, linux-kernel, Dave Airlie

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f873db9acd3c92d4741bc3676c9eb511b2f9a6f6
commit: 9555152beb1143c85c03f9b9de59863cbbe89f4b Merge tag 'amd-drm-next-5.9-2020-07-01' of git://people.freedesktop.org/~agd5f/linux into drm-next
date:   7 weeks ago
config: arm64-randconfig-s031-20200821 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.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.2-191-g10164920-dirty
        git checkout 9555152beb1143c85c03f9b9de59863cbbe89f4b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64 

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 >>)

>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned long long [noderef] __user *__p @@     got unsigned long long [usertype] * @@
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse:     expected unsigned long long [noderef] __user *__p
   drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse:     got unsigned long long [usertype] *

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9555152beb1143c85c03f9b9de59863cbbe89f4b
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9555152beb1143c85c03f9b9de59863cbbe89f4b
vim +172 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c

b42902f4af8fec Yong Zhao   2020-02-05  155  
d69fd951e60ae4 Mukul Joshi 2020-06-24  156  int read_sdma_queue_counter(uint64_t q_rptr, uint64_t *val)
32cb59f3136248 Mukul Joshi 2020-05-26  157  {
32cb59f3136248 Mukul Joshi 2020-05-26  158  	int ret;
32cb59f3136248 Mukul Joshi 2020-05-26  159  	uint64_t tmp = 0;
32cb59f3136248 Mukul Joshi 2020-05-26  160  
d69fd951e60ae4 Mukul Joshi 2020-06-24  161  	if (!val)
32cb59f3136248 Mukul Joshi 2020-05-26  162  		return -EINVAL;
32cb59f3136248 Mukul Joshi 2020-05-26  163  	/*
32cb59f3136248 Mukul Joshi 2020-05-26  164  	 * SDMA activity counter is stored at queue's RPTR + 0x8 location.
32cb59f3136248 Mukul Joshi 2020-05-26  165  	 */
d69fd951e60ae4 Mukul Joshi 2020-06-24  166  	if (!access_ok((const void __user *)(q_rptr +
32cb59f3136248 Mukul Joshi 2020-05-26  167  					sizeof(uint64_t)), sizeof(uint64_t))) {
32cb59f3136248 Mukul Joshi 2020-05-26  168  		pr_err("Can't access sdma queue activity counter\n");
32cb59f3136248 Mukul Joshi 2020-05-26  169  		return -EFAULT;
32cb59f3136248 Mukul Joshi 2020-05-26  170  	}
32cb59f3136248 Mukul Joshi 2020-05-26  171  
d69fd951e60ae4 Mukul Joshi 2020-06-24 @172  	ret = get_user(tmp, (uint64_t *)(q_rptr + sizeof(uint64_t)));
32cb59f3136248 Mukul Joshi 2020-05-26  173  	if (!ret) {
32cb59f3136248 Mukul Joshi 2020-05-26  174  		*val = tmp;
32cb59f3136248 Mukul Joshi 2020-05-26  175  	}
32cb59f3136248 Mukul Joshi 2020-05-26  176  
32cb59f3136248 Mukul Joshi 2020-05-26  177  	return ret;
32cb59f3136248 Mukul Joshi 2020-05-26  178  }
32cb59f3136248 Mukul Joshi 2020-05-26  179  

:::::: The code at line 172 was first introduced by commit
:::::: d69fd951e60ae48c8dd100aa8ceb799ab965f9b3 drm/amdkfd: Fix circular locking dependency warning

:::::: TO: Mukul Joshi <mukul.joshi@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

---
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: 34324 bytes --]

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

end of thread, other threads:[~2020-08-22 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-09  7:25 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15: sparse: sparse: incorrect type in initializer (different address spaces) kernel test robot
2020-08-22 16:03 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 NNTP newsgroup(s).