ページテーブルスキャニング

概要

ubuntu の 64bit において,あるプロセスのページテーブルをスキャンするカーネルモジュールを作成する.

Page Map Level 4

x86-64 では,ページング機構として,ページマップレベル 4 を導入しており,それぞれのアドレス変換テーブルは,PML4,PDPT,PD,PT と呼ばれる.
割り当てることができるページサイズ 4KB,2MB,1GB の3通りが用意されており,それぞれのページングは,次のようになる.

Linux の 64bit においても,4 段アドレス変換テーブルが採用されている. Linux では,アドレス変換テーブルは,PGD,PUD,PMD,PTE と呼ばれ,それぞれのテーブルは,512 個のエントリから成る.
PGD へのポインタは,cr3 レジスタが担っており,この cr3 レジスタの値を変更することで,プロセス毎のアドレス空間の切り替えを実現している.

Linux におけるマクロ

Linux では,ページングに関わる多くのマクロが用意されており,以下のヘッダファイルをインクルードすることで利用可能となる.

<asm/pgtable.h>
自分の環境では,以下のパスにファイルがあった.
/usr/src/linux-headers-4.4.0-21/arch/x86/include/asm/pgtable.h

関連するマクロは以下の通りである.

macro/funcContens
static inline int pgd_none(pgd_t pgd)pgd エントリの有無を確認する
static inline int pud_none(pud_t pud)pud エントリの有無を確認する
static inline int pmd_none(pmd_t pmd)pmd エントリの有無を確認する
static inline int pte_none(pte_t pte)pte エントリの有無を確認する
pgd_offset_k(address)仮想アドレスから対応する pgd エントリのポインタを返す
static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)pgd エントリへのポインタと仮想アドレスから対応する pud エントリのポインタを返す
static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)pud エントリへのポインタと仮想アドレスから対応する pmd エントリのポインタを返す
static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address)pmd エントリへのポインタと仮想アドレスから対応する pte エントリのポインタを返す
static inline unsigned long pgd_page_vaddr(pgd_t pgd)pgd エントリから pud の仮想アドレスを返す
static inline unsigned long pud_page_vaddr(pud_t pud)pud エントリから pmd の仮想アドレスを返す
static inline unsigned long pmd_page_vaddr(pmd_t pmd)pmd エントリから pte の仮想アドレスを返す

実装

ページテーブルのスキャニングは非常に単純である. 前述した通り,Linux64bit では 4 段ページテーブルであり,それぞれのテーブルは 512 個のエントリから成る. よって,4 重ループ回せばよい.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
void page_table_scanning(pgd_t **pgdp)
{
	pgd_t *pgd; /* PML4 */
	pud_t *pud; /* PDP(T) */
	pmd_t *pmd; /* PD */
	pte_t *pt; /* PT */

	pgd = *pgdp;
	for (u64 i = 0; i < 512; ++i) {	/* 512GB loop */
		pgd_t *pgde = &pgd[i];
		if ( pgd_none(*pgde) || unlikely(pgd_bad(*pgde)) ) {
			continue;
		}
		printk("%03d pgd: %p pgde: %p\n", i, pgde, *pgde);

		pud = (pud_t *)pgd_page_vaddr(*pgde);
		for (u64 j = 0; j < 512; ++j) {	/* 1GB loop */
			pud_t *pude = &pud[j];
			if ( pud_none(*pude) || unlikely(pud_bad(*pude)) )
				continue;

			if ( pud_large(*pude) ) {	/* 1GB LARGE_PAGE ? */
				printk("%03d-%30d pud: %p pude: %p\n", i, j, pude, *pude);
				continue; /* 1GB page */
			}
			printk("%03d-%03d pud: %p pude: %p\n", i, j, pude, *pude);

			pmd = (pmd_t *)pud_page_vaddr(*pude);
			for (u64 k = 0; k < 512; ++k) {	/* 2MB loop */
				pmd_t *pmde = &pmd[k];
				if ( pmd_none(*pmde) || unlikely(pmd_bad(*pmde)) )
					continue;

				if ( pmd_large(*pmde) ) {	/* 2MB LARGE_PAGE ? */
					printk("%03d-%03d-%03d pmd: %p pmde: %p\n", i, j, k, pmde, *pmde);
					continue; /* 2MB page */
				}
				printk("%03d-%03d-%03d pmd: %p pmde: %p\n", i, j, k, pmde, *pmde);

				pt = (pte_t *)pmd_page_vaddr(*pmde);
				for (u64 l = 0; l < 512; ++l) {	/* 4KB loop */
					pte_t *pte = &pt[l];
					if ( pte_none(*pte) )
						continue;

//					printk("%3d-%3d-%3d-%3d pt: %p pte: %p\n", i, j, k, l, pte, *pte);
				}
			}
		}
	}

	return;
}

実行結果

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
sudo ./a.out
dmesg -wH

[  +0.000006] 000 pgd: ffff88008a3e0000 pgde: 000000008a0fa067
[  +0.000005] 000-000 pud: ffff88008a0fa000 pude: 000000008a3dc067
[  +0.000006] 000-000-002 pmd: ffff88008a3dc010 pmde: 000000008a3b9067
[  +0.000006] 000-000-003 pmd: ffff88008a3dc018 pmde: 00000000c4b13067
[  +0.000006] 000-000-008 pmd: ffff88008a3dc040 pmde: 000000008a240067
[  +0.000015] 254 pgd: ffff88008a3e07f0 pgde: 000000008098e067
[  +0.000007] 254-137 pud: ffff88008098e448 pude: 000000008a2a1067
[  +0.000006] 254-137-002 pmd: ffff88008a2a1010 pmde: 0000000080a71067
[  +0.000006] 254-137-003 pmd: ffff88008a2a1018 pmde: 00000000ac92e067
[  +0.000006] 254-137-004 pmd: ffff88008a2a1020 pmde: 00000000d466b067
[  +0.000006] 254-137-005 pmd: ffff88008a2a1028 pmde: 000000008a159067
[  +0.000010] 255 pgd: ffff88008a3e07f8 pgde: 00000000c7f1b067
[  +0.000010] 255-498 pud: ffff8800c7f1bf90 pude: 000000008a007067
[  +0.000008] 255-498-271 pmd: ffff88008a007878 pmde: 000000008a1ed067
[  +0.000006] 272 pgd: ffff88008a3e0880 pgde: 00000000031fe067
[  +0.000006] 272-000 pud: ffff8800031fe000 pude: 00000000031ff067
[  +0.000006] 272-000-000 pmd: ffff8800031ff000 pmde: 0000000003200067
[  +0.000007] 272-000-020 pmd: ffff8800031ff0a0 pmde: 000000021148d063
[  +0.000006] 272-000-022 pmd: ffff8800031ff0b0 pmde: 0000000216905063
[  +0.000006] 272-000-025 pmd: ffff8800031ff0c8 pmde: 0000000216906063
[  +0.000008] 272-000-426 pmd: ffff8800031ffd50 pmde: 00000000358a6063
[  +0.000006] 272-000-427 pmd: ffff8800031ffd58 pmde: 00000000d5976063
[  +0.000006] 272-000-428 pmd: ffff8800031ffd60 pmde: 000000003596b063
[  +0.000006] 272-000-429 pmd: ffff8800031ffd68 pmde: 0000000210876063
[  +0.000005] 272-002 pud: ffff8800031fe010 pude: 00000000b4102063
[  +0.000006] 272-002-004 pmd: ffff8800b4102020 pmde: 0000000080806063
[  +0.000006] 272-002-005 pmd: ffff8800b4102028 pmde: 000000008a0f5063
[  +0.000007] 272-002-080 pmd: ffff8800b4102280 pmde: 00000000acb87063
[  +0.000005] 272-002-081 pmd: ffff8800b4102288 pmde: 000000008a0fe063
[  +0.000008] 272-002-356 pmd: ffff8800b4102b20 pmde: 00000000ac92b063
[  +0.000006] 272-002-357 pmd: ffff8800b4102b28 pmde: 00000000aca56063
[  +0.000007] 272-002-416 pmd: ffff8800b4102d00 pmde: 00000000b4101063
[  +0.000006] 272-002-417 pmd: ffff8800b4102d08 pmde: 000000008a0a2063
[  +0.000006] 272-002-477 pmd: ffff8800b4102ee8 pmde: 00000000bbb0e063
[  +0.000006] 272-003 pud: ffff8800031fe018 pude: 000000021f5ff067
[  +0.000006] 272-003-036 pmd: ffff88021f5ff120 pmde: 00000000c4877063
[  +0.000006] 272-003-037 pmd: ffff88021f5ff128 pmde: 00000000c4af4063
[  +0.000006] 272-003-063 pmd: ffff88021f5ff1f8 pmde: 00000000c7fa3063
[  +0.000006] 272-003-112 pmd: ffff88021f5ff380 pmde: 0000000216903063
[  +0.000006] 272-003-114 pmd: ffff88021f5ff390 pmde: 00000000ce525063
[  +0.000006] 272-003-115 pmd: ffff88021f5ff398 pmde: 00000000ce577063
[  +0.000006] 272-003-126 pmd: ffff88021f5ff3f0 pmde: 000000021f5fe067
[  +0.000006] 272-003-127 pmd: ffff88021f5ff3f8 pmde: 0000000003202067
[  +0.000005] 272-003-136 pmd: ffff88021f5ff440 pmde: 0000000216901063
[  +0.000006] 272-003-155 pmd: ffff88021f5ff4d8 pmde: 00000002168fd063
[  +0.000005] 272-003-158 pmd: ffff88021f5ff4f0 pmde: 00000000d62cd063
[  +0.000006] 272-003-159 pmd: ffff88021f5ff4f8 pmde: 00000000d3fde063
[  +0.000005] 272-003-160 pmd: ffff88021f5ff500 pmde: 00000000d42d4063
[  +0.000004] 272-003-161 pmd: ffff88021f5ff508 pmde: 00000000d422c063
[  +0.000005] 272-003-162 pmd: ffff88021f5ff510 pmde: 00000000d46f0063
[  +0.000005] 272-003-163 pmd: ffff88021f5ff518 pmde: 00000000d4f0f063
[  +0.000006] 272-003-166 pmd: ffff88021f5ff530 pmde: 00000002168fa063
[  +0.000005] 272-003-167 pmd: ffff88021f5ff538 pmde: 00000000d3d63063
[  +0.000006] 272-003-172 pmd: ffff88021f5ff560 pmde: 00000000d3cd2063
[  +0.000006] 272-003-173 pmd: ffff88021f5ff568 pmde: 00000000d953d063
[  +0.000005] 272-003-176 pmd: ffff88021f5ff580 pmde: 000000003584e063
[  +0.000006] 272-003-177 pmd: ffff88021f5ff588 pmde: 00000002168fb063
[  +0.000006] 272-003-184 pmd: ffff88021f5ff5c0 pmde: 00000000d52f2063
[  +0.000005] 272-003-185 pmd: ffff88021f5ff5c8 pmde: 00000000d73fb063
[  +0.000006] 272-003-202 pmd: ffff88021f5ff650 pmde: 0000000035aa4063
[  +0.000005] 272-003-203 pmd: ffff88021f5ff658 pmde: 00000000d9675063
[  +0.000006] 272-003-204 pmd: ffff88021f5ff660 pmde: 00000002168f8063
[  +0.000005] 272-003-209 pmd: ffff88021f5ff688 pmde: 0000000003203067
[  +0.000006] 272-003-210 pmd: ffff88021f5ff690 pmde: 00000002168f3063
[  +0.000005] 272-003-217 pmd: ffff88021f5ff6c8 pmde: 00000002168f4063
[  +0.000006] 272-003-231 pmd: ffff88021f5ff738 pmde: 000000021f5fd067
[  +0.000005] 272-003-448 pmd: ffff88021f5ffe00 pmde: 00000002168f1063
[  +0.000004] 272-003-502 pmd: ffff88021f5fffb0 pmde: 00000002168ee063
[  +0.000005] 272-006 pud: ffff8800031fe030 pude: 00000001c26b0063
[  +0.000006] 272-006-182 pmd: ffff8801c26b05b0 pmde: 0000000196d12063
[  +0.000006] 272-006-386 pmd: ffff8801c26b0c10 pmde: 00000001c257f063
[  +0.000005] 272-006-387 pmd: ffff8801c26b0c18 pmde: 00000001b0708063
[  +0.000006] 272-007 pud: ffff8800031fe038 pude: 00000000c7d4f063
[  +0.000005] 272-007-018 pmd: ffff8800c7d4f090 pmde: 00000001c2453063
[  +0.000005] 272-007-019 pmd: ffff8800c7d4f098 pmde: 00000001c262a063
[  +0.000007] 272-007-188 pmd: ffff8800c7d4f5e0 pmde: 0000000212114063
[  +0.000005] 272-007-189 pmd: ffff8800c7d4f5e8 pmde: 00000001d7af5063
[  +0.000006] 272-007-240 pmd: ffff8800c7d4f780 pmde: 00000001de001063
[  +0.000006] 272-007-241 pmd: ffff8800c7d4f788 pmde: 0000000208230063
[  +0.000005] 272-007-298 pmd: ffff8800c7d4f950 pmde: 000000020a344063
[  +0.000004] 272-007-299 pmd: ffff8800c7d4f958 pmde: 00000001e556f063
[  +0.000004] 272-007-476 pmd: ffff8800c7d4fee0 pmde: 00000001fb963063
[  +0.000003] 272-007-494 pmd: ffff8800c7d4ff70 pmde: 00000000c7d8c063
[  +0.000003] 272-007-495 pmd: ffff8800c7d4ff78 pmde: 00000001d7b04063
[  +0.000003] 272-008 pud: ffff8800031fe040 pude: 0000000003201067
[  +0.000003] 272-008-020 pmd: ffff8800032010a0 pmde: 0000000202829063
[  +0.000004] 272-008-021 pmd: ffff8800032010a8 pmde: 0000000202a0d063
[  +0.000003] 272-008-054 pmd: ffff8800032011b0 pmde: 0000000208218063
[  +0.000003] 272-008-055 pmd: ffff8800032011b8 pmde: 0000000206ea0063
[  +0.000003] 272-008-064 pmd: ffff880003201200 pmde: 0000000208157063
[  +0.000003] 272-008-065 pmd: ffff880003201208 pmde: 0000000208278063
[  +0.000003] 272-008-080 pmd: ffff880003201280 pmde: 00000001fb9d1063
[  +0.000003] 272-008-081 pmd: ffff880003201288 pmde: 0000000208158063
[  +0.000003] 272-008-132 pmd: ffff880003201420 pmde: 0000000210875063
[  +0.000004] 272-008-133 pmd: ffff880003201428 pmde: 0000000211084063
[  +0.000003] 272-008-136 pmd: ffff880003201440 pmde: 00000002110e5063
[  +0.000003] 272-008-137 pmd: ffff880003201448 pmde: 000000021128f063
[  +0.000003] 272-008-138 pmd: ffff880003201450 pmde: 000000021172f063
[  +0.000003] 272-008-139 pmd: ffff880003201458 pmde: 0000000211712063
[  +0.000003] 272-008-141 pmd: ffff880003201468 pmde: 0000000211734063
[  +0.000002] 272-008-142 pmd: ffff880003201470 pmde: 00000001de0b5063
[  +0.000003] 272-008-143 pmd: ffff880003201478 pmde: 0000000208194063
[  +0.000003] 272-008-144 pmd: ffff880003201480 pmde: 00000000d46e9063
[  +0.000003] 272-008-145 pmd: ffff880003201488 pmde: 000000020a33f063
[  +0.000003] 272-008-146 pmd: ffff880003201490 pmde: 0000000211214063
[  +0.000003] 272-008-148 pmd: ffff8800032014a0 pmde: 000000021540b063
[  +0.000003] 272-008-149 pmd: ffff8800032014a8 pmde: 00000000d5975063
[  +0.000003] 272-008-150 pmd: ffff8800032014b0 pmde: 0000000213938063
[  +0.000003] 272-008-151 pmd: ffff8800032014b8 pmde: 00000002128af063
[  +0.000003] 272-008-154 pmd: ffff8800032014d0 pmde: 0000000213470063
[  +0.000003] 272-008-155 pmd: ffff8800032014d8 pmde: 0000000212f06063
[  +0.000003] 272-008-156 pmd: ffff8800032014e0 pmde: 00000000d5889063
[  +0.000003] 272-008-157 pmd: ffff8800032014e8 pmde: 0000000213b63063
[  +0.000003] 272-008-160 pmd: ffff880003201500 pmde: 000000021408a063
[  +0.000003] 272-008-161 pmd: ffff880003201508 pmde: 0000000212f05063
[  +0.000003] 272-008-162 pmd: ffff880003201510 pmde: 0000000208195063
[  +0.000003] 272-008-163 pmd: ffff880003201518 pmde: 00000001de178063
[  +0.000003] 272-008-166 pmd: ffff880003201530 pmde: 0000000214e01063
[  +0.000003] 272-008-167 pmd: ffff880003201538 pmde: 0000000214e00063
[  +0.000004] 272-008-170 pmd: ffff880003201550 pmde: 000000021557d063
[  +0.000005] 272-008-171 pmd: ffff880003201558 pmde: 0000000213bc0063
[  +0.000012] 402 pgd: ffff88008a3e0c90 pgde: 00000002168a1067
[  +0.000005] 402-000 pud: ffff8802168a1000 pude: 00000002168a2067
[  +0.000005] 402-000-000 pmd: ffff8802168a2000 pmde: 00000002168a3067
[  +0.000005] 402-000-001 pmd: ffff8802168a2008 pmde: 0000000215d2c067
[  +0.000005] 402-000-002 pmd: ffff8802168a2010 pmde: 0000000215d2d067
[  +0.000004] 402-000-003 pmd: ffff8802168a2018 pmde: 0000000215d2e067
[  +0.000005] 402-000-004 pmd: ffff8802168a2020 pmde: 0000000215d2f067
[  +0.000005] 402-000-005 pmd: ffff8802168a2028 pmde: 0000000215932067
[  +0.000005] 402-000-006 pmd: ffff8802168a2030 pmde: 0000000215933067
[  +0.000006] 402-000-007 pmd: ffff8802168a2038 pmde: 0000000214d46067
[  +0.000004] 402-000-008 pmd: ffff8802168a2040 pmde: 0000000211ba1067
[  +0.000005] 402-000-009 pmd: ffff8802168a2048 pmde: 0000000035aa5067
[  +0.000005] 402-000-011 pmd: ffff8802168a2058 pmde: 000000021399f067
[  +0.000006] 402-000-013 pmd: ffff8802168a2068 pmde: 00000000d3c5a067
[  +0.000005] 402-000-014 pmd: ffff8802168a2070 pmde: 0000000206c93067
[  +0.000005] 402-000-015 pmd: ffff8802168a2078 pmde: 00000000c4bfc067
[  +0.000005] 402-000-016 pmd: ffff8802168a2080 pmde: 00000000359af067
[  +0.000006] 402-000-017 pmd: ffff8802168a2088 pmde: 00000000359c0067
[  +0.000005] 402-000-018 pmd: ffff8802168a2090 pmde: 00000000359c1067
[  +0.000005] 402-000-019 pmd: ffff8802168a2098 pmde: 00000000bb802067
[  +0.000005] 402-000-020 pmd: ffff8802168a20a0 pmde: 00000000bb811067
[  +0.000006] 402-000-021 pmd: ffff8802168a20a8 pmde: 00000001ea03a067
[  +0.000006] 402-000-022 pmd: ffff8802168a20b0 pmde: 00000001ea183067
[  +0.000005] 402-000-023 pmd: ffff8802168a20b8 pmde: 00000001ea0b2067
[  +0.000006] 402-000-024 pmd: ffff8802168a20c0 pmde: 00000001fba84067
[  +0.000006] 402-000-025 pmd: ffff8802168a20c8 pmde: 00000002029ad067
[  +0.000006] 402-000-026 pmd: ffff8802168a20d0 pmde: 00000001ea16e067
[  +0.000005] 402-000-027 pmd: ffff8802168a20d8 pmde: 00000001ea262067
[  +0.000006] 402-000-028 pmd: ffff8802168a20e0 pmde: 00000001ea117067
[  +0.000006] 402-000-029 pmd: ffff8802168a20e8 pmde: 00000000bbb6b067
[  +0.000005] 402-000-030 pmd: ffff8802168a20f0 pmde: 00000000bb9ec067
[  +0.000005] 402-000-031 pmd: ffff8802168a20f8 pmde: 00000000bb9cd067
[  +0.000006] 402-000-032 pmd: ffff8802168a2100 pmde: 00000000bb9f6067
[  +0.000006] 402-000-033 pmd: ffff8802168a2108 pmde: 00000001ea21f067
[  +0.000006] 402-000-034 pmd: ffff8802168a2110 pmde: 00000001ea059067
[  +0.000005] 402-000-035 pmd: ffff8802168a2118 pmde: 00000000ce4df067
[  +0.000006] 402-000-036 pmd: ffff8802168a2120 pmde: 00000000bb8a8067
[  +0.000005] 402-000-037 pmd: ffff8802168a2128 pmde: 00000001e5433067
[  +0.000005] 402-000-038 pmd: ffff8802168a2130 pmde: 00000001e5438067
[  +0.000006] 402-000-039 pmd: ffff8802168a2138 pmde: 00000001e5476067
[  +0.000005] 402-000-040 pmd: ffff8802168a2140 pmde: 00000000bb90e067
[  +0.000005] 402-000-041 pmd: ffff8802168a2148 pmde: 00000001e5441067
[  +0.000005] 402-000-042 pmd: ffff8802168a2150 pmde: 00000001e5446067
[  +0.000005] 402-000-043 pmd: ffff8802168a2158 pmde: 000000020a15f067
[  +0.000004] 402-000-044 pmd: ffff8802168a2160 pmde: 00000000acadb067
[  +0.000005] 402-000-045 pmd: ffff8802168a2168 pmde: 00000001e542b067
[  +0.000005] 402-000-046 pmd: ffff8802168a2170 pmde: 00000000b4247067
[  +0.000005] 402-000-047 pmd: ffff8802168a2178 pmde: 00000000b43f0067
[  +0.000005] 402-000-048 pmd: ffff8802168a2180 pmde: 0000000211f74067
[  +0.000004] 402-000-049 pmd: ffff8802168a2188 pmde: 00000001de35e067
[  +0.000005] 402-000-050 pmd: ffff8802168a2190 pmde: 000000020a08f067
[  +0.000005] 402-000-051 pmd: ffff8802168a2198 pmde: 00000000b4180067
[  +0.000005] 402-000-052 pmd: ffff8802168a21a0 pmde: 00000000ac808067
[  +0.000005] 402-000-053 pmd: ffff8802168a21a8 pmde: 00000000c4ae6067
[  +0.000005] 402-000-054 pmd: ffff8802168a21b0 pmde: 00000001de1dc067
[  +0.000005] 402-000-055 pmd: ffff8802168a21b8 pmde: 00000000b41c5067
[  +0.000004] 402-000-056 pmd: ffff8802168a21c0 pmde: 00000001de1e8067
[  +0.000005] 402-000-057 pmd: ffff8802168a21c8 pmde: 0000000211eca067
[  +0.000005] 402-000-058 pmd: ffff8802168a21d0 pmde: 00000000ac8a0067
[  +0.000005] 402-000-059 pmd: ffff8802168a21d8 pmde: 00000001de14d067
[  +0.000005] 402-000-060 pmd: ffff8802168a21e0 pmde: 000000020a110067
[  +0.000004] 402-000-061 pmd: ffff8802168a21e8 pmde: 00000001de141067
[  +0.000005] 402-000-062 pmd: ffff8802168a21f0 pmde: 00000000ac9a4067
[  +0.000005] 402-000-063 pmd: ffff8802168a21f8 pmde: 00000000d41c7067
[  +0.000012] 465 pgd: ffff88008a3e0e88 pgde: 0000000211443067
[  +0.000009] 465-511 pud: ffff880211443ff8 pude: 0000000211442067
[  +0.000007] 465-511-510 pmd: ffff880211442ff0 pmde: 0000000211441067
[  +0.000004] 468 pgd: ffff88008a3e0ea0 pgde: 000000021edf5067
[  +0.000005] 468-000 pud: ffff88021edf5000 pude: 000000021edf4067
[  +0.000011] 510 pgd: ffff88008a3e0ff0 pgde: 00000000030bf067
[  +0.000010] 511 pgd: ffff88008a3e0ff8 pgde: 0000000002e0d067
[  +0.000010] 511-507 pud: ffff880002e0dfd8 pude: 00000002168ef063
[  +0.000006] 511-507-464 pmd: ffff8802168efe80 pmde: 0000000216904063
[  +0.000005] 511-507-465 pmd: ffff8802168efe88 pmde: 0000000216902063
[  +0.000006] 511-507-474 pmd: ffff8802168efed0 pmde: 0000000216900063
[  +0.000005] 511-507-485 pmd: ffff8802168eff28 pmde: 00000002168fc063
[  +0.000005] 511-507-496 pmd: ffff8802168eff80 pmde: 00000002168f9063
[  +0.000005] 511-507-501 pmd: ffff8802168effa8 pmde: 00000002168f7063
[  +0.000004] 511-507-502 pmd: ffff8802168effb0 pmde: 00000002168f5063
[  +0.000005] 511-507-509 pmd: ffff8802168effe8 pmde: 00000002168f6063
[  +0.000005] 511-507-510 pmd: ffff8802168efff0 pmde: 00000002168f2063
[  +0.000005] 511-507-511 pmd: ffff8802168efff8 pmde: 00000002168f0063
[  +0.000005] 511-510 pud: ffff880002e0dff0 pude: 0000000002e0e063
[  +0.000005] 511-510-012 pmd: ffff880002e0e060 pmde: 000000021148c063
[  +0.000005] 511-510-015 pmd: ffff880002e0e078 pmde: 000000021148b063
[  +0.000005] 511-510-016 pmd: ffff880002e0e080 pmde: 0000000215977063
[  +0.000006] 511-511 pud: ffff880002e0dff8 pude: 0000000002e0f067
[  +0.000006] 511-511-000 pmd: ffff880002e0f000 pmde: 00000002116c5067
[  +0.000005] 511-511-001 pmd: ffff880002e0f008 pmde: 0000000035b6f067
[  +0.000005] 511-511-002 pmd: ffff880002e0f010 pmde: 0000000210b73067
[  +0.000006] 511-511-003 pmd: ffff880002e0f018 pmde: 0000000210b2b067
[  +0.000005] 511-511-004 pmd: ffff880002e0f020 pmde: 00000000d5900067
[  +0.000007] 511-511-505 pmd: ffff880002e0ffc8 pmde: 00000000030c1067
[  +0.000005] 511-511-506 pmd: ffff880002e0ffd0 pmde: 0000000002e10067
[  +0.000005] 511-511-507 pmd: ffff880002e0ffd8 pmde: 000000021f5ae067

参考

2 章 Linux カーネル - メモリ管理 1 - SlideShare
Linux の仮想 - 物理アドレスと、カーネル空間の概要(その 2)