Home
last modified time | relevance | path

Searched refs:kprobe (Results 1 – 25 of 67) sorted by relevance

123

/Linux-v5.15/include/linux/
Dkprobes.h50 struct kprobe;
54 typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *);
55 typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *,
60 struct kprobe { struct
108 static inline int kprobe_gone(struct kprobe *p) in kprobe_gone()
114 static inline int kprobe_disabled(struct kprobe *p) in kprobe_disabled()
120 static inline int kprobe_optimized(struct kprobe *p) in kprobe_optimized()
126 static inline int kprobe_ftrace(struct kprobe *p) in kprobe_ftrace()
147 struct kprobe kp;
181 DECLARE_PER_CPU(struct kprobe *, current_kprobe);
[all …]
/Linux-v5.15/kernel/
Dkprobes.c63 static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL;
349 static inline void set_kprobe_instance(struct kprobe *kp) in set_kprobe_instance()
365 struct kprobe *get_kprobe(void *addr) in get_kprobe()
368 struct kprobe *p; in get_kprobe()
381 static int aggr_pre_handler(struct kprobe *p, struct pt_regs *regs);
384 static inline int kprobe_aggrprobe(struct kprobe *p) in kprobe_aggrprobe()
390 static inline int kprobe_unused(struct kprobe *p) in kprobe_unused()
399 static inline void copy_kprobe(struct kprobe *ap, struct kprobe *p) in copy_kprobe()
413 void opt_pre_handler(struct kprobe *p, struct pt_regs *regs) in opt_pre_handler()
415 struct kprobe *kp; in opt_pre_handler()
[all …]
Dtest_kprobes.c26 static int kp_pre_handler(struct kprobe *p, struct pt_regs *regs) in kp_pre_handler()
36 static void kp_post_handler(struct kprobe *p, struct pt_regs *regs, in kp_post_handler()
50 static struct kprobe kp = {
87 static int kp_pre_handler2(struct kprobe *p, struct pt_regs *regs) in kp_pre_handler2()
93 static void kp_post_handler2(struct kprobe *p, struct pt_regs *regs, in kp_post_handler2()
103 static struct kprobe kp2 = {
112 struct kprobe *kps[2] = {&kp, &kp2}; in test_kprobes()
/Linux-v5.15/arch/sh/kernel/
Dkprobes.c17 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
20 static DEFINE_PER_CPU(struct kprobe, saved_current_opcode);
21 static DEFINE_PER_CPU(struct kprobe, saved_next_opcode);
22 static DEFINE_PER_CPU(struct kprobe, saved_next_opcode2);
40 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
52 void __kprobes arch_copy_kprobe(struct kprobe *p) in arch_copy_kprobe()
58 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
65 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
72 int __kprobes arch_trampoline_kprobe(struct kprobe *p) in arch_trampoline_kprobe()
88 struct kprobe *p = get_kprobe((kprobe_opcode_t *) pc + 1); in kprobe_handle_illslot()
[all …]
/Linux-v5.15/arch/parisc/kernel/
Dkprobes.c16 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
19 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
35 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
44 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
49 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
66 static inline void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
71 static void __kprobes setup_singlestep(struct kprobe *p, in setup_singlestep()
83 struct kprobe *p; in parisc_kprobe_break_handler()
134 struct kprobe *p = kprobe_running(); in parisc_kprobe_ss_handler()
184 static int __kprobes trampoline_probe_handler(struct kprobe *p,
[all …]
/Linux-v5.15/arch/riscv/kernel/probes/
Dkprobes.c16 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
20 post_kprobe_handler(struct kprobe *, struct kprobe_ctlblk *, struct pt_regs *);
22 static void __kprobes arch_prepare_ss_slot(struct kprobe *p) in arch_prepare_ss_slot()
33 static void __kprobes arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate()
38 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs) in arch_simulate_insn()
49 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
98 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
107 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
112 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
128 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
[all …]
/Linux-v5.15/arch/arm64/kernel/probes/
Dkprobes.c35 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
39 post_kprobe_handler(struct kprobe *, struct kprobe_ctlblk *, struct pt_regs *);
41 static void __kprobes arch_prepare_ss_slot(struct kprobe *p) in arch_prepare_ss_slot()
59 static void __kprobes arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate()
65 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs) in arch_simulate_insn()
76 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
122 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
131 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
138 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
158 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
[all …]
/Linux-v5.15/arch/csky/kernel/probes/
Dkprobes.c14 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
52 static void __kprobes arch_prepare_ss_slot(struct kprobe *p) in arch_prepare_ss_slot()
61 static void __kprobes arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate()
66 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs) in arch_simulate_insn()
76 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
114 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
120 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
125 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
141 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
168 set_ss_context(struct kprobe_ctlblk *kcb, unsigned long addr, struct kprobe *p) in set_ss_context()
[all …]
/Linux-v5.15/arch/s390/kernel/
Dkprobes.c27 DEFINE_PER_CPU(struct kprobe *, current_kprobe);
67 static void copy_instruction(struct kprobe *p) in copy_instruction()
95 static int s390_get_insn_slot(struct kprobe *p) in s390_get_insn_slot()
111 static void s390_free_insn_slot(struct kprobe *p) in s390_free_insn_slot()
123 int arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
138 struct kprobe *p;
145 struct kprobe *p = args->p; in swap_instruction()
154 void arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
162 void arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
170 void arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
[all …]
/Linux-v5.15/arch/arc/kernel/
Dkprobes.c20 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
23 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
37 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
45 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
53 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
91 static inline void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
96 static void __kprobes resume_execution(struct kprobe *p, unsigned long addr, in resume_execution()
125 static void __kprobes setup_singlestep(struct kprobe *p, struct pt_regs *regs) in setup_singlestep()
195 struct kprobe *p; in arc_kprobe_handler()
247 struct kprobe *cur = kprobe_running(); in arc_post_kprobe_handler()
[all …]
/Linux-v5.15/arch/sparc/kernel/
Dkprobes.c45 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
50 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
65 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
71 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
93 static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, in set_current_kprobe()
101 static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs, in prepare_singlestep()
118 struct kprobe *p; in kprobe_handler()
201 static unsigned long __kprobes relbranch_fixup(u32 insn, struct kprobe *p, in relbranch_fixup()
277 static void __kprobes resume_execution(struct kprobe *p, in resume_execution()
295 struct kprobe *cur = kprobe_running(); in post_kprobe_handler()
[all …]
/Linux-v5.15/arch/powerpc/kernel/
Dkprobes.c31 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
123 int arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
126 struct kprobe *prev; in arch_prepare_kprobe()
166 void arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
172 void arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
178 void arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
187 static nokprobe_inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) in prepare_singlestep()
214 static nokprobe_inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, in set_current_kprobe()
244 static int try_to_emulate(struct kprobe *p, struct pt_regs *regs) in try_to_emulate()
287 struct kprobe *p; in kprobe_handler()
[all …]
/Linux-v5.15/arch/mips/kernel/
Dkprobes.c42 DEFINE_PER_CPU(struct kprobe *, current_kprobe);
74 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
135 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
141 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
147 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
173 static void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, in set_current_kprobe()
194 static int evaluate_branch_instruction(struct kprobe *p, struct pt_regs *regs, in evaluate_branch_instruction()
228 static void prepare_singlestep(struct kprobe *p, struct pt_regs *regs, in prepare_singlestep()
261 static void __kprobes resume_execution(struct kprobe *p, in resume_execution()
275 struct kprobe *p; in kprobe_handler()
[all …]
/Linux-v5.15/arch/arm/probes/kprobes/
Dtest-core.c310 static int __kprobes pre_handler(struct kprobe *p, struct pt_regs *regs) in pre_handler()
318 static void __kprobes post_handler(struct kprobe *p, struct pt_regs *regs, in post_handler()
326 static struct kprobe the_kprobe = {
498 benchmark_pre_handler(struct kprobe *p, struct pt_regs *regs) in benchmark_pre_handler()
520 struct kprobe k = { in kprobe_benchmark()
1161 struct kprobe kprobe; member
1169 unregister_kprobe(&probe->kprobe); in unregister_test_probe()
1170 probe->kprobe.flags = 0; /* Clear disable flag to allow reuse */ in unregister_test_probe()
1182 ret = register_kprobe(&probe->kprobe); in register_test_probe()
1191 test_before_pre_handler(struct kprobe *p, struct pt_regs *regs) in test_before_pre_handler()
[all …]
Dcore.c42 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
46 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
118 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
176 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
182 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
202 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
208 singlestep_skip(struct kprobe *p, struct pt_regs *regs) in singlestep_skip()
222 singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) in singlestep()
236 struct kprobe *p, *cur; in kprobe_handler()
331 struct kprobe *cur = kprobe_running(); in kprobe_fault_handler()
[all …]
/Linux-v5.15/arch/x86/kernel/kprobes/
Dcore.c58 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
195 struct kprobe *kp; in __recover_probed_insn()
372 static int prepare_singlestep(kprobe_opcode_t *buf, struct kprobe *p, in prepare_singlestep()
427 static void kprobe_emulate_ifmodifiers(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_ifmodifiers()
447 static void kprobe_emulate_ret(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_ret()
453 static void kprobe_emulate_call(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_call()
463 void __kprobe_emulate_jmp(struct kprobe *p, struct pt_regs *regs, bool cond) in __kprobe_emulate_jmp()
472 static void kprobe_emulate_jmp(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_jmp()
487 static void kprobe_emulate_jcc(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_jcc()
504 static void kprobe_emulate_loop(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_loop()
[all …]
/Linux-v5.15/arch/ia64/kernel/
Dkprobes.c25 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
88 struct kprobe *p) in update_kprobe_inst_flag()
288 struct kprobe *p, in prepare_break_inst()
389 static void __kprobes set_current_kprobe(struct kprobe *p, in set_current_kprobe()
399 int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) in trampoline_probe_handler()
472 static void __kprobes prepare_booster(struct kprobe *p) in prepare_booster()
476 struct kprobe *other_kp; in prepare_booster()
491 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
530 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
557 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
[all …]
/Linux-v5.15/arch/x86/include/asm/
Dkprobes.h24 struct kprobe;
51 void arch_remove_kprobe(struct kprobe *p);
83 void (*emulate_op)(struct kprobe *p, struct pt_regs *regs);
104 struct kprobe *kp;
/Linux-v5.15/arch/parisc/include/asm/
Dkprobes.h25 struct kprobe;
27 void arch_remove_kprobe(struct kprobe *p);
41 struct kprobe *kp;
/Linux-v5.15/arch/arc/include/asm/
Dkprobes.h31 struct kprobe;
33 void arch_remove_kprobe(struct kprobe *p);
39 struct kprobe *kp;
/Linux-v5.15/arch/sh/include/asm/
Dkprobes.h26 struct kprobe;
28 void arch_remove_kprobe(struct kprobe *);
38 struct kprobe *kp;
/Linux-v5.15/Documentation/trace/
Dkprobes.rst37 (also called return probes). A kprobe can be inserted on virtually
64 When a kprobe is registered, Kprobes makes a copy of the probed
71 associated with the kprobe, passing the handler the addresses of the
72 kprobe struct and the saved registers.
81 "post_handler," if any, that is associated with the kprobe.
110 When you call register_kretprobe(), Kprobes establishes a kprobe at
115 At boot time, Kprobes registers a kprobe at the trampoline.
148 field of the kretprobe struct. Whenever the kprobe placed by kretprobe at the
183 Kprobes inserts an ordinary, breakpoint-based kprobe at the specified
236 If the kprobe can be optimized, Kprobes enqueues the kprobe to an
[all …]
/Linux-v5.15/arch/mips/include/asm/
Dkprobes.h25 struct kprobe;
43 void arch_remove_kprobe(struct kprobe *p);
53 struct kprobe *kp;
/Linux-v5.15/arch/s390/include/asm/
Dkprobes.h39 struct kprobe;
60 struct kprobe *kp;
72 void arch_remove_kprobe(struct kprobe *p);
/Linux-v5.15/arch/arm/include/asm/
Dkprobes.h25 struct kprobe;
31 struct kprobe *kp;
41 void arch_remove_kprobe(struct kprobe *);

123