Reservations for must-succeed memory allocations
Reservations for must-succeed memory allocations
Posted Mar 18, 2015 22:26 UTC (Wed) by Cyberax (✭ supporter ✭, #52523)In reply to: Reservations for must-succeed memory allocations by neilbrown
Parent article: Reservations for must-succeed memory allocations
Posted Mar 18, 2015 23:31 UTC (Wed)
by nix (subscriber, #2304)
[Link] (5 responses)
Posted Mar 18, 2015 23:31 UTC (Wed)
by nix (subscriber, #2304)
[Link] (1 responses)
I clearly need to go to sleep...
Posted Mar 19, 2015 1:12 UTC (Thu)
by Paf (subscriber, #91811)
[Link]
Uninterruptible sleeping, and sleeping with sigkill blocked. Doing either one in a syscall means the process won't act on sigkill until it is woken up. I believe when sleeping uninterruptibly, sigkill is ignored. (I'm pretty sure.)
One particularly fun thing in multi-threaded systems I've actually seen: The intended waker is killed and the sleeper is now unwakeable and unkillable.
Posted Mar 19, 2015 0:03 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link] (2 responses)
Posted Mar 19, 2015 0:32 UTC (Thu)
by neilbrown (subscriber, #359)
[Link] (1 responses)
So either they will have called get_user_pages() and will hold references to the pages which will keep them safe, or it will be calling copy_{to,from}_user which is designed to handle missing
Is there some other way to access user memory that I have missed? Or is one of those racy in a way that I cannot see?
Posted Mar 19, 2015 18:45 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link]
> Is there some other way to access user memory that I have missed? Or is one of those racy in a way that I cannot see?
Reservations for must-succeed memory allocations
Reservations for must-succeed memory allocations
Reservations for must-succeed memory allocations
Reservations for must-succeed memory allocations
Reservations for must-succeed memory allocations
addresses and will return an appropriate error status if the memory isn't there.
Reservations for must-succeed memory allocations
Wouldn't this require splitting the victim's VMA to free pages that are not pinned (requiring more RAM to do it)? On the other hand, in most cases only a couple of pages are going to be pinned at any given moment.
Other than weird zero-copy scenarios I think you're not missing anything.