🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.mach
Article #938

Maximum protections and vm_protect

#938
From: Boris Putanec
Date: Sat, 13 Apr 1991 03:36
25 lines
1228 bytes
Why are tasks permitted to change their maximum protections with
vm_protect? Why have maximum protections at all if they can be changed
to allow greater access? Shouldn't the maximum protection set by
vm_map stick?

Here is the relevant portion from the Mach 3.0 vm_map.c,

		old_prot = current->protection;
		if (set_max)
			current->protection =
				(current->max_protection = new_prot) &
					old_prot;
		else
			current->protection = new_prot;

We are trying to design a file server which will map files directly
into a tasks address space and need a way to restrict access. Since
the server would be performing the vm_map, maximum protections seemed
an ideal solution. The source seems to indicate otherwise.

Am I missing something? Is there another way to do it?

boris
bp@cs.brown.edu
Technical Details
Message-ID: <BP.91Apr12233650@flint.cs.brown.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!brunix!doorknob!bp

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!brunix!doorknob!bp
From: bp@cs.brown.edu (Boris Putanec)
Newsgroups: comp.os.mach
Subject: Maximum protections and vm_protect
Message-ID: <BP.91Apr12233650@flint.cs.brown.edu>
Date: 13 Apr 91 03:36:50 GMT
Sender: news@brunix.UUCP
Distribution: comp
Organization: Department of Computer Science, Brown University
Lines: 25