Re: [PATCH] powerpc/tm: Avoid possible userspace r1 corruption on reclaim

2018-09-27 Thread Michael Ellerman
Michael Neuling writes: > On Tue, 2018-09-25 at 22:00 +1000, Michael Ellerman wrote: >> Michael Neuling writes: >> > Current we store the userspace r1 to PACATMSCRATCH before finally >> > saving it to the thread struct. >> > >> > In theory an exception could be taken here (like a machine check

Re: [PATCH] powerpc/tm: Avoid possible userspace r1 corruption on reclaim

2018-09-25 Thread Michael Neuling
On Tue, 2018-09-25 at 22:00 +1000, Michael Ellerman wrote: > Michael Neuling writes: > > Current we store the userspace r1 to PACATMSCRATCH before finally > > saving it to the thread struct. > > > > In theory an exception could be taken here (like a machine check or > > SLB miss) that could

Re: [PATCH] powerpc/tm: Avoid possible userspace r1 corruption on reclaim

2018-09-25 Thread Michael Ellerman
Michael Neuling writes: > Current we store the userspace r1 to PACATMSCRATCH before finally > saving it to the thread struct. > > In theory an exception could be taken here (like a machine check or > SLB miss) that could write PACATMSCRATCH and hence corrupt the > userspace r1. The SLB fault

[PATCH] powerpc/tm: Avoid possible userspace r1 corruption on reclaim

2018-09-25 Thread Michael Neuling
Current we store the userspace r1 to PACATMSCRATCH before finally saving it to the thread struct. In theory an exception could be taken here (like a machine check or SLB miss) that could write PACATMSCRATCH and hence corrupt the userspace r1. The SLB fault currently doesn't touch PACATMSCRATCH,