public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Manisha Chinthapally <manisha.chinthapally@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.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
Date: Tue, 8 Feb 2022 19:55:12 +0800	[thread overview]
Message-ID: <202202081901.wpMee2f6-lkp@intel.com> (raw)

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@intel.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@intel.com>
:::::: CC: Faycal Benmlih <faycal.benmlih@intel.com>

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

                 reply	other threads:[~2022-02-08 11:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202202081901.wpMee2f6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manisha.chinthapally@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox