summaryrefslogtreecommitdiff
path: root/samples/kprobes
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2017-09-14 14:11:15 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-09-28 07:29:41 +0200
commite16c5dd5157efeddaad7492b920192fea0e7e4ec (patch)
treef1513f28374fc2a907e2ac8e51034e10d8d0dc73 /samples/kprobes
parent262832bc5acda76fd8f901d39f4da1121d951222 (diff)
downloadlwn-e16c5dd5157efeddaad7492b920192fea0e7e4ec.tar.gz
lwn-e16c5dd5157efeddaad7492b920192fea0e7e4ec.zip
samples/kprobes: Add s390 case in kprobe example module
Add info prints in sample kprobe handlers for S/390 Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'samples/kprobes')
-rw-r--r--samples/kprobes/kprobe_example.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c
index 88b3e2d227ae..67de3b774bc9 100644
--- a/samples/kprobes/kprobe_example.c
+++ b/samples/kprobes/kprobe_example.c
@@ -47,6 +47,10 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs)
" pstate = 0x%lx\n",
p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate);
#endif
+#ifdef CONFIG_S390
+ pr_info("<%s> pre_handler: p->addr, 0x%p, ip = 0x%lx, flags = 0x%lx\n",
+ p->symbol_name, p->addr, regs->psw.addr, regs->flags);
+#endif
/* A dump_stack() here will give a stack backtrace */
return 0;
@@ -76,6 +80,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs,
pr_info("<%s> post_handler: p->addr = 0x%p, pstate = 0x%lx\n",
p->symbol_name, p->addr, (long)regs->pstate);
#endif
+#ifdef CONFIG_S390
+ pr_info("<%s> pre_handler: p->addr, 0x%p, flags = 0x%lx\n",
+ p->symbol_name, p->addr, regs->flags);
+#endif
}
/*