#include "op_list.h"
Go to the source code of this file.
Data Structures | |
struct | opd_map |
Functions | |
void | opd_init_hash_map (void) |
void | opd_cleanup_hash_name (void) |
void | opd_handle_mapping (struct op_note const *note) |
void | opd_add_mapping (struct opd_proc *proc, struct opd_image *image, unsigned long start, unsigned long offset, unsigned long end) |
void | opd_kill_maps (struct opd_proc *proc) |
static int | opd_is_in_map (struct opd_map *map, unsigned long eip) |
static unsigned long | opd_map_offset (struct opd_map *map, unsigned long eip) |
Management of process mappings
Definition in file opd_mapping.h.
void opd_add_mapping | ( | struct opd_proc * | proc, | |
struct opd_image * | image, | |||
unsigned long | start, | |||
unsigned long | offset, | |||
unsigned long | end | |||
) |
opd_put_mapping - add a mapping to a process
proc | process to add map to | |
image | mapped image pointer | |
start | start of mapping | |
offset | file offset of mapping | |
end | end of mapping |
Add the mapping specified to the process proc growing the maps array if necessary.
Definition at line 68 of file opd_mapping.c.
References opd_map::end, opd_map::image, list_add_tail(), list_empty(), opd_proc::maps, opd_proc::name, opd_image::name, opd_map::next, opd_map::offset, opd_image::ref_count, opd_map::start, opd_proc::tid, verbprintf, and vmisc.
Referenced by opd_add_ascii_map(), opd_add_kernel_map(), opd_get_ascii_maps(), opd_handle_fork(), and opd_handle_mapping().
void opd_cleanup_hash_name | ( | void | ) |
op_cleanup_hash_name
release resource owned by hash_name array
Definition at line 33 of file opd_mapping.c.
References hash_name, and OP_HASH_MAP_NR.
Referenced by clean_exit().
void opd_handle_mapping | ( | struct op_note const * | note | ) |
opd_handle_mapping - deal with mapping notification
note | mapping notification |
Deal with one notification that a process has mapped in a new executable file. The mapping information is added to the process structure.
Definition at line 139 of file opd_mapping.c.
References op_note::addr, op_note::hash, op_note::len, opd_proc::name, opd_image::name, op_note::offset, OP_HASH_MAP_NR, opd_add_mapping(), opd_get_hash_name(), opd_get_image(), opd_get_proc(), opd_new_proc(), op_note::pid, op_note::tgid, verbprintf, and vmisc.
Referenced by opd_do_notes().
void opd_init_hash_map | ( | void | ) |
opd_init_hash_map - initialise the hashmap
Definition at line 42 of file opd_mapping.c.
References hashmapdevfd, and OP_HASH_MAP_SIZE.
Referenced by op_open_files().
static int opd_is_in_map | ( | struct opd_map * | map, | |
unsigned long | eip | |||
) | [inline, static] |
opd_is_in_map - check whether an EIP is within a mapping
map | map to check | |
eip | EIP value |
Return 1 if the EIP value is within the boundaries of the map , 0 otherwise.
Definition at line 90 of file opd_mapping.h.
References opd_map::start.
Referenced by opd_lookup_maps().
void opd_kill_maps | ( | struct opd_proc * | proc | ) |
opd_kill_maps - delete mapping information for a process
proc | process to work on |
Frees structures holding mapping information
Definition at line 55 of file opd_mapping.c.
References opd_map::image, list_del(), list_entry, list_for_each_safe, opd_proc::maps, opd_map::next, and opd_delete_image().
Referenced by opd_delete_proc(), and opd_handle_exec().
static unsigned long opd_map_offset | ( | struct opd_map * | map, | |
unsigned long | eip | |||
) | [inline, static] |
Definition at line 105 of file opd_mapping.h.
References opd_map::offset, and opd_map::start.
Referenced by opd_lookup_maps().