Date: Tue, 7 Mar 2017 13:36:43 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314849 - head/sys/kern Message-ID: <201703071336.v27DahJO070012@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Mar 7 13:36:43 2017 New Revision: 314849 URL: https://svnweb.freebsd.org/changeset/base/314849 Log: Consistently use vm_ooffset_t type for the vm object offset in elf_load_section. The values passed currently as vm_offset_t are phdr.p_offset, which have the native Elf word size. Since elf_load_section interprets them as the file offset, use vm object offset type. Noted and reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Mar 7 12:43:37 2017 (r314848) +++ head/sys/kern/imgact_elf.c Tue Mar 7 13:36:43 2017 (r314849) @@ -89,7 +89,7 @@ static Elf_Brandinfo *__elfN(get_brandin const char *interp, int interp_name_len, int32_t *osrel); static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr, u_long *entry, size_t pagesize); -static int __elfN(load_section)(struct image_params *imgp, vm_offset_t offset, +static int __elfN(load_section)(struct image_params *imgp, vm_ooffset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot, size_t pagesize); static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); @@ -490,7 +490,7 @@ __elfN(map_insert)(struct image_params * } static int -__elfN(load_section)(struct image_params *imgp, vm_offset_t offset, +__elfN(load_section)(struct image_params *imgp, vm_ooffset_t offset, caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot, size_t pagesize) { @@ -501,7 +501,7 @@ __elfN(load_section)(struct image_params vm_offset_t map_addr; int error, rv, cow; size_t copy_len; - vm_offset_t file_addr; + vm_ooffset_t file_addr; /* * It's necessary to fail if the filsz + offset taken from the
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703071336.v27DahJO070012>