函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:klp_ftrace_handler

函数原型:static void notrace klp_ftrace_handler(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *fops, struct pt_regs *regs)

返回类型:void

参数:

类型参数名称
unsigned longip
unsigned longparent_ip
struct ftrace_ops *fops
struct pt_regs *regs
49  ops等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(fops, structklp_ops, fops)
55  preempt_disable_notrace()
57  func等于list_first_or_null_rcu - get the first element from a list*@ptr: the list head to take the element from.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.( & func_stack, structklp_func, stack_node)
65  如果WARN_ON_ONCE(!func)则转到:unlock
79  smp_rmb()
81  如果此条件成立可能性小(为编译器优化)(transition)则
89  smp_rmb()
91  patch_state等于patch_state
93  WARN_ON_ONCE(patch_state == ask patch states )
95  如果patch_state恒等于KLP_UNPATCHED
104  如果stack_node恒等于func_stack则转到:unlock
113  如果nop则转到:unlock
116  klp_arch_set_pc(regs, (unsignedlong)new_func)
118  unlock :
119  preempt_enable_notrace()