Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Sanity checks against invalid binaries, wrong arch, weird elf version.

Proto:static int elf_header_check(struct load_info *info)

Type:int

Parameter:

TypeParameterName
struct load_info *info
2909  If len < size of *hdr Then Return -ENOEXEC
2912  If memcmp(e_ident, ELFMAG, SELFMAG) != 0 || e_type != ET_REL || Not elf_check_arch(hdr) || e_shentsize != size of Elf_Shdr Then Return -ENOEXEC
2918  If e_shoff >= len || e_shnum * size of Elf_Shdr > len - e_shoff Then Return -ENOEXEC
2923  Return 0
Caller
NameDescribe
load_moduleAllocate and load the module: note that size of section 0 is alwayszero, and we rely on this for optional sections.