Nativeboost & memory protection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Nativeboost & memory protection

Ben Coman
 

I have been wondering for a while about the implications with Nativeboost for a misbehaving C-library to corrupt the Smalltalk image.  Just now I came across http://stackoverflow.com/questions/9056427/kernel-mode-and-memory-protection, where I read:

"Each process has its own page table, and each page in the page table can be restricted by setting a maximum CPL (Current Privilege Level).  Changing your CPL is a relatively fast operation"

I don't know much about this but I am curious...   Could the VM be made to normally run at CPL 2 and when allocating calling out to foreign function switch to CPL 3 - without too much overhead?

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: Nativeboost & memory protection

Ben Coman
 
[hidden email] wrote:
 

I have been wondering for a while about the implications with Nativeboost for a misbehaving C-library to corrupt the Smalltalk image. Just now I came across http://stackoverflow.com/questions/9056427/kernel-mode-and-memory-protection, where I read: "Each process has its own page table, and each page in the page table can be restricted by setting a maximum CPL (Current Privilege Level). Changing your CPL is a relatively fast operation" I don't know much about this but I am curious... Could the VM be made to normally run at CPL 2 and when allocating calling out to foreign function switch to CPL 3 - without too much overhead? cheers -ben
http://pdos.csail.mit.edu/6.828/2005/readings/i386/s06_03.htm.
also provides some interesting options.  Note this is all new to me and at the moment just for mild curiosity, so if its too much of a distraction just let me know.

Reply | Threaded
Open this post in threaded view
|

Re: Nativeboost & memory protection

Igor Stasenko
In reply to this post by Ben Coman
 
On 7 February 2013 05:39,  <[hidden email]> wrote:
>
>
> I have been wondering for a while about the implications with Nativeboost for a misbehaving C-library to corrupt the Smalltalk image.  Just now I came across http://stackoverflow.com/questions/9056427/kernel-mode-and-memory-protection, where I read:
>
> "Each process has its own page table, and each page in the page table can be restricted by setting a maximum CPL (Current Privilege Level).  Changing your CPL is a relatively fast operation"
>
> I don't know much about this but I am curious...   Could the VM be made to normally run at CPL 2 and when allocating calling out to foreign function switch to CPL 3 - without too much overhead?
>

there's many interesting things which can be done if running VM at
higher privilege level.
I seen there is a paper where people use a memory read protection (and
handle it properly),
to implement efficient read-barrier for GC

> cheers -ben
>

--
Best regards,
Igor Stasenko.