All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [zen-kernel-zen-kernel:5.12/futex2 4/14] kernel/futex2.c:1077:30: error: variable has incomplete type 'struct compat_futex_requeue'
Date: Wed, 05 May 2021 09:08:52 +0800	[thread overview]
Message-ID: <202105050949.0JLrwZJT-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 7606 bytes --]

tree:   https://github.com/zen-kernel/zen-kernel 5.12/futex2
head:   5932045f3f84865548199be0695192a500fbb5cb
commit: 270e16f72b29d04a83645b653e9fc65be51801d2 [4/14] futex2: Implement requeue operation
config: powerpc64-randconfig-r025-20210503 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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/270e16f72b29d04a83645b653e9fc65be51801d2
        git remote add zen-kernel-zen-kernel https://github.com/zen-kernel/zen-kernel
        git fetch --no-tags zen-kernel-zen-kernel 5.12/futex2
        git checkout 270e16f72b29d04a83645b653e9fc65be51801d2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64 

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

All error/warnings (new ones prefixed by >>):

   kernel/futex2.c:711: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:714:28: error: variable has incomplete type 'struct compat_futex_waitv'
           struct compat_futex_waitv waitv;
                                     ^
   kernel/futex2.c:711:16: note: forward declaration of 'struct compat_futex_waitv'
                                       struct compat_futex_waitv __user *uwaitv,
                                              ^
   kernel/futex2.c:719:37: error: subscript of pointer to incomplete type 'struct compat_futex_waitv'
                   if (copy_from_user(&waitv, &uwaitv[i], sizeof(waitv)))
                                               ~~~~~~^
   kernel/futex2.c:711:16: note: forward declaration of 'struct compat_futex_waitv'
                                       struct compat_futex_waitv __user *uwaitv,
                                              ^
   kernel/futex2.c:728:31: error: implicit declaration of function 'compat_ptr' [-Werror,-Wimplicit-function-declaration]
                   futexv->objects[i].uaddr  = compat_ptr(waitv.uaddr);
                                               ^
   kernel/futex2.c:747:37: error: expected identifier
   COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
                                       ^
   kernel/futex2.c:754:6: error: use of undeclared identifier 'flags'
           if (flags & ~FUTEXV_MASK)
               ^
   kernel/futex2.c:757:7: error: use of undeclared identifier 'nr_futexes'
           if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
                ^
   kernel/futex2.c:757:21: error: use of undeclared identifier 'nr_futexes'
           if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
                              ^
   kernel/futex2.c:757:54: error: use of undeclared identifier 'waiters'
           if (!nr_futexes || nr_futexes > FUTEX_WAITV_MAX || !waiters)
                                                               ^
   kernel/futex2.c:760:50: error: use of undeclared identifier 'nr_futexes'
           futexv = kmalloc((sizeof(struct futex_waiter) * nr_futexes) +
                                                           ^
   kernel/futex2.c:768:41: error: use of undeclared identifier 'waiters'
           ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes);
                                                  ^
   kernel/futex2.c:768:50: error: use of undeclared identifier 'nr_futexes'
           ret = compat_futex_parse_waitv(futexv, waiters, nr_futexes);
                                                           ^
   kernel/futex2.c:771:31: error: use of undeclared identifier 'nr_futexes'
                   ret = __futex_waitv(futexv, nr_futexes, timo, flags);
                                               ^
   kernel/futex2.c:771:43: error: use of undeclared identifier 'timo'
                   ret = __futex_waitv(futexv, nr_futexes, timo, flags);
                                                           ^
   kernel/futex2.c:771:49: error: use of undeclared identifier 'flags'
                   ret = __futex_waitv(futexv, nr_futexes, timo, flags);
                                                                 ^
   kernel/futex2.c:747:1: warning: no previous prototype for function 'COMPAT_SYSCALL_DEFINE4' [-Wmissing-prototypes]
   COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
   ^
   kernel/futex2.c:747:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
   ^
   static 
   kernel/futex2.c:747:23: error: this old-style function definition is not preceded by a prototype [-Werror,-Wstrict-prototypes]
   COMPAT_SYSCALL_DEFINE4(futex_waitv, struct compat_futex_waitv __user *, waiters,
                         ^
>> kernel/futex2.c:1074:18: warning: declaration of 'struct compat_futex_requeue' will not be visible outside of this function [-Wvisibility]
                                         struct compat_futex_requeue __user *uaddr,
                                                ^
>> kernel/futex2.c:1077:30: error: variable has incomplete type 'struct compat_futex_requeue'
           struct compat_futex_requeue tmp;
                                       ^
   kernel/futex2.c:1074:18: note: forward declaration of 'struct compat_futex_requeue'
                                         struct compat_futex_requeue __user *uaddr,
                                                ^
   kernel/futex2.c:1088:14: error: implicit declaration of function 'compat_ptr' [-Werror,-Wimplicit-function-declaration]
           rq->uaddr = compat_ptr(tmp.uaddr);
                       ^
   kernel/futex2.c:1094:39: error: expected identifier
   COMPAT_SYSCALL_DEFINE6(futex_requeue, struct compat_futex_requeue __user *, uaddr1,
                                         ^
   kernel/futex2.c:1103:6: error: use of undeclared identifier 'flags'
           if (flags)
               ^
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   3 warnings and 20 errors generated.


vim +1077 kernel/futex2.c

  1071	
  1072	#ifdef CONFIG_COMPAT
  1073	static int compat_futex_parse_requeue(struct futex_requeue *rq,
> 1074					      struct compat_futex_requeue __user *uaddr,
  1075					      bool *shared)
  1076	{
> 1077		struct compat_futex_requeue tmp;
  1078	
  1079		if (copy_from_user(&tmp, uaddr, sizeof(tmp)))
  1080			return -EFAULT;
  1081	
  1082		if (tmp.flags & ~FUTEXV_WAITER_MASK ||
  1083		    (tmp.flags & FUTEX_SIZE_MASK) != FUTEX_32)
  1084			return -EINVAL;
  1085	
  1086		*shared = (tmp.flags & FUTEX_SHARED_FLAG) ? true : false;
  1087	
  1088		rq->uaddr = compat_ptr(tmp.uaddr);
  1089		rq->flags = tmp.flags;
  1090	
  1091		return 0;
  1092	}
  1093	

---
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: 30268 bytes --]

                 reply	other threads:[~2021-05-05  1:08 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=202105050949.0JLrwZJT-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.