summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_elf.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/kern/exec_elf.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/kern/exec_elf.c')
-rw-r--r--sys/kern/exec_elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c
index 49a3d80783e..8d521876505 100644
--- a/sys/kern/exec_elf.c
+++ b/sys/kern/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.95 2014/03/22 06:05:45 guenther Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.96 2014/03/26 05:23:42 guenther Exp $ */
/*
* Copyright (c) 1996 Per Fogelstrom
@@ -1192,7 +1192,7 @@ ELFNAMEEND(coredump_notes)(struct proc *p, void *iocookie, size_t *sizep)
/* Second, write an NT_OPENBSD_AUXV note. */
notesize = sizeof(nhdr) + elfround(sizeof("OpenBSD")) +
- elfround(p->p_emul->e_arglen * sizeof(char *));
+ elfround(pr->ps_emul->e_arglen * sizeof(char *));
if (iocookie) {
iov.iov_base = &pss;
iov.iov_len = sizeof(pss);
@@ -1212,7 +1212,7 @@ ELFNAMEEND(coredump_notes)(struct proc *p, void *iocookie, size_t *sizep)
return (EIO);
nhdr.namesz = sizeof("OpenBSD");
- nhdr.descsz = p->p_emul->e_arglen * sizeof(char *);
+ nhdr.descsz = pr->ps_emul->e_arglen * sizeof(char *);
nhdr.type = NT_OPENBSD_AUXV;
error = coredump_write(iocookie, UIO_SYSSPACE,