drgn/libdrgn/python
Omar Sandoval a213573b23 libdrgn: linux_kernel: make virt_to_phys() and phys_to_virt() generic
On x86-64, the difference between virtual addresses in the direct map
and the corresponding physical addresses is called PAGE_OFFSET, so we
exposed that via an architecture callback and the Linux kernel object
finder. However, this doesn't translate to other architectures. Namely,
on AArch64, the difference is PAGE_OFFSET - PHYS_OFFSET, and both
PAGE_OFFSET and PHYS_OFFSET have varied over time and between
configurations.

We can remove the architecture callback and avoid version-specific logic
by letting the page table tell us the offset. We just need an address in
the direct map, which is easy to find since this includes kmalloc and
memblock allocations.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-07-14 12:05:11 -07:00
..
drgnpy.h libdrgn: linux_kernel: make virt_to_phys() and phys_to_virt() generic 2022-07-14 12:05:11 -07:00
error.c libdrgn: add DRGN_ERROR_NOT_IMPLEMENTED 2022-04-28 13:38:38 -07:00
helpers.c libdrgn: linux_kernel: make virt_to_phys() and phys_to_virt() generic 2022-07-14 12:05:11 -07:00
language.c libdrgn: don't store language structures in one array 2022-02-16 12:47:12 -08:00
module.c libdrgn: linux_kernel: make virt_to_phys() and phys_to_virt() generic 2022-07-14 12:05:11 -07:00
object.c Update copyright headers to Meta 2021-11-21 15:59:44 -08:00
platform.c Fix various lints 2022-02-17 10:45:42 -08:00
program.c libdrgn: allow overriding program default language 2022-02-16 13:29:12 -08:00
stack_trace.c Implement a new API for representing threads 2022-01-11 17:28:17 -08:00
symbol.c Update copyright headers to Meta 2021-11-21 15:59:44 -08:00
test.c Enable prog.type to work with classes 2022-02-22 14:55:23 -08:00
thread.c Fix various lints 2022-02-17 10:45:42 -08:00
type.c Fix various lints 2022-02-17 10:45:42 -08:00
util.c Update copyright headers to Meta 2021-11-21 15:59:44 -08:00