First page Back Continue Last page Overview Graphics
Exposing Address Spaces :
Address spaces already separate objects inside kernel - struct mm_struct
Represent them with file descriptors
- file_operations provide translation to operations on mm_struct
Handle to current address space -
- open(''/proc/self/mm'', O_RDWR)
This doesn't involve any surgery to the kernel. Linux address spaces are represented by mm_structs, which are separate from processes, and which are reference counted.
All that's needed is to expose them to userspace. I'm proposing a file interface, which will cause them to be represented by file descriptors.
The file_operations will translate whatever operations make sense into operations on the mm_struct backing the file descriptor.
So, to get a handle to the current address space, a process would open /proc/self/mm.