Messages in this thread | | | Date | Mon, 23 Aug 2010 16:42:08 +0100 | From | ijackson@chiark ... | Subject | Re: [RFC] mlock/stack guard interaction fixup |
| |
Linus Torvalds writes ("Re: [RFC] mlock/stack guard interaction fixup"): > Although you do need to have some really odd things going on for any > of them to make any difference. Notably, you need to do mlock or > mprotect on the stack segment, which no sane program does.
mlocking the stack is entirely sensible and normal for a real-time program. Most such programs use mlockall but there is no particular reason why a program that has some more specific requirements should use mlock to lock only a part of the stack. (Perhaps it has only one real-time thread?)
Locking, including of the stack, is discussed extensively here: http://www.opengroup.org/onlinepubs/9699919799/xrat/V4_xsh_chap02.html section "Memory locking functions" subsection "Requirements".
Ian.
| |