imgact_aout.c (103767) | imgact_aout.c (109623) |
---|---|
1/* 2 * Copyright (c) 1993, David Greenman 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) 1993, David Greenman 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/kern/imgact_aout.c 103767 2002-09-21 22:07:17Z jake $ | 26 * $FreeBSD: head/sys/kern/imgact_aout.c 109623 2003-01-21 08:56:16Z alfred $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/exec.h> 31#include <sys/imgact.h> 32#include <sys/imgact_aout.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> --- 236 unchanged lines hidden (view full) --- 271 register struct vmspace *vm = p->p_vmspace; 272 char *tempuser; 273 int error; 274 275 if (ctob((uarea_pages + kstack_pages) 276 + vm->vm_dsize + vm->vm_ssize) >= limit) 277 return (EFAULT); 278 tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP, | 27 */ 28 29#include <sys/param.h> 30#include <sys/exec.h> 31#include <sys/imgact.h> 32#include <sys/imgact_aout.h> 33#include <sys/kernel.h> 34#include <sys/lock.h> --- 236 unchanged lines hidden (view full) --- 271 register struct vmspace *vm = p->p_vmspace; 272 char *tempuser; 273 int error; 274 275 if (ctob((uarea_pages + kstack_pages) 276 + vm->vm_dsize + vm->vm_ssize) >= limit) 277 return (EFAULT); 278 tempuser = malloc(ctob(uarea_pages + kstack_pages), M_TEMP, |
279 M_WAITOK | M_ZERO); | 279 M_ZERO); |
280 if (tempuser == NULL) 281 return (ENOMEM); 282 PROC_LOCK(p); 283 fill_kinfo_proc(p, &p->p_uarea->u_kproc); 284 PROC_UNLOCK(p); 285 bcopy(p->p_uarea, tempuser, sizeof(struct user)); 286 bcopy(td->td_frame, 287 tempuser + ctob(uarea_pages) + --- 27 unchanged lines hidden --- | 280 if (tempuser == NULL) 281 return (ENOMEM); 282 PROC_LOCK(p); 283 fill_kinfo_proc(p, &p->p_uarea->u_kproc); 284 PROC_UNLOCK(p); 285 bcopy(p->p_uarea, tempuser, sizeof(struct user)); 286 bcopy(td->td_frame, 287 tempuser + ctob(uarea_pages) + --- 27 unchanged lines hidden --- |