From owner-svn-src-all@freebsd.org Wed Apr 15 20:21:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 506992C1023; Wed, 15 Apr 2020 20:21:32 +0000 (UTC) (envelope-from brooks@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 492YfN1MSxz4Lyt; Wed, 15 Apr 2020 20:21:32 +0000 (UTC) (envelope-from brooks@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 2A0DB24BA1; Wed, 15 Apr 2020 20:21:32 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03FKLWfG090542; Wed, 15 Apr 2020 20:21:32 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03FKLU0u090535; Wed, 15 Apr 2020 20:21:30 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <202004152021.03FKLU0u090535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 15 Apr 2020 20:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359987 - in head/sys: amd64/ia32 amd64/linux32 compat/freebsd32 kern sys X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head/sys: amd64/ia32 amd64/linux32 compat/freebsd32 kern sys X-SVN-Commit-Revision: 359987 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2020 20:21:32 -0000 Author: brooks Date: Wed Apr 15 20:21:30 2020 New Revision: 359987 URL: https://svnweb.freebsd.org/changeset/base/359987 Log: Make ps_strings in struct image_params into a pointer. This is a prepratory commit for D24407. Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Modified: head/sys/amd64/ia32/ia32_signal.c head/sys/amd64/linux32/linux32_sysvec.c head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/imgact_aout.c head/sys/kern/kern_exec.c head/sys/sys/imgact.h Modified: head/sys/amd64/ia32/ia32_signal.c ============================================================================== --- head/sys/amd64/ia32/ia32_signal.c Wed Apr 15 20:19:59 2020 (r359986) +++ head/sys/amd64/ia32/ia32_signal.c Wed Apr 15 20:21:30 2020 (r359987) @@ -961,7 +961,7 @@ ia32_setregs(struct thread *td, struct image_params *i regs->tf_rflags = PSL_USER | saved_rflags; regs->tf_ss = _udatasel; regs->tf_cs = _ucode32sel; - regs->tf_rbx = imgp->ps_strings; + regs->tf_rbx = (register_t)imgp->ps_strings; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; regs->tf_fs = _ufssel; Modified: head/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c Wed Apr 15 20:19:59 2020 (r359986) +++ head/sys/amd64/linux32/linux32_sysvec.c Wed Apr 15 20:21:30 2020 (r359987) @@ -708,7 +708,7 @@ linux_exec_setregs(struct thread *td, struct image_par regs->tf_ss = _udatasel; regs->tf_flags = TF_HASSEGS; regs->tf_cs = _ucode32sel; - regs->tf_rbx = imgp->ps_strings; + regs->tf_rbx = (register_t)imgp->ps_strings; fpstate_drop(td); Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 15 20:19:59 2020 (r359986) +++ head/sys/compat/freebsd32/freebsd32_misc.c Wed Apr 15 20:21:30 2020 (r359987) @@ -3137,6 +3137,7 @@ freebsd32_copyout_strings(struct image_params *imgp, u execpath_len = 0; arginfo = (struct freebsd32_ps_strings *)curproc->p_sysent-> sv_psstrings; + imgp->ps_strings = arginfo; if (imgp->proc->p_sysent->sv_sigcode_base == 0) szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); else Modified: head/sys/kern/imgact_aout.c ============================================================================== --- head/sys/kern/imgact_aout.c Wed Apr 15 20:19:59 2020 (r359986) +++ head/sys/kern/imgact_aout.c Wed Apr 15 20:21:30 2020 (r359987) @@ -200,7 +200,7 @@ exec_aout_imgact(struct image_params *imgp) file_offset = 0; /* Pass PS_STRINGS for BSD/OS binaries only. */ if (N_GETMID(*a_out) == MID_ZERO) - imgp->ps_strings = aout_sysvec.sv_psstrings; + imgp->ps_strings = (void *)aout_sysvec.sv_psstrings; break; default: /* NetBSD compatibility */ Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Wed Apr 15 20:19:59 2020 (r359986) +++ head/sys/kern/kern_exec.c Wed Apr 15 20:21:30 2020 (r359987) @@ -1546,6 +1546,7 @@ exec_copyout_strings(struct image_params *imgp, uintpt p = imgp->proc; szsigcode = 0; arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; + imgp->ps_strings = arginfo; if (p->p_sysent->sv_sigcode_base == 0) { if (p->p_sysent->sv_szsigcode != NULL) szsigcode = *(p->p_sysent->sv_szsigcode); Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Wed Apr 15 20:19:59 2020 (r359986) +++ head/sys/sys/imgact.h Wed Apr 15 20:21:30 2020 (r359987) @@ -75,7 +75,7 @@ struct image_params { char *interpreter_name; /* name of the interpreter */ void *auxargs; /* ELF Auxinfo structure pointer */ struct sf_buf *firstpage; /* first page that we mapped */ - unsigned long ps_strings; /* PS_STRINGS for BSD/OS binaries */ + void *ps_strings; /* pointer to ps_string (user space) */ struct image_args *args; /* system call arguments */ struct sysentvec *sysent; /* system entry vector */ char *execpath;