linux_dsm_epyc7002/Documentation/powerpc
Michael Neuling 2b3f8e87cf powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions
When in an active transaction that takes a signal, we need to be careful with
the stack.  It's possible that the stack has moved back up after the tbegin.
The obvious case here is when the tbegin is called inside a function that
returns before a tend.  In this case, the stack is part of the checkpointed
transactional memory state.  If we write over this non transactionally or in
suspend, we are in trouble because if we get a tm abort, the program counter
and stack pointer will be back at the tbegin but our in memory stack won't be
valid anymore.

To avoid this, when taking a signal in an active transaction, we need to use
the stack pointer from the checkpointed state, rather than the speculated
state.  This ensures that the signal context (written tm suspended) will be
written below the stack required for the rollback.  The transaction is aborted
becuase of the treclaim, so any memory written between the tbegin and the
signal will be rolled back anyway.

For signals taken in non-TM or suspended mode, we use the
normal/non-checkpointed stack pointer.

Tested with 64 and 32 bit signals

Signed-off-by: Michael Neuling <mikey@neuling.org>
Cc: <stable@vger.kernel.org> # v3.9
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2013-06-01 08:29:23 +10:00
..
00-INDEX powerpc: remove PReP platform 2013-04-18 13:03:53 +10:00
bootwrapper.txt powerpc/bootwrapper: Add documentation of boot wrapper targets 2008-07-04 00:59:03 -06:00
cpu_features.txt Documentation/powerpc: Fix path to the powerpc directory 2013-01-10 17:01:50 +11:00
eeh-pci-error-recovery.txt powerpc: Move include files to arch/powerpc/include/asm 2008-08-04 12:02:00 +10:00
firmware-assisted-dump.txt fadump: Add documentation for firmware-assisted dump. 2012-02-23 10:50:00 +11:00
hvcs.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
kvm_440.txt KVM: ppc: PowerPC 440 KVM implementation 2008-04-27 18:21:39 +03:00
mpc52xx.txt Documentation/powerpc/mpc52xx.txt: Checkpatch cleanup 2012-03-18 23:59:34 +01:00
ptrace.txt powerpc/ptrace: Add DAWR debug feature info for userspace 2013-04-18 15:59:55 +10:00
qe_firmware.txt trivial: Miscellaneous documentation typo fixes 2009-06-12 18:01:47 +02:00
transactional_memory.txt powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions 2013-06-01 08:29:23 +10:00