summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/common/compat_util.c4
-rw-r--r--sys/compat/common/compat_util.h6
-rw-r--r--sys/compat/linux/linux_cdrom.c6
-rw-r--r--sys/compat/linux/linux_exec.c16
-rw-r--r--sys/compat/linux/linux_file.c40
-rw-r--r--sys/compat/linux/linux_file64.c12
-rw-r--r--sys/compat/linux/linux_hdio.c4
-rw-r--r--sys/compat/linux/linux_ipc.c14
-rw-r--r--sys/compat/linux/linux_misc.c14
-rw-r--r--sys/compat/linux/linux_signal.c10
-rw-r--r--sys/compat/linux/linux_socket.c10
-rw-r--r--sys/compat/linux/linux_termios.c4
12 files changed, 70 insertions, 70 deletions
diff --git a/sys/compat/common/compat_util.c b/sys/compat/common/compat_util.c
index ec45ce78421..4bc1cb4dadd 100644
--- a/sys/compat/common/compat_util.c
+++ b/sys/compat/common/compat_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat_util.c,v 1.11 2014/01/15 05:31:51 deraadt Exp $ */
+/* $OpenBSD: compat_util.c,v 1.12 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: compat_util.c,v 1.4 1996/03/14 19:31:45 christos Exp $ */
/*
@@ -172,7 +172,7 @@ bad:
}
caddr_t
-stackgap_init(struct emul *e)
+stackgap_init(struct proc *p)
{
return STACKGAPBASE;
}
diff --git a/sys/compat/common/compat_util.h b/sys/compat/common/compat_util.h
index 03df1662f2a..782902a5d1a 100644
--- a/sys/compat/common/compat_util.h
+++ b/sys/compat/common/compat_util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: compat_util.h,v 1.8 2014/01/15 05:31:51 deraadt Exp $ */
+/* $OpenBSD: compat_util.h,v 1.9 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: compat_util.h,v 1.1 1995/06/24 20:16:05 christos Exp $ */
/*
@@ -35,9 +35,9 @@
#include <sys/exec.h>
-struct emul;
+struct proc;
-caddr_t stackgap_init(struct emul *);
+caddr_t stackgap_init(struct proc *);
void *stackgap_alloc(caddr_t *, size_t);
int emul_find(struct proc *, caddr_t *, const char *, char *, char **, int);
diff --git a/sys/compat/linux/linux_cdrom.c b/sys/compat/linux/linux_cdrom.c
index 7c74d8d91b0..b1ca8e16af0 100644
--- a/sys/compat/linux/linux_cdrom.c
+++ b/sys/compat/linux/linux_cdrom.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: linux_cdrom.c,v 1.10 2014/01/21 01:49:13 tedu Exp $ */
+/* $OpenBSD: linux_cdrom.c,v 1.11 2014/03/26 05:23:42 guenther Exp $ */
/*
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
* All rights reserved.
@@ -135,7 +135,7 @@ linux_ioctl_cdrom(p, v, retval)
if (error)
goto out;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
memset(&tmpb.tes, 0, sizeof tmpb.tes);
tmpb.tes.starting_track = tmpl.te.cdte_track;
@@ -164,7 +164,7 @@ linux_ioctl_cdrom(p, v, retval)
if (error)
goto out;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
memset(&tmpb.sc, 0, sizeof tmpb.sc);
tmpb.sc.data_format = CD_CURRENT_POSITION;
diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c
index 71a13372d6f..919fe63c7f8 100644
--- a/sys/compat/linux/linux_exec.c
+++ b/sys/compat/linux/linux_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_exec.c,v 1.40 2013/12/02 19:47:28 deraadt Exp $ */
+/* $OpenBSD: linux_exec.c,v 1.41 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */
/*-
@@ -165,7 +165,7 @@ void
linux_e_proc_fork(struct proc *p, struct proc *parent)
{
struct linux_emuldata *emul;
- struct linux_emuldata *p_emul;
+ struct linux_emuldata *parent_emul;
/* Allocate new emuldata for the new process. */
p->p_emuldata = NULL;
@@ -174,12 +174,12 @@ linux_e_proc_fork(struct proc *p, struct proc *parent)
linux_e_proc_init(p, parent->p_vmspace);
emul = p->p_emuldata;
- p_emul = parent->p_emuldata;
+ parent_emul = parent->p_emuldata;
- emul->my_set_tid = p_emul->child_set_tid;
- emul->my_clear_tid = p_emul->child_clear_tid;
- emul->my_tls_base = p_emul->child_tls_base;
- emul->set_tls_base = p_emul->set_tls_base;
+ emul->my_set_tid = parent_emul->child_set_tid;
+ emul->my_clear_tid = parent_emul->child_clear_tid;
+ emul->my_tls_base = parent_emul->child_tls_base;
+ emul->set_tls_base = parent_emul->set_tls_base;
}
int
@@ -256,7 +256,7 @@ linux_sys_execve(struct proc *p, void *v, register_t *retval)
struct sys_execve_args ap;
caddr_t sg;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
SCARG(&ap, path) = SCARG(uap, path);
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c
index 090a84b6c9a..96df18a5e4e 100644
--- a/sys/compat/linux/linux_file.c
+++ b/sys/compat/linux/linux_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_file.c,v 1.29 2014/01/23 23:46:42 pirofti Exp $ */
+/* $OpenBSD: linux_file.c,v 1.30 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_file.c,v 1.15 1996/05/20 01:59:09 fvdl Exp $ */
/*
@@ -138,7 +138,7 @@ linux_sys_creat(p, v, retval)
struct sys_open_args oa;
caddr_t sg;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
SCARG(&oa, path) = SCARG(uap, path);
@@ -169,7 +169,7 @@ linux_sys_open(p, v, retval)
struct sys_open_args boa;
caddr_t sg;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
fl = linux_to_bsd_ioflags(SCARG(uap, flags));
@@ -374,7 +374,7 @@ linux_sys_fcntl(p, v, retval)
SCARG(&fca, arg) = (caddr_t) val;
return sys_fcntl(p, &fca, retval);
case LINUX_F_GETLK:
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
if ((error = copyin(arg, &lfl, sizeof lfl)))
return error;
linux_to_bsd_flock(&lfl, &bfl);
@@ -398,7 +398,7 @@ linux_sys_fcntl(p, v, retval)
if ((error = copyin(arg, &lfl, sizeof lfl)))
return error;
linux_to_bsd_flock(&lfl, &bfl);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bfp = (struct flock *) stackgap_alloc(&sg, sizeof *bfp);
if ((error = copyout(&bfl, bfp, sizeof bfl)))
return error;
@@ -514,7 +514,7 @@ linux_sys_fstat(p, v, retval)
caddr_t sg;
int error;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
st = stackgap_alloc(&sg, sizeof (struct stat));
@@ -550,7 +550,7 @@ linux_stat1(p, v, retval, dolstat)
int error;
struct linux_sys_stat_args *uap = v;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
st = stackgap_alloc(&sg, sizeof (struct stat));
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -615,7 +615,7 @@ linux_sys_access(p, v, retval)
syscallarg(char *) path;
syscallarg(int) flags;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -632,7 +632,7 @@ linux_sys_unlink(p, v, retval)
struct linux_sys_unlink_args /* {
syscallarg(char *) path;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -648,7 +648,7 @@ linux_sys_chdir(p, v, retval)
struct linux_sys_chdir_args /* {
syscallarg(char *) path;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -666,7 +666,7 @@ linux_sys_mknod(p, v, retval)
syscallarg(int) mode;
syscallarg(int) dev;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
struct sys_mkfifo_args bma;
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
@@ -692,7 +692,7 @@ linux_sys_chmod(p, v, retval)
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -707,7 +707,7 @@ linux_sys_chown(struct proc *p, void *v, register_t *retval)
syscallarg(uid_t) uid;
syscallarg(gid_t) gid;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -726,7 +726,7 @@ linux_sys_chown16(p, v, retval)
syscallarg(int) gid;
} */ *uap = v;
struct sys_chown_args bca;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -793,7 +793,7 @@ linux_sys_rename(p, v, retval)
syscallarg(char *) from;
syscallarg(char *) to;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
@@ -811,7 +811,7 @@ linux_sys_mkdir(p, v, retval)
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
@@ -827,7 +827,7 @@ linux_sys_rmdir(p, v, retval)
struct linux_sys_rmdir_args /* {
syscallarg(char *) path;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -844,7 +844,7 @@ linux_sys_symlink(p, v, retval)
syscallarg(char *) path;
syscallarg(char *) to;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
LINUX_CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
@@ -863,7 +863,7 @@ linux_sys_readlink(p, v, retval)
syscallarg(char *) buf;
syscallarg(int) count;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, name));
@@ -898,7 +898,7 @@ linux_sys_truncate(p, v, retval)
syscallarg(char *) path;
syscallarg(long) length;
} */ *uap = v;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
struct sys_truncate_args sta;
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
diff --git a/sys/compat/linux/linux_file64.c b/sys/compat/linux/linux_file64.c
index 5d7b8961c0c..7a2f91fc89b 100644
--- a/sys/compat/linux/linux_file64.c
+++ b/sys/compat/linux/linux_file64.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_file64.c,v 1.8 2013/05/10 10:31:16 pirofti Exp $ */
+/* $OpenBSD: linux_file64.c,v 1.9 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_file64.c,v 1.2 2000/12/12 22:24:56 jdolecek Exp $ */
/*-
@@ -123,7 +123,7 @@ linux_sys_fstat64(p, v, retval)
caddr_t sg;
int error;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
st = stackgap_alloc(&sg, sizeof (struct stat));
@@ -159,7 +159,7 @@ linux_do_stat64(p, v, retval, dolstat)
int error;
struct linux_sys_stat64_args *uap = v;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
st = stackgap_alloc(&sg, sizeof (struct stat));
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -221,7 +221,7 @@ linux_sys_truncate64(p, v, retval)
syscallarg(off_t) length;
} */ *uap = v;
struct sys_truncate_args ta;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -321,7 +321,7 @@ linux_sys_fcntl64(p, v, retval)
switch (cmd) {
case LINUX_F_GETLK64:
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
if ((error = copyin(arg, &lfl, sizeof lfl)))
return error;
linux_to_bsd_flock64(&lfl, &bfl);
@@ -344,7 +344,7 @@ linux_sys_fcntl64(p, v, retval)
if ((error = copyin(arg, &lfl, sizeof lfl)))
return error;
linux_to_bsd_flock64(&lfl, &bfl);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bfp = (struct flock *) stackgap_alloc(&sg, sizeof *bfp);
if ((error = copyout(&bfl, bfp, sizeof bfl)))
return error;
diff --git a/sys/compat/linux/linux_hdio.c b/sys/compat/linux/linux_hdio.c
index 3071eea93e0..bb4c4cde98e 100644
--- a/sys/compat/linux/linux_hdio.c
+++ b/sys/compat/linux/linux_hdio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_hdio.c,v 1.8 2012/04/22 05:43:14 guenther Exp $ */
+/* $OpenBSD: linux_hdio.c,v 1.9 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_hdio.c,v 1.1 2000/12/10 14:12:17 fvdl Exp $ */
/*
@@ -91,7 +91,7 @@ linux_ioctl_hdio(struct proc *p, struct linux_sys_ioctl_args *uap,
switch (com) {
case LINUX_HDIO_OBSOLETE_IDENTITY:
case LINUX_HDIO_GET_IDENTITY:
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
atap = stackgap_alloc(&sg, DEV_BSIZE);
if (atap == NULL) {
error = ENOMEM;
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c
index 0d63c3abe50..4afb6d94293 100644
--- a/sys/compat/linux/linux_ipc.c
+++ b/sys/compat/linux/linux_ipc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_ipc.c,v 1.16 2013/05/10 10:31:16 pirofti Exp $ */
+/* $OpenBSD: linux_ipc.c,v 1.17 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_ipc.c,v 1.10 1996/04/05 00:01:44 christos Exp $ */
/*
@@ -323,7 +323,7 @@ linux_semctl(p, v, retval)
if ((error = copyin(ldsp, (caddr_t)&lm, sizeof lm)))
return error;
linux_to_bsd_semid_ds(&lm, &bm);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
unptr = stackgap_alloc(&sg, sizeof (union semun));
dsp = stackgap_alloc(&sg, sizeof (struct semid_ds));
if ((error = copyout((caddr_t)&bm, dsp, sizeof bm)))
@@ -333,7 +333,7 @@ linux_semctl(p, v, retval)
SCARG(&bsa, arg) = (union semun *)unptr;
return sys___semctl(p, &bsa, retval);
case LINUX_IPC_STAT:
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
unptr = stackgap_alloc(&sg, sizeof (union semun));
dsp = stackgap_alloc(&sg, sizeof (struct semid_ds));
if ((error = copyout((caddr_t)&dsp, unptr, sizeof dsp)))
@@ -507,14 +507,14 @@ linux_msgctl(p, v, retval)
if ((error = copyin(SCARG(uap, ptr), (caddr_t)&lm, sizeof lm)))
return error;
linux_to_bsd_msqid_ds(&lm, &bm);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
umsgptr = stackgap_alloc(&sg, sizeof bm);
if ((error = copyout((caddr_t)&bm, umsgptr, sizeof bm)))
return error;
SCARG(&bma, buf) = (struct msqid_ds *)umsgptr;
return sys_msgctl(p, &bma, retval);
case LINUX_IPC_STAT:
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
umsgptr = stackgap_alloc(&sg, sizeof (struct msqid_ds));
SCARG(&bma, buf) = (struct msqid_ds *)umsgptr;
if ((error = sys_msgctl(p, &bma, retval)))
@@ -693,7 +693,7 @@ linux_shmctl(p, v, retval)
switch (SCARG(uap, a2)) {
case LINUX_IPC_STAT:
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bsp = stackgap_alloc(&sg, sizeof (struct shmid_ds));
SCARG(&bsa, shmid) = SCARG(uap, a1);
SCARG(&bsa, cmd) = IPC_STAT;
@@ -710,7 +710,7 @@ linux_shmctl(p, v, retval)
sizeof lseg)))
return error;
linux_to_bsd_shmid_ds(&lseg, &bs);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bsp = stackgap_alloc(&sg, sizeof (struct shmid_ds));
if ((error = copyout((caddr_t) &bs, (caddr_t) bsp, sizeof bs)))
return error;
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 0a1b4d74355..f372f573ffc 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_misc.c,v 1.87 2014/03/24 03:48:00 guenther Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.88 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
@@ -463,7 +463,7 @@ linux_sys_statfs(p, v, retval)
caddr_t sg;
int error;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bsp = (struct statfs *) stackgap_alloc(&sg, sizeof (struct statfs));
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -539,7 +539,7 @@ linux_sys_statfs64(struct proc *p, void *v, register_t *retval)
caddr_t sg;
int error;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bsp = (struct statfs *) stackgap_alloc(&sg, sizeof (struct statfs));
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -574,7 +574,7 @@ linux_sys_fstatfs(p, v, retval)
caddr_t sg;
int error;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bsp = (struct statfs *) stackgap_alloc(&sg, sizeof (struct statfs));
SCARG(&bsa, fd) = SCARG(uap, fd);
@@ -604,7 +604,7 @@ linux_sys_fstatfs64(struct proc *p, void *v, register_t *retval)
caddr_t sg;
int error;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
bsp = (struct statfs *) stackgap_alloc(&sg, sizeof (struct statfs));
SCARG(&bsa, fd) = SCARG(uap, fd);
@@ -1022,7 +1022,7 @@ linux_sys_utime(p, v, retval)
struct timeval tv[2], *tvp;
struct linux_utimbuf lut;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
tvp = (struct timeval *) stackgap_alloc(&sg, sizeof(tv));
LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
@@ -1308,7 +1308,7 @@ linux_select1(struct proc *p, register_t *retval, int nfds, fd_set *readfds,
timerclear(&utv);
}
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
tvp = stackgap_alloc(&sg, sizeof(utv));
if ((error = copyout(&utv, tvp, sizeof(utv))))
return error;
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index af5666317f7..22a03ae8dc9 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_signal.c,v 1.16 2014/01/21 01:49:13 tedu Exp $ */
+/* $OpenBSD: linux_signal.c,v 1.17 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */
/*
@@ -397,7 +397,7 @@ linux_sys_sigaction(p, v, retval)
if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX__NSIG)
return (EINVAL);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
nlsa = SCARG(uap, nsa);
olsa = SCARG(uap, osa);
@@ -468,7 +468,7 @@ linux_sys_rt_sigaction(p, v, retval)
if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX__NSIG)
return (EINVAL);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
nlsa = SCARG(uap, nsa);
olsa = SCARG(uap, osa);
@@ -540,7 +540,7 @@ linux_sys_signal(p, v, retval)
if (SCARG(uap, sig) < 0 || SCARG(uap, sig) >= LINUX__NSIG)
return (EINVAL);
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
nsa = stackgap_alloc(&sg, sizeof *nsa);
osa = stackgap_alloc(&sg, sizeof *osa);
@@ -844,7 +844,7 @@ linux_sys_sigaltstack(p, v, retval)
int error;
caddr_t sg;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
if (SCARG(uap, nss) != NULL) {
bsd_nss = stackgap_alloc(&sg, sizeof *bsd_nss);
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 3a9f77fc1be..caab7b4fbcf 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_socket.c,v 1.48 2014/02/13 13:10:34 mpi Exp $ */
+/* $OpenBSD: linux_socket.c,v 1.49 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_socket.c,v 1.14 1996/04/05 00:01:50 christos Exp $ */
/*
@@ -308,7 +308,7 @@ linux_bind(p, v, retval)
namlen = lba.namelen;
if (lba.name) {
struct sockaddr *sa;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
error = linux_sa_get(p, &sg, &sa, lba.name, &namlen);
if (error)
@@ -335,7 +335,7 @@ linux_connect(p, v, retval)
struct linux_connect_args lca;
struct sys_connect_args bca;
struct sockaddr *sa;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
int namlen;
int error;
@@ -816,7 +816,7 @@ linux_sendto(p, v, retval)
struct sys_sendto_args bsa;
int error;
int tolen;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
if ((error = copyin((caddr_t) uap, (caddr_t) &lsa, sizeof lsa)))
return error;
@@ -1224,7 +1224,7 @@ linux_sendmsg(p, v, retval)
if (msg.msg_name) {
struct sockaddr *sa;
- caddr_t sg = stackgap_init(p->p_emul);
+ caddr_t sg = stackgap_init(p);
nmsg = (struct msghdr *)stackgap_alloc(&sg,
sizeof(struct msghdr));
diff --git a/sys/compat/linux/linux_termios.c b/sys/compat/linux/linux_termios.c
index cda6f1aeb51..1baae7e2f6d 100644
--- a/sys/compat/linux/linux_termios.c
+++ b/sys/compat/linux/linux_termios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_termios.c,v 1.16 2012/04/22 05:43:14 guenther Exp $ */
+/* $OpenBSD: linux_termios.c,v 1.17 2014/03/26 05:23:42 guenther Exp $ */
/* $NetBSD: linux_termios.c,v 1.3 1996/04/05 00:01:54 christos Exp $ */
/*
@@ -693,7 +693,7 @@ linux_ioctl_termios(p, v, retval)
if (c == _POSIX_VDISABLE)
goto out;
- sg = stackgap_init(p->p_emul);
+ sg = stackgap_init(p);
cp = (char *) stackgap_alloc(&sg, 1);
if ((error = copyout(&c, cp, 1)))
goto out;