diff options
-rw-r--r-- | sys/alpha/alpha/machdep.c | 7 | ||||
-rw-r--r-- | sys/alpha/linux/linux_sysvec.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 4 | ||||
-rw-r--r-- | sys/compat/linux/linux_util.h | 4 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/i386/ibcs2/ibcs2_util.h | 2 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 4 | ||||
-rw-r--r-- | sys/i386/linux/linux_util.h | 4 | ||||
-rw-r--r-- | sys/kern/kern_exec.c | 7 | ||||
-rw-r--r-- | sys/pc98/i386/machdep.c | 4 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 4 | ||||
-rw-r--r-- | sys/sys/exec.h | 5 |
12 files changed, 25 insertions, 28 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 446ecec..e8240f1 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: machdep.c,v 1.25 1998/12/04 10:52:47 dfr Exp $ + * $Id: machdep.c,v 1.26 1998/12/04 22:54:42 archie Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1313,8 +1313,7 @@ sendsig(sig_t catcher, int sig, int mask, u_long code) /* * Set up the registers to return to sigcode. */ - frame->tf_regs[FRAME_PC] = - (u_int64_t)PS_STRINGS - (esigcode - sigcode); + frame->tf_regs[FRAME_PC] = PS_STRINGS - (esigcode - sigcode); frame->tf_regs[FRAME_A0] = sig; frame->tf_regs[FRAME_A1] = code; frame->tf_regs[FRAME_A2] = (u_int64_t)scp; @@ -1447,7 +1446,7 @@ setregs(struct proc *p, u_long entry, u_long stack) tfp->tf_regs[FRAME_A0] = stack; /* a0 = sp */ tfp->tf_regs[FRAME_A1] = 0; /* a1 = rtld cleanup */ tfp->tf_regs[FRAME_A2] = 0; /* a2 = rtld object */ - tfp->tf_regs[FRAME_A3] = (u_int64_t)PS_STRINGS; /* a3 = ps_strings */ + tfp->tf_regs[FRAME_A3] = PS_STRINGS; /* a3 = ps_strings */ tfp->tf_regs[FRAME_T12] = tfp->tf_regs[FRAME_PC]; /* a.k.a. PV */ p->p_md.md_flags &= ~MDP_FPUSED; diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index 01362d3..188e3d5 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_sysvec.c,v 1.38 1998/11/15 15:33:51 bde Exp $ + * $Id: linux_sysvec.c,v 1.39 1998/12/14 18:54:01 dt Exp $ */ /* XXX we use functions that might not exist. */ @@ -281,7 +281,7 @@ linux_sendsig(sig_t catcher, int sig, int mask, u_long code) * Build context to run handler in. */ regs->tf_esp = (int)fp; - regs->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); + regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); regs->tf_eflags &= ~PSL_VM; regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 3af1917..45c5e8f 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.317 1998/12/02 08:15:16 kato Exp $ + * $Id: machdep.c,v 1.318 1998/12/10 01:49:01 steve Exp $ */ #include "apm.h" @@ -620,7 +620,7 @@ sendsig(catcher, sig, mask, code) } regs->tf_esp = (int)fp; - regs->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); + regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 58a477d..07a2d3c 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -28,7 +28,7 @@ * * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp * from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp - * $Id: linux_util.h,v 1.5 1997/02/22 09:38:30 peter Exp $ + * $Id: linux_util.h,v 1.6 1998/06/30 08:40:33 jmg Exp $ */ /* @@ -60,7 +60,7 @@ static __inline caddr_t stackgap_init() { #define szsigcode (*(curproc->p_sysent->sv_szsigcode)) - return (caddr_t)(((caddr_t)PS_STRINGS) - szsigcode - SPARE_USRSPACE); + return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE); } diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 3af1917..45c5e8f 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.317 1998/12/02 08:15:16 kato Exp $ + * $Id: machdep.c,v 1.318 1998/12/10 01:49:01 steve Exp $ */ #include "apm.h" @@ -620,7 +620,7 @@ sendsig(catcher, sig, mask, code) } regs->tf_esp = (int)fp; - regs->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); + regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; diff --git a/sys/i386/ibcs2/ibcs2_util.h b/sys/i386/ibcs2/ibcs2_util.h index e616234..4ef390f 100644 --- a/sys/i386/ibcs2/ibcs2_util.h +++ b/sys/i386/ibcs2/ibcs2_util.h @@ -61,7 +61,7 @@ static __inline caddr_t stackgap_init() { #define szsigcode (*(curproc->p_sysent->sv_szsigcode)) - return (caddr_t)(((caddr_t)PS_STRINGS) - szsigcode - SPARE_USRSPACE); + return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE); } static __inline void * diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 01362d3..188e3d5 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: linux_sysvec.c,v 1.38 1998/11/15 15:33:51 bde Exp $ + * $Id: linux_sysvec.c,v 1.39 1998/12/14 18:54:01 dt Exp $ */ /* XXX we use functions that might not exist. */ @@ -281,7 +281,7 @@ linux_sendsig(sig_t catcher, int sig, int mask, u_long code) * Build context to run handler in. */ regs->tf_esp = (int)fp; - regs->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); + regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); regs->tf_eflags &= ~PSL_VM; regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; diff --git a/sys/i386/linux/linux_util.h b/sys/i386/linux/linux_util.h index 58a477d..07a2d3c 100644 --- a/sys/i386/linux/linux_util.h +++ b/sys/i386/linux/linux_util.h @@ -28,7 +28,7 @@ * * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp * from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp - * $Id: linux_util.h,v 1.5 1997/02/22 09:38:30 peter Exp $ + * $Id: linux_util.h,v 1.6 1998/06/30 08:40:33 jmg Exp $ */ /* @@ -60,7 +60,7 @@ static __inline caddr_t stackgap_init() { #define szsigcode (*(curproc->p_sysent->sv_szsigcode)) - return (caddr_t)(((caddr_t)PS_STRINGS) - szsigcode - SPARE_USRSPACE); + return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE); } diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 84d4d46..e3a3b71 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.88 1998/10/28 13:36:58 dg Exp $ + * $Id: kern_exec.c,v 1.89 1998/12/16 16:06:27 bde Exp $ */ #include <sys/param.h> @@ -66,8 +66,7 @@ static long *exec_copyout_strings __P((struct image_params *)); -SYSCTL_LONG(_kern, KERN_PS_STRINGS, ps_strings, CTLFLAG_RD, 0, - (u_long)PS_STRINGS, ""); +SYSCTL_LONG(_kern, KERN_PS_STRINGS, ps_strings, CTLFLAG_RD, 0, PS_STRINGS, ""); SYSCTL_LONG(_kern, KERN_USRSTACK, usrstack, CTLFLAG_RD, 0, USRSTACK, ""); /* @@ -548,7 +547,7 @@ exec_copyout_strings(imgp) * Calculate string base and vector table pointers. * Also deal with signal trampoline code for this exec type. */ - arginfo = PS_STRINGS; + arginfo = (struct ps_strings *)PS_STRINGS; szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - roundup((ARG_MAX - imgp->stringspace), sizeof(char *)); diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 0508aed..121a21d 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.101 1998/12/02 08:15:17 kato Exp $ + * $Id: machdep.c,v 1.102 1998/12/11 08:04:33 kato Exp $ */ #include "apm.h" @@ -633,7 +633,7 @@ sendsig(catcher, sig, mask, code) } regs->tf_esp = (int)fp; - regs->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); + regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 0508aed..121a21d 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.101 1998/12/02 08:15:17 kato Exp $ + * $Id: machdep.c,v 1.102 1998/12/11 08:04:33 kato Exp $ */ #include "apm.h" @@ -633,7 +633,7 @@ sendsig(catcher, sig, mask, code) } regs->tf_esp = (int)fp; - regs->tf_eip = (int)(((char *)PS_STRINGS) - *(p->p_sysent->sv_szsigcode)); + regs->tf_eip = PS_STRINGS - *(p->p_sysent->sv_szsigcode); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; diff --git a/sys/sys/exec.h b/sys/sys/exec.h index 261791a..2ed6112 100644 --- a/sys/sys/exec.h +++ b/sys/sys/exec.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)exec.h 8.3 (Berkeley) 1/21/94 - * $Id: exec.h,v 1.19 1998/10/16 03:55:01 peter Exp $ + * $Id: exec.h,v 1.20 1998/11/15 15:33:52 bde Exp $ */ #ifndef _SYS_EXEC_H_ @@ -60,8 +60,7 @@ struct ps_strings { /* * Address of ps_strings structure (in user space). */ -#define PS_STRINGS ((struct ps_strings *) \ - (USRSTACK - sizeof(struct ps_strings))) +#define PS_STRINGS (USRSTACK - sizeof(struct ps_strings)) #define SPARE_USRSPACE 256 struct image_params; |