Christopher Rhodes wrote: > I think one of the major problems with the Linux implementation, and > apparently windows too, is that noone pays attention to the added security > provided by segmentation (at least to the point of putting the stack on a > different segment?) Having separate non-overlapping stack and data segments causes a great many problems if you want to be able to write programs in C, given that a data pointer has to be able to record the address of any variable, regardless of whether it is static (data segment) or automatic (stack segment). There are workarounds (i.e. foregoing the simplicity of a flat memory model), but these are invariably either inefficient (e.g. the "huge" memory model found on 16-bit x86 C compilers), or not actually C (e.g. the "near" and "far" keywords in the language-which-looks-like-C-but-isn't that was commonly used for 16-bit x86 development). Also, using segmentation pretty much guarantees that your OS cannot be made to run on anything other than the x86 architecture (which is about the worst of the bunch; no sane person would use x86 if wasn't for the compatibility issues). -- Glynn Clements <glynnat_private>
This archive was generated by hypermail 2b30 : Fri Apr 13 2001 - 15:14:32 PDT