1
2 #ifndef _ASM_UPROBES_H
3 #define _ASM_UPROBES_H
4
5
6
7
8
9
10
11
12
13 #include <linux/notifier.h>
14
15 typedef u8 uprobe_opcode_t;
16
17 #define MAX_UINSN_BYTES 16
18 #define UPROBE_XOL_SLOT_BYTES 128
19
20 #define UPROBE_SWBP_INSN 0xcc
21 #define UPROBE_SWBP_INSN_SIZE 1
22
23 struct uprobe_xol_ops;
24
25 struct arch_uprobe {
26 union {
27 u8 insn[MAX_UINSN_BYTES];
28 u8 ixol[MAX_UINSN_BYTES];
29 };
30
31 const struct uprobe_xol_ops *ops;
32
33 union {
34 struct {
35 s32 offs;
36 u8 ilen;
37 u8 opc1;
38 } branch;
39 struct {
40 u8 fixups;
41 u8 ilen;
42 } defparam;
43 struct {
44 u8 reg_offset;
45 u8 ilen;
46 } push;
47 };
48 };
49
50 struct arch_uprobe_task {
51 #ifdef CONFIG_X86_64
52 unsigned long saved_scratch_register;
53 #endif
54 unsigned int saved_trap_nr;
55 unsigned int saved_tf;
56 };
57
58 #endif