Xref: utzoo comp.unix.microport:3015 comp.unix.questions:12386 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!oberon!sm.unisys.com!ism780c!ico!clover!rcd From: rcd@ico.ISC.COM (Dick Dunn) Newsgroups: comp.unix.microport,comp.unix.questions Subject: Re: C bug causes double fault Summary: But AT is protected! Message-ID: <15705@clover.ICO.ISC.COM> Date: 22 Mar 89 17:49:25 GMT References: <244@tree.UUCP> <9884@smoke.BRL.MIL> <27245@cci632.UUCP> <9900@smoke.BRL.MIL> Organization: Interactive Systems Corp, Boulder, CO Lines: 28 In article <9900@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn ) writes: > In article <27245@cci632.UUCP> tvf@ccird7.UUCP (Tom Frauenhofer) writes: > >On Microport V/AT, what he wrote causes a kernel panic. That doesn't seem > >to be reasonable behavior for an OS/library routine/whatever. > > Of course nobody would call it "reasonable", but it's not too surprising. > Incorrect user-mode code on a nonprotected multitasking system (forced by > limitations of the PC/AT architecture) can easily crash the entire system. What, more specifically, are the "limitations of the PC/AT architecture"? Microport runs the 286 in protected mode. Each process has its own memory, protected via the LDT, and the GDT entries be set so that user- level code can't get outside its playpen. The memory protection in the 286 is a fairly serious nuisance to work with, but it is there. Exceptions occurring in user mode go through a call gate into system mode where you can straighten out the mess. You change stacks when you change privilege levels; in the kernel you're in an environment as safe (and as insulated from user-code screwups) as you care to make it. Is there some problem with the 287 interaction with the 286 in protected mode that can't be made safe? Specifically, what can a user-mode program on the AT do, when running in protected mode, that the OS couldn't protect against? -- Dick Dunn UUCP: {ncar,nbires}!ico!rcd (303)449-2870 ...Never offend with style when you can offend with substance.