From: Johannes Thumshirn Date: Thu, 14 Sep 2017 12:11:15 +0000 (+0200) Subject: samples/kprobes: Add s390 case in kprobe example module X-Git-Tag: v5.15~10070^2~74 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e16c5dd5157efeddaad7492b920192fea0e7e4ec;p=platform%2Fkernel%2Flinux-starfive.git samples/kprobes: Add s390 case in kprobe example module Add info prints in sample kprobe handlers for S/390 Signed-off-by: Johannes Thumshirn Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/samples/kprobes/kprobe_example.c b/samples/kprobes/kprobe_example.c index 88b3e2d..67de3b7 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 } /*