Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\events\uprobes.c Create Date:2022-07-28 13:45:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:register_for_each_vma

Proto:static int register_for_each_vma(struct uprobe *uprobe, struct uprobe_consumer *new)

Type:int

Parameter:

TypeParameterName
struct uprobe *uprobe
struct uprobe_consumer *new
1048  is_register = Not Not new
1050  err = 0
1052  percpu_down_write( & dup_mmap_sem)
1053  info = build_map_info(i_mapping, offset, is_register)
1055  If IS_ERR(info) Then
1056  err = PTR_ERR(info)
1057  Go to out
1060  When info cycle
1061  mm = mm
1064  If err && is_register Then Go to free
1067  lock for writing
1068  vma = Look up the first VMA which satisfies addr < vm_end, NULL if none.
1069  If Not vma || Not valid_vma: Verify if the specified vma is an executable vma* Relax restrictions while unregistering: vm_flags might have* changed after breakpoint was inserted || file_inode(File we map to (can be NULL). ) != Also hold a ref to inode Then Go to unlock
1073  If Our start address within vm_mm. > vaddr || vaddr_to_offset(vma, vaddr) != offset Then Go to unlock
1077  If is_register Then
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  Return err
Caller
NameDescribe
__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