Deleted Added
full compact
linux_sysvec.c (41871) linux_sysvec.c (41931)
1/*-
2 * Copyright (c) 1994-1996 S�ren Schmidt
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

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1994-1996 S�ren Schmidt
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

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: linux_sysvec.c,v 1.39 1998/12/14 18:54:01 dt Exp $
28 * $Id: linux_sysvec.c,v 1.40 1998/12/16 16:28:57 bde Exp $
29 */
30
31/* XXX we use functions that might not exist. */
32#include "opt_compat.h"
33
34#ifndef COMPAT_43
35#error "Unable to compile Linux-emulator due to missing COMPAT_43 option!"
36#endif

--- 8 unchanged lines hidden (view full) ---

45#include <sys/imgact_elf.h>
46#include <sys/signalvar.h>
47#include <sys/malloc.h>
48#include <vm/vm.h>
49#include <vm/vm_param.h>
50#include <vm/vm_prot.h>
51#include <vm/vm_page.h>
52#include <vm/vm_extern.h>
29 */
30
31/* XXX we use functions that might not exist. */
32#include "opt_compat.h"
33
34#ifndef COMPAT_43
35#error "Unable to compile Linux-emulator due to missing COMPAT_43 option!"
36#endif

--- 8 unchanged lines hidden (view full) ---

45#include <sys/imgact_elf.h>
46#include <sys/signalvar.h>
47#include <sys/malloc.h>
48#include <vm/vm.h>
49#include <vm/vm_param.h>
50#include <vm/vm_prot.h>
51#include <vm/vm_page.h>
52#include <vm/vm_extern.h>
53#ifdef COMPAT_LINUX_THREADS
54#include <sys/lock.h> /* needed, for now, by vm_map.h */
55#include <vm/vm_map.h> /* needed, for now, for VM_STACK defines */
56#endif /* COMPAT_LINUX_THREADS */
53#include <sys/exec.h>
54#include <sys/kernel.h>
55#include <sys/module.h>
56#include <machine/cpu.h>
57
58#include <i386/linux/linux.h>
59#include <i386/linux/linux_proto.h>
60

--- 151 unchanged lines hidden (view full) ---

212 fp = (struct linux_sigframe *)regs->tf_esp - 1;
213 }
214
215 /*
216 * grow() will return FALSE if the fp will not fit inside the stack
217 * and the stack can not be grown. useracc will return FALSE
218 * if access is denied.
219 */
57#include <sys/exec.h>
58#include <sys/kernel.h>
59#include <sys/module.h>
60#include <machine/cpu.h>
61
62#include <i386/linux/linux.h>
63#include <i386/linux/linux_proto.h>
64

--- 151 unchanged lines hidden (view full) ---

216 fp = (struct linux_sigframe *)regs->tf_esp - 1;
217 }
218
219 /*
220 * grow() will return FALSE if the fp will not fit inside the stack
221 * and the stack can not be grown. useracc will return FALSE
222 * if access is denied.
223 */
224#ifdef COMPAT_LINUX_THREADS
225#ifdef USE_VM_STACK
226#ifndef USE_VM_STACK_FOR_EXEC
227 if ((((caddr_t)fp > p->p_vmspace->vm_maxsaddr &&
228 (caddr_t)fp < (caddr_t)USRSTACK &&
229 grow(p, (int)fp) == FALSE) ||
230 (((caddr_t)fp <= p->p_vmspace->vm_maxsaddr ||
231 (caddr_t)fp >= (caddr_t)USRSTACK) &&
232 grow_stack (p, (int)fp) == FALSE)) ||
233#else
234 if ((grow_stack (p, (int)fp) == FALSE) ||
235#endif
236#else
237#endif /* COMPAT_LINUX_THREADS */
220 if ((grow(p, (int)fp) == FALSE) ||
238 if ((grow(p, (int)fp) == FALSE) ||
239#ifdef COMPAT_LINUX_THREADS
240#endif
241#endif /* COMPAT_LINUX_THREADS */
221 (useracc((caddr_t)fp, sizeof (struct linux_sigframe), B_WRITE) == FALSE)) {
222 /*
223 * Process has trashed its stack; give it an illegal
224 * instruction to halt it in its tracks.
225 */
226 SIGACTION(p, SIGILL) = SIG_DFL;
227 sig = sigmask(SIGILL);
228 p->p_sigignore &= ~sig;

--- 262 unchanged lines hidden ---
242 (useracc((caddr_t)fp, sizeof (struct linux_sigframe), B_WRITE) == FALSE)) {
243 /*
244 * Process has trashed its stack; give it an illegal
245 * instruction to halt it in its tracks.
246 */
247 SIGACTION(p, SIGILL) = SIG_DFL;
248 sig = sigmask(SIGILL);
249 p->p_sigignore &= ~sig;

--- 262 unchanged lines hidden ---