Index: sys/amd64/linux/linux_sysvec.c =================================================================== --- sys/amd64/linux/linux_sysvec.c +++ sys/amd64/linux/linux_sysvec.c @@ -254,9 +254,9 @@ AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); - AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, imgp->canary); + AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); if (imgp->execpathp != 0) - AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, imgp->execpathp); + AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); AUXARGS_ENTRY(pos, AT_NULL, 0); @@ -315,8 +315,8 @@ if (execpath_len != 0) { destp -= execpath_len; destp = rounddown2(destp, sizeof(void *)); - imgp->execpathp = destp; - error = copyout(imgp->execpath, (void *)destp, execpath_len); + imgp->execpathp = (void *)destp; + error = copyout(imgp->execpath, imgp->execpathp, execpath_len); if (error != 0) return (error); } @@ -324,8 +324,8 @@ /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); destp -= roundup(sizeof(canary), sizeof(void *)); - imgp->canary = destp; - error = copyout(canary, (void *)destp, sizeof(canary)); + imgp->canary = (void *)destp; + error = copyout(canary, imgp->canary, sizeof(canary)); if (error != 0) return (error); Index: sys/amd64/linux32/linux32_sysvec.c =================================================================== --- sys/amd64/linux32/linux32_sysvec.c +++ sys/amd64/linux32/linux32_sysvec.c @@ -742,8 +742,8 @@ if (execpath_len != 0) { destp -= execpath_len; destp = rounddown2(destp, sizeof(uint32_t)); - imgp->execpathp = destp; - error = copyout(imgp->execpath, (void *)destp, execpath_len); + imgp->execpathp = (void *)destp; + error = copyout(imgp->execpath, imgp->execpathp, execpath_len); if (error != 0) return (error); } @@ -751,8 +751,8 @@ /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); destp -= roundup(sizeof(canary), sizeof(uint32_t)); - imgp->canary = destp; - error = copyout(canary, (void *)destp, sizeof(canary)); + imgp->canary = (void *)destp; + error = copyout(canary, imgp->canary, sizeof(canary)); if (error != 0) return (error); Index: sys/arm64/linux/linux_sysvec.c =================================================================== --- sys/arm64/linux/linux_sysvec.c +++ sys/arm64/linux/linux_sysvec.c @@ -180,9 +180,9 @@ #if 0 /* LINUXTODO: implement arm64 LINUX_AT_PLATFORM */ AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); #endif - AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, imgp->canary); + AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); if (imgp->execpathp != 0) - AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, imgp->execpathp); + AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); AUXARGS_ENTRY(pos, AT_NULL, 0); @@ -236,8 +236,8 @@ if (execpath_len != 0) { destp -= execpath_len; destp = rounddown2(destp, sizeof(void *)); - imgp->execpathp = destp; - error = copyout(imgp->execpath, (void *)destp, execpath_len); + imgp->execpathp = (void *)destp; + error = copyout(imgp->execpath, imgp->execpathp, execpath_len); if (error != 0) return (error); } @@ -245,8 +245,8 @@ /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); destp -= roundup(sizeof(canary), sizeof(void *)); - imgp->canary = destp; - error = copyout(canary, (void *)destp, sizeof(canary)); + imgp->canary = (void *)destp; + error = copyout(canary, imgp->canary, sizeof(canary)); if (error != 0) return (error); Index: sys/compat/freebsd32/freebsd32_misc.c =================================================================== --- sys/compat/freebsd32/freebsd32_misc.c +++ sys/compat/freebsd32/freebsd32_misc.c @@ -3161,8 +3161,8 @@ */ if (execpath_len != 0) { destp -= execpath_len; - imgp->execpathp = destp; - error = copyout(imgp->execpath, (void *)destp, execpath_len); + imgp->execpathp = (void *)destp; + error = copyout(imgp->execpath, imgp->execpathp, execpath_len); if (error != 0) return (error); } @@ -3172,8 +3172,8 @@ */ arc4rand(canary, sizeof(canary), 0); destp -= sizeof(canary); - imgp->canary = destp; - error = copyout(canary, (void *)destp, sizeof(canary)); + imgp->canary = (void *)destp; + error = copyout(canary, imgp->canary, sizeof(canary)); if (error != 0) return (error); imgp->canarylen = sizeof(canary); @@ -3185,8 +3185,8 @@ pagesizes32[i] = (uint32_t)pagesizes[i]; destp -= sizeof(pagesizes32); destp = rounddown2(destp, sizeof(uint32_t)); - imgp->pagesizes = destp; - error = copyout(pagesizes32, (void *)destp, sizeof(pagesizes32)); + imgp->pagesizes = (void *)destp; + error = copyout(pagesizes32, imgp->pagesizes, sizeof(pagesizes32)); if (error != 0) return (error); imgp->pagesizeslen = sizeof(pagesizes32); Index: sys/i386/linux/linux_sysvec.c =================================================================== --- sys/i386/linux/linux_sysvec.c +++ sys/i386/linux/linux_sysvec.c @@ -237,9 +237,9 @@ AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(uplatform)); - AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, imgp->canary); + AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); if (imgp->execpathp != 0) - AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, imgp->execpathp); + AUXARGS_ENTRY_PTR(pos, LINUX_AT_EXECFN, imgp->execpathp); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); AUXARGS_ENTRY(pos, AT_NULL, 0); @@ -301,8 +301,8 @@ if (execpath_len != 0) { destp -= execpath_len; destp = rounddown2(destp, sizeof(void *)); - imgp->execpathp = destp; - error = copyout(imgp->execpath, (void *)destp, execpath_len); + imgp->execpathp = (void *)destp; + error = copyout(imgp->execpath, imgp->execpathp, execpath_len); if (error != 0) return (error); } @@ -310,8 +310,8 @@ /* Prepare the canary for SSP. */ arc4rand(canary, sizeof(canary), 0); destp -= roundup(sizeof(canary), sizeof(void *)); - imgp->canary = destp; - error = copyout(canary, (void *)destp, sizeof(canary)); + imgp->canary = (void *)destp; + error = copyout(canary, imgp->canary, sizeof(canary)); if (error != 0) return (error); Index: sys/kern/imgact_elf.c =================================================================== --- sys/kern/imgact_elf.c +++ sys/kern/imgact_elf.c @@ -1349,16 +1349,16 @@ AUXARGS_ENTRY(pos, AT_BASE, args->base); AUXARGS_ENTRY(pos, AT_EHDRFLAGS, args->hdr_eflags); if (imgp->execpathp != 0) - AUXARGS_ENTRY(pos, AT_EXECPATH, imgp->execpathp); + AUXARGS_ENTRY_PTR(pos, AT_EXECPATH, imgp->execpathp); AUXARGS_ENTRY(pos, AT_OSRELDATE, imgp->proc->p_ucred->cr_prison->pr_osreldate); if (imgp->canary != 0) { - AUXARGS_ENTRY(pos, AT_CANARY, imgp->canary); + AUXARGS_ENTRY_PTR(pos, AT_CANARY, imgp->canary); AUXARGS_ENTRY(pos, AT_CANARYLEN, imgp->canarylen); } AUXARGS_ENTRY(pos, AT_NCPUS, mp_ncpus); if (imgp->pagesizes != 0) { - AUXARGS_ENTRY(pos, AT_PAGESIZES, imgp->pagesizes); + AUXARGS_ENTRY_PTR(pos, AT_PAGESIZES, imgp->pagesizes); AUXARGS_ENTRY(pos, AT_PAGESIZESLEN, imgp->pagesizeslen); } if (imgp->sysent->sv_timekeep_base != 0) { Index: sys/kern/kern_exec.c =================================================================== --- sys/kern/kern_exec.c +++ sys/kern/kern_exec.c @@ -1571,8 +1571,8 @@ if (execpath_len != 0) { destp -= execpath_len; destp = rounddown2(destp, sizeof(void *)); - imgp->execpathp = destp; - error = copyout(imgp->execpath, (void *)destp, execpath_len); + imgp->execpathp = (void *)destp; + error = copyout(imgp->execpath, imgp->execpathp, execpath_len); if (error != 0) return (error); } @@ -1582,8 +1582,8 @@ */ arc4rand(canary, sizeof(canary), 0); destp -= sizeof(canary); - imgp->canary = destp; - error = copyout(canary, (void *)destp, sizeof(canary)); + imgp->canary = (void *)destp; + error = copyout(canary, imgp->canary, sizeof(canary)); if (error != 0) return (error); imgp->canarylen = sizeof(canary); @@ -1593,8 +1593,8 @@ */ destp -= szps; destp = rounddown2(destp, sizeof(void *)); - imgp->pagesizes = destp; - error = copyout(pagesizes, (void *)destp, szps); + imgp->pagesizes = (void *)destp; + error = copyout(pagesizes, imgp->pagesizes, szps); if (error != 0) return (error); imgp->pagesizeslen = szps; Index: sys/powerpc/powerpc/elf_common.c =================================================================== --- sys/powerpc/powerpc/elf_common.c +++ sys/powerpc/powerpc/elf_common.c @@ -54,16 +54,16 @@ AUXARGS_ENTRY(pos, AT_OLD_BASE, args->base); AUXARGS_ENTRY(pos, AT_OLD_EHDRFLAGS, args->hdr_eflags); if (imgp->execpathp != 0) - AUXARGS_ENTRY(pos, AT_OLD_EXECPATH, imgp->execpathp); + AUXARGS_ENTRY_PTR(pos, AT_OLD_EXECPATH, imgp->execpathp); AUXARGS_ENTRY(pos, AT_OLD_OSRELDATE, imgp->proc->p_ucred->cr_prison->pr_osreldate); if (imgp->canary != 0) { - AUXARGS_ENTRY(pos, AT_OLD_CANARY, imgp->canary); + AUXARGS_ENTRY_PTR(pos, AT_OLD_CANARY, imgp->canary); AUXARGS_ENTRY(pos, AT_OLD_CANARYLEN, imgp->canarylen); } AUXARGS_ENTRY(pos, AT_OLD_NCPUS, mp_ncpus); if (imgp->pagesizes != 0) { - AUXARGS_ENTRY(pos, AT_OLD_PAGESIZES, imgp->pagesizes); + AUXARGS_ENTRY_PTR(pos, AT_OLD_PAGESIZES, imgp->pagesizes); AUXARGS_ENTRY(pos, AT_OLD_PAGESIZESLEN, imgp->pagesizeslen); } if (imgp->sysent->sv_timekeep_base != 0) { Index: sys/sys/imgact.h =================================================================== --- sys/sys/imgact.h +++ sys/sys/imgact.h @@ -81,11 +81,11 @@ void *argv; /* pointer to argv (user space) */ void *envv; /* pointer to envv (user space) */ char *execpath; - unsigned long execpathp; + void *execpathp; char *freepath; - unsigned long canary; + void *canary; int canarylen; - unsigned long pagesizes; + void *pagesizes; int pagesizeslen; vm_prot_t stack_prot; u_long stack_sz;