Re: [PATCH 7/7] powerpc/signal: Use unsafe_copy_siginfo_to_user()
From: Christophe Leroy <hidden>
Date: 2021-06-15 07:01:14
Also in:
lkml
From: Christophe Leroy <hidden>
Date: 2021-06-15 07:01:14
Also in:
lkml
Le 15/06/2021 à 08:55, Christoph Hellwig a écrit :
quoted
@@ -836,14 +830,19 @@ int handle_rt_signal32(struct ksignal *ksig, sigset_t *oldset, asm("dcbst %y0; sync; icbi %y0; sync" :: "Z" (mctx->mc_pad[0])); } unsafe_put_sigset_t(&frame->uc.uc_sigmask, oldset, failed); +#ifndef CONFIG_COMPAT + unsafe_copy_siginfo_to_user(&frame->info, &ksig->info, failed); +#endif /* create a stack frame for the caller of the handler */ unsafe_put_user(regs->gpr[1], newsp, failed); user_access_end(); - if (copy_siginfo_to_user(&frame->info, &ksig->info)) +#ifdef CONFIG_COMPAT + if (copy_siginfo_to_user32(&frame->info, &ksig->info)) goto badframe; +#endifShouldn't the compat case be handled the same way?
It would be best, but it is not that easy to convert. So for the time being it is left aside, anyway compat is for compatibility, so performance doesn't matter so much.