Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:klp_init_object

Proto:static int klp_init_object(struct klp_patch *patch, struct klp_object *obj)

Type:int

Parameter:

TypeParameterName
struct klp_patch *patch
struct klp_object *obj
791  If klp_is_module(obj) && strlen - Find the length of a string*@s: The string to be sized >= MODULE_NAME_LEN Then Return -EINVAL
794  patched = false
795  mod = NULL
797  sets obj->mod if object is not vmlinux and module is found
799  name = If klp_is_module(obj) Then external Else "vmlinux"
800  ret = kobject_add() - The main kobject add function.*@kobj: the kobject to add*@parent: pointer to the parent of the kobject.*@fmt: format to name the kobject with.* The kobject name is set and added to the kobject hierarchy in this* function.
801  If ret Then Return ret
804  klp_for_each_func(obj, func)
805  ret = klp_init_func(obj, func)
806  If ret Then Return ret
810  If klp_is_object_loaded(obj) Then ret = parts of the initialization that is done only when the object is loaded
813  Return ret
Caller
NameDescribe
klp_init_patch