[FIX] __switch_to for x86 28/73328/3
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 3 Jun 2016 15:57:22 +0000 (18:57 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Fri, 10 Jun 2016 18:10:32 +0000 (21:10 +0300)
commit90e1564690c281ad00759b621daa41fb232a44a4
tree0be9e088c653f4ef49eda6ecd9030e5e41bd1720
parenta50333c3fa5419e94bda56bd0862f289e3dfc20d
[FIX] __switch_to for x86

In order not to miss calls __switch_to() we use special flags (which
are stored in the stack). These flags we set when enter __switch_to and
reset when return from __switch_to. If flags have been set we use
PER_CPU (exclusive for __switch_to) to store temporary values.

To identify __switch_to kretprobe we set SWITCH_TO_RP flag to next
executing process. And reset this flag in trampoline_probe_handler().

Change-Id: Id86e40853755bf9acdde642df8a7db337440e1db
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
kprobe/arch/x86/swap-asm/swap_kprobes.c
kprobe/swap_kprobes.c
kprobe/swap_kprobes.h