On Fri, Mar 19, 2021 at 11:06:57AM +0000, Christophe Leroy wrote:
> Convert restore_user_regs() and restore_tm_user_regs()
> to use user_access_read_begin/end blocks.
> 
> Signed-off-by: Christophe Leroy <christophe.le...@csgroup.eu>
> ---
...
>  static long restore_user_regs(struct pt_regs *regs,
>                             struct mcontext __user *sr, int sig)
>  {
...
> @@ -567,19 +569,22 @@ static long restore_user_regs(struct pt_regs *regs,
>       regs->msr &= ~MSR_SPE;
>       if (msr & MSR_SPE) {
>               /* restore spe registers from the stack */
> -             if (__copy_from_user(current->thread.evr, &sr->mc_vregs,
> -                                  ELF_NEVRREG * sizeof(u32)))
> -                     return 1;
> +             unsafe_copy_from_user(current->thread.evr, &sr->mc_vregs,
> +                                   ELF_NEVRREG * sizeof(u32));

arch/powerpc/kernel/signal_32.c: In function 'restore_user_regs':
arch/powerpc/kernel/signal_32.c:565:36: error: macro "unsafe_copy_from_user" 
requires 4 arguments, but only 3 given

Guenter

Reply via email to