MIPS memory execution prevention

I do some research with MIPS architecture and wonder how operating systems work with the limited instructions and memory protection that mips offers. I just wonder how the operating system will prevent the execution of certain address ranges. For example, how can an operating system limit a PC to a certain range? In other words, to prevent something like execution from dynamically allocated memory?

The first thing that came to mind was TLB, but TLBs offer only write protection (and not execute).

I don’t quite understand how this could be solved using the OS, because it would mean that each instruction would throw an exception, and then many MANY cycles would be executed, just checking if the PC was in a reasonable range of addresses.

If someone knows how this is usually done? It is somehow handled by the hardware during initialization (for example, it sets the range of addresses and an exception is thrown if it is out of range?)

+5
source share
2 answers

Most security checks are performed on the hardware, by the processor itself and do not require much involvement from the OS.

( ), , , /, CPU .

, , , . , ( , , - ), . -, .

, -, . . /, , - . , , , , , / , . , , , / .

, , , CPU .

MIPS ( " 235 - MIPS ARM" ):

3.4.2 MIPS , , 2 . .

enter image description here

MEM- , , " MIPS.

MIPS , . .

+2

TLB. ( NX) , MIPS . MIPS- ( 3) SmartMIPS Application- XI (Execute Inhibit).

, . , .

+2

All Articles