tree:
https://github.com/zen-kernel/zen-kernel 5.13/futex2
head: db649ce1f5de12432be5bfedd8388eacc2f85efc
commit: 28d2f243eaf76b0e9d84947a899fc742bd49d70c [3/19] futex2: Implement vectorized wait
config: powerpc64-randconfig-r011-20210718 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
5d5b08761f944d5b9822d582378333cc4b36a0a7)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
#
https://github.com/zen-kernel/zen-kernel/commit/28d2f243eaf76b0e9d84947a8...
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
git checkout 28d2f243eaf76b0e9d84947a899fc742bd49d70c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir
ARCH=powerpc 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 >>):
In file included from kernel/futex2.c:16:
In file included from include/linux/freezer.h:7:
In file included from include/linux/debug_locks.h:5:
In file included from include/linux/atomic.h:7:
In file included from arch/powerpc/include/asm/atomic.h:11:
In file included from arch/powerpc/include/asm/cmpxchg.h:8:
In file included from include/linux/bug.h:5:
In file included from arch/powerpc/include/asm/bug.h:109:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:12:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined
[-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : :
:"memory")
^
<built-in>:309:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
kernel/futex2.c:307:31: error: implicit declaration of function
'basepage_index' [-Werror,-Wimplicit-function-declaration]
key->index = (unsigned long)basepage_index(tail);
^
kernel/futex2.c:307:31: note: did you mean 'page_index'?
include/linux/mm.h:1653:23: note: 'page_index' declared here
static inline pgoff_t page_index(struct page *page)
^
kernel/futex2.c:683:43: error: expected identifier
COMPAT_SYSCALL_DEFINE4(compat_futex_wait, void __user *, uaddr, compat_u64, val,
^
kernel/futex2.c:687:25: error: use of undeclared identifier 'uaddr'
return ksys_futex_wait(uaddr, val, flags, timo);
^
kernel/futex2.c:687:32: error: use of undeclared identifier 'val'
return ksys_futex_wait(uaddr, val, flags, timo);
^
kernel/futex2.c:687:37: error: use of undeclared identifier 'flags'
return ksys_futex_wait(uaddr, val, flags, timo);
^
kernel/futex2.c:687:44: error: use of undeclared identifier 'timo'
return ksys_futex_wait(uaddr, val, flags, timo);
^
kernel/futex2.c:683:1: warning: no previous prototype for function
'COMPAT_SYSCALL_DEFINE4' [-Wmissing-prototypes]
COMPAT_SYSCALL_DEFINE4(compat_futex_wait, void __user *, uaddr, compat_u64, val,
^
kernel/futex2.c:683:1: note: declare 'static' if the function is not intended
to be used outside of this translation unit
COMPAT_SYSCALL_DEFINE4(compat_futex_wait, void __user *, uaddr, compat_u64, val,
^
static
kernel/futex2.c:683:23: error: this old-style function definition is not preceded by a
prototype [-Werror,-Wstrict-prototypes]
COMPAT_SYSCALL_DEFINE4(compat_futex_wait, void __user *, uaddr, compat_u64, val,
^
kernel/futex2.c:720:16: warning: declaration of 'struct compat_futex_waitv'
will not be visible outside of this function [-Wvisibility]
struct compat_futex_waitv __user *uwaitv,
^
kernel/futex2.c:723:28: error: variable has incomplete type 'struct
compat_futex_waitv'
struct compat_futex_waitv waitv;
^
kernel/futex2.c:720:16: note: forward declaration of 'struct
compat_futex_waitv'
struct compat_futex_waitv __user *uwaitv,
^
kernel/futex2.c:728:37: error: subscript of pointer to incomplete type 'struct
compat_futex_waitv'
if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
~~~~~~^
kernel/futex2.c:720:16: note: forward declaration of 'struct
compat_futex_waitv'
struct compat_futex_waitv __user *uwaitv,
^
kernel/futex2.c:737:31: error: implicit declaration of function 'compat_ptr'
[-Werror,-Wimplicit-function-declaration]
futexv->objects[i].uaddr = compat_ptr(waitv.uaddr);
^
kernel/futex2.c:756:37: error: expected identifier
COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
^
> kernel/futex2.c:756:1: error: redefinition of
'COMPAT_SYSCALL_DEFINE4'
COMPAT_SYSCALL_DEFINE4(futex_waitv, struct
compat_futex_waitv __user *, waiters,
^
kernel/futex2.c:683:1: note: previous definition is here
COMPAT_SYSCALL_DEFINE4(compat_futex_wait, void __user *, uaddr, compat_u64, val,
^
kernel/futex2.c:763:6: error: use of undeclared identifier 'flags'
if (flags & ~FUTEXV_MASK)
^
kernel/futex2.c:766:7: error: use of undeclared identifier 'nr_futexes'
if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
^
kernel/futex2.c:766:21: error: use of undeclared identifier 'nr_futexes'
if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
^
kernel/futex2.c:766:54: error: use of undeclared identifier 'waiters'
if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
^
kernel/futex2.c:769:50: error: use of undeclared identifier 'nr_futexes'
futexv = kmalloc((sizeof(struct futex_waiter) * nr_futexes) +
^
kernel/futex2.c:777:41: error: use of undeclared identifier 'waiters'
ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes);
^
kernel/futex2.c:777:50: error: use of undeclared identifier 'nr_futexes'
ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
vim +/COMPAT_SYSCALL_DEFINE4 +756 kernel/futex2.c
755
756 COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv
__user *, waiters,
757 unsigned int, nr_futexes, unsigned int, flags,
758 struct __kernel_timespec __user *, timo)
759 {
760 struct futex_waiter_head *futexv;
761 int ret;
762
763 if (flags & ~FUTEXV_MASK)
764 return -EINVAL;
765
766 if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
767 return -EINVAL;
768
769 futexv = kmalloc((sizeof(struct futex_waiter) * nr_futexes) +
770 sizeof(*futexv), GFP_KERNEL);
771 if (!futexv)
772 return -ENOMEM;
773
774 futexv->hint = false;
775 futexv->task = current;
776
777 ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes);
778
779 if (!ret)
780 ret = __futex_waitv(futexv, nr_futexes, timo, flags);
781
782 kfree(futexv);
783
784 return ret;
785 }
786 #endif
787
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org