aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>2015-09-08 18:00:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-08 18:35:28 -0400
commit83b4b0bb635eee2b8e075062e4e008d1bc110ed7 (patch)
tree032136b51f1ae668b08cd2f1583fbfe8a42f2939
parent77bb499bb60f4b79cca7d139c8041662860fcf87 (diff)
pagemap: update documentation
Notes about recent changes. [akpm@linux-foundation.org: various tweaks] Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Cc: Mark Williamson <mwilliamson@undo-software.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--Documentation/vm/pagemap.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/Documentation/vm/pagemap.txt b/Documentation/vm/pagemap.txt
index 56faec0f73f7..3cd38438242a 100644
--- a/Documentation/vm/pagemap.txt
+++ b/Documentation/vm/pagemap.txt
@@ -16,12 +16,17 @@ There are three components to pagemap:
16 * Bits 0-4 swap type if swapped 16 * Bits 0-4 swap type if swapped
17 * Bits 5-54 swap offset if swapped 17 * Bits 5-54 swap offset if swapped
18 * Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.txt) 18 * Bit 55 pte is soft-dirty (see Documentation/vm/soft-dirty.txt)
19 * Bit 56 page exclusively mapped 19 * Bit 56 page exclusively mapped (since 4.2)
20 * Bits 57-60 zero 20 * Bits 57-60 zero
21 * Bit 61 page is file-page or shared-anon 21 * Bit 61 page is file-page or shared-anon (since 3.5)
22 * Bit 62 page swapped 22 * Bit 62 page swapped
23 * Bit 63 page present 23 * Bit 63 page present
24 24
25 Since Linux 4.0 only users with the CAP_SYS_ADMIN capability can get PFNs.
26 In 4.0 and 4.1 opens by unprivileged fail with -EPERM. Starting from
27 4.2 the PFN field is zeroed if the user does not have CAP_SYS_ADMIN.
28 Reason: information about PFNs helps in exploiting Rowhammer vulnerability.
29
25 If the page is not present but in swap, then the PFN contains an 30 If the page is not present but in swap, then the PFN contains an
26 encoding of the swap file number and the page's offset into the 31 encoding of the swap file number and the page's offset into the
27 swap. Unmapped pages return a null PFN. This allows determining 32 swap. Unmapped pages return a null PFN. This allows determining
@@ -160,3 +165,8 @@ Other notes:
160Reading from any of the files will return -EINVAL if you are not starting 165Reading from any of the files will return -EINVAL if you are not starting
161the read on an 8-byte boundary (e.g., if you sought an odd number of bytes 166the read on an 8-byte boundary (e.g., if you sought an odd number of bytes
162into the file), or if the size of the read is not a multiple of 8 bytes. 167into the file), or if the size of the read is not a multiple of 8 bytes.
168
169Before Linux 3.11 pagemap bits 55-60 were used for "page-shift" (which is
170always 12 at most architectures). Since Linux 3.11 their meaning changes
171after first clear of soft-dirty bits. Since Linux 4.2 they are used for
172flags unconditionally.