paging ¤
Classes:
-
PageTableLevel– -
PagewalkResult– -
PageTableScan– -
ArchPagingInfo– -
x86_64PagingInfo– -
Aarch64PagingInfo–
Functions:
Attributes:
PageTableLevel dataclass ¤
PageTableLevel(
name: str | None = None,
entry: int | None = None,
virt: int | None = None,
phys: int | None = None,
idx: int | None = None,
level: int | None = None,
)
PagewalkResult dataclass ¤
PagewalkResult(
virt: int | None = None,
phys: int | None = None,
entry: int | None = None,
levels: tuple[PageTableLevel, ...] = (),
)
Attributes:
-
virt(int | None) – -
phys(int | None) – -
entry(int | None) – -
levels(tuple[PageTableLevel, ...]) –
PageTableScan ¤
PageTableScan(pi: ArchPagingInfo)
Methods:
Attributes:
-
paging_level– -
PAGE_ENTRY_MASK– -
PAGE_INDEX_LEN– -
PAGE_INDEX_MASK– -
page_shift– -
should_stop_pagewalk– -
pagesz– -
ptrsize– -
fmt– -
cache(dict[tuple[int, int], list[tuple[int, int, int]]]) – -
entry_cache(dict[int, tuple[int]]) – -
arch– -
read(Callable[[int, int], bytearray]) –
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 with the same read method, on average: - gdb-pt-dump takes ~0.122 for x64 and 0.562 seconds for aarch64 - this implementation takes less than 0.0297 seconds to complete for x64 and 0.0492 seconds for aarch64 → 4x faster for x64 and 10x faster for aarch64
ArchPagingInfo ¤
Methods:
-
slab_to_virt– -
virt_to_slab– -
adjust– -
markers– -
handle_kernel_pages– -
pagewalk– -
pagescan– -
pagetablescan– -
switch_to_phymem_mode– -
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) – -
slab_virtual(int) – -
kbase(int | None) – -
page_shift(int) – -
page_size(int) – -
paging_level(int) – -
PAGE_ENTRY_MASK(int) – -
PAGE_INDEX_LEN(int) – -
PAGE_INDEX_MASK(int) – -
ram_phys_start(int) – -
va_bits(int) – -
pagetable_level_names(tuple[str, ...]) –
x86_64PagingInfo ¤
Bases: ArchPagingInfo
Methods:
-
get_vmalloc_vmemmap_bases– -
slab_to_virt– -
virt_to_slab– -
markers– -
adjust– -
handle_kernel_pages– -
pagewalk– -
pagescan– -
bitflags– -
should_stop_pagewalk– -
pagetablescan– -
switch_to_phymem_mode–
Attributes:
-
P4D_SHIFT– -
pagetable_level_names(tuple[str, ...]) – -
va_bits(int) – -
physmap(int) – -
kbase(int | None) – -
page_shift(int) – -
vmalloc(int) – -
vmemmap(int) – -
slab_virtual(int) – -
SLAB_DATA_BASE_ADDR(int) – -
paging_level(int) – -
USERLAND– -
KERNELLAND– -
KERNELRO– -
KERNELBSS– -
KERNELDRIVER– -
ESPSTACK– -
PHYSMAP– -
VMALLOC– -
VMEMMAP– -
STRUCT_PAGE_SIZE(int) – -
STRUCT_PAGE_SHIFT(int) – -
page_size(int) – -
PAGE_ENTRY_MASK(int) – -
PAGE_INDEX_LEN(int) – -
PAGE_INDEX_MASK(int) – -
ram_phys_start(int) –
Aarch64PagingInfo ¤
Bases: ArchPagingInfo
Methods:
-
markers– -
adjust– -
handle_kernel_pages– -
pagewalk– -
pagescan– -
bitflags– -
should_stop_pagewalk– -
slab_to_virt– -
virt_to_slab– -
pagetablescan– -
switch_to_phymem_mode–
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 | None) – -
fixmap(int) – -
ksize(int) – -
page_shift_heuristic(int) – -
page_shift(int) – -
page_shift_user(int) – -
paging_level(int) – -
ram_phys_start(int) – -
USERLAND– -
KERNELLAND– -
KERNELRO– -
KERNELBSS– -
KERNELDRIVER– -
ESPSTACK– -
PHYSMAP– -
VMALLOC– -
VMEMMAP– -
STRUCT_PAGE_SIZE(int) – -
STRUCT_PAGE_SHIFT(int) – -
slab_virtual(int) – -
page_size(int) – -
PAGE_ENTRY_MASK(int) – -
PAGE_INDEX_LEN(int) – -
PAGE_INDEX_MASK(int) –