函数逻辑报告 |
Source Code:kernel\events\uprobes.c |
Create Date:2022-07-27 15:06:19 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:NOTE:* Expect the breakpoint instruction to be the smallest size instruction for* the architecture
函数原型:int uprobe_write_opcode(struct arch_uprobe *auprobe, struct mm_struct *mm, unsigned long vaddr, uprobe_opcode_t opcode)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct arch_uprobe * | auprobe | |
struct mm_struct * | mm | |
unsigned long | vaddr | |
uprobe_opcode_t | opcode |
475 | ref_ctr_updated等于0 |
476 | bool orig_page_huge = false |
482 | retry : |
491 | ret等于verify_opcode(old_page, vaddr, & opcode) |
495 | 如果WARN(!is_register && PageCompound(old_page), "uprobe unregister should never work on compound page\n")则 |
502 | 如果非ref_ctr_updated且ref_ctr_offset则 |
503 | ret等于update_ref_ctr(uprobe, mm, is_register ? 1 : - 1) |
507 | ref_ctr_updated等于1 |
510 | ret等于0 |
511 | 如果非is_register且非PageAnon(old_page)则转到:put_old |
514 | ret等于anon_vma_prepare(vma) |
524 | copy_highpage(new_page, old_page) |
525 | copy_to_page(new_page, vaddr, & opcode, UPROBE_SWBP_INSN_SIZE) |
527 | 如果非is_register则 |
531 | VM_BUG_ON_PAGE(!PageAnon(old_page), old_page) |
537 | 如果orig_page则 |
538 | 如果PageUptodate(orig_page)且pages_identical(new_page, orig_page)则 |
554 | put_old : |
557 | 如果此条件成立可能性小(为编译器优化)(ret == - EAGAIN)则转到:retry |
561 | 如果ret且is_register且ref_ctr_updated则update_ref_ctr(uprobe, mm, - 1) |
565 | 如果非ret且orig_page_huge则collapse_pte_mapped_thp(mm, vaddr) |
568 | 返回:ret |
名称 | 描述 |
---|---|
set_swbp | set_swbp - store breakpoint at a given address.*@auprobe: arch specific probepoint information.*@mm: the probed process address space.*@vaddr: the virtual address to insert the opcode.* For mm @mm, store the breakpoint instruction at @vaddr. |
set_orig_insn | set_orig_insn - Restore the original instruction.*@mm: the probed process address space.*@auprobe: arch specific probepoint information.*@vaddr: the virtual address to insert the opcode.* For mm @mm, restore the original opcode (opcode) at @vaddr. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |