Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\livepatch\patch.c Create Date:2022-07-28 10:31:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:klp_ftrace_handler

Proto:static void notrace klp_ftrace_handler(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *fops, struct pt_regs *regs)

Type:void

Parameter:

TypeParameterName
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  If WARN_ON_ONCE(!func) Then Go to unlock
79  smp_rmb()
81  If Value for the false possibility is greater at compile time(transition) Then
89  smp_rmb()
91  patch_state = patch_state
93  WARN_ON_ONCE(patch_state == ask patch states )
95  If patch_state == KLP_UNPATCHED Then
104  If stack_node == func_stack Then Go to unlock
113  If nop Then Go to unlock
116  klp_arch_set_pc(regs, (unsignedlong)new_func)
118  unlock :
119  preempt_enable_notrace()