On 1/8/19 2:43 PM, Breno Leitao wrote: >> Most likely this was introduced by (Cc'ed) >> >> | commit 31d30f00e798eb3f18726a58c31f3edacd6f590d >> | Author: Breno Leitao <leitao@xxxxxxxxxx> >> | Date: Wed Nov 21 17:21:09 2018 -0200 >> | >> | powerpc/tm: Set MSR[TS] just prior to recheckpoint >> >> FWIW, CONFIG_PPC_TRANSACTIONAL_MEM is not set but perhaps should, will >> do more checks later. > > That should be the case, I am wondering if this problem should be happening > on upstream as well. > > Anyway, I will send a patch soon to get this fixed. I think we will need a patch like the one below. I will check if this fix is OK with the powerpc maintainer later today. Once I heard from him, I will submit a final fix (probably earlier tomorrow) diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index bd5e6834ca69..a230c89c4270 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c @@ -756,9 +756,9 @@ SYSCALL_DEFINE0(rt_sigreturn) &uc_transact->uc_mcontext)) goto badframe; } -#endif /* Fall through, for non-TM restore */ if (!MSR_TM_ACTIVE(msr)) { +#endif /* * Unset MSR[TS] on the thread regs since MSR from user * context does not have MSR active, and recheckpoint was @@ -772,7 +772,9 @@ SYSCALL_DEFINE0(rt_sigreturn) current->thread.regs->msr &= ~MSR_TS_MASK; if (restore_sigcontext(current, NULL, 1, &uc->uc_mcontext)) goto badframe; +#ifdef CONFIG_PPC_TRANSACTIONAL_MEM } +#endif if (restore_altstack(&uc->uc_stack)) goto badframe;