/linux-6.6.21/include/linux/ |
D | kprobes.h | 50 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 109 static inline bool kprobe_gone(struct kprobe *p) in kprobe_gone() 115 static inline bool kprobe_disabled(struct kprobe *p) in kprobe_disabled() 121 static inline bool kprobe_optimized(struct kprobe *p) in kprobe_optimized() 127 static inline bool kprobe_ftrace(struct kprobe *p) in kprobe_ftrace() 148 struct kprobe kp; 192 DECLARE_PER_CPU(struct kprobe *, current_kprobe); [all …]
|
/linux-6.6.21/kernel/ |
D | kprobes.c | 68 static DEFINE_PER_CPU(struct kprobe *, kprobe_instance); 360 static inline void set_kprobe_instance(struct kprobe *kp) in set_kprobe_instance() 376 struct kprobe *get_kprobe(void *addr) in get_kprobe() 379 struct kprobe *p; in get_kprobe() 392 static int aggr_pre_handler(struct kprobe *p, struct pt_regs *regs); 395 static inline bool kprobe_aggrprobe(struct kprobe *p) in kprobe_aggrprobe() 401 static inline bool kprobe_unused(struct kprobe *p) in kprobe_unused() 408 static inline void copy_kprobe(struct kprobe *ap, struct kprobe *p) in copy_kprobe() 422 void opt_pre_handler(struct kprobe *p, struct pt_regs *regs) in opt_pre_handler() 424 struct kprobe *kp; in opt_pre_handler() [all …]
|
/linux-6.6.21/arch/sh/kernel/ |
D | kprobes.c | 17 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-6.6.21/arch/riscv/kernel/probes/ |
D | kprobes.c | 18 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 22 post_kprobe_handler(struct kprobe *, struct kprobe_ctlblk *, struct pt_regs *); 24 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() 52 static bool __kprobes arch_check_kprobe(struct kprobe *p) in arch_check_kprobe() 67 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() 127 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe() 132 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe() [all …]
|
/linux-6.6.21/arch/parisc/kernel/ |
D | kprobes.c | 17 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 20 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe() 41 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe() 50 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe() 55 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe() 72 static inline void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe() 77 static void __kprobes setup_singlestep(struct kprobe *p, in setup_singlestep() 87 struct kprobe *p; in parisc_kprobe_break_handler() 138 struct kprobe *p = kprobe_running(); in parisc_kprobe_ss_handler() 187 static int __kprobes trampoline_probe_handler(struct kprobe *p, [all …]
|
/linux-6.6.21/arch/loongarch/kernel/ |
D | kprobes.c | 10 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() 69 void arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe() 76 void arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe() 99 static void set_current_kprobe(struct kprobe *p) in set_current_kprobe() 128 static void post_kprobe_handler(struct kprobe *cur, struct kprobe_ctlblk *kcb, in post_kprobe_handler() 155 static void setup_singlestep(struct kprobe *p, struct pt_regs *regs, in setup_singlestep() [all …]
|
/linux-6.6.21/arch/arm64/kernel/probes/ |
D | kprobes.c | 38 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) in arch_prepare_ss_slot() 77 static void __kprobes arch_prepare_simulate(struct kprobe *p) in arch_prepare_simulate() 83 static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs) in arch_simulate_insn() 94 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe() 140 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe() 149 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe() 156 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe() 176 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe() [all …]
|
/linux-6.6.21/arch/s390/kernel/ |
D | kprobes.c | 30 DEFINE_PER_CPU(struct kprobe *, current_kprobe); 68 static void copy_instruction(struct kprobe *p) in copy_instruction() 96 static int s390_get_insn_slot(struct kprobe *p) in s390_get_insn_slot() 112 static void s390_free_insn_slot(struct kprobe *p) in s390_free_insn_slot() 129 struct kprobe *kp; in can_probe() 170 int arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe() 185 struct kprobe *p; 192 struct kprobe *p = args->p; in swap_instruction() 201 void arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe() 209 void arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe() [all …]
|
/linux-6.6.21/arch/csky/kernel/probes/ |
D | kprobes.c | 16 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-6.6.21/arch/arc/kernel/ |
D | kprobes.c | 20 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-6.6.21/arch/sparc/kernel/ |
D | kprobes.c | 45 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-6.6.21/arch/mips/kernel/ |
D | kprobes.c | 44 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-6.6.21/arch/powerpc/kernel/ |
D | kprobes.c | 31 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 143 int arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe() 146 struct kprobe *prev; in arch_prepare_kprobe() 190 void arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe() 196 void arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe() 202 void arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe() 211 static nokprobe_inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) in prepare_singlestep() 238 static nokprobe_inline void set_current_kprobe(struct kprobe *p, struct pt_regs *regs, in set_current_kprobe() 255 static int try_to_emulate(struct kprobe *p, struct pt_regs *regs) in try_to_emulate() 298 struct kprobe *p; in kprobe_handler() [all …]
|
/linux-6.6.21/arch/x86/kernel/kprobes/ |
D | core.c | 61 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 196 struct kprobe *kp; in __recover_probed_insn() 418 static int prepare_singlestep(kprobe_opcode_t *buf, struct kprobe *p, in prepare_singlestep() 466 static void kprobe_emulate_ifmodifiers(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_ifmodifiers() 486 static void kprobe_emulate_ret(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_ret() 492 static void kprobe_emulate_call(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_call() 501 static void kprobe_emulate_jmp(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_jmp() 510 static void kprobe_emulate_jcc(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_jcc() 518 static void kprobe_emulate_loop(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_loop() 575 static void kprobe_emulate_call_indirect(struct kprobe *p, struct pt_regs *regs) in kprobe_emulate_call_indirect() [all …]
|
/linux-6.6.21/arch/arm/probes/kprobes/ |
D | test-core.c | 310 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 …]
|
D | core.c | 44 DEFINE_PER_CPU(struct kprobe *, current_kprobe) = NULL; 48 int __kprobes arch_prepare_kprobe(struct kprobe *p) in arch_prepare_kprobe() 120 void __kprobes arch_arm_kprobe(struct kprobe *p) in arch_arm_kprobe() 178 void __kprobes arch_disarm_kprobe(struct kprobe *p) in arch_disarm_kprobe() 184 void __kprobes arch_remove_kprobe(struct kprobe *p) in arch_remove_kprobe() 204 static void __kprobes set_current_kprobe(struct kprobe *p) in set_current_kprobe() 210 singlestep_skip(struct kprobe *p, struct pt_regs *regs) in singlestep_skip() 224 singlestep(struct kprobe *p, struct pt_regs *regs, struct kprobe_ctlblk *kcb) in singlestep() 238 struct kprobe *p, *cur; in kprobe_handler() 333 struct kprobe *cur = kprobe_running(); in kprobe_fault_handler() [all …]
|
/linux-6.6.21/tools/testing/selftests/bpf/prog_tests/ |
D | fill_link_info.c | 57 ASSERT_EQ(info.perf_event.kprobe.offset, offset, "kprobe_offset"); in verify_perf_link_info() 61 ASSERT_EQ(info.perf_event.kprobe.addr, addr + entry_offset, in verify_perf_link_info() 64 if (!info.perf_event.kprobe.func_name) { in verify_perf_link_info() 65 ASSERT_EQ(info.perf_event.kprobe.name_len, 0, "name_len"); in verify_perf_link_info() 66 info.perf_event.kprobe.func_name = ptr_to_u64(&buf); in verify_perf_link_info() 67 info.perf_event.kprobe.name_len = sizeof(buf); in verify_perf_link_info() 71 err = strncmp(u64_to_ptr(info.perf_event.kprobe.func_name), KPROBE_FUNC, in verify_perf_link_info() 117 info.perf_event.kprobe.func_name = 0x1; /* invalid address */ in kprobe_fill_invalid_user_buffer() 121 info.perf_event.kprobe.name_len = 64; in kprobe_fill_invalid_user_buffer() 125 info.perf_event.kprobe.func_name = 0; in kprobe_fill_invalid_user_buffer() [all …]
|
/linux-6.6.21/arch/ia64/kernel/ |
D | kprobes.c | 25 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-6.6.21/Documentation/bpf/libbpf/ |
D | program_types.rst | 76 …BE`` | | ``kprobe+`` [#kprobe]_ … 78 … | | ``kretprobe+`` [#kprobe]_ | … 94 | | ``BPF_TRACE_KPROBE_MULTI`` | ``kprobe.mul… 191 .. [#kprobe] The ``kprobe`` attach format is ``kprobe/<function>[+<offset>]``. Valid 197 .. [#kpmulti] The ``kprobe.multi`` attach format is ``kprobe.multi/<pattern>`` where ``pattern``
|
/linux-6.6.21/arch/x86/include/asm/ |
D | kprobes.h | 24 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-6.6.21/drivers/misc/lkdtm/ |
D | core.c | 40 static int lkdtm_kprobe_handler(struct kprobe *kp, struct pt_regs *regs); 45 .kprobe = { \ 60 struct kprobe kprobe; member 105 static struct kprobe *lkdtm_kprobe; 170 if (!crashpoint->kprobe.symbol_name) { in lkdtm_register_cpoint() 180 lkdtm_kprobe = &crashpoint->kprobe; in lkdtm_register_cpoint() 184 crashpoint->kprobe.symbol_name); in lkdtm_register_cpoint() 199 static int lkdtm_kprobe_handler(struct kprobe *kp, struct pt_regs *regs) in lkdtm_kprobe_handler()
|
/linux-6.6.21/Documentation/trace/ |
D | kprobes.rst | 37 (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-6.6.21/arch/arc/include/asm/ |
D | kprobes.h | 31 struct kprobe; 33 void arch_remove_kprobe(struct kprobe *p); 39 struct kprobe *kp;
|
/linux-6.6.21/arch/parisc/include/asm/ |
D | kprobes.h | 26 struct kprobe; 28 void arch_remove_kprobe(struct kprobe *p); 42 struct kprobe *kp;
|
/linux-6.6.21/arch/sh/include/asm/ |
D | kprobes.h | 26 struct kprobe; 28 void arch_remove_kprobe(struct kprobe *); 38 struct kprobe *kp;
|