ptdump.h 567 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_PTDUMP_H
  3. #define _LINUX_PTDUMP_H
  4. #include <linux/mm_types.h>
  5. struct ptdump_range {
  6. unsigned long start;
  7. unsigned long end;
  8. };
  9. struct ptdump_state {
  10. /* level is 0:PGD to 4:PTE, or -1 if unknown */
  11. void (*note_page)(struct ptdump_state *st, unsigned long addr,
  12. int level, u64 val);
  13. void (*effective_prot)(struct ptdump_state *st, int level, u64 val);
  14. const struct ptdump_range *range;
  15. };
  16. void ptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd);
  17. #endif /* _LINUX_PTDUMP_H */