Skip to content

Commit e16c5dd

Browse files
Johannes ThumshirnMartin Schwidefsky
authored andcommitted
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>
1 parent 262832b commit e16c5dd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎samples/kprobes/kprobe_example.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs)
4747
" pstate = 0x%lx\n",
4848
p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate);
4949
#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
5054

5155
/* A dump_stack() here will give a stack backtrace */
5256
return 0;
@@ -76,6 +80,10 @@ static void handler_post(struct kprobe *p, struct pt_regs *regs,
7680
pr_info("<%s> post_handler: p->addr = 0x%p, pstate = 0x%lx\n",
7781
p->symbol_name, p->addr, (long)regs->pstate);
7882
#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
7987
}
8088

8189
/*

0 commit comments

Comments
 (0)