函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Determine whether the given stack trace includes any references to a* to-be-patched or to-be-unpatched function.

函数原型:static int klp_check_stack_func(struct klp_func *func, unsigned long *entries, unsigned int nr_entries)

返回类型:int

参数:

类型参数名称
struct klp_func *func
unsigned long *entries
unsigned intnr_entries
200 i小于nr_entries循环
201  address等于entries[i]
203  如果klp_target_state恒等于KLP_UNPATCHED
208  func_addr等于new_func
209  func_size等于new_size
210  否则
215  ops等于klp_find_ops(rnal )
217  如果链表只有一项
219  func_addr等于rnal
220  func_size等于old_size
221  否则
231  如果address大于等于func_addraddress小于func_addrfunc_size则返回:负EAGAIN
235  返回:0
调用者
名称描述
klp_check_stackDetermine whether it's safe to transition the task to the target patch state* by looking for any to-be-patched or to-be-unpatched functions on its stack.