From b22b377bd4ec234bc95a9d6359ba0f8d7264b4ae Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Fri, 23 Apr 2010 17:31:01 +0100 Subject: [PATCH] mprotect.2: mention effect of READ_IMPLIES_EXEC personality flag I puzzled over mprotect()'s effect on /proc/*/maps for a while yesterday -- it was setting "x" without PROT_EXEC being specified. Here is a patch to add some explanation. Signed-off-by: Michael Kerrisk --- man2/mprotect.2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/man2/mprotect.2 b/man2/mprotect.2 index 09c2d8acc..821850501 100644 --- a/man2/mprotect.2 +++ b/man2/mprotect.2 @@ -130,7 +130,15 @@ Whether .B PROT_EXEC has any effect different from .B PROT_READ -is architecture- and kernel version-dependent. +depends on processor architecture, kernel version, and process state. If +.B READ_IMPLIES_EXEC +is set in the process's personality flags (see +.BR personality (2)), +specifying +.B PROT_READ +will implicitly add +.BR PROT_EXEC. + On some hardware architectures (e.g., i386), .B PROT_WRITE implies