Searched refs:kprobe (Results 26 - 50 of 60) sorted by relevance

123

/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...]
/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/s390/kernel/
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...]
H A Dftrace.c296 struct kprobe *p;
338 int arch_prepare_kprobe_ftrace(struct kprobe *p)
/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...]
H A Dfail_function.c15 static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs);
17 static void fei_post_handler(struct kprobe *kp, struct pt_regs *regs,
28 struct kprobe kp;
169 static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs)
/linux-master/arch/arm/probes/kprobes/
H A Dcore.c44 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL;
48 int __kprobes arch_prepare_kprobe(struct kprobe *p)
120 void __kprobes arch_arm_kprobe(struct kprobe *p)
178 void __kprobes arch_disarm_kprobe(struct kprobe *p)
184 void __kprobes arch_remove_kprobe(struct kprobe *p)
204 static void __kprobes set_current_kprobe(struct kprobe *p)
210 singlestep_skip(struct kprobe *p, struct pt_regs *regs)
224 singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb)
231 * all the way until processing this kprobe is complete. The current
233 * kprobe, an
[all...]
H A Dtest-core.c40 * When the test case is run a kprobe is placed of each nop. The
48 * step a second time but with an additional kprobe on the test_case
172 * inserts a kprobe on the test case instruction 'test_insn' and returns a
177 * numbered run (the one without the kprobe on test_insn). These should be
178 * the same if the kprobe instruction simulation routine is correct.
310 static int __kprobes pre_handler(struct kprobe *p, struct pt_regs *regs)
318 static void __kprobes post_handler(struct kprobe *p, struct pt_regs *regs,
326 static struct kprobe the_kprobe = {
351 pr_err("FAIL: kprobe pre_handler not called\n");
355 pr_err("FAIL: kprobe post_handle
1161 struct kprobe kprobe; member in struct:test_probe
[all...]
H A Dopt-arm.c115 * In ARM ISA, kprobe opt always replace one instruction (4 bytes
117 * kprobe in the address range. So always return 0.
125 static int can_optimize(struct kprobe *kp)
152 struct kprobe *p = &op->kp;
182 int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *orig)
200 * kprobe opt use a 'b' instruction to branch to optinsn.insn.
/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/riscv/kernel/probes/
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 Doptprobes.c47 static unsigned long can_optimize(struct kprobe *p)
55 * kprobe placed for kretprobe during boot time
154 int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
259 * kprobe in this address range. So always return 0.
/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...]
H A Dopt.c40 struct kprobe *kp;
46 /* This function only handles jump-optimized kprobe */
58 * If the kprobe can be optimized, original bytes which can be
175 /* Optimized kprobe call back function: called from optinsn */
295 * we can't optimize kprobe in this function.
344 struct kprobe *p;
392 struct kprobe *__unused)
469 * The caller will have installed a regular kprobe and after that issued
540 int setup_detour_execution(struct kprobe *p, struct pt_regs *regs, int reenter)
545 /* This kprobe i
[all...]
/linux-master/drivers/misc/lkdtm/
H A Dcore.c40 static int lkdtm_kprobe_handler(struct kprobe *kp, struct pt_regs *regs);
45 .kprobe = { \
60 struct kprobe kprobe; member in struct:crashpoint
104 /* Global kprobe entry and crashtype. */
105 static struct kprobe *lkdtm_kprobe;
175 if (!crashpoint->kprobe.symbol_name)
183 lkdtm_kprobe = &crashpoint->kprobe;
186 pr_info("Couldn't register kprobe %s\n",
187 crashpoint->kprobe
[all...]
/linux-master/samples/kprobes/
H A Dkprobe_example.c22 /* For each probe you need to allocate a kprobe structure */
23 static struct kprobe kp = {
27 /* kprobe pre_handler: called just before the probed instruction is executed */
28 static int __kprobes handler_pre(struct kprobe *p, struct pt_regs *regs)
67 /* kprobe post_handler: called after the probed instruction is executed */
68 static void __kprobes handler_post(struct kprobe *p, struct pt_regs *regs,
116 pr_info("Planted kprobe at %p\n", kp.addr);
123 pr_info("kprobe at %p unregistered\n", kp.addr);
/linux-master/arch/sparc/include/asm/
H A Dkprobes.h36 struct kprobe *kp;
42 /* per-cpu kprobe control block */
/linux-master/lib/
H A Dtest_kprobes.c36 static int kp_pre_handler(struct kprobe *p, struct pt_regs *regs)
44 static void kp_post_handler(struct kprobe *p, struct pt_regs *regs,
55 static struct kprobe kp = {
103 static int kp_pre_handler2(struct kprobe *p, struct pt_regs *regs)
109 static void kp_post_handler2(struct kprobe *p, struct pt_regs *regs,
116 static struct kprobe kp2 = {
124 struct kprobe *kps[2] = {&kp, &kp2};
128 /* addr and flags should be cleard for reusing kprobe. */
149 static struct kprobe kp_missed = {
229 /* addr and flags should be cleard for reusing kprobe
[all...]
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dfill_link_info.c61 ASSERT_EQ(info.perf_event.kprobe.offset, offset, "kprobe_offset");
65 ASSERT_EQ(info.perf_event.kprobe.addr, addr + entry_offset,
68 ASSERT_EQ(info.perf_event.kprobe.cookie, PERF_EVENT_COOKIE, "kprobe_cookie");
70 if (!info.perf_event.kprobe.func_name) {
71 ASSERT_EQ(info.perf_event.kprobe.name_len, 0, "name_len");
72 info.perf_event.kprobe.func_name = ptr_to_u64(&buf);
73 info.perf_event.kprobe.name_len = sizeof(buf);
77 err = strncmp(u64_to_ptr(info.perf_event.kprobe.func_name), KPROBE_FUNC,
132 info.perf_event.kprobe.func_name = 0x1; /* invalid address */
136 info.perf_event.kprobe
[all...]
H A Dmissed.c8 * Putting kprobe on bpf_fentry_test1 that calls bpf_kfunc_common_test
9 * kfunc, which has also kprobe on. The latter won't get triggered due
10 * to kprobe recursion check and kprobe missed counter is incremented.
39 ASSERT_EQ(info.perf_event.kprobe.missed, 1, "info.perf_event.kprobe.missed");
58 * Putting kprobe.multi on bpf_fentry_test1 that calls bpf_kfunc_common_test
59 * kfunc which has 3 perf event kprobes and 1 kprobe.multi attached.
61 * Because fprobe (kprobe.multi attach layear) does not have strict recursion
62 * check the kprobe'
[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/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)

Completed in 408 milliseconds

123