From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [intel-linux-intel-lts:5.10/yocto 10619/15089] drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1357:14: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Sat, 14 Aug 2021 05:12:53 +0800 [thread overview]
Message-ID: <202108140548.VAsiQJSG-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3766 bytes --]
tree: https://github.com/intel/linux-intel-lts.git 5.10/yocto
head: 33f329993aa32e5d7587399a764842b9c4b30b1b
commit: 4a13d96daeb2f402d35b53c718b83609e65d4b3d [10619/15089] v4l: subdev: Add [GS]_ROUTING ioctls and operations
config: x86_64-randconfig-s022-20210813 (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/intel/linux-intel-lts/commit/4a13d96daeb2f402d35b53c718b83609e65d4b3d
git remote add intel-linux-intel-lts https://github.com/intel/linux-intel-lts.git
git fetch --no-tags intel-linux-intel-lts 5.10/yocto
git checkout 4a13d96daeb2f402d35b53c718b83609e65d4b3d
# 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/media/v4l2-core/v4l2-compat-ioctl32.c:1355:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct v4l2_subdev_route *routes @@ got void [noderef] __user * @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1355:20: sparse: expected struct v4l2_subdev_route *routes
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1355:20: sparse: got void [noderef] __user *
>> drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1357:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got struct v4l2_subdev_route *routes @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1357:14: sparse: expected void const volatile [noderef] __user *ptr
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1357:14: sparse: got struct v4l2_subdev_route *routes
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1593:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct v4l2_subdev_routing *kp @@ got void [noderef] __user *[addressable] new_p64 @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1593:55: sparse: expected struct v4l2_subdev_routing *kp
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1593:55: sparse: got void [noderef] __user *[addressable] new_p64
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1764:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct v4l2_subdev_routing *kp @@ got void [noderef] __user *[addressable] new_p64 @@
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1764:55: sparse: expected struct v4l2_subdev_routing *kp
drivers/media/v4l2-core/v4l2-compat-ioctl32.c:1764:55: sparse: got void [noderef] __user *[addressable] new_p64
vim +1357 drivers/media/v4l2-core/v4l2-compat-ioctl32.c
1342
1343 static int get_v4l2_subdev_routing(struct v4l2_subdev_routing *kp,
1344 struct v4l2_subdev_routing32 __user *up)
1345 {
1346 compat_caddr_t p;
1347
1348 if (!access_ok(up, sizeof(*up)) ||
1349 get_user(p, &up->routes) ||
1350 get_user(kp->num_routes, &up->num_routes) ||
1351 !access_ok(up->reserved, sizeof(*up->reserved)) ||
1352 kp->num_routes > U32_MAX / sizeof(*kp->routes))
1353 return -EFAULT;
1354
1355 kp->routes = compat_ptr(p);
1356
> 1357 if (!access_ok(kp->routes,
1358 kp->num_routes * (u32)sizeof(*kp->routes)))
1359 return -EFAULT;
1360
1361 return 0;
1362 }
1363
---
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: 35528 bytes --]
reply other threads:[~2021-08-13 21:12 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=202108140548.VAsiQJSG-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.