Function report |
Source Code:arch\x86\kernel\kprobes\core.c |
Create Date:2022-07-28 08:38:45 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Called from kretprobe_trampoline
Proto:__used __visible void *trampoline_handler(struct pt_regs *regs)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct pt_regs * | regs |
| 763 | struct kretprobe_instance * ri = NULL |
| 766 | orig_ret_address = 0 |
| 767 | unsigned long trampoline_address = (unsigned long) & kretprobe_trampoline |
| 768 | kprobe_opcode_t * correct_ret_addr = NULL |
| 770 | bool skipped = false |
| 779 | kcb = get_kprobe_ctlblk() |
| 783 | INIT_HLIST_HEAD( & empty_rp) |
| 784 | kretprobe_hash_lock(current process, & head, & flags) |
| 788 | cs |= get_kernel_rpl() |
| 789 | gs = 0 |
| 792 | frame_pointer = sp |
| 793 | ip = trampoline_address |
| 794 | orig_ax = ~0UL |
| 810 | If task != current process Then Continue |
| 821 | If fp != frame_pointer Then |
| 824 | skipped = true |
| 825 | Continue |
| 828 | orig_ret_address = ret_addr |
| 833 | If orig_ret_address != trampoline_address Then Break |
| 844 | correct_ret_addr = ret_addr |
| 846 | If task != current process Then Continue |
| 849 | If fp != frame_pointer Then Continue |
| 852 | orig_ret_address = ret_addr |
| 854 | __this_cpu_write(current_kprobe, & kp) |
| 855 | ret_addr = correct_ret_addr |
| 860 | recycle_rp_inst(ri, & empty_rp) |
| 862 | If orig_ret_address != trampoline_address Then Break |
| 873 | __this_cpu_write(current_kprobe, NULL) |
| 874 | preempt_enable() |
| 880 | Return orig_ret_address |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |