[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007040829.OauDtJAy%lkp@intel.com>
Date: Sat, 4 Jul 2020 08:07:34 +0800
From: kernel test robot <lkp@...el.com>
To: Jamal Shareef <jamal.k.shareef@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1513:13:
sparse: sparse: incorrect type in assignment (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 0c7d7d1fada70420851b63f2e2669cb4976a303b
commit: 00d36494dee9e5020250e9bb5afd54362795847e staging: vc04_services: Replace VCHIQ_STATUS_T enum typedef with enum vchiq_status
date: 8 months ago
config: x86_64-randconfig-s021-20200704 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-3-gfa153962-dirty
git checkout 00d36494dee9e5020250e9bb5afd54362795847e
# 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@...el.com>
sparse warnings: (new ones prefixed by >>)
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1244:60: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct vchiq_header *header @@ got void [noderef] <asn:1> *[addressable] msgbuf @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1244:60: sparse: expected struct vchiq_header *header
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1244:60: sparse: got void [noderef] <asn:1> *[addressable] msgbuf
>> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1513:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected int enum vchiq_status ( *__pu_val )( ... ) @@ got void [noderef] <asn:1> * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1513:13: sparse: expected int enum vchiq_status ( *__pu_val )( ... )
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1513:13: sparse: got void [noderef] <asn:1> *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1515:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *__pu_val @@ got void [noderef] <asn:1> * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1515:13: sparse: expected void *__pu_val
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1515:13: sparse: got void [noderef] <asn:1> *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1641:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *__pu_val @@ got void [noderef] <asn:1> * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1641:13: sparse: expected void *__pu_val
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1641:13: sparse: got void [noderef] <asn:1> *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1643:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *__pu_val @@ got void [noderef] <asn:1> * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1643:13: sparse: expected void *__pu_val
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1643:13: sparse: got void [noderef] <asn:1> *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1718:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct vchiq_completion_data *__pu_val @@ got void [noderef] <asn:1> * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1718:13: sparse: expected struct vchiq_completion_data *__pu_val
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1718:13: sparse: got void [noderef] <asn:1> *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1721:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void **__pu_val @@ got void [noderef] <asn:1> * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1721:13: sparse: expected void **__pu_val
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1721:13: sparse: got void [noderef] <asn:1> *
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1768:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct vchiq_completion_data *__pu_val @@ got struct vchiq_completion_data [noderef] <asn:1> *[assigned] completion @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1768:13: sparse: expected struct vchiq_completion_data *__pu_val
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1768:13: sparse: got struct vchiq_completion_data [noderef] <asn:1> *[assigned] completion
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1798:59: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *uptr @@ got struct vchiq_header *[addressable] header @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1798:59: sparse: expected void [noderef] <asn:1> *uptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1798:59: sparse: got struct vchiq_header *[addressable] header
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1800:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *uptr @@ got void *[addressable] service_userdata @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1800:45: sparse: expected void [noderef] <asn:1> *uptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1800:45: sparse: got void *[addressable] service_userdata
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1802:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] <asn:1> *uptr @@ got void *[addressable] bulk_userdata @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1802:45: sparse: expected void [noderef] <asn:1> *uptr
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1802:45: sparse: got void *[addressable] bulk_userdata
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1856:13: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *__pu_val @@ got void [noderef] <asn:1> * @@
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1856:13: sparse: expected void *__pu_val
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1856:13: sparse: got void [noderef] <asn:1> *
vim +1513 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
5569a1260933ae Michael Zoran 2017-03-07 1489
5569a1260933ae Michael Zoran 2017-03-07 1490 #define VCHIQ_IOC_CREATE_SERVICE32 \
5569a1260933ae Michael Zoran 2017-03-07 1491 _IOWR(VCHIQ_IOC_MAGIC, 2, struct vchiq_create_service32)
5569a1260933ae Michael Zoran 2017-03-07 1492
5569a1260933ae Michael Zoran 2017-03-07 1493 static long
5569a1260933ae Michael Zoran 2017-03-07 1494 vchiq_compat_ioctl_create_service(
5569a1260933ae Michael Zoran 2017-03-07 1495 struct file *file,
5569a1260933ae Michael Zoran 2017-03-07 1496 unsigned int cmd,
5569a1260933ae Michael Zoran 2017-03-07 1497 unsigned long arg)
5569a1260933ae Michael Zoran 2017-03-07 1498 {
562943286c7466 Dominic Braun 2018-12-14 1499 struct vchiq_create_service __user *args;
5569a1260933ae Michael Zoran 2017-03-07 1500 struct vchiq_create_service32 __user *ptrargs32 =
5569a1260933ae Michael Zoran 2017-03-07 1501 (struct vchiq_create_service32 __user *)arg;
5569a1260933ae Michael Zoran 2017-03-07 1502 struct vchiq_create_service32 args32;
5569a1260933ae Michael Zoran 2017-03-07 1503 long ret;
5569a1260933ae Michael Zoran 2017-03-07 1504
5569a1260933ae Michael Zoran 2017-03-07 1505 args = compat_alloc_user_space(sizeof(*args));
5569a1260933ae Michael Zoran 2017-03-07 1506 if (!args)
5569a1260933ae Michael Zoran 2017-03-07 1507 return -EFAULT;
5569a1260933ae Michael Zoran 2017-03-07 1508
ffb99752e93053 Jasminko Dedic 2019-03-25 1509 if (copy_from_user(&args32, ptrargs32, sizeof(args32)))
5569a1260933ae Michael Zoran 2017-03-07 1510 return -EFAULT;
5569a1260933ae Michael Zoran 2017-03-07 1511
5569a1260933ae Michael Zoran 2017-03-07 1512 if (put_user(args32.params.fourcc, &args->params.fourcc) ||
5569a1260933ae Michael Zoran 2017-03-07 @1513 put_user(compat_ptr(args32.params.callback),
5569a1260933ae Michael Zoran 2017-03-07 1514 &args->params.callback) ||
5569a1260933ae Michael Zoran 2017-03-07 1515 put_user(compat_ptr(args32.params.userdata),
5569a1260933ae Michael Zoran 2017-03-07 1516 &args->params.userdata) ||
5569a1260933ae Michael Zoran 2017-03-07 1517 put_user(args32.params.version, &args->params.version) ||
5569a1260933ae Michael Zoran 2017-03-07 1518 put_user(args32.params.version_min,
5569a1260933ae Michael Zoran 2017-03-07 1519 &args->params.version_min) ||
5569a1260933ae Michael Zoran 2017-03-07 1520 put_user(args32.is_open, &args->is_open) ||
5569a1260933ae Michael Zoran 2017-03-07 1521 put_user(args32.is_vchi, &args->is_vchi) ||
5569a1260933ae Michael Zoran 2017-03-07 1522 put_user(args32.handle, &args->handle))
5569a1260933ae Michael Zoran 2017-03-07 1523 return -EFAULT;
5569a1260933ae Michael Zoran 2017-03-07 1524
5569a1260933ae Michael Zoran 2017-03-07 1525 ret = vchiq_ioctl(file, VCHIQ_IOC_CREATE_SERVICE, (unsigned long)args);
5569a1260933ae Michael Zoran 2017-03-07 1526
5569a1260933ae Michael Zoran 2017-03-07 1527 if (ret < 0)
5569a1260933ae Michael Zoran 2017-03-07 1528 return ret;
5569a1260933ae Michael Zoran 2017-03-07 1529
5569a1260933ae Michael Zoran 2017-03-07 1530 if (get_user(args32.handle, &args->handle))
5569a1260933ae Michael Zoran 2017-03-07 1531 return -EFAULT;
5569a1260933ae Michael Zoran 2017-03-07 1532
5569a1260933ae Michael Zoran 2017-03-07 1533 if (copy_to_user(&ptrargs32->handle,
5569a1260933ae Michael Zoran 2017-03-07 1534 &args32.handle,
5569a1260933ae Michael Zoran 2017-03-07 1535 sizeof(args32.handle)))
5569a1260933ae Michael Zoran 2017-03-07 1536 return -EFAULT;
5569a1260933ae Michael Zoran 2017-03-07 1537
5569a1260933ae Michael Zoran 2017-03-07 1538 return 0;
5569a1260933ae Michael Zoran 2017-03-07 1539 }
5569a1260933ae Michael Zoran 2017-03-07 1540
:::::: The code at line 1513 was first introduced by commit
:::::: 5569a1260933ae105acdd50d70decfa868f7c3b5 staging: vchiq_arm: Add compatibility wrappers for ioctls
:::::: TO: Michael Zoran <mzoran@...wfest.net>
:::::: CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
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" (48996 bytes)
Powered by blists - more mailing lists