函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:klp_module_coming

函数原型:int klp_module_coming(struct module *mod)

返回类型:int

参数:

类型参数名称
struct module *mod
1139  如果WARN_ON(state != MODULE_STATE_COMING)则返回:负EINVAL
1142  mutex_lock( & klp_mutex is a coarse lock which serializes access to klp data)
1148  klp_alive = true
1150  klp_for_each_patch(patch)
1152  如果非klp_is_module(obj)或字符串比较则继续下一循环
1155  mod等于mod
1158  如果ret
1159  打印警告信息("failed to initialize patch '%s' for module '%s' (%d)\n", Unique handle for this module , Unique handle for this module , ret)
1161  转到:err
1164  打印注释信息("applying patch '%s' to loading module '%s'\n", Unique handle for this module , Unique handle for this module )
1168  如果ret
1169  打印警告信息("pre-patch callback failed for object '%s'\n", external )
1171  转到:err
1174  ret等于klp_patch_object(obj)
1175  如果ret
1176  打印警告信息("failed to apply patch '%s' to module '%s' (%d)\n", Unique handle for this module , Unique handle for this module , ret)
1180  转到:err
1186  退出
1190  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1192  返回:0
1194  err :
1199  打印警告信息("patch '%s' failed for module '%s', refusing to load module '%s'\n", Unique handle for this module , Unique handle for this module , Unique handle for this module )
1201  klp_alive = false
1202  mod = NULL
1203  Remove parts of patches that touch a given kernel module. The list of* patches processed might be limited. When limit is NULL, all patches* will be handled.
1204  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1206  返回:ret
调用者
名称描述
prepare_coming_module