函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Parse build id from the note segment. This logic can be shared between* 32-bit and 64-bit system, because Elf32_Nhdr and Elf64_Nhdr are* identical.

函数原型:static inline int stack_map_parse_build_id(void *page_addr, unsigned char *build_id, void *note_start, Elf32_Word note_size)

返回类型:int

参数:

类型参数名称
void *page_addr
unsigned char *build_id
void *note_start
Elf32_Wordnote_size
163  note_offs等于0
166  如果note_start小于page_addrnote_startnote_size小于note_start则返回:负EINVAL
170  如果note_startnote_size大于page_addrPAGE_SIZE则返回:负EINVAL
173 note_offssizeof(Elf32_Nhdr)小于note_size循环
174  nhdr等于note_startnote_offs
176  如果n_type恒等于BPF_BUILD_IDName size 恒等于"GNU"的长度且Content size 大于0且Content size 小于等于BPF_BUILD_ID_SIZE
186  返回:0
188  new_offs等于note_offssizeof(Elf32_Nhdr)加@a is a power of 2 value (Name size , 4)加@a is a power of 2 value (Content size , 4)
190  如果new_offs小于等于note_offs退出
192  note_offs等于new_offs
194  返回:负EINVAL
调用者
名称描述
stack_map_get_build_id_32Parse build ID from 32-bit ELF
stack_map_get_build_id_64Parse build ID from 64-bit ELF