diff options
author | Michael Neuling <mikey@neuling.org> | 2018-09-24 17:27:04 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-09-25 22:51:08 +1000 |
commit | cf13435b730a502e814c63c84d93db131e563f5f (patch) | |
tree | 46d7d088182d0ca86b7f5b7b45ecbf5dfa82e66f /certs | |
parent | 8604895a34d92f5e186ceb931b0d1b384030ea3d (diff) | |
download | linux-cf13435b730a502e814c63c84d93db131e563f5f.tar.bz2 |
powerpc/tm: Fix userspace r13 corruption
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 contains the userspace r13.
To fix this, we store r13 to the kernel stack (which can't fault)
before we access the user thread struct.
Found by running P8 guest + powervm + disable_1tb_segments + TM. Seen
as a random userspace segfault with r13 looking like a kernel address.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Reviewed-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions