Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

PROT_* for PowerPC questions....(revisiting)

From: Joshua Johnson <joshua.johnson(at)charter.net>
Date: Sat Feb 08 2003 - 00:11:40 EST


All,

        On 30 Jan 2003 Theo sent out a summary of new features that were to be included in the new 3.3(4) release. In the post he provided a table showing supported architectures and the successful (or unsuccessful) implementation of correct PROT_READ PROT_WRITE PROT_EXEC flags. The entry for PPC had a note saying that the team was unable to implement the way they had for the other(fully supported) architectures and that currently the best that can be done is stack protection.

My question is: Is this really the case?

After reading this I consulted the PPC and SPARC arch manuals on my desk and it seems at first glance that the PPC should be able to come quite close to the SPARC, ALPHA, and PARISC.

My (quite probably flawed) reasoning follows:

The PPC does implement 5 modes of protection on pages for each of 2(?) segment types. The two segment types being user and supervisor. The data as I found it is from the Programming Environments Manual For 32 bit implementations of the PowerPC architecture. http://e-www.motorola.com/brdata/PDFDB/docs/MPCFPE32B.pdf

Chapter 7, Section 3.4 (Memory Protection Facilities) explains the modes in a table that I will repeat here.
ACCESS | USER | SPVR |


SRWX     |  | | | X|R|W|
SRW      |  | | |  |R|W|
SRWX URX | X|R| | X|R|W|
SRW  UR  |  |R| |  |R|W|
SRWX URWX| X|R|W| X|R|W|
SRW  URW |  |R|W|  |R|W|
SRX  URX | X|R| | X|R| |
SR   UR  |  |R| |  |R| |
========================

S=Supervisor Mode
U=User Mode
R=Data Read Access

W=Write Access
X=Instruction Fetch Access

So, doesn't this mean that you can take the combinations of RWX from the PROT_* flags and map them as:

Do you need help?X

(PROT)R -> SR UR
(PROT)RW -> SRW URW
(PROT)RWX -> SRWX URWX
(PROT)WX -> SRWX URWX
(PROT)RX -> SRWX URX -or- SRX URX

Ok, the notable assumptions/exceptions here:

I am assuming (naively) that the kernel can/does use supervisor mode. I am assuming that the block translation mechanism is not in place (if it were we lose the X protection <and I go 'Um--Nevermind'>).

What is the big key that I am missing here?

I do understand that undoubtedly the correct people know all of this stuff already, I am just wondering where I am missing the boat. If someone could be so kind as to point me the general direction of why this won't/doesn't work I would be most appreciative.

Thanks again to all for the wonderful OS.

Joshua Johnson Received on Fri Feb 7 23:59:26 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:30 EDT

Do you need more help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library