Le 27/08/2020 à 11:07, kernel test robot a écrit :
Hi Christophe,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on linus/master v5.9-rc2 next-20200827]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    
https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-Switch-signal-32-to-using-unsafe_put_user-and-friends/20200819-012411
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r005-20200827 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.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
         # save the attached .config to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=powerpc64

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

All errors (new ones prefixed by >>):

    arch/powerpc/kernel/signal_32.c: In function 'save_user_regs_unsafe':
arch/powerpc/kernel/signal_32.c:314:34: error: macro "unsafe_copy_to_user" 
requires 4 arguments, but only 3 given
      314 |         ELF_NEVRREG * sizeof(u32)), failed);
          |                                  ^
    In file included from include/linux/uaccess.h:9,
                     from include/linux/sched/task.h:11,
                     from include/linux/sched/signal.h:9,
                     from include/linux/rcuwait.h:6,
                     from include/linux/percpu-rwsem.h:7,
                     from include/linux/fs.h:33,
                     from include/linux/huge_mm.h:8,
                     from include/linux/mm.h:672,
                     from arch/powerpc/kernel/signal_32.c:17:
    arch/powerpc/include/asm/uaccess.h:605: note: macro "unsafe_copy_to_user" 
defined here
      605 | #define unsafe_copy_to_user(d, s, l, e) \
          |
arch/powerpc/kernel/signal_32.c:313:3: error: 'unsafe_copy_to_user' undeclared 
(first use in this function); did you mean 'raw_copy_to_user'?
      313 |   unsafe_copy_to_user(&frame->mc_vregs, current->thread.evr,
          |   ^~~~~~~~~~~~~~~~~~~
          |   raw_copy_to_user
    arch/powerpc/kernel/signal_32.c:313:3: note: each undeclared identifier is 
reported only once for each function it appears in
arch/powerpc/kernel/signal_32.c:314:37: error: 'failed' undeclared (first use 
in this function)
      314 |         ELF_NEVRREG * sizeof(u32)), failed);
          |                                     ^~~~~~
    arch/powerpc/kernel/signal_32.c:314:35: warning: left-hand operand of comma 
expression has no effect [-Wunused-value]
      314 |         ELF_NEVRREG * sizeof(u32)), failed);
          |                                   ^
arch/powerpc/kernel/signal_32.c:314:43: error: expected ';' before ')' token
      314 |         ELF_NEVRREG * sizeof(u32)), failed);
          |                                           ^
          |                                           ;
arch/powerpc/kernel/signal_32.c:314:43: error: expected statement before ')' 
token


Should be fixed by:

diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index f795fe0240a1..123682299d4f 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -311,7 +311,7 @@ static int save_user_regs_unsafe(struct pt_regs *regs, struct mcontext __user *f
        /* save spe registers */
        if (current->thread.used_spe) {
                unsafe_copy_to_user(&frame->mc_vregs, current->thread.evr,
-                                   ELF_NEVRREG * sizeof(u32)), failed);
+                                   ELF_NEVRREG * sizeof(u32), failed);
                /* set MSR_SPE in the saved MSR value to indicate that
                   frame->mc_vregs contains valid data */
                msr |= MSR_SPE;

---
Christophe

Reply via email to