]> 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)
commit3cfbe0321e0fa60d50a9798ffb80a10de681a514
tree3231ff5c12366200c5f5d48e654415e628a231f0
parentc57ad1fd81a42d062a44f4846cc1e12b9ee8872d
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