Home
last modified time | relevance | path

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

123

/linux/include/linux/
H A Dkprobes.h49 struct kprobe;
53 typedef int (*kprobe_pre_handler_t) (struct kprobe *, struct pt_regs *);
54 typedef void (*kprobe_post_handler_t) (struct kprobe *, struct pt_regs *,
59 struct kprobe { struct
108 static inline bool kprobe_gone(struct kprobe *p) in kprobe_gone()
114 static inline bool kprobe_disabled(struct kprobe *p) in kprobe_disabled()
120 static inline bool kprobe_optimized(struct kprobe *p) in kprobe_optimized()
126 static inline bool kprobe_ftrace(struct kprobe *p) in kprobe_ftrace()
147 struct kprobe kp;
188 DECLARE_PER_CPU(struct kprobe *, current_kprobe);
[all …]
/linux/kernel/
H A Dkprobes.c72 static DEFINE_PER_CPU(struct kprobe *, kprobe_instance);
88 * 'kprobe::ainsn.insn' points to the copy of the instruction to be
142 * @c: Pointer to kprobe instruction cache
297 * Check given address is on the page of kprobe instruction slots.
365 static inline void set_kprobe_instance(struct kprobe *kp) in set_kprobe_instance()
381 struct kprobe *get_kprobe(void *addr) in get_kprobe()
384 struct kprobe *p; in get_kprobe()
397 static int aggr_pre_handler(struct kprobe *p, struct pt_regs *regs);
400 static inline bool kprobe_aggrprobe(struct kprobe *p) in kprobe_aggrprobe()
406 static inline bool kprobe_unused(struct kprobe * in kprobe_unused()
[all...]
/linux/arch/riscv/kernel/probes/
H A Dkprobes.c19 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
23 post_kprobe_handler(struct kprobe *, struct kprobe_ctlblk *, struct pt_regs *);
25 static void __kprobes arch_prepare_ss_slot(struct kprobe *p) in arch_prepare_ss_slot()
36 static void __kprobes arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate()
41 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs) in arch_simulate_insn()
72 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
113 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
122 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
129 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
145 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
[all …]
/linux/arch/sh/kernel/
H A 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()
53 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
60 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
67 int __kprobes arch_trampoline_kprobe(struct kprobe *p) in arch_trampoline_kprobe()
83 struct kprobe *p = get_kprobe((kprobe_opcode_t *) pc + 1); in kprobe_handle_illslot()
95 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
[all …]
/linux/arch/loongarch/kernel/
H A Dkprobes.c10 DEFINE_PER_CPU(struct kprobe *, current_kprobe);
13 static void arch_prepare_ss_slot(struct kprobe *p) in arch_prepare_ss_slot()
21 static void arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate()
27 int arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
61 void arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
70 void arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
78 void arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
101 static void set_current_kprobe(struct kprobe *p) in set_current_kprobe()
130 static void post_kprobe_handler(struct kprobe *cur, struct kprobe_ctlblk *kcb, in post_kprobe_handler()
157 static void setup_singlestep(struct kprobe *p, struct pt_regs *regs, in setup_singlestep()
[all …]
/linux/arch/arm64/kernel/probes/
H A Dkprobes.c39 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
43 post_kprobe_handler(struct kprobe *, struct kprobe_ctlblk *, struct pt_regs *);
59 static void __kprobes arch_prepare_ss_slot(struct kprobe *p) in arch_prepare_ss_slot()
92 static void __kprobes arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate()
98 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs) in arch_simulate_insn()
109 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
148 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
157 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
165 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
200 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
[all …]
/linux/arch/csky/kernel/probes/
H A Dkprobes.c16 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
54 static void __kprobes arch_prepare_ss_slot(struct kprobe *p) in arch_prepare_ss_slot()
63 static void __kprobes arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate()
68 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs) in arch_simulate_insn()
78 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()
145 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe()
172 set_ss_context(struct kprobe_ctlblk *kcb, unsigned long addr, struct kprobe *p) in set_ss_context()
[all …]
/linux/arch/arc/kernel/
H A 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()
196 struct kprobe *p; in arc_kprobe_handler()
248 struct kprobe *cur = kprobe_running(); in arc_post_kprobe_handler()
[all …]
/linux/arch/sparc/kernel/
H A 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/arch/mips/kernel/
H A Dkprobes.c44 DEFINE_PER_CPU(struct kprobe *, current_kprobe);
78 int arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe()
139 void arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe()
146 void arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe()
153 void arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe()
180 static void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, in set_current_kprobe()
201 static int evaluate_branch_instruction(struct kprobe *p, struct pt_regs *regs, in evaluate_branch_instruction()
235 static void prepare_singlestep(struct kprobe *p, struct pt_regs *regs, in prepare_singlestep()
266 static void resume_execution(struct kprobe *p, in resume_execution()
281 struct kprobe *p; in kprobe_handler()
[all …]
/linux/arch/arm/probes/kprobes/
H A 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()
1160 struct kprobe kprobe; member
1168 unregister_kprobe(&probe->kprobe); in unregister_test_probe()
1169 probe->kprobe.flags = 0; /* Clear disable flag to allow reuse */ in unregister_test_probe()
1181 ret = register_kprobe(&probe->kprobe); in register_test_probe()
1190 test_before_pre_handler(struct kprobe *p, struct pt_regs *regs) in test_before_pre_handler()
[all …]
/linux/arch/x86/kernel/kprobes/
H A Dcore.c61 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
206 struct kprobe *kp; in __recover_probed_insn()
455 static int prepare_singlestep(kprobe_opcode_t *buf, struct kprobe *p, in prepare_singlestep()
485 static void kprobe_emulate_ifmodifiers(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_ifmodifiers()
505 static void kprobe_emulate_ret(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_ret()
511 static void kprobe_emulate_call(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_call()
519 static void kprobe_emulate_jmp(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_jmp()
528 static void kprobe_emulate_jcc(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_jcc()
536 static void kprobe_emulate_loop(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_loop()
593 static void kprobe_emulate_call_indirect(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_call_indirect()
[all …]
/linux/arch/x86/include/asm/
H A Dkprobes.h24 struct kprobe;
51 void arch_remove_kprobe(struct kprobe *p);
80 void (*emulate_op)(struct kprobe *p, struct pt_regs *regs);
101 struct kprobe *kp;
/linux/Documentation/trace/
H A 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.
147 field of the kretprobe struct. Whenever the kprobe placed by kretprobe at the
182 Kprobes inserts an ordinary, breakpoint-based kprobe at the specified
235 If the kprobe can be optimized, Kprobes enqueues the kprobe to an
[all …]
/linux/arch/sh/include/asm/
H A Dkprobes.h26 struct kprobe;
28 void arch_remove_kprobe(struct kprobe *);
38 struct kprobe *kp;
/linux/arch/arc/include/asm/
H A Dkprobes.h31 struct kprobe;
33 void arch_remove_kprobe(struct kprobe *p);
36 struct kprobe *kp;
/linux/lib/tests/
H A Dtest_kprobes.c42 static int kp_pre_handler(struct kprobe *p, struct pt_regs *regs) in kp_pre_handler()
50 static void kp_post_handler(struct kprobe *p, struct pt_regs *regs, in kp_post_handler()
61 static struct kprobe kp = {
109 static int kp_pre_handler2(struct kprobe *p, struct pt_regs *regs) in kp_pre_handler2()
115 static void kp_post_handler2(struct kprobe *p, struct pt_regs *regs, in kp_post_handler2()
122 static struct kprobe kp2 = {
130 struct kprobe *kps[2] = {&kp, &kp2}; in test_kprobes()
151 static struct kprobe kp_missed = {
H A Dslub_kunit.c313 struct kprobe kprobe; member
428 static int slab_kprobe_pre_handler(struct kprobe *p, struct pt_regs *regs) in slab_kprobe_pre_handler()
432 ctx = container_of(p, struct test_nolock_context, kprobe); in slab_kprobe_pre_handler()
439 ctx->kprobe.symbol_name = "slab_attach_kprobe_locked"; in register_slab_kprobes()
440 ctx->kprobe.pre_handler = slab_kprobe_pre_handler; in register_slab_kprobes()
442 if (register_kprobe(&ctx->kprobe)) in register_slab_kprobes()
451 unregister_kprobe(&ctx->kprobe); in unregister_slab_kprobes()
/linux/arch/parisc/include/asm/
H A Dkprobes.h27 struct kprobe;
29 void arch_remove_kprobe(struct kprobe *p);
43 struct kprobe *kp;
/linux/arch/mips/include/asm/
H A Dkprobes.h25 struct kprobe;
43 void arch_remove_kprobe(struct kprobe *p);
53 struct kprobe *kp;
/linux/arch/s390/include/asm/
H A Dkprobes.h40 struct kprobe;
61 struct kprobe *kp;
73 void arch_remove_kprobe(struct kprobe *p);
/linux/arch/arm/include/asm/
H A Dkprobes.h25 struct kprobe;
31 struct kprobe *kp;
41 void arch_remove_kprobe(struct kprobe *);
/linux/arch/s390/lib/
H A Dtest_kprobes.c9 static struct kprobe kp;
11 static void setup_kprobe(struct kunit *test, struct kprobe *kp, in setup_kprobe()
19 static void test_kprobe_offset(struct kunit *test, struct kprobe *kp, in test_kprobe_offset()
/linux/arch/riscv/include/asm/
H A Dkprobes.h28 struct kprobe *kp;
39 void arch_remove_kprobe(struct kprobe *p);
/linux/tools/bpf/bpftool/
H A Dlink.c475 jsonw_uint_field(wtr, "addr", info->perf_event.kprobe.addr); in show_perf_event_kprobe_json()
477 u64_to_ptr(info->perf_event.kprobe.func_name)); in show_perf_event_kprobe_json()
478 jsonw_uint_field(wtr, "offset", info->perf_event.kprobe.offset); in show_perf_event_kprobe_json()
479 jsonw_uint_field(wtr, "missed", info->perf_event.kprobe.missed); in show_perf_event_kprobe_json()
480 jsonw_uint_field(wtr, "cookie", info->perf_event.kprobe.cookie); in show_perf_event_kprobe_json()
948 buf = u64_to_ptr(info->perf_event.kprobe.func_name); in show_perf_event_kprobe_plain()
949 if (buf[0] == '\0' && !info->perf_event.kprobe.addr) in show_perf_event_kprobe_plain()
956 if (info->perf_event.kprobe.addr) in show_perf_event_kprobe_plain()
957 printf("%llx ", info->perf_event.kprobe.addr); in show_perf_event_kprobe_plain()
959 if (info->perf_event.kprobe.offset) in show_perf_event_kprobe_plain()
[all …]

123