Deleted Added
full compact
linux_machdep.c (76166) linux_machdep.c (78962)
1/*-
2 * Copyright (c) 2000 Marcel Moolenaar
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) 2000 Marcel Moolenaar
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 * $FreeBSD: head/sys/i386/linux/linux_machdep.c 76166 2001-05-01 08:13:21Z markm $
28 * $FreeBSD: head/sys/i386/linux/linux_machdep.c 78962 2001-06-29 11:10:41Z jhb $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/mman.h>
34#include <sys/mutex.h>
35#include <sys/proc.h>
36#include <sys/resource.h>

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

257 start = 0;
258
259 if ((error = fork1(p, ff, &p2)) != 0)
260 return (error);
261
262 PROC_LOCK(p2);
263 p2->p_sigparent = exit_signal;
264 PROC_UNLOCK(p2);
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/mman.h>
34#include <sys/mutex.h>
35#include <sys/proc.h>
36#include <sys/resource.h>

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

257 start = 0;
258
259 if ((error = fork1(p, ff, &p2)) != 0)
260 return (error);
261
262 PROC_LOCK(p2);
263 p2->p_sigparent = exit_signal;
264 PROC_UNLOCK(p2);
265 p2->p_md.md_regs->tf_esp = (unsigned int)args->stack;
265 p2->p_frame->tf_esp = (unsigned int)args->stack;
266
267#ifdef DEBUG
268 if (ldebug(clone))
269 printf(LMSG("clone: successful rfork to %ld"),
270 (long)p2->p_pid);
271#endif
272
273 /*

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

469 int error;
470
471 if (args->level < 0 || args->level > 3)
472 return (EINVAL);
473 if ((error = suser(p)) != 0)
474 return (error);
475 if (securelevel > 0)
476 return (EPERM);
266
267#ifdef DEBUG
268 if (ldebug(clone))
269 printf(LMSG("clone: successful rfork to %ld"),
270 (long)p2->p_pid);
271#endif
272
273 /*

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

469 int error;
470
471 if (args->level < 0 || args->level > 3)
472 return (EINVAL);
473 if ((error = suser(p)) != 0)
474 return (error);
475 if (securelevel > 0)
476 return (EPERM);
477 p->p_md.md_regs->tf_eflags = (p->p_md.md_regs->tf_eflags & ~PSL_IOPL) |
477 p->p_frame->tf_eflags = (p->p_frame->tf_eflags & ~PSL_IOPL) |
478 (args->level * (PSL_IOPL / 3));
479 return (0);
480}
481
482int
483linux_modify_ldt(p, uap)
484 struct proc *p;
485 struct linux_modify_ldt_args *uap;

--- 225 unchanged lines hidden ---
478 (args->level * (PSL_IOPL / 3));
479 return (0);
480}
481
482int
483linux_modify_ldt(p, uap)
484 struct proc *p;
485 struct linux_modify_ldt_args *uap;

--- 225 unchanged lines hidden ---