[IMPROVE] remove atomic context from kprobe handler 23/69323/4
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 10 May 2016 12:41:00 +0000 (15:41 +0300)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Wed, 18 May 2016 10:46:16 +0000 (03:46 -0700)
commitecd0f98c3d511cc3ddbb8bf9092986458faa106d
tree7d6ac67a34d3340eb26090c13db49a6520dd42a6
parentaa9bf32e9fbb3823555f49bb26af1a2c047b6309
[IMPROVE] remove atomic context from kprobe handler

Changes:
1. Kprobe redesign.
2. Current kprobe state saved in stack (thread context) or
in per_cpu_kpc_data (interrupt context).

for ARM:
In kprobe handler irq is turned on, if kprobe was fired in
non-irq context.

for x86:
Breakpoint is processed in several stages:
1. Save regs and change ip on exec_trampoline().
2. Call handlers in original context.
3. Restore regs and changed instruction processing.

Change-Id: I0b8d007eafddaabffd3a030a7a9aaa7ebf1642f3
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
12 files changed:
energy/energy.c
kprobe/arch/arm/swap-asm/swap_kprobes.c
kprobe/arch/arm/swap-asm/swap_kprobes.h
kprobe/arch/x86/swap-asm/swap_kprobes.c
kprobe/arch/x86/swap-asm/swap_kprobes.h
kprobe/swap_kprobes.c
kprobe/swap_kprobes.h
ks_features/ks_features.c
ks_manager/ks_manager.c
task_ctx/task_ctx.c
uprobe/arch/x86/swap-asm/swap_uprobes.c
us_manager/helper.c