Searched refs:kprobe (Results 1 - 25 of 60) sorted by last modified time

123

/linux-master/kernel/trace/
H A Dtrace_kprobe.c34 disable_tracing_selftest("running kprobe events");
60 struct kretprobe rp; /* Use rp.kp for kprobe use */
246 static int kprobe_dispatcher(struct kprobe *kp, struct pt_regs *regs);
530 /* Cleanup kprobe for reuse and mark it unregistered */
541 /* If other probes are on the event, just unregister kprobe */
713 .priority = 1 /* Invoked after kprobe module callback */
768 * - Add kprobe:
889 /* Defer the ENOENT case until register kprobe */
912 * kprobe.
1037 * kprobe_event_cmd_init - Initialize a kprobe even
[all...]
H A Dbpf_trace.c102 * kprobe handlers execute BPF programs via this helper.
106 * kprobe handler as:
107 * 0 - return from kprobe (event is filtered out)
108 * 1 - store kprobe event into ring buffer
121 * and don't send kprobe event into ring-buffer,
1076 struct kprobe *kp;
1676 /* bpf+kprobe programs can access fields of 'struct pt_regs' */
2512 /* kprobe/uprobe */
/linux-master/kernel/
H A Dkprobes.c68 static DEFINE_PER_CPU(struct kprobe *, kprobe_instance);
84 * 'kprobe::ainsn.insn' points to the copy of the instruction to be
292 * Check given address is on the page of kprobe instruction slots.
360 static inline void set_kprobe_instance(struct kprobe *kp)
376 struct kprobe *get_kprobe(void *addr)
379 struct kprobe *p;
392 static int aggr_pre_handler(struct kprobe *p, struct pt_regs *regs);
395 static inline bool kprobe_aggrprobe(struct kprobe *p)
401 static inline bool kprobe_unused(struct kprobe *p)
407 /* Keep all fields in the kprobe consisten
[all...]
/linux-master/kernel/bpf/
H A Dsyscall.c3654 uname = u64_to_user_ptr(info->perf_event.kprobe.func_name);
3655 ulen = info->perf_event.kprobe.name_len;
3665 info->perf_event.kprobe.offset = offset;
3666 info->perf_event.kprobe.missed = missed;
3669 info->perf_event.kprobe.addr = addr;
3670 info->perf_event.kprobe.cookie = event->bpf_cookie;
/linux-master/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
91 * Protected by kprobe_mutex after this kprobe is registered.
107 /* Has this kprobe gone ? */
108 static inline bool kprobe_gone(struct kprobe *p)
113 /* Is this kprobe disabled ? */
114 static inline bool kprobe_disabled(struct kprobe *p)
119 /* Is this kprobe reall
[all...]
/linux-master/arch/x86/kernel/kprobes/
H A Dftrace.c20 struct kprobe *p;
68 int arch_prepare_kprobe_ftrace(struct kprobe *p)
H A Dcore.c22 * kprobe-booster and kretprobe-booster for i386.
23 * 2007-Dec Masami Hiramatsu <mhiramat@redhat.com> added kprobe-booster
61 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
207 struct kprobe *kp;
302 * kprobe, in which case we replace the breakpoint by the
306 * normally used, we just go through if there is no kprobe.
465 static int prepare_singlestep(kprobe_opcode_t *buf, struct kprobe *p,
513 static void kprobe_emulate_ifmodifiers(struct kprobe *p, struct pt_regs *regs)
533 static void kprobe_emulate_ret(struct kprobe *p, struct pt_regs *regs)
539 static void kprobe_emulate_call(struct kprobe *
[all...]
/linux-master/arch/s390/kernel/
H A Dftrace.c296 struct kprobe *p;
338 int arch_prepare_kprobe_ftrace(struct kprobe *p)
H A Dkprobes.c30 DEFINE_PER_CPU(struct kprobe *, current_kprobe);
68 static void copy_instruction(struct kprobe *p)
96 static int s390_get_insn_slot(struct kprobe *p)
112 static void s390_free_insn_slot(struct kprobe *p)
129 struct kprobe *kp;
149 * instructions and prevent setting a kprobe.
155 * kprobe, in which case the original instruction is
160 /* not a kprobe */
170 int arch_prepare_kprobe(struct kprobe *p)
185 struct kprobe *
[all...]
/linux-master/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)
37 static void __kprobes arch_prepare_simulate(struct kprobe *p)
42 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs)
53 static bool __kprobes arch_check_kprobe(struct kprobe *p)
68 int __kprobes arch_prepare_kprobe(struct kprobe *p)
109 void __kprobes arch_arm_kprobe(struct kprobe *p)
118 void __kprobes arch_disarm_kprobe(struct kprobe *p)
123 void __kprobes arch_remove_kprobe(struct kprobe *
[all...]
H A Dftrace.c9 struct kprobe *p;
61 int arch_prepare_kprobe_ftrace(struct kprobe *p)
/linux-master/arch/powerpc/kernel/
H A Dkprobes-ftrace.c19 struct kprobe *p;
70 int arch_prepare_kprobe_ftrace(struct kprobe *p)
H A Dkprobes.c31 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
129 int arch_prepare_kprobe(struct kprobe *p)
132 struct kprobe *prev;
136 printk("Attempt to register kprobe at an unaligned address\n");
139 printk("Cannot register a kprobe on instructions that can't be single stepped\n");
143 printk("Cannot register a kprobe on the second word of prefixed instruction\n");
149 * When prev is a ftrace-based kprobe, we don't have an insn, and it
154 printk("Cannot register a kprobe on the second word of prefixed instruction\n");
176 void arch_arm_kprobe(struct kprobe *p)
182 void arch_disarm_kprobe(struct kprobe *
[all...]
/linux-master/arch/parisc/kernel/
H A Dftrace.c206 struct kprobe *p;
249 int arch_prepare_kprobe_ftrace(struct kprobe *p)
/linux-master/arch/loongarch/kernel/
H A Dftrace_dyn.c287 struct kprobe *p;
339 int arch_prepare_kprobe_ftrace(struct kprobe *p)
/linux-master/arch/csky/kernel/probes/
H A Dftrace.c11 struct kprobe *p;
66 int arch_prepare_kprobe_ftrace(struct kprobe *p)
/linux-master/arch/arm64/kernel/probes/
H A Dkprobes.c38 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
42 post_kprobe_handler(struct kprobe *, struct kprobe_ctlblk *, struct pt_regs *);
44 static void __kprobes arch_prepare_ss_slot(struct kprobe *p)
53 * *before* the kprobe BRK is written (and aarch64_insn_patch_text_nosync()
57 * - That the kprobe BRK results in an exception (and consequently a
77 static void __kprobes arch_prepare_simulate(struct kprobe *p)
83 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs)
94 int __kprobes arch_prepare_kprobe(struct kprobe *p)
132 /* arm kprobe: install breakpoint in text */
133 void __kprobes arch_arm_kprobe(struct kprobe *
[all...]
/linux-master/tools/testing/selftests/bpf/benchs/
H A Dbench_trigger.c415 /* batched (staying mostly in kernel) kprobe/fentry benchmarks */
428 BENCH_TRIG_KERNEL(kprobe, "kprobe");
430 BENCH_TRIG_KERNEL(kprobe_multi, "kprobe-multi");
H A Drun_bench_trigger.sh9 kprobe kprobe-multi \
/linux-master/tools/include/uapi/linux/
H A Dbpf.h556 * If the *pid* and *fd* are associated with a tracepoint, kprobe
559 * of type **bpf_task_fd_type**. If associated with a kprobe or
563 * the tracepoint, kprobe or uprobe.
1698 * symbol for kprobe
3088 * The first argument is the context *regs* on which the kprobe
4195 * SEC("kprobe/sys_open")
5258 * Get address of the traced function (for tracing and kprobe programs).
5260 * When called for kprobe program attached as uprobe it returns
5264 * Address of the traced function for kprobe.
5276 * - kprobe/uprob
6706 } kprobe; /* BPF_PERF_EVENT_KPROBE, BPF_PERF_EVENT_KRETPROBE */ member in union:bpf_link_info::__anon3568::__anon3584::__anon3585
[all...]
/linux-master/tools/bpf/bpftool/
H A Dlink.c367 jsonw_uint_field(wtr, "addr", info->perf_event.kprobe.addr);
369 u64_to_ptr(info->perf_event.kprobe.func_name));
370 jsonw_uint_field(wtr, "offset", info->perf_event.kprobe.offset);
371 jsonw_uint_field(wtr, "missed", info->perf_event.kprobe.missed);
372 jsonw_uint_field(wtr, "cookie", info->perf_event.kprobe.cookie);
791 buf = u64_to_ptr(info->perf_event.kprobe.func_name);
792 if (buf[0] == '\0' && !info->perf_event.kprobe.addr)
799 if (info->perf_event.kprobe.addr)
800 printf("%llx ", info->perf_event.kprobe.addr);
802 if (info->perf_event.kprobe
[all...]
/linux-master/include/uapi/linux/
H A Dbpf.h556 * If the *pid* and *fd* are associated with a tracepoint, kprobe
559 * of type **bpf_task_fd_type**. If associated with a kprobe or
563 * the tracepoint, kprobe or uprobe.
1698 * symbol for kprobe
3088 * The first argument is the context *regs* on which the kprobe
4195 * SEC("kprobe/sys_open")
5258 * Get address of the traced function (for tracing and kprobe programs).
5260 * When called for kprobe program attached as uprobe it returns
5264 * Address of the traced function for kprobe.
5276 * - kprobe/uprob
6706 } kprobe; /* BPF_PERF_EVENT_KPROBE, BPF_PERF_EVENT_KRETPROBE */ member in union:bpf_link_info::__anon2958::__anon2974::__anon2975
[all...]
/linux-master/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)
53 void __kprobes arch_arm_kprobe(struct kprobe *p)
60 void __kprobes arch_disarm_kprobe(struct kprobe *p)
67 int __kprobes arch_trampoline_kprobe(struct kprobe *p)
77 * containing a kprobe, remove the probe.
83 struct kprobe *
[all...]
/linux-master/arch/arc/kernel/
H A Dkprobes.c20 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
23 int __kprobes arch_prepare_kprobe(struct kprobe *p)
37 void __kprobes arch_arm_kprobe(struct kprobe *p)
45 void __kprobes arch_disarm_kprobe(struct kprobe *p)
53 void __kprobes arch_remove_kprobe(struct kprobe *p)
57 /* Can we remove the kprobe in the middle of kprobe handling? */
91 static inline void __kprobes set_current_kprobe(struct kprobe *p)
96 static void __kprobes resume_execution(struct kprobe *p, unsigned long addr,
125 static void __kprobes setup_singlestep(struct kprobe *
[all...]
/linux-master/arch/sparc/kernel/
H A Dkprobes.c22 * In the kprobe->ainsn.insn[] array we store the original
26 * When we hit a kprobe we:
31 * - Set regs->tpc to point to kprobe->ainsn.insn[0]
32 * - Set regs->tnpc to point to kprobe->ainsn.insn[1]
33 * - Mark that we are actively in a kprobe
36 * kprobe->ainsn.insn[1] to hit. When it does we:
42 * - Mark that we are no longer actively in a kprobe.
45 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
50 int __kprobes arch_prepare_kprobe(struct kprobe *p)
65 void __kprobes arch_arm_kprobe(struct kprobe *
[all...]

Completed in 306 milliseconds

123