paging ¤
Classes:
Functions:
Attributes:
PageTableLevel dataclass ¤
PageTableScan ¤
PageTableScan(pi: ArchPagingInfo)
Methods:
Attributes:
-
paging_level– -
PAGE_ENTRY_MASK– -
PAGE_INDEX_LEN– -
PAGE_INDEX_MASK– -
page_shift– -
should_stop_pagewalk– -
pagesz– -
ptrsize– -
inf– -
fmt– -
cache(dict[tuple[int, int], list[tuple[int, int, int]]]) – -
entry_cache(dict[int, list[int]]) – -
arch–
scan ¤
scan(entry: int, is_kernel: bool = False) -> list[Page]
this needs to be EXTREMELY optimized as it is used to display context making as few functions calls or memory reads as possible avoid unnecessary python pointer deferences or repetative computations whenever possible when benchmarked on the same linux kernels, on average: - gdb-pt-dump takes ~0.153 for x64 and 5.572 seconds for aarch64 - this implementation takes less than 0.065 seconds to complete for x64 and 0.491 seconds for aarch64 → around 45-65% of the time is used to read qemu system memory depending on arch and kernel (the theoratical limit would be that all time consumed is used for reading memory) → 2.35x speed up for x64 and more than 10x speed up for aarch64 one caveat is that it occasionally show unmapped (checked with pagewalk) vmalloc regions but that happens for gdb-pt-dump as well
ArchPagingInfo ¤
Methods:
-
adjust– -
markers– -
handle_kernel_pages– -
kbase_helper– -
pagewalk– -
pagetable_scan– -
pagetablescan– -
switch_to_phymem_mode– -
pagewalk_helper– -
pagetable_scan_helper– -
pageentry_bitflags– -
should_stop_pagewalk–
Attributes:
-
USERLAND– -
KERNELLAND– -
KERNELRO– -
KERNELBSS– -
KERNELDRIVER– -
ESPSTACK– -
PHYSMAP– -
VMALLOC– -
VMEMMAP– -
STRUCT_PAGE_SIZE(int) – -
STRUCT_PAGE_SHIFT(int) – -
physmap(int) – -
vmalloc(int) – -
vmemmap(int) – -
kbase(int | None) – -
page_shift(int) – -
paging_level(int) – -
PAGE_ENTRY_MASK(int) – -
PAGE_INDEX_LEN(int) – -
PAGE_INDEX_MASK(int) – -
phys_offset(int) – -
va_bits(int) – -
pagetable_level_names(tuple[str, ...]) –
x86_64PagingInfo ¤
Bases: ArchPagingInfo
Methods:
-
get_vmalloc_vmemmap_bases– -
markers– -
adjust– -
handle_kernel_pages– -
pagewalk– -
pagetable_scan– -
pageentry_bitflags– -
should_stop_pagewalk– -
kbase_helper– -
pagetablescan– -
switch_to_phymem_mode– -
pagewalk_helper– -
pagetable_scan_helper–
Attributes:
-
pagetable_level_names(tuple[str, ...]) – -
va_bits(int) – -
physmap(int) – -
kbase(int | None) – -
page_shift(int) – -
vmalloc(int) – -
vmemmap(int) – -
paging_level(int) – -
USERLAND– -
KERNELLAND– -
KERNELRO– -
KERNELBSS– -
KERNELDRIVER– -
ESPSTACK– -
PHYSMAP– -
VMALLOC– -
VMEMMAP– -
STRUCT_PAGE_SIZE(int) – -
STRUCT_PAGE_SHIFT(int) – -
PAGE_ENTRY_MASK(int) – -
PAGE_INDEX_LEN(int) – -
PAGE_INDEX_MASK(int) – -
phys_offset(int) –
Aarch64PagingInfo ¤
Bases: ArchPagingInfo
Methods:
-
markers– -
adjust– -
handle_kernel_pages– -
pagewalk– -
pagetable_scan– -
pageentry_bitflags– -
should_stop_pagewalk– -
kbase_helper– -
pagetablescan– -
switch_to_phymem_mode– -
pagewalk_helper– -
pagetable_scan_helper–
Attributes:
-
VMEMMAP_START– -
VMEMMAP_SIZE– -
PAGE_OFFSET– -
pagetable_level_names(tuple[str, ...]) – -
tcr_el1(BitFlags) – -
va_bits(int) – -
va_bits_min(int) – -
vmalloc(int) – -
physmap(int) – -
kbase(int | None) – -
kversion(tuple[int, ...] | None) – -
module_start(int | None) – -
vmemmap(int) – -
pci(int) – -
fixmap(int) – -
ksize(int) – -
page_shift_heuristic(int) – -
page_shift(int) – -
page_shift_user(int) – -
paging_level(int) – -
phys_offset(int) – -
USERLAND– -
KERNELLAND– -
KERNELRO– -
KERNELBSS– -
KERNELDRIVER– -
ESPSTACK– -
PHYSMAP– -
VMALLOC– -
VMEMMAP– -
STRUCT_PAGE_SIZE(int) – -
STRUCT_PAGE_SHIFT(int) – -
PAGE_ENTRY_MASK(int) – -
PAGE_INDEX_LEN(int) – -
PAGE_INDEX_MASK(int) –