Message ID | 20190904045529.23002-1-gromero@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8205d5d98ef7f155de211f5e2eb6ca03d95a5a60 |
Headers | show |
Series | [v2,1/3] powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch next (c317052c95bef1f977b023158e5aa929215f443d) |
snowpatch_ozlabs/checkpatch | warning | total: 0 errors, 2 warnings, 0 checks, 15 lines checked |
On Wed, 2019-09-04 at 04:55:27 UTC, gromero wrote: > From: Gustavo Romero <gromero@linux.ibm.com> > > When we take an FP unavailable exception in a transaction we have to > account for the hardware FP TM checkpointed registers being > incorrect. In this case for this process we know the current and > checkpointed FP registers must be the same (since FP wasn't used > inside the transaction) hence in the thread_struct we copy the current > FP registers to the checkpointed ones. ... > > This fixes CVE-2019-15030. > > Fixes: f48e91e87e67 ("powerpc/tm: Fix FP and VMX register corruption") > Cc: stable@vger.kernel.org # 4.12+ > Signed-off-by: Gustavo Romero <gromero@linux.vnet.ibm.com> > Signed-off-by: Michael Neuling <mikey@neuling.org> Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/8205d5d98ef7f155de211f5e2eb6ca03d95a5a60 cheers
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8fc4de0d22b4..437b57068cf8 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -497,13 +497,14 @@ void giveup_all(struct task_struct *tsk) if (!tsk->thread.regs) return; + check_if_tm_restore_required(tsk); + usermsr = tsk->thread.regs->msr; if ((usermsr & msr_all_available) == 0) return; msr_check_and_set(msr_all_available); - check_if_tm_restore_required(tsk); WARN_ON((usermsr & MSR_VSX) && !((usermsr & MSR_FP) && (usermsr & MSR_VEC)));