函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\uprobes.c Create Date:2022-07-27 15:06:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:register_for_each_vma

函数原型:static int register_for_each_vma(struct uprobe *uprobe, struct uprobe_consumer *new)

返回类型:int

参数:

类型参数名称
struct uprobe *uprobe
struct uprobe_consumer *new
1048  is_register等于非非new
1050  err等于0
1052  percpu_down_write( & dup_mmap_sem)
1053  info等于build_map_info(i_mapping, offset, is_register)
1055  如果是错误
1056  err等于错误
1057  转到:out
1060 info循环
1061  mm等于mm
1064  如果erris_register则转到:free
1067  lock for writing
1068  vma等于Look up the first VMA which satisfies addr < vm_end, NULL if none.
1069  如果非vma或非valid_vma: Verify if the specified vma is an executable vma* Relax restrictions while unregistering: vm_flags might have* changed after breakpoint was insertedfile_inode(File we map to (can be NULL). )不等于 Also hold a ref to inode 则转到:unlock
1073  如果Our start address within vm_mm. 大于vaddrvaddr_to_offset(vma, vaddr)不等于offset则转到:unlock
1077  如果is_register
1088  unlock :
1089  lease a write lock
1090  free :
1091  Decrement the use count and release all resources for an mm.
1092  info等于free_map_info(info)
1094  out :
1095  percpu_up_write( & dup_mmap_sem)
1096  返回:err
调用者
名称描述
__uprobe_unregister
__uprobe_register__uprobe_register - register a probe*@inode: the file in which the probe has to be placed
uprobe_applyprobe_apply - unregister an already registered probe.*@inode: the file in which the probe has to be removed.*@offset: offset from the start of the file.*@uc: consumer which wants to add more or remove some breakpoints*@add: add or remove the breakpoints