Path: 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: Date: 13 Apr 91 03:36:50 GMT Sender: news@brunix.UUCP Distribution: comp Organization: Department of Computer Science, Brown University Lines: 25 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