Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:klp_find_object_symbol

Proto:static int klp_find_object_symbol(const char *objname, const char *name, unsigned long sympos, unsigned long *addr)

Type:int

Parameter:

TypeParameterName
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  If objname Then module_kallsyms_on_each_symbol(klp_find_callback, & args)
169  Else 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  If addr == 0 Then pr_err("symbol '%s' not found in symbol table\n", name)
179  Else if count > 1 && sympos == 0 Then
180  pr_err("unresolvable ambiguity for symbol '%s' in object '%s'\n", name, objname)
182  Else if sympos != count && sympos > 0 Then
183  pr_err("symbol position %lu for symbol '%s' in object '%s' not found\n", sympos, name, objname ? objname : "vmlinux")
185  Else
186  addr = addr
187  Return 0
190  addr = 0
191  Return -EINVAL
Caller
NameDescribe
klp_resolve_symbols
klp_init_object_loadedparts of the initialization that is done only when the object is loaded