* [linux-next:master 14814/15516] include/linux/regset.h:323:28: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2020-06-04 14:15 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-06-04 14:15 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2236 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: d4899e5542c15062cc55cac0ca99025bb64edc61
commit: 5ea75ae6ae60d13dfa35fd5d2e2a81824cba6662 [14814/15516] user_regset_copyout_zero(): use clear_user()
config: sh-randconfig-s031-20200604 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-244-g0ee050a8-dirty
git checkout 5ea75ae6ae60d13dfa35fd5d2e2a81824cba6662
# save the attached .config to linux build tree
make W=1 C=1 ARCH=sh CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
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 >>)
>> include/linux/regset.h:323:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] <asn:1> *__cl_addr @@
include/linux/regset.h:323:28: sparse: expected void *addr
>> include/linux/regset.h:323:28: sparse: got void [noderef] <asn:1> *__cl_addr
vim +323 include/linux/regset.h
303
304 /*
305 * These two parallel the two above, but for portions of a regset layout
306 * that always read as all-zero or for which writes are ignored.
307 */
308 static inline int user_regset_copyout_zero(unsigned int *pos,
309 unsigned int *count,
310 void **kbuf, void __user **ubuf,
311 const int start_pos,
312 const int end_pos)
313 {
314 if (*count == 0)
315 return 0;
316 BUG_ON(*pos < start_pos);
317 if (end_pos < 0 || *pos < end_pos) {
318 unsigned int copy = (end_pos < 0 ? *count
319 : min(*count, end_pos - *pos));
320 if (*kbuf) {
321 memset(*kbuf, 0, copy);
322 *kbuf += copy;
> 323 } else if (clear_user(*ubuf, copy))
324 return -EFAULT;
325 else
326 *ubuf += copy;
327 *pos += copy;
328 *count -= copy;
329 }
330 return 0;
331 }
332
---
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: 24718 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-04 14:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-04 14:15 [linux-next:master 14814/15516] include/linux/regset.h:323:28: sparse: sparse: incorrect type in argument 1 (different address spaces) 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.