hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/x86/include/asm/kprobes.h
....@@ -58,14 +58,29 @@
5858 /* copy of the original instruction */
5959 kprobe_opcode_t *insn;
6060 /*
61
- * boostable = false: This instruction type is not boostable.
62
- * boostable = true: This instruction has been boosted: we have
61
+ * boostable = 0: This instruction type is not boostable.
62
+ * boostable = 1: This instruction has been boosted: we have
6363 * added a relative jump after the instruction copy in insn,
6464 * so no single-step and fixup are needed (unless there's
6565 * a post_handler).
6666 */
67
- bool boostable;
68
- bool if_modifier;
67
+ unsigned boostable:1;
68
+ unsigned char size; /* The size of insn */
69
+ union {
70
+ unsigned char opcode;
71
+ struct {
72
+ unsigned char type;
73
+ } jcc;
74
+ struct {
75
+ unsigned char type;
76
+ unsigned char asize;
77
+ } loop;
78
+ struct {
79
+ unsigned char reg;
80
+ } indirect;
81
+ };
82
+ s32 rel32; /* relative offset must be s32, s16, or s8 */
83
+ void (*emulate_op)(struct kprobe *p, struct pt_regs *regs);
6984 /* Number of bytes of text poked */
7085 int tp_len;
7186 };
....@@ -104,7 +119,6 @@
104119 extern int kprobe_exceptions_notify(struct notifier_block *self,
105120 unsigned long val, void *data);
106121 extern int kprobe_int3_handler(struct pt_regs *regs);
107
-extern int kprobe_debug_handler(struct pt_regs *regs);
108122
109123 #else
110124