All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 3212/4147] drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-02-05 14:18 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-05 14:18 UTC (permalink / raw)
  To: Kees Cook; +Cc: kbuild-all, Linux Memory Management List

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ef6b35306dd8f15a7e5e5a2532e665917a43c5d9
commit: 0b27a15c23f17d6ca9a01505f38b477178fabb52 [3212/4147] fortify: Add Clang support
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20220205/202202052224.xLO5qlr0-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0b27a15c23f17d6ca9a01505f38b477178fabb52
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 0b27a15c23f17d6ca9a01505f38b477178fabb52
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/staging/r8188eu/

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/staging/r8188eu/os_dep/ioctl_linux.c:3430:17: sparse: sparse: cast removes address space '__user' of expression
>> drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3433:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3433:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3433:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3435:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3435:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3435:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3437:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3437:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3437:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3439:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3439:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3439:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3442:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3442:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3442:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3444:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3444:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3444:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3447:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3447:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3447:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3459:9: sparse: sparse: cast removes address space '__user' of expression

vim +3431 drivers/staging/r8188eu/os_dep/ioctl_linux.c

2b42bd58b32155 Phillip Potter 2021-07-28  3420  
2b42bd58b32155 Phillip Potter 2021-07-28  3421  static int rtw_p2p_get(struct net_device *dev,
2b42bd58b32155 Phillip Potter 2021-07-28  3422  			       struct iw_request_info *info,
2b42bd58b32155 Phillip Potter 2021-07-28  3423  			       union iwreq_data *wrqu, char *extra)
2b42bd58b32155 Phillip Potter 2021-07-28  3424  {
2b42bd58b32155 Phillip Potter 2021-07-28  3425  	int ret = 0;
2b42bd58b32155 Phillip Potter 2021-07-28  3426  
2b42bd58b32155 Phillip Potter 2021-07-28  3427  	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
2b42bd58b32155 Phillip Potter 2021-07-28  3428  
2b42bd58b32155 Phillip Potter 2021-07-28  3429  	if (padapter->bShowGetP2PState)
2b42bd58b32155 Phillip Potter 2021-07-28  3430  		DBG_88E("[%s] extra = %s\n", __func__, (char *)wrqu->data.pointer);
2b42bd58b32155 Phillip Potter 2021-07-28 @3431  	if (!memcmp(wrqu->data.pointer, "status", 6)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3432  		rtw_p2p_get_status(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3433  	} else if (!memcmp(wrqu->data.pointer, "role", 4)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3434  		rtw_p2p_get_role(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3435  	} else if (!memcmp(wrqu->data.pointer, "peer_ifa", 8)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3436  		rtw_p2p_get_peer_ifaddr(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3437  	} else if (!memcmp(wrqu->data.pointer, "req_cm", 6)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3438  		rtw_p2p_get_req_cm(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3439  	} else if (!memcmp(wrqu->data.pointer, "peer_deva", 9)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3440  		/*	Get the P2P device address when receiving the provision discovery request frame. */
2b42bd58b32155 Phillip Potter 2021-07-28  3441  		rtw_p2p_get_peer_devaddr(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3442  	} else if (!memcmp(wrqu->data.pointer, "group_id", 8)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3443  		rtw_p2p_get_groupid(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3444  	} else if (!memcmp(wrqu->data.pointer, "peer_deva_inv", 9)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3445  		/*	Get the P2P device address when receiving the P2P Invitation request frame. */
2b42bd58b32155 Phillip Potter 2021-07-28  3446  		rtw_p2p_get_peer_devaddr_by_invitation(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3447  	} else if (!memcmp(wrqu->data.pointer, "op_ch", 5)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3448  		rtw_p2p_get_op_ch(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3449  	}
2b42bd58b32155 Phillip Potter 2021-07-28  3450  	return ret;
2b42bd58b32155 Phillip Potter 2021-07-28  3451  }
2b42bd58b32155 Phillip Potter 2021-07-28  3452  

:::::: The code at line 3431 was first introduced by commit
:::::: 2b42bd58b32155a1be4dd78991845dec05aaef9e staging: r8188eu: introduce new os_dep dir for RTL8188eu driver

:::::: TO: Phillip Potter <phil@philpotter.co.uk>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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


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

* [linux-next:master 3212/4147] drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2022-02-05 14:18 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-02-05 14:18 UTC (permalink / raw)
  To: kbuild-all

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   ef6b35306dd8f15a7e5e5a2532e665917a43c5d9
commit: 0b27a15c23f17d6ca9a01505f38b477178fabb52 [3212/4147] fortify: Add Clang support
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20220205/202202052224.xLO5qlr0-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0b27a15c23f17d6ca9a01505f38b477178fabb52
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 0b27a15c23f17d6ca9a01505f38b477178fabb52
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/staging/r8188eu/

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/staging/r8188eu/os_dep/ioctl_linux.c:3430:17: sparse: sparse: cast removes address space '__user' of expression
>> drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3433:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3433:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3433:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3435:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3435:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3435:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3437:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3437:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3437:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3439:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3439:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3439:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3442:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3442:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3442:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3444:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3444:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3444:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3447:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *const p @@     got void [noderef] __user *pointer @@
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3447:38: sparse:     expected void const *const p
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3447:38: sparse:     got void [noderef] __user *pointer
   drivers/staging/r8188eu/os_dep/ioctl_linux.c:3459:9: sparse: sparse: cast removes address space '__user' of expression

vim +3431 drivers/staging/r8188eu/os_dep/ioctl_linux.c

2b42bd58b32155 Phillip Potter 2021-07-28  3420  
2b42bd58b32155 Phillip Potter 2021-07-28  3421  static int rtw_p2p_get(struct net_device *dev,
2b42bd58b32155 Phillip Potter 2021-07-28  3422  			       struct iw_request_info *info,
2b42bd58b32155 Phillip Potter 2021-07-28  3423  			       union iwreq_data *wrqu, char *extra)
2b42bd58b32155 Phillip Potter 2021-07-28  3424  {
2b42bd58b32155 Phillip Potter 2021-07-28  3425  	int ret = 0;
2b42bd58b32155 Phillip Potter 2021-07-28  3426  
2b42bd58b32155 Phillip Potter 2021-07-28  3427  	struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
2b42bd58b32155 Phillip Potter 2021-07-28  3428  
2b42bd58b32155 Phillip Potter 2021-07-28  3429  	if (padapter->bShowGetP2PState)
2b42bd58b32155 Phillip Potter 2021-07-28  3430  		DBG_88E("[%s] extra = %s\n", __func__, (char *)wrqu->data.pointer);
2b42bd58b32155 Phillip Potter 2021-07-28 @3431  	if (!memcmp(wrqu->data.pointer, "status", 6)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3432  		rtw_p2p_get_status(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3433  	} else if (!memcmp(wrqu->data.pointer, "role", 4)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3434  		rtw_p2p_get_role(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3435  	} else if (!memcmp(wrqu->data.pointer, "peer_ifa", 8)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3436  		rtw_p2p_get_peer_ifaddr(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3437  	} else if (!memcmp(wrqu->data.pointer, "req_cm", 6)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3438  		rtw_p2p_get_req_cm(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3439  	} else if (!memcmp(wrqu->data.pointer, "peer_deva", 9)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3440  		/*	Get the P2P device address when receiving the provision discovery request frame. */
2b42bd58b32155 Phillip Potter 2021-07-28  3441  		rtw_p2p_get_peer_devaddr(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3442  	} else if (!memcmp(wrqu->data.pointer, "group_id", 8)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3443  		rtw_p2p_get_groupid(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3444  	} else if (!memcmp(wrqu->data.pointer, "peer_deva_inv", 9)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3445  		/*	Get the P2P device address when receiving the P2P Invitation request frame. */
2b42bd58b32155 Phillip Potter 2021-07-28  3446  		rtw_p2p_get_peer_devaddr_by_invitation(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3447  	} else if (!memcmp(wrqu->data.pointer, "op_ch", 5)) {
2b42bd58b32155 Phillip Potter 2021-07-28  3448  		rtw_p2p_get_op_ch(dev, info, wrqu, extra);
2b42bd58b32155 Phillip Potter 2021-07-28  3449  	}
2b42bd58b32155 Phillip Potter 2021-07-28  3450  	return ret;
2b42bd58b32155 Phillip Potter 2021-07-28  3451  }
2b42bd58b32155 Phillip Potter 2021-07-28  3452  

:::::: The code at line 3431 was first introduced by commit
:::::: 2b42bd58b32155a1be4dd78991845dec05aaef9e staging: r8188eu: introduce new os_dep dir for RTL8188eu driver

:::::: TO: Phillip Potter <phil@philpotter.co.uk>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

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

end of thread, other threads:[~2022-02-05 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05 14:18 [linux-next:master 3212/4147] drivers/staging/r8188eu/os_dep/ioctl_linux.c:3431:31: sparse: sparse: incorrect type in argument 1 (different address spaces) kernel test robot
2022-02-05 14:18 ` 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.