Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:const char *kallsyms_lookup(unsigned long addr, unsigned long *symbolsize, unsigned long *offset, char **modname, char *namebuf)

Type:char

Parameter:

TypeParameterName
unsigned longaddr
unsigned long *symbolsize
unsigned long *offset
char **modname
char *namebuf
288  namebuf[KSYM_NAME_LEN - 1] = 0
289  namebuf[0] = 0
291  If is_ksym_addr(addr) Then
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  If modname Then * modname = NULL
300  Return 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  If Not ret Then ret = bpf_address_lookup(addr, symbolsize, offset, modname, namebuf)
310  If Not ret Then ret = ftrace_mod_address_lookup(addr, symbolsize, offset, modname, namebuf)
313  Return ret
Caller
NameDescribe
__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