summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_ipc.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-03-26 05:23:41 +0000
committerguenther <guenther@openbsd.org>2014-03-26 05:23:41 +0000
commit8f76f5add34ff13fa8a804c10695e708224e99b4 (patch)
tree89d3b1dd1cb5e145e1de975c5db86c74df5912e4 /sys/compat/linux/linux_ipc.c
parentDrop Apollo Domain keyboard support, now that hp300 has bitten the dust. (diff)
downloadwireguard-openbsd-8f76f5add34ff13fa8a804c10695e708224e99b4.tar.xz
wireguard-openbsd-8f76f5add34ff13fa8a804c10695e708224e99b4.zip
Move p_emul and p_sigcode from proc to process.
Tweak the handling of ktrace EMUL when changing ktracing: only generate one per process (not one per thread) and pass the correct proc pointer down to the VFS layer. Permit generating of NAMI and CSW records inside ktrace(2) itself. ok deraadt@ millert@
Diffstat (limited to 'sys/compat/linux/linux_ipc.c')
-rw-r--r--sys/compat/linux/linux_ipc.c14
1 files changed, 7 insertions, 7 deletions
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;