函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__update_ref_ctr

函数原型:static int __update_ref_ctr(struct mm_struct *mm, unsigned long vaddr, short d)

返回类型:int

参数:

类型参数名称
struct mm_struct *mm
unsigned longvaddr
shortd
382  如果非vaddr或非d则返回:负EINVAL
385  ret等于get_user_pages_remote(NULL, mm, vaddr, 1, check pte is writable , & page, & vma, NULL)
387  如果此条件成立可能性小(为编译器优化)(ret <= 0)则
392  返回:如果ret恒等于0则负EBUSY否则ret
395  kaddr等于kmap_atomic(page)
396  ptr等于kaddrvaddr按位与PAGE_MASK的反的值
398  如果此条件成立可能性小(为编译器优化)( * ptr + d < 0)则
399  打印警告信息("ref_ctr going negative. vaddr: 0x%lx, curr val: %d, delta: %d\n", vaddr, * ptr, d)
401  ret等于负EINVAL
402  转到:out
405  ptr加等于d
406  ret等于0
407  out :
408  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(kaddr)
409  put_page(page)
410  返回:ret
调用者
名称描述
update_ref_ctr
delayed_ref_ctr_inc@vma contains reference counter, not the probed instruction.