PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Computer Folklore

8086 memory space was: The Soul of Barb's New Machine 1157


This was implemented in OpenBSD a few minor versions ago. (3.3?) Primos also got it a few versions after BIND was introduced; (20.2?)

Didn't Multics (eventually) implement this right?

What extra cost? There is a "small matter of programming" to set the right bits in page registers after loading the elf file, but otherwise the basic hooks for doing this has been in 'x86 and lots of different hardware for a long time.

All pages in the BSD's have RWX bits; for Linux it is a little more coarse-grained, but still possible on a per-segment basis. (And it wouldn't take all that much to change to a per-page view).

8086 memory space was: The Soul of Barb's New Machine 1160
No, tops20 had protection on individual pages, and the loader set them right. The instructions for that is in the .exe file. Malignant code, either by purpose...

Tops20 could mark files as execute-only too, and did it right. Then the user couldn't mess with the image, but code could change data in it's own data segments at will.

8086 memory space was: The Soul of Barb's New Machine 1158
And "executeable" file may consist of one or more of the following "block" types: Executeable - being pure machine instructions...

Here we are doing a different thing. The original prospect is to change the program loader (ld.so in juniks) so that it sets appropriate protection bits on the stuff it loads. RW on stack, RX on code, R on 'pure' data, RW on impure data, and RWX on whatever it cannot handle.If you want to bypbutt this from your program, you can, but you have to set page protection bits explicitly before you go.

Compilers and linkers already pbutt this information on; and most linkers already do a lot of effort to separate pure and impure data to have better paging performance.

If I as an OpenBSD user want a different setup, I can get this. I either need to modify the loader file (elf file, aka .EXE), with different instructions to the loader, or I need to include code in the program to set different protection bits.

The only monitor changes needed in the OpenBSD KERNEL were to make room in tables for more fine-grained memory control needed when this was implemented.

I have been doing this in critical code for servers manually for years; to make a new (big) stack segment and set the protection as RW, and to set RX on code. It works well on Linux and FreeBSD still.I do this as a matter of routine in cgi-bin code.

This is an exempple of stuff from non-unix systems we need to bring into the current thinking.

-- mrr


List | Previous | Next

8086 memory space was: The Soul of Barb's New Machine 1158

Alt Folklore Computers Newsgroups

8086 memory space was: The Soul of Barb's New Machine 1156