Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e16c5dd5 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Martin Schwidefsky
Browse files

samples/kprobes: Add s390 case in kprobe example module



Add info prints in sample kprobe handlers for S/390

Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 262832bc
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -47,6 +47,10 @@ static int handler_pre(struct kprobe *p, struct pt_regs *regs)
			" pstate = 0x%lx\n",
			" pstate = 0x%lx\n",
		p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate);
		p->symbol_name, p->addr, (long)regs->pc, (long)regs->pstate);
#endif
#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 */
	/* A dump_stack() here will give a stack backtrace */
	return 0;
	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",
	pr_info("<%s> post_handler: p->addr = 0x%p, pstate = 0x%lx\n",
		p->symbol_name, p->addr, (long)regs->pstate);
		p->symbol_name, p->addr, (long)regs->pstate);
#endif
#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
}
}


/*
/*