Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static int klp_check_stack_func(struct klp_func *func, unsigned long *entries, unsigned int nr_entries)

Type:int

Parameter:

TypeParameterName
struct klp_func *func
unsigned long *entries
unsigned intnr_entries
200  When i < nr_entries cycle
201  address = entries[i]
203  If klp_target_state == KLP_UNPATCHED Then
210  Else
221  Else
231  If address >= func_addr && address < func_addr + func_size Then Return -EAGAIN
235  Return 0
Caller
NameDescribe
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.