public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] mprotect.2: update example program
@ 2011-08-31 15:08 Seonghun Lim
       [not found] ` <4E5E4E6B.10703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Seonghun Lim @ 2011-08-31 15:08 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

man-pages version: latest git repository
why: The description of the example program says that it makes
the third page "read-only". Thus PROT_READ instead of PROT_NONE.


diff --git a/man2/mprotect.2 b/man2/mprotect.2
--- a/man2/mprotect.2
+++ b/man2/mprotect.2
@@ -207,7 +207,7 @@ main(int argc, char *argv[])
printf("Start of region: 0x%lx\\n", (long) buffer);

if (mprotect(buffer + pagesize * 2, pagesize,
- PROT_NONE) == \-1)
+ PROT_READ) == \-1)
handle_error("mprotect");

for (p = buffer ; ; )

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-08 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31 15:08 [patch] mprotect.2: update example program Seonghun Lim
     [not found] ` <4E5E4E6B.10703-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-09-08 15:29   ` Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox