sync with OpenBSD -current
This commit is contained in:
parent
f36b410006
commit
df7f961280
37 changed files with 741 additions and 712 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: exec_elf.c,v 1.188 2024/07/14 11:36:54 jca Exp $ */
|
||||
/* $OpenBSD: exec_elf.c,v 1.190 2024/08/21 03:16:25 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Per Fogelstrom
|
||||
|
@ -569,8 +569,10 @@ elf_load_file(struct proc *p, char *path, struct exec_package *epp,
|
|||
pr->ps_pin.pn_end = base + len;
|
||||
pr->ps_pin.pn_pins = pins;
|
||||
pr->ps_pin.pn_npins = npins;
|
||||
pr->ps_flags |= PS_PIN;
|
||||
}
|
||||
} else {
|
||||
error = EINVAL; /* no pin table */
|
||||
goto bad1;
|
||||
}
|
||||
|
||||
vn_marktext(nd.ni_vp);
|
||||
|
@ -867,7 +869,6 @@ exec_elf_makecmds(struct proc *p, struct exec_package *epp)
|
|||
epp->ep_pinend = base + len;
|
||||
epp->ep_pins = pins;
|
||||
epp->ep_npins = npins;
|
||||
p->p_p->ps_flags |= PS_PIN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_exec.c,v 1.257 2024/08/06 08:44:54 claudio Exp $ */
|
||||
/* $OpenBSD: kern_exec.c,v 1.258 2024/08/21 03:07:45 deraadt Exp $ */
|
||||
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
|
||||
|
||||
/*-
|
||||
|
@ -514,12 +514,10 @@ sys_execve(struct proc *p, void *v, register_t *retval)
|
|||
pr->ps_pin.pn_pins = pack.ep_pins;
|
||||
pack.ep_pins = NULL;
|
||||
pr->ps_pin.pn_npins = pack.ep_npins;
|
||||
pr->ps_flags |= PS_PIN;
|
||||
} else {
|
||||
pr->ps_pin.pn_start = pr->ps_pin.pn_end = 0;
|
||||
pr->ps_pin.pn_pins = NULL;
|
||||
pr->ps_pin.pn_npins = 0;
|
||||
pr->ps_flags &= ~PS_PIN;
|
||||
}
|
||||
if (pr->ps_libcpin.pn_pins) {
|
||||
free(pr->ps_libcpin.pn_pins, M_PINSYSCALL,
|
||||
|
@ -527,7 +525,6 @@ sys_execve(struct proc *p, void *v, register_t *retval)
|
|||
pr->ps_libcpin.pn_start = pr->ps_libcpin.pn_end = 0;
|
||||
pr->ps_libcpin.pn_pins = NULL;
|
||||
pr->ps_libcpin.pn_npins = 0;
|
||||
pr->ps_flags &= ~PS_LIBCPIN;
|
||||
}
|
||||
|
||||
stopprofclock(pr); /* stop profiling */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kern_fork.c,v 1.264 2024/08/20 07:48:23 mvs Exp $ */
|
||||
/* $OpenBSD: kern_fork.c,v 1.265 2024/08/21 03:07:45 deraadt Exp $ */
|
||||
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -256,14 +256,12 @@ process_new(struct proc *p, struct process *parent, int flags)
|
|||
sizeof(u_int), M_PINSYSCALL, M_WAITOK);
|
||||
memcpy(pr->ps_pin.pn_pins, parent->ps_pin.pn_pins,
|
||||
parent->ps_pin.pn_npins * sizeof(u_int));
|
||||
pr->ps_flags |= PS_PIN;
|
||||
}
|
||||
if (parent->ps_libcpin.pn_pins) {
|
||||
pr->ps_libcpin.pn_pins = mallocarray(parent->ps_libcpin.pn_npins,
|
||||
sizeof(u_int), M_PINSYSCALL, M_WAITOK);
|
||||
memcpy(pr->ps_libcpin.pn_pins, parent->ps_libcpin.pn_pins,
|
||||
parent->ps_libcpin.pn_npins * sizeof(u_int));
|
||||
pr->ps_flags |= PS_LIBCPIN;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue