diff options
| author | Johannes Thumshirn <jthumshirn@suse.de> | 2017-09-14 08:11:15 -0400 |
|---|---|---|
| committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-09-28 01:29:41 -0400 |
| commit | e16c5dd5157efeddaad7492b920192fea0e7e4ec (patch) | |
| tree | f1513f28374fc2a907e2ac8e51034e10d8d0dc73 /samples | |
| parent | 262832bc5acda76fd8f901d39f4da1121d951222 (diff) | |
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')
| -rw-r--r-- | samples/kprobes/kprobe_example.c | 8 |
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) | |||
| 47 | " pstate = 0x%lx\n", | 47 | " pstate = 0x%lx\n", |
| 48 | p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate); | 48 | p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate); |
| 49 | #endif | 49 | #endif |
| 50 | #ifdef CONFIG_S390 | ||
| 51 | pr_info("<%s> pre_handler: p->addr, 0x%p, ip = 0x%lx, flags = 0x%lx\n", | ||
| 52 | p->symbol_name, p->addr, regs->psw.addr, regs->flags); | ||
| 53 | #endif | ||
| 50 | 54 | ||
| 51 | /* A dump_stack() here will give a stack backtrace */ | 55 | /* A dump_stack() here will give a stack backtrace */ |
| 52 | return 0; | 56 | return 0; |
| @@ -76,6 +80,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs, | |||
| 76 | pr_info("<%s> post_handler: p->addr = 0x%p, pstate = 0x%lx\n", | 80 | pr_info("<%s> post_handler: p->addr = 0x%p, pstate = 0x%lx\n", |
| 77 | p->symbol_name, p->addr, (long)regs->pstate); | 81 | p->symbol_name, p->addr, (long)regs->pstate); |
| 78 | #endif | 82 | #endif |
| 83 | #ifdef CONFIG_S390 | ||
| 84 | pr_info("<%s> pre_handler: p->addr, 0x%p, flags = 0x%lx\n", | ||
| 85 | p->symbol_name, p->addr, regs->flags); | ||
| 86 | #endif | ||
| 79 | } | 87 | } |
| 80 | 88 | ||
| 81 | /* | 89 | /* |
