* [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
@ 2021-06-05 3:05 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-06-05 3:05 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7343 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-s021-20210605 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-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__' W=1 ARCH=x86_64
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/socperf/socperfdrv.c:203:13: sparse: sparse: function 'SOCPERF_Read_Data3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:885:1: sparse: sparse: function 'SOCPERF_Switch_Group3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:101:22: sparse: sparse: symbol 'socperf_drv_version' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:102:5: sparse: sparse: symbol 'read_unc_ctr_info' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:103:10: sparse: sparse: symbol 'dispatch_uncore' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:104:12: sparse: sparse: symbol 'socperf_drv_cfg' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:105:14: sparse: sparse: symbol 'socperf_global_ec' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:106:14: sparse: sparse: symbol 'socperf_abnormal_terminate' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:107:11: sparse: sparse: symbol 'socperf_control' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:111:8: sparse: sparse: symbol 'socperf_pcb_size' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:984:28: sparse: sparse: Using plain integer as NULL pointer
drivers/platform/x86/socperf/socperfdrv.c:1070:6: sparse: sparse: symbol 'lwpmudrv_Stop_Mem' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1155:15: sparse: sparse: symbol 'socperf_Service_IOCTL' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1274:6: sparse: sparse: symbol 'socperf_Device_Control' was not declared. Should it be static?
>> drivers/platform/x86/socperf/socperfdrv.c:1332:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1334:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1307:6: sparse: sparse: symbol 'socperf_Device_Control_Compat' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1358:5: sparse: sparse: symbol 'SOCPERF_Abnormal_Terminate' was not declared. Should it be static?
--
>> 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: 33997 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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
@ 2021-08-04 8:28 ` kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-08-04 8:28 UTC (permalink / raw)
To: Manisha Chinthapally; +Cc: kbuild-all, linux-kernel
[-- 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 --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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
@ 2021-08-04 8:28 ` kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-08-04 8:28 UTC (permalink / raw)
To: kbuild-all
[-- 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 --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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
@ 2021-03-29 19:41 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-03-29 19:41 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7339 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-20210329 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-277-gc089cd2d-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__' ARCH=x86_64
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/socperf/socperfdrv.c:203:13: sparse: sparse: function 'SOCPERF_Read_Data3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:885:1: sparse: sparse: function 'SOCPERF_Switch_Group3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:101:22: sparse: sparse: symbol 'socperf_drv_version' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:102:5: sparse: sparse: symbol 'read_unc_ctr_info' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:103:10: sparse: sparse: symbol 'dispatch_uncore' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:104:12: sparse: sparse: symbol 'socperf_drv_cfg' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:105:14: sparse: sparse: symbol 'socperf_global_ec' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:106:14: sparse: sparse: symbol 'socperf_abnormal_terminate' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:107:11: sparse: sparse: symbol 'socperf_control' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:111:8: sparse: sparse: symbol 'socperf_pcb_size' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:984:28: sparse: sparse: Using plain integer as NULL pointer
drivers/platform/x86/socperf/socperfdrv.c:1070:6: sparse: sparse: symbol 'lwpmudrv_Stop_Mem' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1155:15: sparse: sparse: symbol 'socperf_Service_IOCTL' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1274:6: sparse: sparse: symbol 'socperf_Device_Control' was not declared. Should it be static?
>> drivers/platform/x86/socperf/socperfdrv.c:1332:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1334:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1307:6: sparse: sparse: symbol 'socperf_Device_Control_Compat' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1358:5: sparse: sparse: symbol 'SOCPERF_Abnormal_Terminate' was not declared. Should it be static?
--
>> 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: 34621 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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
@ 2021-01-08 14:25 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-01-08 14:25 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7375 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-20210108 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-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__' ARCH=x86_64
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/socperf/socperfdrv.c:203:13: sparse: sparse: function 'SOCPERF_Read_Data3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:885:1: sparse: sparse: function 'SOCPERF_Switch_Group3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:101:22: sparse: sparse: symbol 'socperf_drv_version' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:102:5: sparse: sparse: symbol 'read_unc_ctr_info' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:103:10: sparse: sparse: symbol 'dispatch_uncore' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:104:12: sparse: sparse: symbol 'socperf_drv_cfg' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:105:14: sparse: sparse: symbol 'socperf_global_ec' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:106:14: sparse: sparse: symbol 'socperf_abnormal_terminate' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:107:11: sparse: sparse: symbol 'socperf_control' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:111:8: sparse: sparse: symbol 'socperf_pcb_size' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:984:28: sparse: sparse: Using plain integer as NULL pointer
drivers/platform/x86/socperf/socperfdrv.c:1070:6: sparse: sparse: symbol 'lwpmudrv_Stop_Mem' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1155:15: sparse: sparse: symbol 'socperf_Service_IOCTL' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1274:6: sparse: sparse: symbol 'socperf_Device_Control' was not declared. Should it be static?
>> drivers/platform/x86/socperf/socperfdrv.c:1332:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1334:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1307:6: sparse: sparse: symbol 'socperf_Device_Control_Compat' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1358:5: sparse: sparse: symbol 'SOCPERF_Abnormal_Terminate' was not declared. Should it be static?
--
>> 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
d605aabab41663c Jon Moeller 2018-11-13 726
d605aabab41663c Jon Moeller 2018-11-13 727 #if defined(CONFIG_COMPAT) && defined(DRV_EM64T)
d605aabab41663c Jon Moeller 2018-11-13 728 static IOCTL_OP_TYPE pax_Device_Control_Compat(struct file *filp,
d605aabab41663c Jon Moeller 2018-11-13 729 unsigned int cmd,
d605aabab41663c Jon Moeller 2018-11-13 730 unsigned long arg)
d605aabab41663c Jon Moeller 2018-11-13 731 {
d605aabab41663c Jon Moeller 2018-11-13 732 int status = OS_SUCCESS;
d605aabab41663c Jon Moeller 2018-11-13 733 IOCTL_COMPAT_ARGS_NODE local_args_compat;
d605aabab41663c Jon Moeller 2018-11-13 734 IOCTL_ARGS_NODE local_args;
d605aabab41663c Jon Moeller 2018-11-13 735
d605aabab41663c Jon Moeller 2018-11-13 736 memset(&local_args_compat, 0, sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663c Jon Moeller 2018-11-13 737 if (arg) {
d605aabab41663c Jon Moeller 2018-11-13 738 status = copy_from_user(&local_args_compat,
d605aabab41663c Jon Moeller 2018-11-13 739 (void __user *)arg,
d605aabab41663c Jon Moeller 2018-11-13 740 sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663c Jon Moeller 2018-11-13 741 if (status != OS_SUCCESS)
d605aabab41663c Jon Moeller 2018-11-13 742 return status;
d605aabab41663c Jon Moeller 2018-11-13 743 }
d605aabab41663c Jon Moeller 2018-11-13 744
d605aabab41663c Jon Moeller 2018-11-13 745 local_args.len_drv_to_usr = local_args_compat.len_drv_to_usr;
d605aabab41663c Jon Moeller 2018-11-13 746 local_args.len_usr_to_drv = local_args_compat.len_usr_to_drv;
d605aabab41663c Jon Moeller 2018-11-13 747 local_args.buf_drv_to_usr =
d605aabab41663c Jon Moeller 2018-11-13 @748 (char *)compat_ptr(local_args_compat.buf_drv_to_usr);
d605aabab41663c Jon Moeller 2018-11-13 749 local_args.buf_usr_to_drv =
d605aabab41663c Jon Moeller 2018-11-13 750 (char *)compat_ptr(local_args_compat.buf_usr_to_drv);
d605aabab41663c Jon Moeller 2018-11-13 751
d605aabab41663c Jon Moeller 2018-11-13 752 local_args.command = cmd;
d605aabab41663c Jon Moeller 2018-11-13 753
d605aabab41663c Jon Moeller 2018-11-13 754 status = pax_Service_IOCTL(filp, cmd, local_args);
d605aabab41663c Jon Moeller 2018-11-13 755
d605aabab41663c Jon Moeller 2018-11-13 756 return status;
d605aabab41663c Jon Moeller 2018-11-13 757 }
d605aabab41663c Jon Moeller 2018-11-13 758 #endif
d605aabab41663c 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: 31330 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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
@ 2020-12-05 1:22 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-12-05 1:22 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7341 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-20201204 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-179-ga00755aa-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__' ARCH=x86_64
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
--
drivers/platform/x86/socperf/socperfdrv.c:203:13: sparse: sparse: function 'SOCPERF_Read_Data3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:885:1: sparse: sparse: function 'SOCPERF_Switch_Group3' with external linkage has definition
drivers/platform/x86/socperf/socperfdrv.c:101:22: sparse: sparse: symbol 'socperf_drv_version' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:102:5: sparse: sparse: symbol 'read_unc_ctr_info' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:103:10: sparse: sparse: symbol 'dispatch_uncore' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:104:12: sparse: sparse: symbol 'socperf_drv_cfg' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:105:14: sparse: sparse: symbol 'socperf_global_ec' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:106:14: sparse: sparse: symbol 'socperf_abnormal_terminate' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:107:11: sparse: sparse: symbol 'socperf_control' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:111:8: sparse: sparse: symbol 'socperf_pcb_size' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:984:28: sparse: sparse: Using plain integer as NULL pointer
drivers/platform/x86/socperf/socperfdrv.c:1070:6: sparse: sparse: symbol 'lwpmudrv_Stop_Mem' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1155:15: sparse: sparse: symbol 'socperf_Service_IOCTL' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1274:6: sparse: sparse: symbol 'socperf_Device_Control' was not declared. Should it be static?
>> drivers/platform/x86/socperf/socperfdrv.c:1332:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1334:18: sparse: sparse: cast removes address space '__user' of expression
drivers/platform/x86/socperf/socperfdrv.c:1307:6: sparse: sparse: symbol 'socperf_Device_Control_Compat' was not declared. Should it be static?
drivers/platform/x86/socperf/socperfdrv.c:1358:5: sparse: sparse: symbol 'SOCPERF_Abnormal_Terminate' was not declared. Should it be static?
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: 31399 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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
@ 2020-09-26 7:24 kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2020-09-26 7:24 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4223 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-s021-20200925 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-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__' ARCH=x86_64
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
vim +/__user +748 drivers/platform/x86/sepdk/pax/pax.c
d605aabab41663c Jon Moeller 2018-11-13 726
d605aabab41663c Jon Moeller 2018-11-13 727 #if defined(CONFIG_COMPAT) && defined(DRV_EM64T)
d605aabab41663c Jon Moeller 2018-11-13 728 static IOCTL_OP_TYPE pax_Device_Control_Compat(struct file *filp,
d605aabab41663c Jon Moeller 2018-11-13 729 unsigned int cmd,
d605aabab41663c Jon Moeller 2018-11-13 730 unsigned long arg)
d605aabab41663c Jon Moeller 2018-11-13 731 {
d605aabab41663c Jon Moeller 2018-11-13 732 int status = OS_SUCCESS;
d605aabab41663c Jon Moeller 2018-11-13 733 IOCTL_COMPAT_ARGS_NODE local_args_compat;
d605aabab41663c Jon Moeller 2018-11-13 734 IOCTL_ARGS_NODE local_args;
d605aabab41663c Jon Moeller 2018-11-13 735
d605aabab41663c Jon Moeller 2018-11-13 736 memset(&local_args_compat, 0, sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663c Jon Moeller 2018-11-13 737 if (arg) {
d605aabab41663c Jon Moeller 2018-11-13 738 status = copy_from_user(&local_args_compat,
d605aabab41663c Jon Moeller 2018-11-13 739 (void __user *)arg,
d605aabab41663c Jon Moeller 2018-11-13 740 sizeof(IOCTL_COMPAT_ARGS_NODE));
d605aabab41663c Jon Moeller 2018-11-13 741 if (status != OS_SUCCESS)
d605aabab41663c Jon Moeller 2018-11-13 742 return status;
d605aabab41663c Jon Moeller 2018-11-13 743 }
d605aabab41663c Jon Moeller 2018-11-13 744
d605aabab41663c Jon Moeller 2018-11-13 745 local_args.len_drv_to_usr = local_args_compat.len_drv_to_usr;
d605aabab41663c Jon Moeller 2018-11-13 746 local_args.len_usr_to_drv = local_args_compat.len_usr_to_drv;
d605aabab41663c Jon Moeller 2018-11-13 747 local_args.buf_drv_to_usr =
d605aabab41663c Jon Moeller 2018-11-13 @748 (char *)compat_ptr(local_args_compat.buf_drv_to_usr);
d605aabab41663c Jon Moeller 2018-11-13 749 local_args.buf_usr_to_drv =
d605aabab41663c Jon Moeller 2018-11-13 750 (char *)compat_ptr(local_args_compat.buf_usr_to_drv);
d605aabab41663c Jon Moeller 2018-11-13 751
d605aabab41663c Jon Moeller 2018-11-13 752 local_args.command = cmd;
d605aabab41663c Jon Moeller 2018-11-13 753
d605aabab41663c Jon Moeller 2018-11-13 754 status = pax_Service_IOCTL(filp, cmd, local_args);
d605aabab41663c Jon Moeller 2018-11-13 755
d605aabab41663c Jon Moeller 2018-11-13 756 return status;
d605aabab41663c Jon Moeller 2018-11-13 757 }
d605aabab41663c Jon Moeller 2018-11-13 758 #endif
d605aabab41663c 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: 28146 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-08-04 8:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-05 3:05 [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-08-04 8:28 kernel test robot
2021-08-04 8:28 ` 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
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.