]>
Commit | Line | Data |
---|---|---|
1a59d1b8 | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
2b144498 SD |
2 | #ifndef _ASM_UPROBES_H |
3 | #define _ASM_UPROBES_H | |
4 | /* | |
7b2d81d4 | 5 | * User-space Probes (UProbes) for x86 |
2b144498 | 6 | * |
2b144498 SD |
7 | * Copyright (C) IBM Corporation, 2008-2011 |
8 | * Authors: | |
9 | * Srikar Dronamraju | |
10 | * Jim Keniston | |
11 | */ | |
12 | ||
0326f5a9 SD |
13 | #include <linux/notifier.h> |
14 | ||
2b144498 | 15 | typedef u8 uprobe_opcode_t; |
2b144498 | 16 | |
7b2d81d4 | 17 | #define MAX_UINSN_BYTES 16 |
900771a4 | 18 | #define UPROBE_XOL_SLOT_BYTES 128 /* to keep it cache aligned */ |
7b2d81d4 | 19 | |
5cb4ac3a SD |
20 | #define UPROBE_SWBP_INSN 0xcc |
21 | #define UPROBE_SWBP_INSN_SIZE 1 | |
2b144498 | 22 | |
8ad8e9d3 ON |
23 | struct uprobe_xol_ops; |
24 | ||
3ff54efd | 25 | struct arch_uprobe { |
8a8de66c ON |
26 | union { |
27 | u8 insn[MAX_UINSN_BYTES]; | |
28 | u8 ixol[MAX_UINSN_BYTES]; | |
29 | }; | |
8ad8e9d3 | 30 | |
8ad8e9d3 ON |
31 | const struct uprobe_xol_ops *ops; |
32 | ||
7ba6db2d | 33 | union { |
7ba6db2d ON |
34 | struct { |
35 | s32 offs; | |
36 | u8 ilen; | |
8e89c0be | 37 | u8 opc1; |
97aa5cdd ON |
38 | } branch; |
39 | struct { | |
78d9af4c | 40 | u8 fixups; |
1dc76e6e | 41 | u8 ilen; |
5cdb76d6 | 42 | } defparam; |
e7ed9d9b YS |
43 | struct { |
44 | u8 reg_offset; /* to the start of pt_regs */ | |
45 | u8 ilen; | |
46 | } push; | |
7ba6db2d | 47 | }; |
2b144498 SD |
48 | }; |
49 | ||
0326f5a9 | 50 | struct arch_uprobe_task { |
0326f5a9 SD |
51 | #ifdef CONFIG_X86_64 |
52 | unsigned long saved_scratch_register; | |
53 | #endif | |
baedbf02 | 54 | unsigned int saved_trap_nr; |
3a4664aa | 55 | unsigned int saved_tf; |
0326f5a9 SD |
56 | }; |
57 | ||
2b144498 | 58 | #endif /* _ASM_UPROBES_H */ |