From c079ed6486d2615488f7e5a3a3cec183c9f85d30 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 30 Oct 2010 07:15:38 +0200 Subject: [PATCH] subpage_prot.2: Improvements after review by Paul Mackerras Reported-by: Paul Mackerras Signed-off-by: Michael Kerrisk --- man2/subpage_prot.2 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/man2/subpage_prot.2 b/man2/subpage_prot.2 index 67366d410..d3fed8c27 100644 --- a/man2/subpage_prot.2 +++ b/man2/subpage_prot.2 @@ -62,7 +62,7 @@ Each 2-bit field in the protection map is either 0 to allow any access, On success, .BR subpage_prot () returns 0. -Otherwise, one of the negated error codes specified below is returned. +Otherwise, one of the error codes specified below is returned. .SH ERRORS .TP .B EINVAL @@ -108,14 +108,15 @@ to apply to a specified range of virtual addresses. These masks are applied at the level where hardware page-table entries (PTEs) are inserted into the hardware page table based on the Linux PTEs, so the Linux PTEs are not affected. -.\" Perhaps we don't need to document this implementation detail: -.\" -.\" Implicit in this is that the regions of the address space that are -.\" protected are switched to use 4k hardware pages rather than 64k -.\" hardware pages (on machines with hardware 64k page support). -.\" In fact the whole process is switched to use 4k hardware pages when the -.\" subpage_prot system call is used, but this could be improved in future -.\" to switch only the affected segments. +Implicit in this is that the regions of the address space that are +protected are switched to use 4-kB hardware pages rather than 64-kB +hardware pages (on machines with hardware 64-kB page support). +.\" In the initial implementation, it was the case that: +.\" In fact the whole process is switched to use 4k hardware pages when the +.\" subpage_prot system call is used, but this could be improved in future +.\" to switch only the affected segments. +.\" But Paul Mackerass says (Oct 2010): I'm pretty sure we now only switch +.\" the affected segment, not the whole process. .SH SEE ALSO .BR mprotect (2), .BR syscall (2);