函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lf_is_phdr_sane - check that it is safe to use the program header*@buf_len: size of the buffer in which the ELF file is loaded.

函数原型:static bool elf_is_phdr_sane(const struct elf64_phdr *phdr, size_t buf_len)

返回类型:bool

参数:

类型参数名称
const struct elf64_phdr *phdr
size_tbuf_len
188  如果 Segment file offset Segment size in file 小于 Segment file offset
189  pr_debug("ELF segment location wraps around.\n")
190  返回:false
191  否则如果 Segment file offset Segment size in file 大于buf_len
192  pr_debug("ELF segment not in file.\n")
193  返回:false
194  否则如果 Segment physical address Segment size in memory 小于 Segment physical address
195  pr_debug("ELF segment address wraps around.\n")
196  返回:false
199  返回:true
调用者
名称描述
elf_read_phdr