From owner-svn-src-stable@freebsd.org Tue May 14 19:52:24 2019 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EB6C1596E3E; Tue, 14 May 2019 19:52:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0083B81E03; Tue, 14 May 2019 19:52:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D618625AA7; Tue, 14 May 2019 19:52:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x4EJqNib053261; Tue, 14 May 2019 19:52:23 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x4EJqIYE053236; Tue, 14 May 2019 19:52:18 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201905141952.x4EJqIYE053236@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 14 May 2019 19:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r347571 - in stable/12/sys: amd64/amd64 amd64/cloudabi32 amd64/cloudabi64 amd64/linux amd64/linux32 arm/arm arm/cloudabi32 arm64/arm64 arm64/cloudabi32 arm64/cloudabi64 arm64/linux comp... X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in stable/12/sys: amd64/amd64 amd64/cloudabi32 amd64/cloudabi64 amd64/linux amd64/linux32 arm/arm arm/cloudabi32 arm64/arm64 arm64/cloudabi32 arm64/cloudabi64 arm64/linux compat/ia32 i386/cloudabi32 i... X-SVN-Commit-Revision: 347571 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 0083B81E03 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 May 2019 19:52:24 -0000 Author: trasz Date: Tue May 14 19:52:18 2019 New Revision: 347571 URL: https://svnweb.freebsd.org/changeset/base/347571 Log: MFC r344705: Remove sv_pagesize, originally introduced with r100384. In all of the architectures we have today, we always use PAGE_SIZE. While in theory one could define different things, none of the current architectures do, even the ones that have transitioned from 32-bit to 64-bit like i386 and arm. Some ancient mips binaries on other systems used 8k instead of 4k, but we don't support running those and likely never will due to their age and obscurity. Differently from the original commit, the merge leaves the struct member in place to preserve the ABI. Sponsored by: DARPA, AFRL Modified: stable/12/sys/amd64/amd64/elf_machdep.c stable/12/sys/amd64/cloudabi32/cloudabi32_sysvec.c stable/12/sys/amd64/cloudabi64/cloudabi64_sysvec.c stable/12/sys/amd64/linux/linux_sysvec.c stable/12/sys/amd64/linux32/linux32_sysvec.c stable/12/sys/arm/arm/elf_machdep.c stable/12/sys/arm/cloudabi32/cloudabi32_sysvec.c stable/12/sys/arm64/arm64/elf_machdep.c stable/12/sys/arm64/cloudabi32/cloudabi32_sysvec.c stable/12/sys/arm64/cloudabi64/cloudabi64_sysvec.c stable/12/sys/arm64/linux/linux_sysvec.c stable/12/sys/compat/ia32/ia32_sysvec.c stable/12/sys/i386/cloudabi32/cloudabi32_sysvec.c stable/12/sys/i386/i386/elf_machdep.c stable/12/sys/i386/linux/linux_sysvec.c stable/12/sys/kern/imgact_aout.c stable/12/sys/kern/imgact_elf.c stable/12/sys/kern/init_main.c stable/12/sys/mips/mips/elf_machdep.c stable/12/sys/mips/mips/freebsd32_machdep.c stable/12/sys/powerpc/powerpc/elf32_machdep.c stable/12/sys/powerpc/powerpc/elf64_machdep.c stable/12/sys/riscv/riscv/elf_machdep.c stable/12/sys/sparc64/sparc64/elf_machdep.c stable/12/sys/sys/sysent.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/elf_machdep.c ============================================================================== --- stable/12/sys/amd64/amd64/elf_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/amd64/amd64/elf_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -64,7 +64,6 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/amd64/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- stable/12/sys/amd64/cloudabi32/cloudabi32_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/amd64/cloudabi32/cloudabi32_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -210,7 +210,6 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup_tcb, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, - .sv_pagesize = IA32_PAGE_SIZE, .sv_minuser = FREEBSD32_MINUSER, .sv_maxuser = FREEBSD32_MAXUSER, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, Modified: stable/12/sys/amd64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- stable/12/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/amd64/cloudabi64/cloudabi64_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -197,7 +197,6 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_fixup = cloudabi64_fixup_tcb, .sv_name = "CloudABI ELF64", .sv_coredump = elf64_coredump, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, /* Keep top page reserved to work around AMD Ryzen stability issues. */ .sv_maxuser = VM_MAXUSER_ADDRESS - PAGE_SIZE, Modified: stable/12/sys/amd64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux/linux_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/amd64/linux/linux_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -723,7 +723,6 @@ struct sysentvec elf_linux_sysvec = { .sv_coredump = elf64_coredump, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/12/sys/amd64/linux32/linux32_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/amd64/linux32/linux32_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -921,7 +921,6 @@ struct sysentvec elf_linux_sysvec = { .sv_coredump = elf32_coredump, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = LINUX32_MAXUSER, .sv_usrstack = LINUX32_USRSTACK, Modified: stable/12/sys/arm/arm/elf_machdep.c ============================================================================== --- stable/12/sys/arm/arm/elf_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/arm/arm/elf_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -71,7 +71,6 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/arm/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- stable/12/sys/arm/cloudabi32/cloudabi32_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/arm/cloudabi32/cloudabi32_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -174,7 +174,6 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, Modified: stable/12/sys/arm64/arm64/elf_machdep.c ============================================================================== --- stable/12/sys/arm64/arm64/elf_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/arm64/arm64/elf_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -70,7 +70,6 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/arm64/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- stable/12/sys/arm64/cloudabi32/cloudabi32_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/arm64/cloudabi32/cloudabi32_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -182,7 +182,6 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = (uintmax_t)1 << 32, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, Modified: stable/12/sys/arm64/cloudabi64/cloudabi64_sysvec.c ============================================================================== --- stable/12/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/arm64/cloudabi64/cloudabi64_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -166,7 +166,6 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_fixup = cloudabi64_fixup, .sv_name = "CloudABI ELF64", .sv_coredump = elf64_coredump, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, Modified: stable/12/sys/arm64/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/arm64/linux/linux_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/arm64/linux/linux_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -376,7 +376,6 @@ struct sysentvec elf_linux_sysvec = { .sv_coredump = elf64_coredump, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/12/sys/compat/ia32/ia32_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/compat/ia32/ia32_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -110,7 +110,6 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_coredump = elf32_coredump, .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = IA32_PAGE_SIZE, .sv_minuser = FREEBSD32_MINUSER, .sv_maxuser = FREEBSD32_MAXUSER, .sv_usrstack = FREEBSD32_USRSTACK, Modified: stable/12/sys/i386/cloudabi32/cloudabi32_sysvec.c ============================================================================== --- stable/12/sys/i386/cloudabi32/cloudabi32_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/i386/cloudabi32/cloudabi32_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -185,7 +185,6 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup_tcb, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, Modified: stable/12/sys/i386/i386/elf_machdep.c ============================================================================== --- stable/12/sys/i386/i386/elf_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/i386/i386/elf_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -66,7 +66,6 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/12/sys/i386/linux/linux_sysvec.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/i386/linux/linux_sysvec.c Tue May 14 19:52:18 2019 (r347571) @@ -862,7 +862,6 @@ struct sysentvec linux_sysvec = { .sv_coredump = NULL, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = LINUX_USRSTACK, @@ -899,7 +898,6 @@ struct sysentvec elf_linux_sysvec = { .sv_coredump = elf32_coredump, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = LINUX_USRSTACK, Modified: stable/12/sys/kern/imgact_aout.c ============================================================================== --- stable/12/sys/kern/imgact_aout.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/kern/imgact_aout.c Tue May 14 19:52:18 2019 (r347571) @@ -88,7 +88,6 @@ struct sysentvec aout_sysvec = { .sv_coredump = NULL, .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = AOUT32_USRSTACK, .sv_usrstack = AOUT32_USRSTACK, @@ -131,7 +130,6 @@ struct sysentvec aout_sysvec = { .sv_coredump = NULL, .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = IA32_PAGE_SIZE, .sv_minuser = AOUT32_MINUSER, .sv_maxuser = AOUT32_USRSTACK, .sv_usrstack = AOUT32_USRSTACK, Modified: stable/12/sys/kern/imgact_elf.c ============================================================================== --- stable/12/sys/kern/imgact_elf.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/kern/imgact_elf.c Tue May 14 19:52:18 2019 (r347571) @@ -90,10 +90,9 @@ static int __elfN(check_header)(const Elf_Ehdr *hdr); static Elf_Brandinfo *__elfN(get_brandinfo)(struct image_params *imgp, const char *interp, int interp_name_len, int32_t *osrel, uint32_t *fctl0); static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr, - u_long *entry, size_t pagesize); + u_long *entry); 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); + caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot); static int __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp); static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel); @@ -542,8 +541,7 @@ __elfN(map_insert)(struct image_params *imgp, vm_map_t 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) + caddr_t vmaddr, size_t memsz, size_t filsz, vm_prot_t prot) { struct sf_buf *sf; size_t map_len; @@ -571,8 +569,8 @@ __elfN(load_section)(struct image_params *imgp, vm_oof object = imgp->object; map = &imgp->proc->p_vmspace->vm_map; - map_addr = trunc_page_ps((vm_offset_t)vmaddr, pagesize); - file_addr = trunc_page_ps(offset, pagesize); + map_addr = trunc_page_ps((vm_offset_t)vmaddr, PAGE_SIZE); + file_addr = trunc_page_ps(offset, PAGE_SIZE); /* * We have two choices. We can either clear the data in the last page @@ -583,9 +581,9 @@ __elfN(load_section)(struct image_params *imgp, vm_oof if (filsz == 0) map_len = 0; else if (memsz > filsz) - map_len = trunc_page_ps(offset + filsz, pagesize) - file_addr; + map_len = trunc_page_ps(offset + filsz, PAGE_SIZE) - file_addr; else - map_len = round_page_ps(offset + filsz, pagesize) - file_addr; + map_len = round_page_ps(offset + filsz, PAGE_SIZE) - file_addr; if (map_len != 0) { /* cow flags: don't dump readonly sections in core */ @@ -615,9 +613,9 @@ __elfN(load_section)(struct image_params *imgp, vm_oof * to try and save a page, but it's a pain in the behind to implement. */ copy_len = filsz == 0 ? 0 : (offset + filsz) - trunc_page_ps(offset + - filsz, pagesize); - map_addr = trunc_page_ps((vm_offset_t)vmaddr + filsz, pagesize); - map_len = round_page_ps((vm_offset_t)vmaddr + memsz, pagesize) - + filsz, PAGE_SIZE); + map_addr = trunc_page_ps((vm_offset_t)vmaddr + filsz, PAGE_SIZE); + map_len = round_page_ps((vm_offset_t)vmaddr + memsz, PAGE_SIZE) - map_addr; /* This had damn well better be true! */ @@ -634,7 +632,7 @@ __elfN(load_section)(struct image_params *imgp, vm_oof return (EIO); /* send the page fragment to user space */ - off = trunc_page_ps(offset + filsz, pagesize) - + off = trunc_page_ps(offset + filsz, PAGE_SIZE) - trunc_page(offset + filsz); error = copyout((caddr_t)sf_buf_kva(sf) + off, (caddr_t)map_addr, copy_len); @@ -668,7 +666,7 @@ __elfN(load_section)(struct image_params *imgp, vm_oof */ static int __elfN(load_file)(struct proc *p, const char *file, u_long *addr, - u_long *entry, size_t pagesize) + u_long *entry) { struct { struct nameidata nd; @@ -767,7 +765,7 @@ __elfN(load_file)(struct proc *p, const char *file, u_ prot = __elfN(trans_prot)(phdr[i].p_flags); error = __elfN(load_section)(imgp, phdr[i].p_offset, (caddr_t)(uintptr_t)phdr[i].p_vaddr + rbase, - phdr[i].p_memsz, phdr[i].p_filesz, prot, pagesize); + phdr[i].p_memsz, phdr[i].p_filesz, prot); if (error != 0) goto fail; /* @@ -1056,8 +1054,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i prot = __elfN(trans_prot)(phdr[i].p_flags); error = __elfN(load_section)(imgp, phdr[i].p_offset, (caddr_t)(uintptr_t)phdr[i].p_vaddr + et_dyn_addr, - phdr[i].p_memsz, phdr[i].p_filesz, prot, - sv->sv_pagesize); + phdr[i].p_memsz, phdr[i].p_filesz, prot); if (error != 0) goto ret; @@ -1176,7 +1173,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i snprintf(path, MAXPATHLEN, "%s%s", brand_info->emul_path, interp); error = __elfN(load_file)(imgp->proc, path, &addr, - &imgp->entry_addr, sv->sv_pagesize); + &imgp->entry_addr); free(path, M_TEMP); if (error == 0) have_interp = TRUE; @@ -1185,13 +1182,13 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i (brand_info->interp_path == NULL || strcmp(interp, brand_info->interp_path) == 0)) { error = __elfN(load_file)(imgp->proc, newinterp, &addr, - &imgp->entry_addr, sv->sv_pagesize); + &imgp->entry_addr); if (error == 0) have_interp = TRUE; } if (!have_interp) { error = __elfN(load_file)(imgp->proc, interp, &addr, - &imgp->entry_addr, sv->sv_pagesize); + &imgp->entry_addr); } vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) { Modified: stable/12/sys/kern/init_main.c ============================================================================== --- stable/12/sys/kern/init_main.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/kern/init_main.c Tue May 14 19:52:18 2019 (r347571) @@ -411,7 +411,6 @@ struct sysentvec null_sysvec = { .sv_coredump = NULL, .sv_imgact_try = NULL, .sv_minsigstksz = 0, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/mips/mips/elf_machdep.c ============================================================================== --- stable/12/sys/mips/mips/elf_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/mips/mips/elf_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -67,7 +67,6 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, @@ -123,7 +122,6 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/mips/mips/freebsd32_machdep.c ============================================================================== --- stable/12/sys/mips/mips/freebsd32_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/mips/mips/freebsd32_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -89,7 +89,6 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = ((vm_offset_t)0x80000000), .sv_usrstack = FREEBSD32_USRSTACK, Modified: stable/12/sys/powerpc/powerpc/elf32_machdep.c ============================================================================== --- stable/12/sys/powerpc/powerpc/elf32_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/powerpc/powerpc/elf32_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -95,7 +95,6 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_stackprot = VM_PROT_ALL, #ifdef __powerpc64__ Modified: stable/12/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- stable/12/sys/powerpc/powerpc/elf64_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/powerpc/powerpc/elf64_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -70,7 +70,6 @@ struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, @@ -109,7 +108,6 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/riscv/riscv/elf_machdep.c ============================================================================== --- stable/12/sys/riscv/riscv/elf_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/riscv/riscv/elf_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -73,7 +73,6 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/sparc64/sparc64/elf_machdep.c ============================================================================== --- stable/12/sys/sparc64/sparc64/elf_machdep.c Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/sparc64/sparc64/elf_machdep.c Tue May 14 19:52:18 2019 (r347571) @@ -71,7 +71,6 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_coredump = __elfN(coredump), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, - .sv_pagesize = PAGE_SIZE, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_usrstack = USRSTACK, Modified: stable/12/sys/sys/sysent.h ============================================================================== --- stable/12/sys/sys/sysent.h Tue May 14 18:26:39 2019 (r347570) +++ stable/12/sys/sys/sysent.h Tue May 14 19:52:18 2019 (r347571) @@ -111,7 +111,7 @@ struct sysentvec { /* function to dump core, or NULL */ int (*sv_imgact_try)(struct image_params *); int sv_minsigstksz; /* minimum signal stack size */ - int sv_pagesize; /* pagesize */ + int sv_pagesize; /* spare / no longer used */ vm_offset_t sv_minuser; /* VM_MIN_ADDRESS */ vm_offset_t sv_maxuser; /* VM_MAXUSER_ADDRESS */ vm_offset_t sv_usrstack; /* USRSTACK */