lkml.org 
[lkml]   [2010]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.




\
 
 \ /
  Last update: 2010-08-23 18:03    [W:0.092 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site