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: Fri, 08 Jan 2021 22:25:06 +0800 [thread overview]
Message-ID: <202101082202.fHE3zRgx-lkp@intel.com> (raw)
[-- 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 --]
next reply other threads:[~2021-01-08 14:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-08 14:25 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
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
2021-08-04 8:28 ` kernel test robot
2021-06-05 3:05 kernel test robot
2021-03-29 19:41 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=202101082202.fHE3zRgx-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.