/kernel/linux/linux-6.6/fs/ |
H A D | binfmt_elf_test.c | 7 { .p_type = PT_LOAD, .p_vaddr = 0, .p_memsz = 0, }, in total_mapping_size_test() 8 { .p_type = PT_INTERP, .p_vaddr = 10, .p_memsz = 999999, }, in total_mapping_size_test() 12 * $1 ", .p_vaddr = " $3 ", .p_memsz = " $6 ", },"}' in total_mapping_size_test() 15 { .p_type = PT_PHDR, .p_vaddr = 0x00000040, .p_memsz = 0x0002d8, }, in total_mapping_size_test() 16 { .p_type = PT_INTERP, .p_vaddr = 0x00000318, .p_memsz = 0x00001c, }, in total_mapping_size_test() 17 { .p_type = PT_LOAD, .p_vaddr = 0x00000000, .p_memsz = 0x0033a8, }, in total_mapping_size_test() 18 { .p_type = PT_LOAD, .p_vaddr = 0x00004000, .p_memsz = 0x005c91, }, in total_mapping_size_test() 19 { .p_type = PT_LOAD, .p_vaddr = 0x0000a000, .p_memsz = 0x0022f8, }, in total_mapping_size_test() 20 { .p_type = PT_LOAD, .p_vaddr = 0x0000d330, .p_memsz = 0x000d40, }, in total_mapping_size_test() 21 { .p_type = PT_DYNAMIC, .p_vaddr = 0x0000d928, .p_memsz in total_mapping_size_test() [all...] |
H A D | binfmt_elf_fdpic.c | 171 params->stack_size = phdr->p_memsz; in elf_fdpic_fetch_phdrs() 793 params->hdr.e_entry < seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file() 819 seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file() 839 phdr->p_vaddr + phdr->p_memsz <= in elf_fdpic_map_file() 840 seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file() 851 if (phdr->p_memsz == 0 || in elf_fdpic_map_file() 852 phdr->p_memsz % sizeof(Elf_Dyn) != 0) in elf_fdpic_map_file() 855 tmp = phdr->p_memsz / sizeof(Elf_Dyn); in elf_fdpic_map_file() 877 load_addr = PAGE_ALIGN(mseg->addr + mseg->p_memsz); in elf_fdpic_map_file() 879 mseg->p_memsz in elf_fdpic_map_file() [all...] |
/kernel/linux/linux-5.10/arch/ia64/kernel/ |
H A D | elfcore.c | 26 phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); in elf_core_write_extra_phdrs() 27 phdr.p_filesz = phdr.p_memsz; in elf_core_write_extra_phdrs() 53 size_t memsz = PAGE_ALIGN(gate_phdrs[i].p_memsz); in elf_core_write_extra_data() 72 size += PAGE_ALIGN(gate_phdrs[i].p_memsz); in elf_core_extra_data_size()
|
/kernel/linux/linux-6.6/arch/ia64/kernel/ |
H A D | elfcore.c | 26 phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); in elf_core_write_extra_phdrs() 27 phdr.p_filesz = phdr.p_memsz; in elf_core_write_extra_phdrs() 53 size_t memsz = PAGE_ALIGN(gate_phdrs[i].p_memsz); in elf_core_write_extra_data() 72 size += PAGE_ALIGN(gate_phdrs[i].p_memsz); in elf_core_extra_data_size()
|
/kernel/linux/linux-5.10/drivers/soc/qcom/ |
H A D | mdt_loader.c | 28 if (!phdr->p_memsz) in mdt_phdr_valid() 61 if (phdr->p_paddr + phdr->p_memsz > max_addr) in qcom_mdt_get_size() 62 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in qcom_mdt_get_size() 193 if (phdr->p_paddr + phdr->p_memsz > max_addr) in __qcom_mdt_load() 194 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in __qcom_mdt_load() 227 if (offset < 0 || offset + phdr->p_memsz > mem_size) { in __qcom_mdt_load() 233 if (phdr->p_filesz > phdr->p_memsz) { in __qcom_mdt_load() 235 "refusing to load segment %d with p_filesz > p_memsz\n", in __qcom_mdt_load() 276 if (phdr->p_memsz > phdr->p_filesz) in __qcom_mdt_load() 277 memset(ptr + phdr->p_filesz, 0, phdr->p_memsz in __qcom_mdt_load() [all...] |
/kernel/linux/linux-5.10/fs/ |
H A D | binfmt_elf_fdpic.c | 171 params->stack_size = phdr->p_memsz; in elf_fdpic_fetch_phdrs() 794 params->hdr.e_entry < seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file() 820 seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file() 840 phdr->p_vaddr + phdr->p_memsz <= in elf_fdpic_map_file() 841 seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file() 852 if (phdr->p_memsz == 0 || in elf_fdpic_map_file() 853 phdr->p_memsz % sizeof(Elf32_Dyn) != 0) in elf_fdpic_map_file() 856 tmp = phdr->p_memsz / sizeof(Elf32_Dyn); in elf_fdpic_map_file() 878 load_addr = PAGE_ALIGN(mseg->addr + mseg->p_memsz); in elf_fdpic_map_file() 880 mseg->p_memsz in elf_fdpic_map_file() [all...] |
H A D | binfmt_elf.c | 413 return cmds[last_idx].p_vaddr + cmds[last_idx].p_memsz - in total_mapping_size() 650 * <= p_memsize so it's only necessary to check p_memsz. in load_elf_interp() 654 eppnt->p_filesz > eppnt->p_memsz || in load_elf_interp() 655 eppnt->p_memsz > TASK_SIZE || in load_elf_interp() 656 TASK_SIZE - eppnt->p_memsz < k) { in load_elf_interp() 673 k = load_addr + eppnt->p_vaddr + eppnt->p_memsz; in load_elf_interp() 1040 if (elf_ppnt->p_memsz > PT_OHOS_RANDOMDATA_SIZE_LIMIT) { in load_elf_binary() 1045 temp_buf = vmalloc(elf_ppnt->p_memsz); in load_elf_binary() 1051 get_random_bytes(temp_buf, (int)elf_ppnt->p_memsz); in load_elf_binary() 1052 if (copy_to_user((void *)(elf_ppnt->p_vaddr + load_bias), temp_buf, (unsigned long)elf_ppnt->p_memsz)) { in load_elf_binary() [all...] |
/kernel/linux/linux-5.10/fs/proc/ |
H A D | vmcore.c | 699 * update_note_header_size_elf64 - update p_memsz member of each PT_NOTE entry 703 * This function updates p_memsz member of each PT_NOTE entry in the 719 max_sz = phdr_ptr->p_memsz; in update_note_header_size_elf64() 735 pr_warn("Warning: Exceeded p_memsz, dropping PT_NOTE entry n_namesz=0x%x, n_descsz=0x%x\n", in update_note_header_size_elf64() 743 phdr_ptr->p_memsz = real_sz; in update_note_header_size_elf64() 768 * size in its p_memsz member. 783 *sz_ptnote += phdr_ptr->p_memsz; in get_note_number_and_size_elf64() 803 * size in its p_memsz member. 817 rc = elfcorehdr_read_notes(notes_buf, phdr_ptr->p_memsz, in copy_notes_elf64() 821 notes_buf += phdr_ptr->p_memsz; in copy_notes_elf64() [all...] |
/kernel/linux/linux-6.6/fs/proc/ |
H A D | vmcore.c | 715 * update_note_header_size_elf64 - update p_memsz member of each PT_NOTE entry 719 * This function updates p_memsz member of each PT_NOTE entry in the 735 max_sz = phdr_ptr->p_memsz; in update_note_header_size_elf64() 751 pr_warn("Warning: Exceeded p_memsz, dropping PT_NOTE entry n_namesz=0x%x, n_descsz=0x%x\n", in update_note_header_size_elf64() 759 phdr_ptr->p_memsz = real_sz; in update_note_header_size_elf64() 784 * size in its p_memsz member. 799 *sz_ptnote += phdr_ptr->p_memsz; in get_note_number_and_size_elf64() 819 * size in its p_memsz member. 833 rc = elfcorehdr_read_notes(notes_buf, phdr_ptr->p_memsz, in copy_notes_elf64() 837 notes_buf += phdr_ptr->p_memsz; in copy_notes_elf64() [all...] |
/kernel/linux/linux-6.6/drivers/soc/qcom/ |
H A D | mdt_loader.c | 28 if (!phdr->p_memsz) in mdt_phdr_valid() 99 if (phdr->p_paddr + phdr->p_memsz > max_addr) in qcom_mdt_get_size() 100 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in qcom_mdt_get_size() 234 if (phdr->p_paddr + phdr->p_memsz > max_addr) in qcom_mdt_pas_init() 235 max_addr = ALIGN(phdr->p_paddr + phdr->p_memsz, SZ_4K); in qcom_mdt_pas_init() 353 if (offset < 0 || offset + phdr->p_memsz > mem_size) { in __qcom_mdt_load() 359 if (phdr->p_filesz > phdr->p_memsz) { in __qcom_mdt_load() 361 "refusing to load segment %d with p_filesz > p_memsz\n", in __qcom_mdt_load() 386 if (phdr->p_memsz > phdr->p_filesz) in __qcom_mdt_load() 387 memset(ptr + phdr->p_filesz, 0, phdr->p_memsz in __qcom_mdt_load() [all...] |
/kernel/linux/linux-6.6/include/uapi/linux/ |
H A D | elf-fdpic.h | 24 Elf32_Word p_memsz; /* allocation size recorded in file */ member 39 Elf64_Word p_memsz; /* allocation size recorded in file */ member
|
/kernel/linux/common_modules/xpm/validator/ |
H A D | elf_code_segment_info.c | 102 uint32_t p_memsz; in get_elf32_code_segment() local 114 p_memsz = elf32_get_value(&elf_info->elf_ehdr, phdr_info->p_memsz); in get_elf32_code_segment() 115 if (p_offset + p_filesz < p_offset || p_addr + p_memsz < p_addr) in get_elf32_code_segment() 151 uint64_t p_memsz; in get_elf64_code_segment() local 163 p_memsz = elf64_get_value(&elf_info->elf_ehdr, phdr_info->p_memsz); in get_elf64_code_segment() 164 if (p_offset + p_filesz < p_offset || p_addr + p_memsz < p_addr) in get_elf64_code_segment()
|
/kernel/linux/linux-5.10/kernel/ |
H A D | kexec_elf.c | 194 } else if (phdr->p_paddr + phdr->p_memsz < phdr->p_paddr) { in elf_is_phdr_sane() 224 phdr->p_memsz = elf64_to_cpu(ehdr, buf_phdr->p_memsz); in elf_read_phdr() 233 phdr->p_memsz = elf32_to_cpu(ehdr, buf_phdr->p_memsz); in elf_read_phdr() 408 if (size > phdr->p_memsz) in kexec_elf_load() 409 size = phdr->p_memsz; in kexec_elf_load() 413 kbuf->memsz = phdr->p_memsz; in kexec_elf_load()
|
/kernel/linux/linux-6.6/kernel/ |
H A D | kexec_elf.c | 194 } else if (phdr->p_paddr + phdr->p_memsz < phdr->p_paddr) { in elf_is_phdr_sane() 224 phdr->p_memsz = elf64_to_cpu(ehdr, buf_phdr->p_memsz); in elf_read_phdr() 233 phdr->p_memsz = elf32_to_cpu(ehdr, buf_phdr->p_memsz); in elf_read_phdr() 408 if (size > phdr->p_memsz) in kexec_elf_load() 409 size = phdr->p_memsz; in kexec_elf_load() 413 kbuf->memsz = phdr->p_memsz; in kexec_elf_load()
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/lib/ |
H A D | elf.c | 157 TEST_ASSERT(phdr.p_memsz > 0, "Unexpected loadable segment " in kvm_vm_elf_load() 159 " phdr index: %u p_memsz: 0x%" PRIx64, in kvm_vm_elf_load() 160 n1, (uint64_t) phdr.p_memsz); in kvm_vm_elf_load() 163 vm_vaddr_t seg_vend = phdr.p_vaddr + phdr.p_memsz - 1; in kvm_vm_elf_load()
|
/kernel/linux/linux-6.6/tools/testing/selftests/kvm/lib/ |
H A D | elf.c | 156 TEST_ASSERT(phdr.p_memsz > 0, "Unexpected loadable segment " in kvm_vm_elf_load() 158 " phdr index: %u p_memsz: 0x%" PRIx64, in kvm_vm_elf_load() 159 n1, (uint64_t) phdr.p_memsz); in kvm_vm_elf_load() 161 vm_vaddr_t seg_vend = phdr.p_vaddr + phdr.p_memsz - 1; in kvm_vm_elf_load()
|
/kernel/linux/linux-5.10/arch/sparc/vdso/ |
H A D | vdso2c.h | 37 if (GET_BE(&pt[i].p_memsz) != GET_BE(&pt[i].p_filesz)) in go() 40 load_size = GET_BE(&pt[i].p_memsz); in go() 45 GET_BE(&pt[i].p_memsz); in go()
|
/kernel/linux/linux-6.6/arch/sparc/vdso/ |
H A D | vdso2c.h | 37 if (GET_BE(&pt[i].p_memsz) != GET_BE(&pt[i].p_filesz)) in go() 40 load_size = GET_BE(&pt[i].p_memsz); in go() 45 GET_BE(&pt[i].p_memsz); in go()
|
/kernel/linux/linux-5.10/arch/powerpc/boot/ |
H A D | elf_util.c | 44 info->memsize = (unsigned long)elf64ph->p_memsz; in parse_elf64() 75 info->memsize = elf32ph->p_memsz; in parse_elf32()
|
H A D | elf.h | 101 Elf32_Word p_memsz; member 113 Elf64_Xword p_memsz; /* Segment size in memory */ member
|
/kernel/linux/linux-6.6/arch/powerpc/boot/ |
H A D | elf_util.c | 44 info->memsize = (unsigned long)elf64ph->p_memsz; in parse_elf64() 75 info->memsize = elf32ph->p_memsz; in parse_elf32()
|
H A D | elf.h | 101 Elf32_Word p_memsz; member 113 Elf64_Xword p_memsz; /* Segment size in memory */ member
|
/kernel/linux/linux-5.10/arch/x86/entry/vdso/ |
H A D | vdso2c.h | 38 if (GET_LE(&pt[i].p_memsz) != GET_LE(&pt[i].p_filesz)) in go() 41 load_size = GET_LE(&pt[i].p_memsz); in go() 46 GET_LE(&pt[i].p_memsz); in go()
|
/kernel/linux/linux-5.10/arch/s390/kernel/ |
H A D | kexec_elf.c | 45 buf.memsz = phdr->p_memsz; in kexec_file_add_kernel_elf() 48 if (entry - phdr->p_paddr < phdr->p_memsz) { in kexec_file_add_kernel_elf()
|
/kernel/linux/linux-6.6/arch/s390/kernel/ |
H A D | kexec_elf.c | 45 buf.memsz = phdr->p_memsz; in kexec_file_add_kernel_elf() 48 if (entry - phdr->p_paddr < phdr->p_memsz) { in kexec_file_add_kernel_elf()
|