* [PATCH] samples/kprobes: Add s390 case in kprobe example module
@ 2017-09-14 12:11 Johannes Thumshirn
2017-09-15 13:16 ` Heiko Carstens
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2017-09-14 12:11 UTC (permalink / raw)
To: Martin Schwidefsky, Heiko Carstens
Cc: linux-s390, Linux Kernel Mailinglist, Johannes Thumshirn
Add info prints in sample kprobe handlers for S/390
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
samples/kprobes/kprobe_example.c | 8 ++++++++
1 file changed, 8 insertions(+)
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
}
/*
--
2.13.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] samples/kprobes: Add s390 case in kprobe example module
2017-09-14 12:11 [PATCH] samples/kprobes: Add s390 case in kprobe example module Johannes Thumshirn
@ 2017-09-15 13:16 ` Heiko Carstens
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2017-09-15 13:16 UTC (permalink / raw)
To: Johannes Thumshirn
Cc: Martin Schwidefsky, linux-s390, Linux Kernel Mailinglist
On Thu, Sep 14, 2017 at 02:11:15PM +0200, Johannes Thumshirn wrote:
> Add info prints in sample kprobe handlers for S/390
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
> samples/kprobes/kprobe_example.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-15 13:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 12:11 [PATCH] samples/kprobes: Add s390 case in kprobe example module Johannes Thumshirn
2017-09-15 13:16 ` Heiko Carstens
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.