函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:klp_find_object_symbol

函数原型:static int klp_find_object_symbol(const char *objname, const char *name, unsigned long sympos, unsigned long *addr)

返回类型:int

参数:

类型参数名称
const char *objname
const char *name
unsigned longsympos
unsigned long *addr
158  struct klp_find_arg args = {objname = objname, name = name, addr = 0, count = 0, pos = sympos, }
166  mutex_lock( & module_mutex)
167  如果objnamemodule_kallsyms_on_each_symbol(klp_find_callback, & args)
169  否则kallsyms_on_each_symbol(klp_find_callback, & args)
171  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.
177  如果addr恒等于0则打印错误信息("symbol '%s' not found in symbol table\n", name)
179  否则如果count大于1且sympos恒等于0则
180  打印错误信息("unresolvable ambiguity for symbol '%s' in object '%s'\n", name, objname)
182  否则如果sympos不等于countsympos大于0则
183  打印错误信息("symbol position %lu for symbol '%s' in object '%s' not found\n", sympos, name, objname ? objname : "vmlinux")
185  否则
186  addr等于addr
187  返回:0
190  addr等于0
191  返回:负EINVAL
调用者
名称描述
klp_resolve_symbols
klp_init_object_loadedparts of the initialization that is done only when the object is loaded