Thread (5 messages) 5 messages, 2 authors, 2012-01-16

Re: [PATCH] Mark thread stack correctly in proc/<pid>/maps

From: Siddhesh Poyarekar <hidden>
Date: 2012-01-16 13:08:33
Also in: linux-fsdevel, linux-mm, lkml

On Mon, Jan 16, 2012 at 4:58 PM, Jamie Lokier [off-list ref] wrote:
Is there a reason the names aren't consistent - i.e. not vma_is_stack_guard()?
Ah, that was an error on my part; I did not notice the naming convention.
How about simply calling it vma_is_guard(), return 1 if it's PROT_NONE
without checking vma_is_stack() or ->vm_next/prev, and annotate the
maps output like this:

  is_stack              => "[stack]"
  is_guard & is_stack   => "[stack guard]"
  is_guard & !is_stack  => "[guard]"

What do you think?
Thanks for the review. We're already marking permissions in the maps
output to convey protection, so isn't marking those vmas as [guard]
redundant?

Following that, we could just mark the thread stack guard as [stack]
without any permissions. The process stack guard page probably
deserves the [stack guard] label since it is marked differently from
the thread stack guard and will otherwise have the permissions that
the process stack has. Will that be good?

-- 
Siddhesh Poyarekar

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help