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: <202210010956.Mrwnp77X-lkp@intel.com>
Date:   Sat, 1 Oct 2022 09:18:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [kas:lam 5/16] fs/cifs/dfs_cache.c:308:14: sparse: sparse: incorrect
 type in assignment (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git lam
head:   fd053f88c1b7e1acac9fbaeab44c8f675bb9c287
commit: 2979bb830b677ffdc1a842f9dfb835f313b602f7 [5/16] x86/uaccess: Provide untagged_addr() and remove tags before address check
config: x86_64-randconfig-s021
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git/commit/?id=2979bb830b677ffdc1a842f9dfb835f313b602f7
        git remote add kas https://git.kernel.org/pub/scm/linux/kernel/git/kas/linux.git
        git fetch --no-tags kas lam
        git checkout 2979bb830b677ffdc1a842f9dfb835f313b602f7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/infiniband/core/ drivers/usb/gadget/function/ drivers/vdpa/vdpa_user/ fs/cifs/ net/ipv4/ net/l2tp/ net/smc/ net/tipc/ net/vmw_vsock/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> fs/cifs/dfs_cache.c:308:14: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char const [noderef] __user *__ptr_clean @@     got char const * @@
   fs/cifs/dfs_cache.c:308:14: sparse:     expected char const [noderef] __user *__ptr_clean
   fs/cifs/dfs_cache.c:308:14: sparse:     got char const *
--
>> drivers/vdpa/vdpa_user/vduse_dev.c:1083:23: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned long long [noderef] __user *__ptr_clean @@     got unsigned long long * @@
   drivers/vdpa/vdpa_user/vduse_dev.c:1083:23: sparse:     expected unsigned long long [noderef] __user *__ptr_clean
   drivers/vdpa/vdpa_user/vduse_dev.c:1083:23: sparse:     got unsigned long long *
>> drivers/vdpa/vdpa_user/vduse_dev.c:1188:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned int [noderef] __user *__ptr_clean @@     got unsigned int * @@
   drivers/vdpa/vdpa_user/vduse_dev.c:1188:21: sparse:     expected unsigned int [noderef] __user *__ptr_clean
   drivers/vdpa/vdpa_user/vduse_dev.c:1188:21: sparse:     got unsigned int *
   drivers/vdpa/vdpa_user/vduse_dev.c:1562:23: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned long long [noderef] __user *__ptr_clean @@     got unsigned long long * @@
   drivers/vdpa/vdpa_user/vduse_dev.c:1562:23: sparse:     expected unsigned long long [noderef] __user *__ptr_clean
   drivers/vdpa/vdpa_user/vduse_dev.c:1562:23: sparse:     got unsigned long long *
   drivers/vdpa/vdpa_user/vduse_dev.c:1568:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned long long [noderef] __user *__ptr_clean @@     got unsigned long long * @@
   drivers/vdpa/vdpa_user/vduse_dev.c:1568:21: sparse:     expected unsigned long long [noderef] __user *__ptr_clean
   drivers/vdpa/vdpa_user/vduse_dev.c:1568:21: sparse:     got unsigned long long *
--
>> drivers/infiniband/core/uverbs_main.c:632:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned long long const [noderef] __user *__ptr_clean @@     got unsigned long long const * @@
   drivers/infiniband/core/uverbs_main.c:632:31: sparse:     expected unsigned long long const [noderef] __user *__ptr_clean
   drivers/infiniband/core/uverbs_main.c:632:31: sparse:     got unsigned long long const *
--
>> drivers/infiniband/core/uverbs_ioctl.c:157:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned short [noderef] __user *__ptr_clean @@     got unsigned short * @@
   drivers/infiniband/core/uverbs_ioctl.c:157:13: sparse:     expected unsigned short [noderef] __user *__ptr_clean
   drivers/infiniband/core/uverbs_ioctl.c:157:13: sparse:     got unsigned short *
>> drivers/infiniband/core/uverbs_ioctl.c:334:29: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned long long [noderef] __user *__ptr_clean @@     got unsigned long long * @@
   drivers/infiniband/core/uverbs_ioctl.c:334:29: sparse:     expected unsigned long long [noderef] __user *__ptr_clean
   drivers/infiniband/core/uverbs_ioctl.c:334:29: sparse:     got unsigned long long *
   drivers/infiniband/core/uverbs_ioctl.c:423:17: sparse: sparse: incorrect type in assignment (different modifiers) @@     expected int ( *handler )( ... ) @@     got int ( [noderef] * )( ... ) @@
   drivers/infiniband/core/uverbs_ioctl.c:423:17: sparse:     expected int ( *handler )( ... )
   drivers/infiniband/core/uverbs_ioctl.c:423:17: sparse:     got int ( [noderef] * )( ... )
--
>> drivers/usb/gadget/function/rndis.c:1138:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected char const [noderef] __user *__ptr_clean @@     got char const * @@
   drivers/usb/gadget/function/rndis.c:1138:21: sparse:     expected char const [noderef] __user *__ptr_clean
   drivers/usb/gadget/function/rndis.c:1138:21: sparse:     got char const *
--
>> net/ipv4/ipmr.c:1580:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/ipv4/ipmr.c:1580:13: sparse:     expected int [noderef] __user *__ptr_clean
   net/ipv4/ipmr.c:1580:13: sparse:     got int *
   net/ipv4/ipmr.c:1585:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/ipv4/ipmr.c:1585:13: sparse:     expected int [noderef] __user *__ptr_clean
   net/ipv4/ipmr.c:1585:13: sparse:     got int *
   net/ipv4/ipmr.c:2896:13: sparse: sparse: context imbalance in 'ipmr_vif_seq_start' - different lock contexts for basic block
   net/ipv4/ipmr.c: note: in included file (through include/linux/mroute.h):
   include/linux/mroute_base.h:432:31: sparse: sparse: context imbalance in 'mr_mfc_seq_stop' - unexpected unlock
--
>> net/l2tp/l2tp_ip.c:585:16: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/l2tp/l2tp_ip.c:585:16: sparse:     expected int [noderef] __user *__ptr_clean
   net/l2tp/l2tp_ip.c:585:16: sparse:     got int *
--
>> net/smc/af_smc.c:2860:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/smc/af_smc.c:2860:13: sparse:     expected int [noderef] __user *__ptr_clean
   net/smc/af_smc.c:2860:13: sparse:     got int *
   net/smc/af_smc.c:2876:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/smc/af_smc.c:2876:13: sparse:     expected int [noderef] __user *__ptr_clean
   net/smc/af_smc.c:2876:13: sparse:     got int *
   net/smc/af_smc.c:3108:16: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/smc/af_smc.c:3108:16: sparse:     expected int [noderef] __user *__ptr_clean
   net/smc/af_smc.c:3108:16: sparse:     got int *
--
>> net/tipc/socket.c:3243:24: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/tipc/socket.c:3243:24: sparse:     expected int [noderef] __user *__ptr_clean
   net/tipc/socket.c:3243:24: sparse:     got int *
   net/tipc/socket.c:3246:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/tipc/socket.c:3246:15: sparse:     expected int [noderef] __user *__ptr_clean
   net/tipc/socket.c:3246:15: sparse:     got int *
   net/tipc/socket.c:3296:16: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/tipc/socket.c:3296:16: sparse:     expected int [noderef] __user *__ptr_clean
   net/tipc/socket.c:3296:16: sparse:     got int *
--
>> net/vmw_vsock/af_vsock.c:1689:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/vmw_vsock/af_vsock.c:1689:13: sparse:     expected int [noderef] __user *__ptr_clean
   net/vmw_vsock/af_vsock.c:1689:13: sparse:     got int *
   net/vmw_vsock/af_vsock.c:1724:13: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected int [noderef] __user *__ptr_clean @@     got int * @@
   net/vmw_vsock/af_vsock.c:1724:13: sparse:     expected int [noderef] __user *__ptr_clean
   net/vmw_vsock/af_vsock.c:1724:13: sparse:     got int *
>> net/vmw_vsock/af_vsock.c:2253:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned int [noderef] __user *__ptr_clean @@     got unsigned int * @@
   net/vmw_vsock/af_vsock.c:2253:21: sparse:     expected unsigned int [noderef] __user *__ptr_clean
   net/vmw_vsock/af_vsock.c:2253:21: sparse:     got unsigned int *

vim +308 fs/cifs/dfs_cache.c

54be1f6c1c3749 Paulo Alcantara        2018-11-14  301  
54be1f6c1c3749 Paulo Alcantara        2018-11-14  302  static ssize_t dfscache_proc_write(struct file *file, const char __user *buffer,
54be1f6c1c3749 Paulo Alcantara        2018-11-14  303  				   size_t count, loff_t *ppos)
54be1f6c1c3749 Paulo Alcantara        2018-11-14  304  {
54be1f6c1c3749 Paulo Alcantara        2018-11-14  305  	char c;
54be1f6c1c3749 Paulo Alcantara        2018-11-14  306  	int rc;
54be1f6c1c3749 Paulo Alcantara        2018-11-14  307  
54be1f6c1c3749 Paulo Alcantara        2018-11-14 @308  	rc = get_user(c, buffer);
54be1f6c1c3749 Paulo Alcantara        2018-11-14  309  	if (rc)
54be1f6c1c3749 Paulo Alcantara        2018-11-14  310  		return rc;
54be1f6c1c3749 Paulo Alcantara        2018-11-14  311  
54be1f6c1c3749 Paulo Alcantara        2018-11-14  312  	if (c != '0')
54be1f6c1c3749 Paulo Alcantara        2018-11-14  313  		return -EINVAL;
54be1f6c1c3749 Paulo Alcantara        2018-11-14  314  
a0a3036b81f1f6 Joe Perches            2020-04-14  315  	cifs_dbg(FYI, "clearing dfs cache\n");
742d8de0186e9f Paulo Alcantara (SUSE  2019-12-04  316) 
742d8de0186e9f Paulo Alcantara (SUSE  2019-12-04  317) 	down_write(&htable_rw_lock);
54be1f6c1c3749 Paulo Alcantara        2018-11-14  318  	flush_cache_ents();
742d8de0186e9f Paulo Alcantara (SUSE  2019-12-04  319) 	up_write(&htable_rw_lock);
54be1f6c1c3749 Paulo Alcantara        2018-11-14  320  
54be1f6c1c3749 Paulo Alcantara        2018-11-14  321  	return count;
54be1f6c1c3749 Paulo Alcantara        2018-11-14  322  }
54be1f6c1c3749 Paulo Alcantara        2018-11-14  323  

:::::: The code at line 308 was first introduced by commit
:::::: 54be1f6c1c37498bba557049df646cc239fa37e3 cifs: Add DFS cache routines

:::::: TO: Paulo Alcantara <palcantara@...e.de>
:::::: CC: Steve French <stfrench@...rosoft.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (167401 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ