aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/kprobes.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-09-07 02:19:51 -0400
committerIngo Molnar <mingo@elte.hu>2009-09-07 02:19:51 -0400
commita1922ed661ab2c1637d0b10cde933bd9cd33d965 (patch)
tree0f1777542b385ebefd30b3586d830fd8ed6fda5b /arch/s390/kernel/kprobes.c
parent75e33751ca8bbb72dd6f1a74d2810ddc8cbe4bdf (diff)
parentd28daf923ac5e4a0d7cecebae56f3e339189366b (diff)
Merge branch 'tracing/core' into tracing/hw-breakpoints
Conflicts: arch/Kconfig kernel/trace/trace.h Merge reason: resolve the conflicts, plus adopt to the new ring-buffer APIs. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/s390/kernel/kprobes.c')
-rw-r--r--arch/s390/kernel/kprobes.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index 9bb2f6241d9f..86783efa24ee 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -154,39 +154,35 @@ void __kprobes get_instruction_type(struct arch_specific_insn *ainsn)
154 154
155static int __kprobes swap_instruction(void *aref) 155static int __kprobes swap_instruction(void *aref)
156{ 156{
157 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
158 unsigned long status = kcb->kprobe_status;
157 struct ins_replace_args *args = aref; 159 struct ins_replace_args *args = aref;
160 int rc;
158 161
159 return probe_kernel_write(args->ptr, &args->new, sizeof(args->new)); 162 kcb->kprobe_status = KPROBE_SWAP_INST;
163 rc = probe_kernel_write(args->ptr, &args->new, sizeof(args->new));
164 kcb->kprobe_status = status;
165 return rc;
160} 166}
161 167
162void __kprobes arch_arm_kprobe(struct kprobe *p) 168void __kprobes arch_arm_kprobe(struct kprobe *p)
163{ 169{
164 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
165 unsigned long status = kcb->kprobe_status;
166 struct ins_replace_args args; 170 struct ins_replace_args args;
167 171
168 args.ptr = p->addr; 172 args.ptr = p->addr;
169 args.old = p->opcode; 173 args.old = p->opcode;
170 args.new = BREAKPOINT_INSTRUCTION; 174 args.new = BREAKPOINT_INSTRUCTION;
171
172 kcb->kprobe_status = KPROBE_SWAP_INST;
173 stop_machine(swap_instruction, &args, NULL); 175 stop_machine(swap_instruction, &args, NULL);
174 kcb->kprobe_status = status;
175} 176}
176 177
177void __kprobes arch_disarm_kprobe(struct kprobe *p) 178void __kprobes arch_disarm_kprobe(struct kprobe *p)
178{ 179{
179 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
180 unsigned long status = kcb->kprobe_status;
181 struct ins_replace_args args; 180 struct ins_replace_args args;
182 181
183 args.ptr = p->addr; 182 args.ptr = p->addr;
184 args.old = BREAKPOINT_INSTRUCTION; 183 args.old = BREAKPOINT_INSTRUCTION;
185 args.new = p->opcode; 184 args.new = p->opcode;
186
187 kcb->kprobe_status = KPROBE_SWAP_INST;
188 stop_machine(swap_instruction, &args, NULL); 185 stop_machine(swap_instruction, &args, NULL);
189 kcb->kprobe_status = status;
190} 186}
191 187
192void __kprobes arch_remove_kprobe(struct kprobe *p) 188void __kprobes arch_remove_kprobe(struct kprobe *p)