plan 9 kernel history: overview | file list | diff list

1997/0520/pc/trap.c (diff list | history)

1997/0520/sys/src/9/pc/trap.c:492,5011997/1003/sys/src/9/pc/trap.c:492,504 (short | long | prev | next)
1997/0520    
	 * Check the segment selectors are all valid, otherwise 
	 * a fault will be taken on attempting to return to the 
	 * user process. 
1997/1003    
	 * Take care with the comparisons as different processor 
	 * generations push segment descriptors in different ways. 
1997/0520    
	 */ 
	if(nureg->cs != UESEL || nureg->ss != UDSEL || nureg->ds != UDSEL 
	  || nureg->es != UDSEL || nureg->fs != UDSEL || nureg->gs != UDSEL){ 
		pprint("bad segement selector in noted\n"); 
1997/1003    
	if((nureg->cs & 0xFFFF) != UESEL || (nureg->ss & 0xFFFF) != UDSEL 
	  || (nureg->ds & 0xFFFF) != UDSEL || (nureg->es & 0xFFFF) != UDSEL 
	  || (nureg->fs & 0xFFFF) != UDSEL || (nureg->gs & 0xFFFF) != UDSEL){ 
		pprint("bad segment selector in noted\n"); 
1997/0520    
		qunlock(&up->debug); 
		pexit("Suicide", 0); 
	} 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)