ia32_reg.c (190620) | ia32_reg.c (195486) |
---|---|
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 190620 2009-04-01 13:09:26Z kib $ | 26 * $FreeBSD: head/sys/amd64/ia32/ia32_reg.c 195486 2009-07-09 09:34:11Z kib $ |
27 */ 28 29#include <sys/cdefs.h> | 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_reg.c 190620 2009-04-01 13:09:26Z kib $"); | 30__FBSDID("$FreeBSD: head/sys/amd64/ia32/ia32_reg.c 195486 2009-07-09 09:34:11Z kib $"); |
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 tp->tf_flags = TF_HASSEGS; 129 tp->tf_rdi = regs->r_edi; 130 tp->tf_rsi = regs->r_esi; 131 tp->tf_rbp = regs->r_ebp; 132 tp->tf_rbx = regs->r_ebx; 133 tp->tf_rdx = regs->r_edx; 134 tp->tf_rcx = regs->r_ecx; 135 tp->tf_rax = regs->r_eax; --- 96 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; --- 96 unchanged lines hidden --- |