函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:prepare_uretprobe

函数原型:static void prepare_uretprobe(struct uprobe *uprobe, struct pt_regs *regs)

返回类型:void

参数:

类型参数名称
struct uprobe *uprobe
struct pt_regs *regs
1869  如果非get_xol_area - Allocate process's xol_area if necessary.* This area will be used for storing instructions for execution out of line.* Returns the allocated area or NULL.则返回
1872  utask等于Allocate a uprobe_task object for the task if if necessary.* Called when the thread hits a breakpoint.* Returns:* - pointer to new uprobe_task on success* - NULL otherwise
1873  如果非utask则返回
1876  如果depth大于等于MAX_URETPROBE_DEPTH
1877  atelimited messages with local ratelimit_state,* no local ratelimit_state used in the !PRINTK case(formational "uprobe: omit uretprobe due to nestedness limit pid/tgid=%d/%d\n", pid, tgid)
1880  返回
1883  ri等于开辟内存
1884  如果非ri则返回
1887  trampoline_vaddr等于Current area->vaddr notion assume the trampoline address is always* equal area->vaddr.* Returns -1 in case the xol_area is not allocated.
1888  orig_ret_vaddr等于arch_uretprobe_hijack_return_addr(trampoline_vaddr, regs)
1889  如果orig_ret_vaddr恒等于负1则转到:fail
1893  chained等于orig_ret_vaddr恒等于trampoline_vaddr
1894  cleanup_return_instances(utask, chained, regs)
1901  如果chained
1902  如果非return_instances
1907  uprobe_warn(当前进程, "handle tail call")
1908  转到:fail
1910  orig_ret_vaddr等于 original return address
1913  uprobe等于get_uprobe(uprobe)
1914  func等于instruction_pointer(regs)
1915  stack pointer 等于user_stack_pointer(regs)
1916  original return address 等于orig_ret_vaddr
1917  true, if instance is nested 等于chained
1919  depth自加
1920  keep as stack 等于return_instances
1921  return_instances等于ri
1923  返回
1924  fail :
1925  kfree(ri)
调用者
名称描述
handler_chain