]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/kprobe: Complete kprobe and migrate exception frame
authorTiejun Chen <tiejun.chen@windriver.com>
Sun, 16 Sep 2012 23:54:30 +0000 (23:54 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 18 Sep 2012 05:32:42 +0000 (15:32 +1000)
commit319b7d33280a31e6fc35aa32d2454238a57faa11
tree3231ff5c12366200c5f5d48e654415e628a231f0
parentc8f097645ca96235fd23cc0f3014168a2af87c4a
powerpc/kprobe: Complete kprobe and migrate exception frame

We can't emulate stwu since that may corrupt current exception stack.
So we will have to do real store operation in the exception return code.

Firstly we'll allocate a trampoline exception frame below the kprobed
function stack and copy the current exception frame to the trampoline.
Then we can do this real store operation to implement 'stwu', and reroute
the trampoline frame to r1 to complete this exception migration.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/entry_32.S
arch/powerpc/kernel/entry_64.S