dump_pagetables.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /*
  2. * Debug helper to dump the current kernel pagetables of the system
  3. * so that we can see what the various memory ranges are set to.
  4. *
  5. * (C) Copyright 2008 Intel Corporation
  6. *
  7. * Author: Arjan van de Ven <arjan@linux.intel.com>
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; version 2
  12. * of the License.
  13. */
  14. #include <linux/debugfs.h>
  15. #include <linux/kasan.h>
  16. #include <linux/mm.h>
  17. #include <linux/init.h>
  18. #include <linux/sched.h>
  19. #include <linux/seq_file.h>
  20. #include <asm/pgtable.h>
  21. /*
  22. * The dumper groups pagetable entries of the same type into one, and for
  23. * that it needs to keep some state when walking, and flush this state
  24. * when a "break" in the continuity is found.
  25. */
  26. struct pg_state {
  27. int level;
  28. pgprot_t current_prot;
  29. unsigned long start_address;
  30. unsigned long current_address;
  31. const struct addr_marker *marker;
  32. unsigned long lines;
  33. bool to_dmesg;
  34. bool check_wx;
  35. unsigned long wx_pages;
  36. };
  37. struct addr_marker {
  38. unsigned long start_address;
  39. const char *name;
  40. unsigned long max_lines;
  41. };
  42. /* Address space markers hints */
  43. #ifdef CONFIG_X86_64
  44. enum address_markers_idx {
  45. USER_SPACE_NR = 0,
  46. KERNEL_SPACE_NR,
  47. LOW_KERNEL_NR,
  48. #if defined(CONFIG_MODIFY_LDT_SYSCALL) && defined(CONFIG_X86_5LEVEL)
  49. LDT_NR,
  50. #endif
  51. VMALLOC_START_NR,
  52. VMEMMAP_START_NR,
  53. #ifdef CONFIG_KASAN
  54. KASAN_SHADOW_START_NR,
  55. KASAN_SHADOW_END_NR,
  56. #endif
  57. #if defined(CONFIG_MODIFY_LDT_SYSCALL) && !defined(CONFIG_X86_5LEVEL)
  58. LDT_NR,
  59. #endif
  60. CPU_ENTRY_AREA_NR,
  61. #ifdef CONFIG_X86_ESPFIX64
  62. ESPFIX_START_NR,
  63. #endif
  64. #ifdef CONFIG_EFI
  65. EFI_END_NR,
  66. #endif
  67. HIGH_KERNEL_NR,
  68. MODULES_VADDR_NR,
  69. MODULES_END_NR,
  70. FIXADDR_START_NR,
  71. END_OF_SPACE_NR,
  72. };
  73. static struct addr_marker address_markers[] = {
  74. [USER_SPACE_NR] = { 0, "User Space" },
  75. [KERNEL_SPACE_NR] = { (1UL << 63), "Kernel Space" },
  76. [LOW_KERNEL_NR] = { 0UL, "Low Kernel Mapping" },
  77. [VMALLOC_START_NR] = { 0UL, "vmalloc() Area" },
  78. [VMEMMAP_START_NR] = { 0UL, "Vmemmap" },
  79. #ifdef CONFIG_KASAN
  80. [KASAN_SHADOW_START_NR] = { KASAN_SHADOW_START, "KASAN shadow" },
  81. [KASAN_SHADOW_END_NR] = { KASAN_SHADOW_END, "KASAN shadow end" },
  82. #endif
  83. #ifdef CONFIG_MODIFY_LDT_SYSCALL
  84. [LDT_NR] = { LDT_BASE_ADDR, "LDT remap" },
  85. #endif
  86. [CPU_ENTRY_AREA_NR] = { CPU_ENTRY_AREA_BASE,"CPU entry Area" },
  87. #ifdef CONFIG_X86_ESPFIX64
  88. [ESPFIX_START_NR] = { ESPFIX_BASE_ADDR, "ESPfix Area", 16 },
  89. #endif
  90. #ifdef CONFIG_EFI
  91. [EFI_END_NR] = { EFI_VA_END, "EFI Runtime Services" },
  92. #endif
  93. [HIGH_KERNEL_NR] = { __START_KERNEL_map, "High Kernel Mapping" },
  94. [MODULES_VADDR_NR] = { MODULES_VADDR, "Modules" },
  95. [MODULES_END_NR] = { MODULES_END, "End Modules" },
  96. [FIXADDR_START_NR] = { FIXADDR_START, "Fixmap Area" },
  97. [END_OF_SPACE_NR] = { -1, NULL }
  98. };
  99. #else /* CONFIG_X86_64 */
  100. enum address_markers_idx {
  101. USER_SPACE_NR = 0,
  102. KERNEL_SPACE_NR,
  103. VMALLOC_START_NR,
  104. VMALLOC_END_NR,
  105. #ifdef CONFIG_HIGHMEM
  106. PKMAP_BASE_NR,
  107. #endif
  108. CPU_ENTRY_AREA_NR,
  109. FIXADDR_START_NR,
  110. END_OF_SPACE_NR,
  111. };
  112. static struct addr_marker address_markers[] = {
  113. [USER_SPACE_NR] = { 0, "User Space" },
  114. [KERNEL_SPACE_NR] = { PAGE_OFFSET, "Kernel Mapping" },
  115. [VMALLOC_START_NR] = { 0UL, "vmalloc() Area" },
  116. [VMALLOC_END_NR] = { 0UL, "vmalloc() End" },
  117. #ifdef CONFIG_HIGHMEM
  118. [PKMAP_BASE_NR] = { 0UL, "Persistent kmap() Area" },
  119. #endif
  120. [CPU_ENTRY_AREA_NR] = { 0UL, "CPU entry area" },
  121. [FIXADDR_START_NR] = { 0UL, "Fixmap area" },
  122. [END_OF_SPACE_NR] = { -1, NULL }
  123. };
  124. #endif /* !CONFIG_X86_64 */
  125. /* Multipliers for offsets within the PTEs */
  126. #define PTE_LEVEL_MULT (PAGE_SIZE)
  127. #define PMD_LEVEL_MULT (PTRS_PER_PTE * PTE_LEVEL_MULT)
  128. #define PUD_LEVEL_MULT (PTRS_PER_PMD * PMD_LEVEL_MULT)
  129. #define P4D_LEVEL_MULT (PTRS_PER_PUD * PUD_LEVEL_MULT)
  130. #define PGD_LEVEL_MULT (PTRS_PER_P4D * P4D_LEVEL_MULT)
  131. #define pt_dump_seq_printf(m, to_dmesg, fmt, args...) \
  132. ({ \
  133. if (to_dmesg) \
  134. printk(KERN_INFO fmt, ##args); \
  135. else \
  136. if (m) \
  137. seq_printf(m, fmt, ##args); \
  138. })
  139. #define pt_dump_cont_printf(m, to_dmesg, fmt, args...) \
  140. ({ \
  141. if (to_dmesg) \
  142. printk(KERN_CONT fmt, ##args); \
  143. else \
  144. if (m) \
  145. seq_printf(m, fmt, ##args); \
  146. })
  147. /*
  148. * Print a readable form of a pgprot_t to the seq_file
  149. */
  150. static void printk_prot(struct seq_file *m, pgprot_t prot, int level, bool dmsg)
  151. {
  152. pgprotval_t pr = pgprot_val(prot);
  153. static const char * const level_name[] =
  154. { "cr3", "pgd", "p4d", "pud", "pmd", "pte" };
  155. if (!(pr & _PAGE_PRESENT)) {
  156. /* Not present */
  157. pt_dump_cont_printf(m, dmsg, " ");
  158. } else {
  159. if (pr & _PAGE_USER)
  160. pt_dump_cont_printf(m, dmsg, "USR ");
  161. else
  162. pt_dump_cont_printf(m, dmsg, " ");
  163. if (pr & _PAGE_RW)
  164. pt_dump_cont_printf(m, dmsg, "RW ");
  165. else
  166. pt_dump_cont_printf(m, dmsg, "ro ");
  167. if (pr & _PAGE_PWT)
  168. pt_dump_cont_printf(m, dmsg, "PWT ");
  169. else
  170. pt_dump_cont_printf(m, dmsg, " ");
  171. if (pr & _PAGE_PCD)
  172. pt_dump_cont_printf(m, dmsg, "PCD ");
  173. else
  174. pt_dump_cont_printf(m, dmsg, " ");
  175. /* Bit 7 has a different meaning on level 3 vs 4 */
  176. if (level <= 4 && pr & _PAGE_PSE)
  177. pt_dump_cont_printf(m, dmsg, "PSE ");
  178. else
  179. pt_dump_cont_printf(m, dmsg, " ");
  180. if ((level == 5 && pr & _PAGE_PAT) ||
  181. ((level == 4 || level == 3) && pr & _PAGE_PAT_LARGE))
  182. pt_dump_cont_printf(m, dmsg, "PAT ");
  183. else
  184. pt_dump_cont_printf(m, dmsg, " ");
  185. if (pr & _PAGE_GLOBAL)
  186. pt_dump_cont_printf(m, dmsg, "GLB ");
  187. else
  188. pt_dump_cont_printf(m, dmsg, " ");
  189. if (pr & _PAGE_NX)
  190. pt_dump_cont_printf(m, dmsg, "NX ");
  191. else
  192. pt_dump_cont_printf(m, dmsg, "x ");
  193. }
  194. pt_dump_cont_printf(m, dmsg, "%s\n", level_name[level]);
  195. }
  196. /*
  197. * On 64 bits, sign-extend the 48 bit address to 64 bit
  198. */
  199. static unsigned long normalize_addr(unsigned long u)
  200. {
  201. int shift;
  202. if (!IS_ENABLED(CONFIG_X86_64))
  203. return u;
  204. shift = 64 - (__VIRTUAL_MASK_SHIFT + 1);
  205. return (signed long)(u << shift) >> shift;
  206. }
  207. /*
  208. * This function gets called on a break in a continuous series
  209. * of PTE entries; the next one is different so we need to
  210. * print what we collected so far.
  211. */
  212. static void note_page(struct seq_file *m, struct pg_state *st,
  213. pgprot_t new_prot, int level)
  214. {
  215. pgprotval_t prot, cur;
  216. static const char units[] = "BKMGTPE";
  217. /*
  218. * If we have a "break" in the series, we need to flush the state that
  219. * we have now. "break" is either changing perms, levels or
  220. * address space marker.
  221. */
  222. prot = pgprot_val(new_prot);
  223. cur = pgprot_val(st->current_prot);
  224. if (!st->level) {
  225. /* First entry */
  226. st->current_prot = new_prot;
  227. st->level = level;
  228. st->marker = address_markers;
  229. st->lines = 0;
  230. pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n",
  231. st->marker->name);
  232. } else if (prot != cur || level != st->level ||
  233. st->current_address >= st->marker[1].start_address) {
  234. const char *unit = units;
  235. unsigned long delta;
  236. int width = sizeof(unsigned long) * 2;
  237. pgprotval_t pr = pgprot_val(st->current_prot);
  238. if (st->check_wx && (pr & _PAGE_RW) && !(pr & _PAGE_NX)) {
  239. WARN_ONCE(1,
  240. "x86/mm: Found insecure W+X mapping at address %p/%pS\n",
  241. (void *)st->start_address,
  242. (void *)st->start_address);
  243. st->wx_pages += (st->current_address -
  244. st->start_address) / PAGE_SIZE;
  245. }
  246. /*
  247. * Now print the actual finished series
  248. */
  249. if (!st->marker->max_lines ||
  250. st->lines < st->marker->max_lines) {
  251. pt_dump_seq_printf(m, st->to_dmesg,
  252. "0x%0*lx-0x%0*lx ",
  253. width, st->start_address,
  254. width, st->current_address);
  255. delta = st->current_address - st->start_address;
  256. while (!(delta & 1023) && unit[1]) {
  257. delta >>= 10;
  258. unit++;
  259. }
  260. pt_dump_cont_printf(m, st->to_dmesg, "%9lu%c ",
  261. delta, *unit);
  262. printk_prot(m, st->current_prot, st->level,
  263. st->to_dmesg);
  264. }
  265. st->lines++;
  266. /*
  267. * We print markers for special areas of address space,
  268. * such as the start of vmalloc space etc.
  269. * This helps in the interpretation.
  270. */
  271. if (st->current_address >= st->marker[1].start_address) {
  272. if (st->marker->max_lines &&
  273. st->lines > st->marker->max_lines) {
  274. unsigned long nskip =
  275. st->lines - st->marker->max_lines;
  276. pt_dump_seq_printf(m, st->to_dmesg,
  277. "... %lu entr%s skipped ... \n",
  278. nskip,
  279. nskip == 1 ? "y" : "ies");
  280. }
  281. st->marker++;
  282. st->lines = 0;
  283. pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n",
  284. st->marker->name);
  285. }
  286. st->start_address = st->current_address;
  287. st->current_prot = new_prot;
  288. st->level = level;
  289. }
  290. }
  291. static void walk_pte_level(struct seq_file *m, struct pg_state *st, pmd_t addr, unsigned long P)
  292. {
  293. int i;
  294. pte_t *start;
  295. pgprotval_t prot;
  296. start = (pte_t *)pmd_page_vaddr(addr);
  297. for (i = 0; i < PTRS_PER_PTE; i++) {
  298. prot = pte_flags(*start);
  299. st->current_address = normalize_addr(P + i * PTE_LEVEL_MULT);
  300. note_page(m, st, __pgprot(prot), 5);
  301. start++;
  302. }
  303. }
  304. #ifdef CONFIG_KASAN
  305. /*
  306. * This is an optimization for KASAN=y case. Since all kasan page tables
  307. * eventually point to the kasan_zero_page we could call note_page()
  308. * right away without walking through lower level page tables. This saves
  309. * us dozens of seconds (minutes for 5-level config) while checking for
  310. * W+X mapping or reading kernel_page_tables debugfs file.
  311. */
  312. static inline bool kasan_page_table(struct seq_file *m, struct pg_state *st,
  313. void *pt)
  314. {
  315. if (__pa(pt) == __pa(kasan_zero_pmd) ||
  316. #ifdef CONFIG_X86_5LEVEL
  317. __pa(pt) == __pa(kasan_zero_p4d) ||
  318. #endif
  319. __pa(pt) == __pa(kasan_zero_pud)) {
  320. pgprotval_t prot = pte_flags(kasan_zero_pte[0]);
  321. note_page(m, st, __pgprot(prot), 5);
  322. return true;
  323. }
  324. return false;
  325. }
  326. #else
  327. static inline bool kasan_page_table(struct seq_file *m, struct pg_state *st,
  328. void *pt)
  329. {
  330. return false;
  331. }
  332. #endif
  333. #if PTRS_PER_PMD > 1
  334. static void walk_pmd_level(struct seq_file *m, struct pg_state *st, pud_t addr, unsigned long P)
  335. {
  336. int i;
  337. pmd_t *start, *pmd_start;
  338. pgprotval_t prot;
  339. pmd_start = start = (pmd_t *)pud_page_vaddr(addr);
  340. for (i = 0; i < PTRS_PER_PMD; i++) {
  341. st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT);
  342. if (!pmd_none(*start)) {
  343. if (pmd_large(*start) || !pmd_present(*start)) {
  344. prot = pmd_flags(*start);
  345. note_page(m, st, __pgprot(prot), 4);
  346. } else if (!kasan_page_table(m, st, pmd_start)) {
  347. walk_pte_level(m, st, *start,
  348. P + i * PMD_LEVEL_MULT);
  349. }
  350. } else
  351. note_page(m, st, __pgprot(0), 4);
  352. start++;
  353. }
  354. }
  355. #else
  356. #define walk_pmd_level(m,s,a,p) walk_pte_level(m,s,__pmd(pud_val(a)),p)
  357. #define pud_large(a) pmd_large(__pmd(pud_val(a)))
  358. #define pud_none(a) pmd_none(__pmd(pud_val(a)))
  359. #endif
  360. #if PTRS_PER_PUD > 1
  361. static void walk_pud_level(struct seq_file *m, struct pg_state *st, p4d_t addr, unsigned long P)
  362. {
  363. int i;
  364. pud_t *start, *pud_start;
  365. pgprotval_t prot;
  366. pud_t *prev_pud = NULL;
  367. pud_start = start = (pud_t *)p4d_page_vaddr(addr);
  368. for (i = 0; i < PTRS_PER_PUD; i++) {
  369. st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT);
  370. if (!pud_none(*start)) {
  371. if (pud_large(*start) || !pud_present(*start)) {
  372. prot = pud_flags(*start);
  373. note_page(m, st, __pgprot(prot), 3);
  374. } else if (!kasan_page_table(m, st, pud_start)) {
  375. walk_pmd_level(m, st, *start,
  376. P + i * PUD_LEVEL_MULT);
  377. }
  378. } else
  379. note_page(m, st, __pgprot(0), 3);
  380. prev_pud = start;
  381. start++;
  382. }
  383. }
  384. #else
  385. #define walk_pud_level(m,s,a,p) walk_pmd_level(m,s,__pud(p4d_val(a)),p)
  386. #define p4d_large(a) pud_large(__pud(p4d_val(a)))
  387. #define p4d_none(a) pud_none(__pud(p4d_val(a)))
  388. #endif
  389. #if PTRS_PER_P4D > 1
  390. static void walk_p4d_level(struct seq_file *m, struct pg_state *st, pgd_t addr, unsigned long P)
  391. {
  392. int i;
  393. p4d_t *start, *p4d_start;
  394. pgprotval_t prot;
  395. p4d_start = start = (p4d_t *)pgd_page_vaddr(addr);
  396. for (i = 0; i < PTRS_PER_P4D; i++) {
  397. st->current_address = normalize_addr(P + i * P4D_LEVEL_MULT);
  398. if (!p4d_none(*start)) {
  399. if (p4d_large(*start) || !p4d_present(*start)) {
  400. prot = p4d_flags(*start);
  401. note_page(m, st, __pgprot(prot), 2);
  402. } else if (!kasan_page_table(m, st, p4d_start)) {
  403. walk_pud_level(m, st, *start,
  404. P + i * P4D_LEVEL_MULT);
  405. }
  406. } else
  407. note_page(m, st, __pgprot(0), 2);
  408. start++;
  409. }
  410. }
  411. #else
  412. #define walk_p4d_level(m,s,a,p) walk_pud_level(m,s,__p4d(pgd_val(a)),p)
  413. #define pgd_large(a) p4d_large(__p4d(pgd_val(a)))
  414. #define pgd_none(a) p4d_none(__p4d(pgd_val(a)))
  415. #endif
  416. static inline bool is_hypervisor_range(int idx)
  417. {
  418. #ifdef CONFIG_X86_64
  419. /*
  420. * ffff800000000000 - ffff87ffffffffff is reserved for
  421. * the hypervisor.
  422. */
  423. return (idx >= pgd_index(__PAGE_OFFSET) - 16) &&
  424. (idx < pgd_index(__PAGE_OFFSET));
  425. #else
  426. return false;
  427. #endif
  428. }
  429. static void ptdump_walk_pgd_level_core(struct seq_file *m, pgd_t *pgd,
  430. bool checkwx, bool dmesg)
  431. {
  432. #ifdef CONFIG_X86_64
  433. pgd_t *start = (pgd_t *) &init_top_pgt;
  434. #else
  435. pgd_t *start = swapper_pg_dir;
  436. #endif
  437. pgprotval_t prot;
  438. int i;
  439. struct pg_state st = {};
  440. if (pgd) {
  441. start = pgd;
  442. st.to_dmesg = dmesg;
  443. }
  444. st.check_wx = checkwx;
  445. if (checkwx)
  446. st.wx_pages = 0;
  447. for (i = 0; i < PTRS_PER_PGD; i++) {
  448. st.current_address = normalize_addr(i * PGD_LEVEL_MULT);
  449. if (!pgd_none(*start) && !is_hypervisor_range(i)) {
  450. if (pgd_large(*start) || !pgd_present(*start)) {
  451. prot = pgd_flags(*start);
  452. note_page(m, &st, __pgprot(prot), 1);
  453. } else {
  454. walk_p4d_level(m, &st, *start,
  455. i * PGD_LEVEL_MULT);
  456. }
  457. } else
  458. note_page(m, &st, __pgprot(0), 1);
  459. cond_resched();
  460. start++;
  461. }
  462. /* Flush out the last page */
  463. st.current_address = normalize_addr(PTRS_PER_PGD*PGD_LEVEL_MULT);
  464. note_page(m, &st, __pgprot(0), 0);
  465. if (!checkwx)
  466. return;
  467. if (st.wx_pages)
  468. pr_info("x86/mm: Checked W+X mappings: FAILED, %lu W+X pages found.\n",
  469. st.wx_pages);
  470. else
  471. pr_info("x86/mm: Checked W+X mappings: passed, no W+X pages found.\n");
  472. }
  473. void ptdump_walk_pgd_level(struct seq_file *m, pgd_t *pgd)
  474. {
  475. ptdump_walk_pgd_level_core(m, pgd, false, true);
  476. }
  477. void ptdump_walk_pgd_level_debugfs(struct seq_file *m, pgd_t *pgd)
  478. {
  479. ptdump_walk_pgd_level_core(m, pgd, false, false);
  480. }
  481. EXPORT_SYMBOL_GPL(ptdump_walk_pgd_level_debugfs);
  482. static void ptdump_walk_user_pgd_level_checkwx(void)
  483. {
  484. #ifdef CONFIG_PAGE_TABLE_ISOLATION
  485. pgd_t *pgd = (pgd_t *) &init_top_pgt;
  486. if (!static_cpu_has(X86_FEATURE_PTI))
  487. return;
  488. pr_info("x86/mm: Checking user space page tables\n");
  489. pgd = kernel_to_user_pgdp(pgd);
  490. ptdump_walk_pgd_level_core(NULL, pgd, true, false);
  491. #endif
  492. }
  493. void ptdump_walk_pgd_level_checkwx(void)
  494. {
  495. ptdump_walk_pgd_level_core(NULL, NULL, true, false);
  496. ptdump_walk_user_pgd_level_checkwx();
  497. }
  498. static int __init pt_dump_init(void)
  499. {
  500. /*
  501. * Various markers are not compile-time constants, so assign them
  502. * here.
  503. */
  504. #ifdef CONFIG_X86_64
  505. address_markers[LOW_KERNEL_NR].start_address = PAGE_OFFSET;
  506. address_markers[VMALLOC_START_NR].start_address = VMALLOC_START;
  507. address_markers[VMEMMAP_START_NR].start_address = VMEMMAP_START;
  508. #endif
  509. #ifdef CONFIG_X86_32
  510. address_markers[VMALLOC_START_NR].start_address = VMALLOC_START;
  511. address_markers[VMALLOC_END_NR].start_address = VMALLOC_END;
  512. # ifdef CONFIG_HIGHMEM
  513. address_markers[PKMAP_BASE_NR].start_address = PKMAP_BASE;
  514. # endif
  515. address_markers[FIXADDR_START_NR].start_address = FIXADDR_START;
  516. address_markers[CPU_ENTRY_AREA_NR].start_address = CPU_ENTRY_AREA_BASE;
  517. #endif
  518. return 0;
  519. }
  520. __initcall(pt_dump_init);