Re: [PATCH] powerpc/tm: Fix userspace r13 corruption

2018-09-25 Thread Breno Leitao
Hi Mikey, On 09/25/2018 02:24 AM, Michael Neuling wrote: > On Mon, 2018-09-24 at 11:32 -0300, Breno Leitao wrote: >> Hi Mikey, >> >> On 09/24/2018 04:27 AM, Michael Neuling wrote: >>> When we treclaim we store the userspace checkpointed r13 to a scratch >>> SPR and then later save the scratch SPR

Re: [PATCH] powerpc/tm: Fix userspace r13 corruption

2018-09-24 Thread Michael Neuling
On Mon, 2018-09-24 at 11:32 -0300, Breno Leitao wrote: > Hi Mikey, > > On 09/24/2018 04:27 AM, Michael Neuling wrote: > > When we treclaim we store the userspace checkpointed r13 to a scratch > > SPR and then later save the scratch SPR to the user thread struct. > > > > Unfortunately, this

Re: [PATCH] powerpc/tm: Fix userspace r13 corruption

2018-09-24 Thread Breno Leitao
Hi Mikey, On 09/24/2018 04:27 AM, Michael Neuling wrote: > When we treclaim we store the userspace checkpointed r13 to a scratch > SPR and then later save the scratch SPR to the user thread struct. > > Unfortunately, this doesn't work as accessing the user thread struct > can take an SLB fault

[PATCH] powerpc/tm: Fix userspace r13 corruption

2018-09-24 Thread Michael Neuling
When we treclaim we store the userspace checkpointed r13 to a scratch SPR and then later save the scratch SPR to the user thread struct. Unfortunately, this doesn't work as accessing the user thread struct can take an SLB fault and the SLB fault handler will write the same scratch SPRG that now