tree:
https://github.com/zen-kernel/zen-kernel 5.13/futex2-tkg
head: 8eb940ffa39f19c4ddf284615dfb27a6444a3c1d
commit: e0c5fabdb1a5efa8d1c606485e22709fd4f90fb5 [3/15] futex2: Implement vectorized wait
config: mips-randconfig-r026-20210720 (attached as .config)
compiler: mips64-linux-gcc (GCC) 10.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/zen-kernel/zen-kernel/commit/e0c5fabdb1a5efa8d1c606485...
git remote add zen-kernel-zen-kernel
https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.13/futex2-tkg
git checkout e0c5fabdb1a5efa8d1c606485e22709fd4f90fb5
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir
ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/futex2.c:723:16: warning: 'struct compat_futex_waitv' declared inside
parameter list will not be visible outside of this definition or declaration
723 | struct compat_futex_waitv __user *uwaitv,
| ^~~~~~~~~~~~~~~~~~
kernel/futex2.c: In function 'compat_futex_parse_waitv':
> kernel/futex2.c:727:28: error: storage size of 'waitv'
isn't known
727 | struct compat_futex_waitv waitv;
| ^~~~~
kernel/futex2.c:731:37: error: invalid use of undefined type 'struct
compat_futex_waitv'
731 | if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
| ^
kernel/futex2.c:740:31: error: implicit declaration of function 'compat_ptr'
[-Werror=implicit-function-declaration]
740 | futexv->objects[i].uaddr = compat_ptr(waitv.uaddr);
| ^~~~~~~~~~
kernel/futex2.c:727:28: warning: unused variable 'waitv' [-Wunused-variable]
727 | struct compat_futex_waitv waitv;
| ^~~~~
kernel/futex2.c: At top level:
kernel/futex2.c:759:36: error: expected ')' before 'struct'
759 | COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *,
waiters,
| ^~~~~~~
| )
kernel/futex2.c:722:12: warning: 'compat_futex_parse_waitv' defined but not
used [-Wunused-function]
722 | static int compat_futex_parse_waitv(struct futex_waiter_head *futexv,
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +727 kernel/futex2.c
712
713 #ifdef CONFIG_COMPAT
714 /**
715 * compat_futex_parse_waitv - Parse a waitv array from userspace
716 * @futexv: Kernel side list of waiters to be filled
717 * @uwaitv: Userspace list to be parsed
718 * @nr_futexes: Length of futexv
719 *
720 * Return: Error code on failure, pointer to a prepared futexv otherwise
721 */
722 static int compat_futex_parse_waitv(struct futex_waiter_head *futexv,
723 struct compat_futex_waitv __user *uwaitv,
724 unsigned int nr_futexes)
725 {
726 struct futex_bucket *bucket;
727 struct compat_futex_waitv waitv;
728 unsigned int i;
729
730 for (i = 0; i < nr_futexes; i++) {
731 if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
732 return -EFAULT;
733
734 if ((waitv.flags & ~FUTEXV_WAITER_MASK) ||
735 (waitv.flags & FUTEX_SIZE_MASK) != FUTEX_32)
736 return -EINVAL;
737
738 futexv->objects[i].key.pointer = 0;
739 futexv->objects[i].flags = waitv.flags;
740 futexv->objects[i].uaddr = compat_ptr(waitv.uaddr);
741 futexv->objects[i].val = waitv.val;
742 futexv->objects[i].index = i;
743
744 bucket = futex_get_bucket(compat_ptr(waitv.uaddr),
745 &futexv->objects[i].key,
746 is_object_shared);
747
748 if (IS_ERR(bucket))
749 return PTR_ERR(bucket);
750
751 futexv->objects[i].bucket = bucket;
752
753 INIT_LIST_HEAD(&futexv->objects[i].list);
754 }
755
756 return 0;
757 }
758
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org