delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/10/10:01:42

From: Andrew Crabtree <andrewc AT typhoon DOT rose DOT hp DOT com>
Message-Id: <199703101442.AA264674970@typhoon.rose.hp.com>
Subject: Re: Ring 0?
To: ao950 AT FreeNet DOT Carleton DOT CA
Date: Mon, 10 Mar 1997 6:42:50 PST
Cc: djgpp AT delorie DOT com
In-Reply-To: <5g06av$qit@freenet-news.carleton.ca>; from "Paul Derbyshire" at Mar 10, 97 5:31 am

>  
> > All DOS programs are not DPMI programs.  Real-mode code that runs in a
> > DOS box will completely ignore the memory manager and can go ahead and
> > corrupt anything it likes.  Usually, Win95 will catch the program at it,
> > but it can still take down your computer.
> 
> Flame me if I'm wrong, but doesn't a DOS box run on a virtual machine with
> its own Windows-provided image of the real memory map? Aren't all of its
> transactions indirect via the Windows kernel then?
> 
> [DOS is terribly insecure]
> 
> Is this caused by an aspect of Intel CPU design or by an aspect of the
> DPMI spec?
> 
Hmmmm - It sounds like you've been brainwashed by Microsoft's marketing
guys.  With Windows 3.1, WFW, and Win95 microsoft virtualizes some
(but not all) dos functions.  The reason they don't do all is software 
compatibility (WFW virtualized some that Win95 does not, but 32 bit disk
access broke things like Stacker).  This means possibly hundreds of
shifts to real mode a second.  Once the Protection Enable bit in the 
CPU is off any program has a fair shot at all memory.  NT I believe 
does virtualize all Dos calls and also runs dos programs
in v86 mode making it able to catch much more than Windows 95.

Whether or not this is a flaw I don't know.  MS can obviouly virualize 
every function but does it make sense to given the amount of 
real mode code out there?  Definately not an intel problem though.

Andrew

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019