Message ID | 20211221025012.1057923-7-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | linux-user: nios2 fixes | expand |
Le 21/12/2021 à 03:50, Richard Henderson a écrit : > Do not cast the signal mask elements; trust __put_user. > > Reviewed-by: Laurent Vivier <laurent@vivier.eu> > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/nios2/signal.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c > index 20b65aa06e..80e3d42fc9 100644 > --- a/linux-user/nios2/signal.c > +++ b/linux-user/nios2/signal.c > @@ -168,8 +168,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, > target_save_altstack(&frame->uc.tuc_stack, env); > rt_setup_ucontext(&frame->uc, env); > for (i = 0; i < TARGET_NSIG_WORDS; i++) { > - __put_user((abi_ulong)set->sig[i], > - (abi_ulong *)&frame->uc.tuc_sigmask.sig[i]); > + __put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i]); > } > > /* Set up to return from userspace; jump to fixed address sigreturn Applied to my linux-user-for-7.0 branch. Thanks, Laurent
diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c index 20b65aa06e..80e3d42fc9 100644 --- a/linux-user/nios2/signal.c +++ b/linux-user/nios2/signal.c @@ -168,8 +168,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka, target_save_altstack(&frame->uc.tuc_stack, env); rt_setup_ucontext(&frame->uc, env); for (i = 0; i < TARGET_NSIG_WORDS; i++) { - __put_user((abi_ulong)set->sig[i], - (abi_ulong *)&frame->uc.tuc_sigmask.sig[i]); + __put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i]); } /* Set up to return from userspace; jump to fixed address sigreturn