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

Michael Neuling mikey at neuling.org
Thu Nov 22 09:42:57 AEDT 2018


> Do you mean in this part of code?
> 
>   SYSCALL_DEFINE0(rt_sigreturn)
>   {
> 	....
>         if (__copy_from_user(&set, &uc->uc_sigmask, sizeof(set)))
>                 goto badframe;
> 
> 	...
>         if (MSR_TM_SUSPENDED(mfmsr()))
>                 tm_reclaim_current(0);

I'm actually thinking after the reclaim, not before.

If I follow your original email properly, you have a problem because you end up
in this senario:
1) Current MSR is not TM suspended
2) regs->msr[TS] set
3) get_user() (which may fault)

After the tm_reclaim there are cases in restore_tm_sigcontexts() where the above
is also the case. Hence why I think we have a problem there too.

Mikey


More information about the Linuxppc-dev mailing list