Re: Unmap pages from a VMA

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

 



Thomas Petazzoni wrote:
Hi,

The nopage() method of a VMA is called when a page fault occurs on that
VMA, and this method allows the driver being mmap()ed which page should
be mapped at the fault address. Works nicely.

However, how can the driver unmap some pages of a VMA, so that at the
next access from userspace, a new call to the nopage() method is done ?

You could just reset the present bit of the pages that you want to remap.
Now the next access to these pages will generate a fault and your nopage() will be called.
you can modify your nopage() accordingly.

Hope it helps.


--
Vivek Kutal





--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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