[arnd-playground:arm-kill-set_fs-10 5/9] arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: sparse: incorrect type in initializer (different base types)

From: kernel test robot
Date: Thu Jul 22 2021 - 16:57:48 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git arm-kill-set_fs-10
head: a6e0b06b967960c7e0a64bf10b8d1b7afaa4008e
commit: 50310ba6abb85af07544c5bb6e6bb07174e4b694 [5/9] ARM: oabi-compat: rework epoll_wait/epoll_pwait emulation
config: arm-randconfig-s031-20210722 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 10.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commit/?id=50310ba6abb85af07544c5bb6e6bb07174e4b694
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground arm-kill-set_fs-10
git checkout 50310ba6abb85af07544c5bb6e6bb07174e4b694
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
arch/arm/kernel/sys_oabi-compat.c:264:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got unsigned int [addressable] [usertype] events @@
arch/arm/kernel/sys_oabi-compat.c:264:23: sparse: expected restricted __poll_t [usertype] events
arch/arm/kernel/sys_oabi-compat.c:264:23: sparse: got unsigned int [addressable] [usertype] events
>> arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int __pu_val @@ got restricted __poll_t [usertype] revents @@
arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: expected unsigned int __pu_val
arch/arm/kernel/sys_oabi-compat.c:284:21: sparse: got restricted __poll_t [usertype] revents
arch/arm/kernel/sys_oabi-compat.c:334:25: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct old_timespec32 const [noderef] __user *timeout @@ got struct old_timespec32 * @@
arch/arm/kernel/sys_oabi-compat.c:334:25: sparse: expected struct old_timespec32 const [noderef] __user *timeout
arch/arm/kernel/sys_oabi-compat.c:334:25: sparse: got struct old_timespec32 *
arch/arm/kernel/sys_oabi-compat.c:341:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct sembuf [noderef] __user *sops @@ got struct sembuf *[assigned] sops @@
arch/arm/kernel/sys_oabi-compat.c:341:52: sparse: expected struct sembuf [noderef] __user *sops
arch/arm/kernel/sys_oabi-compat.c:341:52: sparse: got struct sembuf *[assigned] sops

vim +284 arch/arm/kernel/sys_oabi-compat.c

276
277 struct epoll_event __user *
278 epoll_put_uevent(__poll_t revents, __u64 data,
279 struct epoll_event __user *uevent)
280 {
281 if (in_oabi_syscall()) {
282 struct oabi_epoll_event __user *oevent = (void __user *)uevent;
283
> 284 if (__put_user(revents, &oevent->events) ||
285 __put_user(data, &oevent->data))
286 return NULL;
287
288 return (void __user *)(oevent+1);
289 }
290
291 if (__put_user(revents, &uevent->events) ||
292 __put_user(data, &uevent->data))
293 return NULL;
294
295 return uevent+1;
296 }
297

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

Attachment: .config.gz
Description: application/gzip