0001
0002 #ifndef _ASM_UPROBES_H
0003 #define _ASM_UPROBES_H
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #include <linux/notifier.h>
0014
0015 typedef u8 uprobe_opcode_t;
0016
0017 #define MAX_UINSN_BYTES 16
0018 #define UPROBE_XOL_SLOT_BYTES 128
0019
0020 #define UPROBE_SWBP_INSN 0xcc
0021 #define UPROBE_SWBP_INSN_SIZE 1
0022
0023 struct uprobe_xol_ops;
0024
0025 struct arch_uprobe {
0026 union {
0027 u8 insn[MAX_UINSN_BYTES];
0028 u8 ixol[MAX_UINSN_BYTES];
0029 };
0030
0031 const struct uprobe_xol_ops *ops;
0032
0033 union {
0034 struct {
0035 s32 offs;
0036 u8 ilen;
0037 u8 opc1;
0038 } branch;
0039 struct {
0040 u8 fixups;
0041 u8 ilen;
0042 } defparam;
0043 struct {
0044 u8 reg_offset;
0045 u8 ilen;
0046 } push;
0047 };
0048 };
0049
0050 struct arch_uprobe_task {
0051 #ifdef CONFIG_X86_64
0052 unsigned long saved_scratch_register;
0053 #endif
0054 unsigned int saved_trap_nr;
0055 unsigned int saved_tf;
0056 };
0057
0058 #endif