Re: Passing a memory map

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > any hint (where i should start, what i should learn)?
>
> You will want to read do_mmap_pgoff and sys_mprotect
> functions and all the functions surrounding them.
> 
> They should give you an idea to the data structures
> you need to read and copy over to another process.
>

yeah, a have (eventually) read some source code and i am getting 
an idea :-)
I have also found very useful to read mm.h and fork.c

I was now trying to realize the difference among VM_SHARE,
VM_MAYSHARE and VM_SHM.

when a program do an mmap MAP_SHARED, the vma gets
at least the VM_SHARE|VM_MAYSHARE flags.
does this mean that it could not be possible to pass a 
PRIVATE mapping? (i mean, it would be difficult without 
messing around too much with the kernel)

After all there are also problems to decide what should happen
when a private copy-on-write file mapping is passed :-)

Thanx
Maurizio

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux