All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [mchinth:sep_socwatch_linux_5_9 1/1] drivers/platform/x86/sepdk/pax/pax.c:748:18: sparse: sparse: cast removes address space '__user' of expression
Date: Wed, 04 Aug 2021 16:28:16 +0800	[thread overview]
Message-ID: <202108041612.gCVtcINm-lkp@intel.com> (raw)

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

Hi Manisha,

First bad commit (maybe != root cause):

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_9
head:   c859e634bf058e7963fccc4c1219c1365e925ad4
commit: c859e634bf058e7963fccc4c1219c1365e925ad4 [1/1] platform/x86: Update SEP driver for 5.9 pull
config: x86_64-randconfig-s022-20210803 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://github.com/mchinth/linux/commit/c859e634bf058e7963fccc4c1219c1365e925ad4
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_9
        git checkout c859e634bf058e7963fccc4c1219c1365e925ad4
        # save the attached .config to linux build tree
        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/

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:748:18: sparse: sparse: cast removes address space '__user' of expression
   drivers/platform/x86/sepdk/pax/pax.c:750:18: sparse: sparse: cast removes address space '__user' of expression
--
   drivers/platform/x86/sepdk/sep/lwpmudrv.c: note: in included file (through drivers/platform/x86/sepdk/inc/apic.h):
   /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:406:9: sparse: sparse: preprocessor token offsetof redefined
   drivers/platform/x86/sepdk/sep/lwpmudrv.c: note: in included file (through include/uapi/linux/posix_types.h, include/uapi/linux/types.h, include/linux/types.h, ...):
   include/linux/stddef.h:17:9: sparse: this was the original definition
>> drivers/platform/x86/sepdk/sep/lwpmudrv.c:7127:18: sparse: sparse: cast removes address space '__user' of expression
   drivers/platform/x86/sepdk/sep/lwpmudrv.c:7129:18: sparse: sparse: cast removes address space '__user' of expression

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

d605aabab41663 Jon Moeller 2018-11-13  726  
d605aabab41663 Jon Moeller 2018-11-13  727  #if defined(CONFIG_COMPAT) && defined(DRV_EM64T)
d605aabab41663 Jon Moeller 2018-11-13  728  static IOCTL_OP_TYPE pax_Device_Control_Compat(struct file *filp,
d605aabab41663 Jon Moeller 2018-11-13  729  					       unsigned int cmd,
d605aabab41663 Jon Moeller 2018-11-13  730  					       unsigned long arg)
d605aabab41663 Jon Moeller 2018-11-13  731  {
d605aabab41663 Jon Moeller 2018-11-13  732  	int status = OS_SUCCESS;
d605aabab41663 Jon Moeller 2018-11-13  733  	IOCTL_COMPAT_ARGS_NODE local_args_compat;
d605aabab41663 Jon Moeller 2018-11-13  734  	IOCTL_ARGS_NODE local_args;
d605aabab41663 Jon Moeller 2018-11-13  735  
d605aabab41663 Jon Moeller 2018-11-13  736  	memset(&local_args_compat, 0, sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663 Jon Moeller 2018-11-13  737  	if (arg) {
d605aabab41663 Jon Moeller 2018-11-13  738  		status = copy_from_user(&local_args_compat,
d605aabab41663 Jon Moeller 2018-11-13  739  					(void __user *)arg,
d605aabab41663 Jon Moeller 2018-11-13  740  					sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663 Jon Moeller 2018-11-13  741  		if (status != OS_SUCCESS)
d605aabab41663 Jon Moeller 2018-11-13  742  			return status;
d605aabab41663 Jon Moeller 2018-11-13  743  	}
d605aabab41663 Jon Moeller 2018-11-13  744  
d605aabab41663 Jon Moeller 2018-11-13  745  	local_args.len_drv_to_usr = local_args_compat.len_drv_to_usr;
d605aabab41663 Jon Moeller 2018-11-13  746  	local_args.len_usr_to_drv = local_args_compat.len_usr_to_drv;
d605aabab41663 Jon Moeller 2018-11-13  747  	local_args.buf_drv_to_usr =
d605aabab41663 Jon Moeller 2018-11-13 @748  		(char *)compat_ptr(local_args_compat.buf_drv_to_usr);
d605aabab41663 Jon Moeller 2018-11-13  749  	local_args.buf_usr_to_drv =
d605aabab41663 Jon Moeller 2018-11-13  750  		(char *)compat_ptr(local_args_compat.buf_usr_to_drv);
d605aabab41663 Jon Moeller 2018-11-13  751  
d605aabab41663 Jon Moeller 2018-11-13  752  	local_args.command = cmd;
d605aabab41663 Jon Moeller 2018-11-13  753  
d605aabab41663 Jon Moeller 2018-11-13  754  	status = pax_Service_IOCTL(filp, cmd, local_args);
d605aabab41663 Jon Moeller 2018-11-13  755  
d605aabab41663 Jon Moeller 2018-11-13  756  	return status;
d605aabab41663 Jon Moeller 2018-11-13  757  }
d605aabab41663 Jon Moeller 2018-11-13  758  #endif
d605aabab41663 Jon Moeller 2018-11-13  759  

:::::: The code at line 748 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(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34216 bytes --]

WARNING: multiple messages have this Message-ID (diff)
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_9 1/1] drivers/platform/x86/sepdk/pax/pax.c:748:18: sparse: sparse: cast removes address space '__user' of expression
Date: Wed, 4 Aug 2021 16:28:16 +0800	[thread overview]
Message-ID: <202108041612.gCVtcINm-lkp@intel.com> (raw)

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

Hi Manisha,

First bad commit (maybe != root cause):

tree:   https://github.com/mchinth/linux sep_socwatch_linux_5_9
head:   c859e634bf058e7963fccc4c1219c1365e925ad4
commit: c859e634bf058e7963fccc4c1219c1365e925ad4 [1/1] platform/x86: Update SEP driver for 5.9 pull
config: x86_64-randconfig-s022-20210803 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://github.com/mchinth/linux/commit/c859e634bf058e7963fccc4c1219c1365e925ad4
        git remote add mchinth https://github.com/mchinth/linux
        git fetch --no-tags mchinth sep_socwatch_linux_5_9
        git checkout c859e634bf058e7963fccc4c1219c1365e925ad4
        # save the attached .config to linux build tree
        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/

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:748:18: sparse: sparse: cast removes address space '__user' of expression
   drivers/platform/x86/sepdk/pax/pax.c:750:18: sparse: sparse: cast removes address space '__user' of expression
--
   drivers/platform/x86/sepdk/sep/lwpmudrv.c: note: in included file (through drivers/platform/x86/sepdk/inc/apic.h):
   /usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:406:9: sparse: sparse: preprocessor token offsetof redefined
   drivers/platform/x86/sepdk/sep/lwpmudrv.c: note: in included file (through include/uapi/linux/posix_types.h, include/uapi/linux/types.h, include/linux/types.h, ...):
   include/linux/stddef.h:17:9: sparse: this was the original definition
>> drivers/platform/x86/sepdk/sep/lwpmudrv.c:7127:18: sparse: sparse: cast removes address space '__user' of expression
   drivers/platform/x86/sepdk/sep/lwpmudrv.c:7129:18: sparse: sparse: cast removes address space '__user' of expression

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

d605aabab41663 Jon Moeller 2018-11-13  726  
d605aabab41663 Jon Moeller 2018-11-13  727  #if defined(CONFIG_COMPAT) && defined(DRV_EM64T)
d605aabab41663 Jon Moeller 2018-11-13  728  static IOCTL_OP_TYPE pax_Device_Control_Compat(struct file *filp,
d605aabab41663 Jon Moeller 2018-11-13  729  					       unsigned int cmd,
d605aabab41663 Jon Moeller 2018-11-13  730  					       unsigned long arg)
d605aabab41663 Jon Moeller 2018-11-13  731  {
d605aabab41663 Jon Moeller 2018-11-13  732  	int status = OS_SUCCESS;
d605aabab41663 Jon Moeller 2018-11-13  733  	IOCTL_COMPAT_ARGS_NODE local_args_compat;
d605aabab41663 Jon Moeller 2018-11-13  734  	IOCTL_ARGS_NODE local_args;
d605aabab41663 Jon Moeller 2018-11-13  735  
d605aabab41663 Jon Moeller 2018-11-13  736  	memset(&local_args_compat, 0, sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663 Jon Moeller 2018-11-13  737  	if (arg) {
d605aabab41663 Jon Moeller 2018-11-13  738  		status = copy_from_user(&local_args_compat,
d605aabab41663 Jon Moeller 2018-11-13  739  					(void __user *)arg,
d605aabab41663 Jon Moeller 2018-11-13  740  					sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663 Jon Moeller 2018-11-13  741  		if (status != OS_SUCCESS)
d605aabab41663 Jon Moeller 2018-11-13  742  			return status;
d605aabab41663 Jon Moeller 2018-11-13  743  	}
d605aabab41663 Jon Moeller 2018-11-13  744  
d605aabab41663 Jon Moeller 2018-11-13  745  	local_args.len_drv_to_usr = local_args_compat.len_drv_to_usr;
d605aabab41663 Jon Moeller 2018-11-13  746  	local_args.len_usr_to_drv = local_args_compat.len_usr_to_drv;
d605aabab41663 Jon Moeller 2018-11-13  747  	local_args.buf_drv_to_usr =
d605aabab41663 Jon Moeller 2018-11-13 @748  		(char *)compat_ptr(local_args_compat.buf_drv_to_usr);
d605aabab41663 Jon Moeller 2018-11-13  749  	local_args.buf_usr_to_drv =
d605aabab41663 Jon Moeller 2018-11-13  750  		(char *)compat_ptr(local_args_compat.buf_usr_to_drv);
d605aabab41663 Jon Moeller 2018-11-13  751  
d605aabab41663 Jon Moeller 2018-11-13  752  	local_args.command = cmd;
d605aabab41663 Jon Moeller 2018-11-13  753  
d605aabab41663 Jon Moeller 2018-11-13  754  	status = pax_Service_IOCTL(filp, cmd, local_args);
d605aabab41663 Jon Moeller 2018-11-13  755  
d605aabab41663 Jon Moeller 2018-11-13  756  	return status;
d605aabab41663 Jon Moeller 2018-11-13  757  }
d605aabab41663 Jon Moeller 2018-11-13  758  #endif
d605aabab41663 Jon Moeller 2018-11-13  759  

:::::: The code at line 748 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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34216 bytes --]

             reply	other threads:[~2021-08-04  8:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  8:28 kernel test robot [this message]
2021-08-04  8:28 ` [mchinth:sep_socwatch_linux_5_9 1/1] drivers/platform/x86/sepdk/pax/pax.c:748:18: sparse: sparse: cast removes address space '__user' of expression kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-06-05  3:05 kernel test robot
2021-03-29 19:41 kernel test robot
2021-01-08 14:25 kernel test robot
2020-12-05  1:22 kernel test robot
2020-09-26  7:24 kernel test robot

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=202108041612.gCVtcINm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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 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.