RE: How to read-protect a vm_area?

mshar@vax.ipm.ac.ir
Thu, 12 Feb 1998 00:44:31 +0330


What DSM system were you working on?

My work concern DIPC (http://wallybox.cei.net/dipc). DIPC plants a handler
in the page fault handling routine (arch/.../mm/fault.c) which allows
it to take charge when necessary, by overriding normal kernel behaviousr.

As you have noted, making a page write-protected is no problem. DIPC also
uses a modified change_protection to do so. Currently DIPC swaps the
pages of a shm to make them read-and-write protected, but I'd rather
do this just by the page protection bits.

Now, everything works when write-protection is involved: My handler in
fault.c gets called, the shm contents are brought in, and then the kernel
is allowed to do its normal processing.

But why the same technic does not work when one wants to make the pages
read-protected? After making this modification, the program could just
go on and read from the shm, without my handler being called.

swapping out works, but in DIPC's case, one has to copy and modify code
from other parts of the kernel. This makes it harder to keep up
with newer kernel releases, and opens the door to many bugs. Another
consideration is that swapping out is potentially less efficient than
the other method. This is when the pages are actually written to the
swap area.

-Kamran

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu