Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:klp_add_object_nops

Proto:static int klp_add_object_nops(struct klp_patch *patch, struct klp_object *old_obj)

Type:int

Parameter:

TypeParameterName
struct klp_patch *patch
struct klp_object *old_obj
488  obj = klp_find_object(patch, old_obj)
490  If Not obj Then
491  obj = klp_alloc_object_dynamic( external , patch)
492  If Not obj Then Return -ENOMEM
496  klp_for_each_func(old_obj, old_func)
497  func = klp_find_func(obj, old_func)
498  If func Then Continue
501  func = klp_alloc_func_nop(old_func, obj)
502  If Not func Then Return -ENOMEM
506  Return 0
Caller
NameDescribe
klp_add_nopsAdd 'nop' functions which simply return to the caller to run* the original function. The 'nop' functions are added to a* patch to facilitate a 'replace' mode.