• Home
  • Raw
  • Download

Lines Matching refs:hdr

360 	for (i = 1; i < info->hdr->e_shnum; i++) {  in find_sec()
1608 for (i = 0; i < info->hdr->e_shnum; i++) in add_sect_attrs()
1625 for (i = 0; i < info->hdr->e_shnum; i++) { in add_sect_attrs()
1709 for (i = 0; i < info->hdr->e_shnum; i++) in add_notes_attrs()
1724 for (loaded = i = 0; i < info->hdr->e_shnum; ++i) { in add_notes_attrs()
2100 static int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_enforce_rwx_sections() argument
2106 for (i = 0; i < hdr->e_shnum; i++) { in module_enforce_rwx_sections()
2120 static int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs, in module_enforce_rwx_sections() argument
2144 size = sizeof(mod->klp_info->hdr); in copy_module_elf()
2145 memcpy(&mod->klp_info->hdr, info->hdr, size); in copy_module_elf()
2148 size = sizeof(*info->sechdrs) * info->hdr->e_shnum; in copy_module_elf()
2156 size = info->sechdrs[info->hdr->e_shstrndx].sh_size; in copy_module_elf()
2422 ignore_undef_symbol(info->hdr->e_machine, name))) in simplify_symbols()
2450 for (i = 1; i < info->hdr->e_shnum; i++) { in apply_relocations()
2454 if (infosec >= info->hdr->e_shnum) in apply_relocations()
2517 for (i = 0; i < info->hdr->e_shnum; i++) in layout_sections()
2522 for (i = 0; i < info->hdr->e_shnum; ++i) { in layout_sections()
2555 for (i = 0; i < info->hdr->e_shnum; ++i) { in layout_sections()
2636 char *modinfo = (char *)info->hdr + infosec->sh_offset; in get_next_modinfo()
2787 src = (void *)info->hdr + symsect->sh_offset; in layout_symtab()
2793 is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum, in layout_symtab()
2857 is_core_symbol(src+i, info->sechdrs, info->hdr->e_shnum, in add_kallsyms()
2918 for (i = 1; i < info->hdr->e_shnum; i++) { in kmemleak_load_module()
2942 const void *mod = info->hdr; in module_sig_check()
3024 if (info->len < sizeof(*(info->hdr))) in elf_validity_check()
3027 if (memcmp(info->hdr->e_ident, ELFMAG, SELFMAG) != 0 in elf_validity_check()
3028 || info->hdr->e_type != ET_REL in elf_validity_check()
3029 || !elf_check_arch(info->hdr) in elf_validity_check()
3030 || info->hdr->e_shentsize != sizeof(Elf_Shdr)) in elf_validity_check()
3038 if (info->hdr->e_shoff >= info->len in elf_validity_check()
3039 || (info->hdr->e_shnum * sizeof(Elf_Shdr) > in elf_validity_check()
3040 info->len - info->hdr->e_shoff)) in elf_validity_check()
3043 info->sechdrs = (void *)info->hdr + info->hdr->e_shoff; in elf_validity_check()
3048 if (info->hdr->e_shstrndx == SHN_UNDEF in elf_validity_check()
3049 || info->hdr->e_shstrndx >= info->hdr->e_shnum) in elf_validity_check()
3052 strhdr = &info->sechdrs[info->hdr->e_shstrndx]; in elf_validity_check()
3062 info->secstrings = (void *)info->hdr + strhdr->sh_offset; in elf_validity_check()
3075 for (i = 1; i < info->hdr->e_shnum; i++) { in elf_validity_check()
3083 || shdr->sh_link >= info->hdr->e_shnum) in elf_validity_check()
3166 if (info->len < sizeof(*(info->hdr))) in copy_module_from_user()
3174 info->hdr = __vmalloc(info->len, GFP_KERNEL | __GFP_NOWARN); in copy_module_from_user()
3175 if (!info->hdr) in copy_module_from_user()
3178 if (copy_chunked_from_user(info->hdr, umod, info->len) != 0) { in copy_module_from_user()
3183 err = security_kernel_post_load_data((char *)info->hdr, info->len, in copy_module_from_user()
3187 vfree(info->hdr); in copy_module_from_user()
3194 vfree(info->hdr); in free_copy()
3204 for (i = 1; i < info->hdr->e_shnum; i++) { in rewrite_section_headers()
3209 shdr->sh_addr = (size_t)info->hdr + shdr->sh_offset; in rewrite_section_headers()
3238 for (i = 1; i < info->hdr->e_shnum; i++) { in setup_load_info()
3242 info->strtab = (char *)info->hdr in setup_load_info()
3261 info->mod = (void *)info->hdr + info->sechdrs[info->index.mod].sh_offset; in setup_load_info()
3478 for (i = 0; i < info->hdr->e_shnum; i++) { in move_module()
3558 int __weak module_frob_arch_sections(Elf_Ehdr *hdr, in module_frob_arch_sections() argument
3598 err = module_frob_arch_sections(info->hdr, info->sechdrs, in layout_and_allocate()
3603 err = module_enforce_rwx_sections(info->hdr, info->sechdrs, in layout_and_allocate()
3663 int __weak module_finalize(const Elf_Ehdr *hdr, in module_finalize() argument
3683 return module_finalize(info->hdr, info->sechdrs, mod); in post_relocation()
3926 module_bug_finalize(info->hdr, info->sechdrs, mod); in complete_formation()
4234 void *hdr = NULL; in SYSCALL_DEFINE3() local
4247 err = kernel_read_file_from_fd(fd, 0, &hdr, INT_MAX, NULL, in SYSCALL_DEFINE3()
4251 info.hdr = hdr; in SYSCALL_DEFINE3()