Deleted Added
full compact
ia32_reg.c (215865) ia32_reg.c (216634)
1/*-
2 * Copyright (c) 2005 Peter Wemm
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) 2005 Peter Wemm
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/amd64/ia32/ia32_reg.c 215865 2010-11-26 14:50:42Z kib $
26 * $FreeBSD: head/sys/amd64/ia32/ia32_reg.c 216634 2010-12-22 00:18:42Z jkim $
27 */
28
29#include <sys/cdefs.h>
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_reg.c 215865 2010-11-26 14:50:42Z kib $");
30__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_reg.c 216634 2010-12-22 00:18:42Z jkim $");
31
32#include "opt_compat.h"
33
34#include <sys/param.h>
35#include <sys/exec.h>
36#include <sys/fcntl.h>
37#include <sys/imgact.h>
38#include <sys/kernel.h>

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

120 tp = td->td_frame;
121 if (!EFL_SECURE(regs->r_eflags, tp->tf_rflags) || !CS_SECURE(regs->r_cs))
122 return (EINVAL);
123 pcb = td->td_pcb;
124 tp->tf_gs = regs->r_gs;
125 tp->tf_fs = regs->r_fs;
126 tp->tf_es = regs->r_es;
127 tp->tf_ds = regs->r_ds;
31
32#include "opt_compat.h"
33
34#include <sys/param.h>
35#include <sys/exec.h>
36#include <sys/fcntl.h>
37#include <sys/imgact.h>
38#include <sys/kernel.h>

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

120 tp = td->td_frame;
121 if (!EFL_SECURE(regs->r_eflags, tp->tf_rflags) || !CS_SECURE(regs->r_cs))
122 return (EINVAL);
123 pcb = td->td_pcb;
124 tp->tf_gs = regs->r_gs;
125 tp->tf_fs = regs->r_fs;
126 tp->tf_es = regs->r_es;
127 tp->tf_ds = regs->r_ds;
128 td->td_pcb->pcb_full_iret = 1;
128 set_pcb_flags(pcb, PCB_FULL_IRET);
129 tp->tf_flags = TF_HASSEGS;
130 tp->tf_rdi = regs->r_edi;
131 tp->tf_rsi = regs->r_esi;
132 tp->tf_rbp = regs->r_ebp;
133 tp->tf_rbx = regs->r_ebx;
134 tp->tf_rdx = regs->r_edx;
135 tp->tf_rcx = regs->r_ecx;
136 tp->tf_rax = regs->r_eax;

--- 100 unchanged lines hidden ---
129 tp->tf_flags = TF_HASSEGS;
130 tp->tf_rdi = regs->r_edi;
131 tp->tf_rsi = regs->r_esi;
132 tp->tf_rbp = regs->r_ebp;
133 tp->tf_rbx = regs->r_ebx;
134 tp->tf_rdx = regs->r_edx;
135 tp->tf_rcx = regs->r_ecx;
136 tp->tf_rax = regs->r_eax;

--- 100 unchanged lines hidden ---