All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] sparse: use static inline for __chk_{user, io}_ptr()
Date: Wed, 02 Sep 2020 05:37:12 +0800	[thread overview]
Message-ID: <202009020511.7s6f3jOy%lkp@intel.com> (raw)
In-Reply-To: <20200828085301.78423-1-luc.vanoostenryck@gmail.com>

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

Hi Luc,

I love your patch! Perhaps something to improve:

[auto build test WARNING on 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5]

url:    https://github.com/0day-ci/linux/commits/Luc-Van-Oostenryck/sparse-use-static-inline-for-__chk_-user-io-_ptr/20200828-165431
base:    9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
config: x86_64-randconfig-s031-20200901 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        # 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 >>)

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

# https://github.com/0day-ci/linux/commit/7d01c91ac34a64f0177bc6d058cc50e805f59102
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luc-Van-Oostenryck/sparse-use-static-inline-for-__chk_-user-io-_ptr/20200828-165431
git checkout 7d01c91ac34a64f0177bc6d058cc50e805f59102
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  

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

  parent reply	other threads:[~2020-09-01 21:37 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28  8:53 [PATCH] sparse: use static inline for __chk_{user,io}_ptr() Luc Van Oostenryck
2020-08-28 11:15 ` kernel test robot
2020-08-28 11:15   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-08-28 11:37 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() kernel test robot
2020-08-28 11:37   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-08-28 12:20 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() kernel test robot
2020-08-28 12:20   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-08-28 14:21 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() kernel test robot
2020-08-28 14:21   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-08-28 15:11 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() kernel test robot
2020-08-28 15:11   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-08-28 19:04 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() Miguel Ojeda
2020-08-28 20:15   ` Luc Van Oostenryck
2020-08-29  7:33     ` Miguel Ojeda
2020-09-01  0:57 ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-09-01  5:33 ` kernel test robot
2020-09-01 21:37 ` kernel test robot [this message]
2020-09-02  1:12 ` kernel test robot
2020-09-03  2:56 ` kernel test robot
2020-09-03  4:06 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-06-28  7:20 [PATCH] sparse: use static inline for __chk_{user,io}_ptr() Luc Van Oostenryck
2020-06-29 17:12 ` kernel test robot
2020-06-29 17:12   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-06-29 18:08 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() kernel test robot
2020-06-29 18:08   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-06-29 18:37   ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() Luc Van Oostenryck
2020-06-29 18:37     ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() Luc Van Oostenryck
2020-06-30  0:31     ` Rong Chen
2020-06-30 11:58 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() kernel test robot
2020-06-30 11:58   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot
2020-07-01 18:35 ` [PATCH] sparse: use static inline for __chk_{user,io}_ptr() kernel test robot
2020-07-01 18:35   ` [PATCH] sparse: use static inline for __chk_{user, io}_ptr() kernel test robot

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=202009020511.7s6f3jOy%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.