Linux 4.8-rc8
[linux/fpc-iii.git] / arch / s390 / include / asm / uprobes.h
blob1411dff7fea75abd9b942c279ffc09929ae11fc7
1 /*
2 * User-space Probes (UProbes) for s390
4 * Copyright IBM Corp. 2014
5 * Author(s): Jan Willeke,
6 */
8 #ifndef _ASM_UPROBES_H
9 #define _ASM_UPROBES_H
11 #include <linux/notifier.h>
13 typedef u16 uprobe_opcode_t;
15 #define UPROBE_XOL_SLOT_BYTES 256 /* cache aligned */
17 #define UPROBE_SWBP_INSN 0x0002
18 #define UPROBE_SWBP_INSN_SIZE 2
20 struct arch_uprobe {
21 union{
22 uprobe_opcode_t insn[3];
23 uprobe_opcode_t ixol[3];
25 unsigned int saved_per : 1;
26 unsigned int saved_int_code;
29 struct arch_uprobe_task {
32 int arch_uprobe_analyze_insn(struct arch_uprobe *aup, struct mm_struct *mm,
33 unsigned long addr);
34 int arch_uprobe_pre_xol(struct arch_uprobe *aup, struct pt_regs *regs);
35 int arch_uprobe_post_xol(struct arch_uprobe *aup, struct pt_regs *regs);
36 bool arch_uprobe_xol_was_trapped(struct task_struct *tsk);
37 int arch_uprobe_exception_notify(struct notifier_block *self, unsigned long val,
38 void *data);
39 void arch_uprobe_abort_xol(struct arch_uprobe *ap, struct pt_regs *regs);
40 unsigned long arch_uretprobe_hijack_return_addr(unsigned long trampoline,
41 struct pt_regs *regs);
42 #endif /* _ASM_UPROBES_H */