From 9ac64af7926d77ca1bc84977a4249c91059065ca Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Fri, 2 May 2003 21:07:51 +0000 Subject: when flipping the code descriptors also update cs in the tss and not only in the frame since we might be returning that way too. add a heuristic for detecting an exec protection fault: iff we get a read protection fault (which we normally never get due to our segments being always readable) we assume that it was an exec protection indeed and go to page fault routine which will decide the rest for us (including sending a signal should that be needed). problem found by drahn@ and testing by many ppl. --- sys/arch/i386/include/pcb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/arch/i386/include/pcb.h') diff --git a/sys/arch/i386/include/pcb.h b/sys/arch/i386/include/pcb.h index 18d135096cc..889bdc95397 100644 --- a/sys/arch/i386/include/pcb.h +++ b/sys/arch/i386/include/pcb.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcb.h,v 1.7 2001/03/24 18:11:48 millert Exp $ */ +/* $OpenBSD: pcb.h,v 1.8 2003/05/02 21:07:50 mickey Exp $ */ /* $NetBSD: pcb.h,v 1.21 1996/01/08 13:51:42 mycroft Exp $ */ /*- @@ -61,6 +61,7 @@ struct pcb { #define pcb_cr3 pcb_tss.tss_cr3 #define pcb_esp pcb_tss.tss_esp #define pcb_ebp pcb_tss.tss_ebp +#define pcb_cs pcb_tss.tss_cs #define pcb_fs pcb_tss.tss_fs #define pcb_gs pcb_tss.tss_gs #define pcb_ldt_sel pcb_tss.tss_ldt -- cgit v1.2.3