lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008091556.YnUiuIT7%lkp@intel.com>
Date:   Sun, 9 Aug 2020 15:25:00 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alex Deucher <alexander.deucher@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Dave Airlie <airlied@...hat.com>
Subject: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_device_queue_manager.c:172:15:
 sparse: sparse: incorrect type in initializer (different address spaces)

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@...el.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@....com>
:::::: CC: Alex Deucher <alexander.deucher@....com>

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

Download attachment ".config.gz" of type "application/gzip" (32213 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ