Re: When can I call SetPageReserved()?

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

 



Curran, Dominic wrote:

Can you use mlock() from user space, before you pass down the memory to
kernel space ?

We currently call sys_mlock() from within the driver. Yes, I know that we're not supposed to make system calls from within kernel space, but for now it works. I'll see if we can move that call to user space, but the problem is that, according to the man page, memory locks do not stack. We need them to stack, because the application can request operations on buffers that have overlapping pages.


That is, an application can call malloc() twice. The end of the first buffer and the beginning of the second buffer can exist in the same page. If I lock both buffers and then unlock the first, the beginning of the second buffer will become unlocked.

--
Timur Tabi
Staff Software Engineer
timur.tabi@ammasso.com

--
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