Function report |
Source Code:kernel\kexec_elf.c |
Create Date:2022-07-28 11:04:55 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:static bool elf_is_phdr_sane(const struct elf64_phdr *phdr, size_t buf_len)
Type:bool
Parameter:
Type | Parameter | Name |
---|---|---|
const struct elf64_phdr * | phdr | |
size_t | buf_len |
188 | If Segment file offset + Segment size in file < Segment file offset Then |
189 | pr_debug("ELF segment location wraps around.\n") |
190 | Return false |
191 | Else if Segment file offset + Segment size in file > buf_len Then |
192 | pr_debug("ELF segment not in file.\n") |
193 | Return false |
194 | Else if Segment physical address + Segment size in memory < Segment physical address Then |
195 | pr_debug("ELF segment address wraps around.\n") |
196 | Return false |
199 | Return true |
Name | Describe |
---|---|
elf_read_phdr |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |