aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/kprobes.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-01-05 06:48:10 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2011-01-05 06:47:31 -0500
commit5e9a26928f550157563cfc06ce12c4ae121a02ec (patch)
treefc58668f8c6151a5f58c0430f92a0691d727af42 /arch/s390/kernel/kprobes.c
parentda7f51c11d5fedca9ba779ee220063ccb4f0a27e (diff)
[S390] ptrace cleanup
Overhaul program event recording and the code dealing with the ptrace user space interface. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/kprobes.c')
-rw-r--r--arch/s390/kernel/kprobes.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index f227f52ce913..1d05d669107c 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -175,13 +175,12 @@ static void __kprobes enable_singlestep(struct kprobe_ctlblk *kcb,
175 struct pt_regs *regs, 175 struct pt_regs *regs,
176 unsigned long ip) 176 unsigned long ip)
177{ 177{
178 per_cr_bits kprobe_per_regs[1]; 178 struct per_regs per_kprobe;
179 179
180 /* Set up the per control reg info, will pass to lctl */ 180 /* Set up the PER control registers %cr9-%cr11 */
181 memset(kprobe_per_regs, 0, sizeof(per_cr_bits)); 181 per_kprobe.control = PER_EVENT_IFETCH;
182 kprobe_per_regs[0].em_instruction_fetch = 1; 182 per_kprobe.start = ip;
183 kprobe_per_regs[0].starting_addr = ip; 183 per_kprobe.end = ip;
184 kprobe_per_regs[0].ending_addr = ip;
185 184
186 /* Save control regs and psw mask */ 185 /* Save control regs and psw mask */
187 __ctl_store(kcb->kprobe_saved_ctl, 9, 11); 186 __ctl_store(kcb->kprobe_saved_ctl, 9, 11);
@@ -189,7 +188,7 @@ static void __kprobes enable_singlestep(struct kprobe_ctlblk *kcb,
189 (PSW_MASK_PER | PSW_MASK_IO | PSW_MASK_EXT); 188 (PSW_MASK_PER | PSW_MASK_IO | PSW_MASK_EXT);
190 189
191 /* Set PER control regs, turns on single step for the given address */ 190 /* Set PER control regs, turns on single step for the given address */
192 __ctl_load(kprobe_per_regs, 9, 11); 191 __ctl_load(per_kprobe, 9, 11);
193 regs->psw.mask |= PSW_MASK_PER; 192 regs->psw.mask |= PSW_MASK_PER;
194 regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT); 193 regs->psw.mask &= ~(PSW_MASK_IO | PSW_MASK_EXT);
195 regs->psw.addr = ip | PSW_ADDR_AMODE; 194 regs->psw.addr = ip | PSW_ADDR_AMODE;