Messages in this thread | | | Date | Tue, 15 Apr 2008 22:13:08 +0200 | From | "Robert Obryk" <> | Subject | Changing vma's vm_file |
| |
Hello everyone,
Can a file_ops mmap routine change the vm_file in the vma? I assume the file_ops of the substituted file won't break -- question is whether anything else can.
The only thing during mmap syscall I can notice to depend on the value of vm_file prior to call to f_op->mmap is the whole VM_DENYWRITE stuff. It confuses me somewhat, while it appears to do something, while manual for mmap states that MAP_DENYWRITE is ignored. What does it do now?
The problem I am trying to solve is creating a file which will, upon being mmaped, duplicate a mapping belonging to a different process. I plan to do this by substituting vm_file and calling proper f_op->mmap in my file's f_op->mmap.
Thanks in advance for any advice, Robert Obryk
| |