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: <202202081901.wpMee2f6-lkp@intel.com>
Date:   Tue, 8 Feb 2022 19:55:12 +0800
From:   kernel test robot <lkp@...el.com>
To:     Manisha Chinthapally <manisha.chinthapally@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [mchinth:sep_socwatch_linux_5_10 1/2]
 drivers/platform/x86/sepdk/pax/pax.c:763:18: sparse: sparse: cast removes
 address space '__user' of expression

Hi Manisha,

First bad commit (maybe != root cause):

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_10
head:   c55df4a2b60fc7c6c4d00fd9f9fb447087833513
commit: 50ccb9f3611a1cff43d9df2e2b303f817ad00a4d [1/2] platform/x86: Update SEP driver for 5.10 pull
config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220208/202202081901.wpMee2f6-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://github.com/mchinth/linux/commit/50ccb9f3611a1cff43d9df2e2b303f817ad00a4d
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_10
        git checkout 50ccb9f3611a1cff43d9df2e2b303f817ad00a4d
        # 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=x86_64 SHELL=/bin/bash drivers/platform/x86/sepdk/pax/ drivers/platform/x86/sepdk/sep/ drivers/platform/x86/socperf/

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/platform/x86/sepdk/pax/pax.c:763:18: sparse: sparse: cast removes address space '__user' of expression
   drivers/platform/x86/sepdk/pax/pax.c:765:18: sparse: sparse: cast removes address space '__user' of expression

vim +/__user +763 drivers/platform/x86/sepdk/pax/pax.c

d605aabab41663 Jon Moeller 2018-11-13  741  
d605aabab41663 Jon Moeller 2018-11-13  742  #if defined(CONFIG_COMPAT) && defined(DRV_EM64T)
d605aabab41663 Jon Moeller 2018-11-13  743  static IOCTL_OP_TYPE pax_Device_Control_Compat(struct file *filp,
d605aabab41663 Jon Moeller 2018-11-13  744  					       unsigned int cmd,
d605aabab41663 Jon Moeller 2018-11-13  745  					       unsigned long arg)
d605aabab41663 Jon Moeller 2018-11-13  746  {
d605aabab41663 Jon Moeller 2018-11-13  747  	int status = OS_SUCCESS;
d605aabab41663 Jon Moeller 2018-11-13  748  	IOCTL_COMPAT_ARGS_NODE local_args_compat;
d605aabab41663 Jon Moeller 2018-11-13  749  	IOCTL_ARGS_NODE local_args;
d605aabab41663 Jon Moeller 2018-11-13  750  
d605aabab41663 Jon Moeller 2018-11-13  751  	memset(&local_args_compat, 0, sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663 Jon Moeller 2018-11-13  752  	if (arg) {
d605aabab41663 Jon Moeller 2018-11-13  753  		status = copy_from_user(&local_args_compat,
d605aabab41663 Jon Moeller 2018-11-13  754  					(void __user *)arg,
d605aabab41663 Jon Moeller 2018-11-13  755  					sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663 Jon Moeller 2018-11-13  756  		if (status != OS_SUCCESS)
d605aabab41663 Jon Moeller 2018-11-13  757  			return status;
d605aabab41663 Jon Moeller 2018-11-13  758  	}
d605aabab41663 Jon Moeller 2018-11-13  759  
d605aabab41663 Jon Moeller 2018-11-13  760  	local_args.len_drv_to_usr = local_args_compat.len_drv_to_usr;
d605aabab41663 Jon Moeller 2018-11-13  761  	local_args.len_usr_to_drv = local_args_compat.len_usr_to_drv;
d605aabab41663 Jon Moeller 2018-11-13  762  	local_args.buf_drv_to_usr =
d605aabab41663 Jon Moeller 2018-11-13 @763  		(char *)compat_ptr(local_args_compat.buf_drv_to_usr);
d605aabab41663 Jon Moeller 2018-11-13  764  	local_args.buf_usr_to_drv =
d605aabab41663 Jon Moeller 2018-11-13  765  		(char *)compat_ptr(local_args_compat.buf_usr_to_drv);
d605aabab41663 Jon Moeller 2018-11-13  766  
d605aabab41663 Jon Moeller 2018-11-13  767  	local_args.command = cmd;
d605aabab41663 Jon Moeller 2018-11-13  768  
d605aabab41663 Jon Moeller 2018-11-13  769  	status = pax_Service_IOCTL(filp, cmd, local_args);
d605aabab41663 Jon Moeller 2018-11-13  770  
d605aabab41663 Jon Moeller 2018-11-13  771  	return status;
d605aabab41663 Jon Moeller 2018-11-13  772  }
d605aabab41663 Jon Moeller 2018-11-13  773  #endif
d605aabab41663 Jon Moeller 2018-11-13  774  

:::::: The code at line 763 was first introduced by commit
:::::: d605aabab41663c9be9e8c549042933189adbf2f platform/x86: add sep and socwatch drivers without socperf.

:::::: TO: Jon Moeller <jon.moeller@...el.com>
:::::: CC: Faycal Benmlih <faycal.benmlih@...el.com>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ