"Key"-based memory protection
Posted: Tue Sep 01, 2009 10:21 pm
Hey all,
I was browsing wikipedia and stumbled upon this interesting thing about a special type of memory protection. It uses, from what I can tell, a chunk of memory is given a unique identification key to be used in conjunction with an application's assigned key. I'm guessing applications are given a key based on which blocks are free (probably size as well) which restricts the blocks of memory it can access.
So here's my question: how feasible would it be to implement "key protection", as I like to call it, in software? I would assume that under the x86, one could use the debug registers to restrict access, but there's a problem with that. The debug registers can either fire a breakpoint on the access of one, two, or four bytes only. No more. Damn.
So how else would it be done? How portable would it be? Is it worth to use instead of segmentation or (ye-eech) paging? Would it be anything else than just a "cool idea"?
I'd love to hear your thoughts on this.
Cheers,
--Troy
I was browsing wikipedia and stumbled upon this interesting thing about a special type of memory protection. It uses, from what I can tell, a chunk of memory is given a unique identification key to be used in conjunction with an application's assigned key. I'm guessing applications are given a key based on which blocks are free (probably size as well) which restricts the blocks of memory it can access.
So here's my question: how feasible would it be to implement "key protection", as I like to call it, in software? I would assume that under the x86, one could use the debug registers to restrict access, but there's a problem with that. The debug registers can either fire a breakpoint on the access of one, two, or four bytes only. No more. Damn.
So how else would it be done? How portable would it be? Is it worth to use instead of segmentation or (ye-eech) paging? Would it be anything else than just a "cool idea"?
I'd love to hear your thoughts on this.
Cheers,
--Troy