Re: [PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-22 Thread Breno Leitao
Hi Mikey, On 11/21/18 8:42 PM, Michael Neuling wrote: >> Do you mean in this part of code? >> >> SYSCALL_DEFINE0(rt_sigreturn) >> { >> >> if (__copy_from_user(, >uc_sigmask, sizeof(set))) >> goto badframe; >> >> ... >> if

Re: [PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-21 Thread Michael Neuling
> Do you mean in this part of code? > > SYSCALL_DEFINE0(rt_sigreturn) > { > > if (__copy_from_user(, >uc_sigmask, sizeof(set))) > goto badframe; > > ... > if (MSR_TM_SUSPENDED(mfmsr())) > tm_reclaim_current(0); I'm actually

Re: [PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-21 Thread Breno Leitao
hi Michael, On 11/20/18 8:34 AM, Michael Ellerman wrote: > Hi Breno, > > Thanks for chasing this one down. > > Breno Leitao writes: > >> On a signal handler return, the user could set a context with MSR[TS] bits >> set, and these bits would be copied to task regs->msr. >> >> At

Re: [PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-21 Thread Breno Leitao
hi Mikey, On 11/19/18 9:30 PM, Michael Neuling wrote: > On Mon, 2018-11-19 at 10:44 -0200, Breno Leitao wrote: >> On a signal handler return, the user could set a context with MSR[TS] bits >> set, and these bits would be copied to task regs->msr. >> >> At restore_tm_sigcontexts(), after current

Re: [PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-20 Thread Michael Ellerman
Hi Breno, Thanks for chasing this one down. Breno Leitao writes: > On a signal handler return, the user could set a context with MSR[TS] bits > set, and these bits would be copied to task regs->msr. > > At restore_tm_sigcontexts(), after current task regs->msr[TS] bits are set, > several

Re: [PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-19 Thread Michael Neuling
On Mon, 2018-11-19 at 10:44 -0200, Breno Leitao wrote: > On a signal handler return, the user could set a context with MSR[TS] bits > set, and these bits would be copied to task regs->msr. > > At restore_tm_sigcontexts(), after current task regs->msr[TS] bits are set, > several __get_user() are

[PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-19 Thread Breno Leitao
On a signal handler return, the user could set a context with MSR[TS] bits set, and these bits would be copied to task regs->msr. At restore_tm_sigcontexts(), after current task regs->msr[TS] bits are set, several __get_user() are called and then a recheckpoint is executed. This is a problem