Path: utzoo!utgpu!attcan!uunet!husc6!mailrus!ames!vsi1!wyse!mips!sultra!dtynan
From: dtynan@sultra.UUCP (Der Tynan)
Newsgroups: comp.arch
Subject: PEP: Page Execution Priviledge
Keywords: access level, User/Supervisor.
Message-ID: <2550@sultra.UUCP>
Date: 28 Sep 88 22:19:52 GMT
Organization: Ultrasystems DSI, Sunnyvale, CA
Lines: 32

I was thinking last night, about an improvement in the standard User/Supervisor
status bit.  Before I let you in on what I was thinking, I must give the
disclaimer that some "brilliant" ideas I've had at 4:00 in the morning have
been pretty dumb, in the cold light of day.

Rather than have a standard U/S bit in the CPU status register, it might make
more sense to assign it to each I-page in a paged-MMU system.  The idea is that
certain functions within marked pages would carry a higher priviledge than the
rest.  This could best be used to alter certain key variables in the UN*X
kernel.  An example might be getpid(), which is a fairly nondescript system
call.  Instead of doing a trap to the kernel (with all the incredible overhead
involved), an application calls the standard library (which is in a page with
special access to the running kernel) which pulls the process ID right out of
the proc structure.  Date & time the same way.  Even the stuff to change UID/
GID could be done in the standard library (although this produces serious
security problems).  The programs such as 'ps', need not touch /dev/kmem, but
go straight to the kernel itself, and pull the appropriate stuff (sort of like
open-heart surgery).  All-in-all, the user application cannot touch the kernel,
but those instructions fetched from certain pages (which are X-only) could.

My question is this:  Does any system implement a scheme like this?  What are
the problems with doing this?  And is there anyone actually researching this?

Another application might be to use shared libraries between different
applications (I believe AT&T does this in SYSV3?), by mapping the library
into the appropriate page of the user process (again, X-only).  Any comments?
						- Der

-- 
Reply:	dtynan@sultra.UUCP		(Der Tynan @ Tynan Computers)
	{mips,pyramid}!sultra!dtynan
	Cast a cold eye on life, on death.  Horseman, pass by...    [WBY]