subr_syscall.c (26373) | subr_syscall.c (26494) |
---|---|
1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 | 1/*- 2 * Copyright (C) 1994, David Greenman 3 * Copyright (c) 1990, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * the University of Utah, and William Jolitz. 8 * --- 21 unchanged lines hidden (view full) --- 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 |
38 * $Id: trap.c,v 1.97 1997/05/31 09:27:29 peter Exp $ | 38 * $Id: trap.c,v 1.98 1997/06/02 08:19:03 dfr Exp $ |
39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include "opt_ktrace.h" 46#include "opt_ddb.h" --- 300 unchanged lines hidden (view full) --- 347 do { \ 348 if (frame.tf_eip == (int)where) { \ 349 frame.tf_eip = (int)whereto; \ 350 return; \ 351 } \ 352 } while (0) 353 354 if (intr_nesting_level == 0) { | 39 */ 40 41/* 42 * 386 Trap and System call handling 43 */ 44 45#include "opt_ktrace.h" 46#include "opt_ddb.h" --- 300 unchanged lines hidden (view full) --- 347 do { \ 348 if (frame.tf_eip == (int)where) { \ 349 frame.tf_eip = (int)whereto; \ 350 return; \ 351 } \ 352 } while (0) 353 354 if (intr_nesting_level == 0) { |
355 /* 356 * Invalid %fs's and %gs's can be created using 357 * procfs or PT_SETREGS or by invalidating the 358 * underlying LDT entry. This causes a fault 359 * in kernel mode when the kernel attempts to 360 * switch contexts. Lose the bad context 361 * (XXX) so that we can continue, and generate 362 * a signal. 363 */ 364 if (frame.tf_eip == (int)cpu_switch_load_fs) { 365 curpcb->pcb_fs = 0; 366 psignal(p, SIGBUS); 367 return; 368 } 369 if (frame.tf_eip == (int)cpu_switch_load_gs) { 370 curpcb->pcb_gs = 0; 371 psignal(p, SIGBUS); 372 return; 373 } |
|
355 MAYBE_DORETI_FAULT(doreti_iret, 356 doreti_iret_fault); 357 MAYBE_DORETI_FAULT(doreti_popl_ds, 358 doreti_popl_ds_fault); 359 MAYBE_DORETI_FAULT(doreti_popl_es, 360 doreti_popl_es_fault); 361 if (curpcb && curpcb->pcb_onfault) { 362 frame.tf_eip = (int)curpcb->pcb_onfault; --- 615 unchanged lines hidden --- | 374 MAYBE_DORETI_FAULT(doreti_iret, 375 doreti_iret_fault); 376 MAYBE_DORETI_FAULT(doreti_popl_ds, 377 doreti_popl_ds_fault); 378 MAYBE_DORETI_FAULT(doreti_popl_es, 379 doreti_popl_es_fault); 380 if (curpcb && curpcb->pcb_onfault) { 381 frame.tf_eip = (int)curpcb->pcb_onfault; --- 615 unchanged lines hidden --- |