Rizin
unix-like reverse engineering framework and cli tools
|
#include "kernelcache.h"
Go to the source code of this file.
Classes | |
struct | RebaseCtx |
struct | BufCtx |
Typedefs | |
typedef bool(* | OnRebaseFunc) (ut64 offset, ut64 decorated_addr, void *user_data) |
Variables | |
static const RzBufferMethods | buf_methods |
Definition at line 8 of file kernelcache.c.
Definition at line 255 of file kernelcache.c.
Definition at line 287 of file kernelcache.c.
References b, and rz_buf_size().
Definition at line 297 of file kernelcache.c.
References b, and rz_buf_data().
Definition at line 266 of file kernelcache.c.
References b, len, MACH0_, r, rebase_buffer(), rz_xnu_kernelcache_obj_t::rebase_info, rz_buf_read_at(), RZ_MIN, and st64.
Definition at line 261 of file kernelcache.c.
References b, and rz_buf_resize().
Definition at line 292 of file kernelcache.c.
References addr, b, rz_buf_size(), and rz_seek_offset().
Definition at line 282 of file kernelcache.c.
References b, len, and rz_buf_write_at().
|
static |
Definition at line 93 of file kernelcache.c.
References bytes, delta, rz_buf_read_at(), rz_read_le64(), ut64(), and UT64_MAX.
Referenced by rebase_buffer(), and rebase_info_populate().
Definition at line 197 of file kernelcache.c.
References rz_xnu_kernelcache_parsed_pointer_t::address, in_buf, off, rz_write_le64(), rz_xnu_kernelcache_parse_pointer(), and ut64().
Referenced by rebase_buffer().
|
static |
Definition at line 169 of file kernelcache.c.
References rz_xnu_kernelcache_obj_t::cache_buf, count, test_evm::end, i, iterate_rebase_list(), rz_xnu_kernelcache_rebase_info_t::multiplier, rz_xnu_kernelcache_rebase_info_t::n_ranges, off, rz_xnu_kernelcache_file_range_t::offset, on_rebase_pointer(), rz_xnu_kernelcache_rebase_info_t::ranges, rz_xnu_kernelcache_obj_t::rebase_info, rebase_info_populate(), rz_xnu_kernelcache_obj_t::rebasing_buffer, rz_xnu_kernelcache_file_range_t::size, start, and ut64().
Referenced by buf_read().
|
static |
Definition at line 121 of file kernelcache.c.
References rz_xnu_kernelcache_obj_t::cache_buf, cleanup(), test_evm::end, get_sections(), i, info(), iterate_rebase_list(), MACH0_, NULL, rz_xnu_kernelcache_obj_t::rebase_info_populated, rebase_offset_to_paddr(), RZ_FREE, sections(), ut64(), and UT64_MAX.
Referenced by rebase_buffer().
|
static |
Definition at line 151 of file kernelcache.c.
References addr, i, rz_xnu_kernelcache_rebase_info_t::kernel_base, rz_xnu_kernelcache_obj_t::rebase_info, sections(), ut64(), and section_t::vsize.
Referenced by rebase_info_populate().
Definition at line 13 of file kernelcache.c.
References b, CPU_TYPE_ARM64, flags, i, LC_KEXT, LC_LAZY_LOAD_DYLIB, LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, LC_SEGMENT_64, LC_UNIXTHREAD, length, MACH0_, MH_FILESET, MH_PIE, rz_buf_read_le32_at, rz_buf_read_le64_at, rz_buf_size(), st64, autogen_x86imm::tmp, and ut64().
Referenced by check_buffer().
RZ_API bool rz_xnu_kernelcache_needs_rebasing | ( | RzXNUKernelCacheObj * | obj | ) |
Definition at line 317 of file kernelcache.c.
References rz_xnu_kernelcache_obj_t::rebase_info.
RZ_API RzBuffer* rz_xnu_kernelcache_new_rebasing_buf | ( | RzXNUKernelCacheObj * | obj | ) |
Definition at line 313 of file kernelcache.c.
References buf_methods, and rz_buf_new_with_methods().
RZ_API bool rz_xnu_kernelcache_parse_pointer | ( | RzXNUKernelCacheParsedPointer * | ptr, |
ut64 | decorated_addr, | ||
RzXNUKernelCacheObj * | obj | ||
) |
Definition at line 218 of file kernelcache.c.
References rz_xnu_kernelcache_parsed_pointer_t::address, rz_xnu_kernelcache_rebase_info_t::kernel_base, and rz_xnu_kernelcache_obj_t::rebase_info.
Referenced by on_rebase_pointer(), and p_ptr().
|
static |
Definition at line 302 of file kernelcache.c.
Referenced by rz_xnu_kernelcache_new_rebasing_buf().