函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Lookup an address* - modname is set to NULL if it's in the kernel.* - We guarantee that the returned name is valid until we reschedule even if.* It resides in a module.* - We also guarantee that modname will be valid until rescheduled.

函数原型:const char *kallsyms_lookup(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf)

返回类型:char

参数:

类型参数名称
unsigned longaddr
unsigned long *symbolsize
unsigned long *offset
char **modname
char *namebuf
288  namebuf[KSYM_NAME_LEN - 1]等于0
289  namebuf[0]等于0
291  如果is_ksym_addr(addr)则
294  pos等于get_symbol_pos(addr, symbolsize, offset)
296  Expand a compressed symbol data into the resulting uncompressed string,* if uncompressed string is too long (>= maxlen), it will be truncated,* given the offset to where the symbol is in the compressed stream.
298  如果modname则 * modname = NULL
300  返回:namebuf
304  ret等于For kallsyms to ask for address resolution. namebuf should be at* least KSYM_NAME_LEN long: a pointer to namebuf is returned if* found, otherwise NULL.
306  如果非retret等于bpf_address_lookup(addr, symbolsize, offset, modname, namebuf)
310  如果非retret等于ftrace_mod_address_lookup(addr, symbolsize, offset, modname, namebuf)
313  返回:ret
调用者
名称描述
__sprint_symbolLook up a kernel symbol and return it in a text buffer.
kdbnearsymkdbnearsym - Return the name of the symbol with the nearest address* less than 'addr'
find_syscall_meta
__btf_resolve_helper_id