|
Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
|
#include "config.h"#include <assert.h>#include <errno.h>#include <sys/types.h>#include <sys/stat.h>#include <glib.h>#include "common.h"#include "glib_wrapper.h"#include "arch.h"#include "arch_x86.h"#include "arch_x86_64.h"#include "binfile.h"#include "target.h"#include "target_event.h"#include "target_os.h"#include "target_os_linux_generic.h"
Go to the source code of this file.
Data Structures | |
| struct | os_linux_signame |
| struct | old_linux_syscall_probe_state |
| struct | match_pid_data |
| struct | __update_module_data |
Macros | |
| #define | LOCAL_TIF_SIGPENDING (1UL << 2) |
| #define | SYSCALL_GLOBAL_ENTRY_PROBE "os_linux_syscall_entry_probe" |
| #define | SYSCALL_GLOBAL_RET_PROBE "os_linux_syscall_ret_probe" |
| #define | DCACHE_AUTOFS_PENDING 0x0001 |
| #define | DCACHE_NFSFS_RENAMED 0x0002 |
| #define | DCACHE_DISCONNECTED 0x0004 |
| #define | DCACHE_REFERENCED 0x0008 |
| #define | DCACHE_UNHASHED 0x0010 |
| #define | DCACHE_INOTIFY_PARENT_WATCHED 0x0020 |
| #define | _LINUX_MAX_ERRNO 4095 |
| #define | _LINUX_IS_ERR(x) unlikely((x) >= (REGVAL)-_LINUX_MAX_ERRNO) |
Variables | |
| struct probe_ops | os_linux_syscall_ret_probe_ops |
| struct probe_ops | os_linux_global_syscall_ret_probe_ops |
| struct target_personality_ops | os_linux_generic_personality_ops |
| struct target_os_ops | os_linux_generic_os_ops |
| #define _LINUX_IS_ERR | ( | x | ) | unlikely((x) >= (REGVAL)-_LINUX_MAX_ERRNO) |
Definition at line 7991 of file target_os_linux_generic.c.
| #define _LINUX_MAX_ERRNO 4095 |
Definition at line 7990 of file target_os_linux_generic.c.
| #define DCACHE_AUTOFS_PENDING 0x0001 |
Definition at line 3460 of file target_os_linux_generic.c.
| #define DCACHE_DISCONNECTED 0x0004 |
Definition at line 3462 of file target_os_linux_generic.c.
| #define DCACHE_INOTIFY_PARENT_WATCHED 0x0020 |
Definition at line 3465 of file target_os_linux_generic.c.
| #define DCACHE_NFSFS_RENAMED 0x0002 |
Definition at line 3461 of file target_os_linux_generic.c.
| #define DCACHE_REFERENCED 0x0008 |
Definition at line 3463 of file target_os_linux_generic.c.
| #define DCACHE_UNHASHED 0x0010 |
Definition at line 3464 of file target_os_linux_generic.c.
| #define LOCAL_TIF_SIGPENDING (1UL << 2) |
| #define SYSCALL_GLOBAL_ENTRY_PROBE "os_linux_syscall_entry_probe" |
Definition at line 2619 of file target_os_linux_generic.c.
| #define SYSCALL_GLOBAL_RET_PROBE "os_linux_syscall_ret_probe" |
Definition at line 2620 of file target_os_linux_generic.c.
| result_t os_linux_active_memory_handler | ( | struct probe * | probe, |
| tid_t | tid, | ||
| void * | handler_data, | ||
| struct probe * | trigger, | ||
| struct probe * | base | ||
| ) |
Definition at line 7749 of file target_os_linux_generic.c.
| result_t os_linux_active_thread_entry_handler | ( | struct probe * | probe, |
| tid_t | tid, | ||
| void * | handler_data, | ||
| struct probe * | trigger, | ||
| struct probe * | base | ||
| ) |
Definition at line 7993 of file target_os_linux_generic.c.
| result_t os_linux_active_thread_exit_handler | ( | struct probe * | probe, |
| tid_t | tid, | ||
| void * | handler_data, | ||
| struct probe * | trigger, | ||
| struct probe * | base | ||
| ) |
Definition at line 8103 of file target_os_linux_generic.c.
| int os_linux_attach | ( | struct target * | target | ) |
Definition at line 58 of file target_os_linux_generic.c.
Definition at line 3204 of file target_os_linux_generic.c.
| char* os_linux_d_path | ( | struct target * | target, |
| struct value * | dentry, | ||
| struct value * | vfsmnt, | ||
| struct value * | root_dentry, | ||
| struct value * | root_vfsmnt, | ||
| char * | buf, | ||
| int | buflen | ||
| ) |
Definition at line 3471 of file target_os_linux_generic.c.
| result_t os_linux_debug_handler | ( | struct probe * | probe, |
| tid_t | tid, | ||
| void * | handler_data, | ||
| struct probe * | trigger, | ||
| struct probe * | base | ||
| ) |
Definition at line 1634 of file target_os_linux_generic.c.
| char* os_linux_file_get_path | ( | struct target * | target, |
| struct value * | task, | ||
| struct value * | file, | ||
| char * | ibuf, | ||
| int | buflen | ||
| ) |
Definition at line 3687 of file target_os_linux_generic.c.
| int os_linux_fini | ( | struct target * | target | ) |
Definition at line 431 of file target_os_linux_generic.c.
| int os_linux_flush_current_thread | ( | struct target * | target | ) |
WARNING: esp and ss may not be valid if the sleeping thread was interrupted while it was in the kernel, because the interrupt gate does not push ss and esp; see include/asm-i386/processor.h .
Definition at line 6224 of file target_os_linux_generic.c.
WARNING: esp and ss may not be valid if the sleeping thread was interrupted while it was in the kernel, because the interrupt gate does not push ss and esp; see include/asm-i386/processor.h .
XXX: what the heck?? memset(<state->context,0,sizeof(vcpu_guest_context_t)); ltstate->context.user_regs.eip = ltstate->eip; ltstate->context.user_regs.esp = ltstate->esp; ltstate->context.user_regs.fs = ltstate->fs; ltstate->context.user_regs.gs = ltstate->gs;
Definition at line 6503 of file target_os_linux_generic.c.
| void os_linux_free_thread_state | ( | struct target * | target, |
| void * | state | ||
| ) |
Definition at line 5136 of file target_os_linux_generic.c.
| void os_linux_generic_register | ( | void | ) |
Globals.
Definition at line 9476 of file target_os_linux_generic.c.
Definition at line 3101 of file target_os_linux_generic.c.
Definition at line 3438 of file target_os_linux_generic.c.
Definition at line 3390 of file target_os_linux_generic.c.
Definition at line 3285 of file target_os_linux_generic.c.
Definition at line 3299 of file target_os_linux_generic.c.
| int os_linux_handle_exception | ( | struct target * | target | ) |
Definition at line 1755 of file target_os_linux_generic.c.
| result_t os_linux_int3_handler | ( | struct probe * | probe, |
| tid_t | tid, | ||
| void * | handler_data, | ||
| struct probe * | trigger, | ||
| struct probe * | base | ||
| ) |
Definition at line 1495 of file target_os_linux_generic.c.
| int os_linux_invalidate_thread | ( | struct target * | target, |
| struct target_thread * | tthread | ||
| ) |
Definition at line 7086 of file target_os_linux_generic.c.
| struct array_list* os_linux_list_available_tids | ( | struct target * | target | ) |
Definition at line 3988 of file target_os_linux_generic.c.
| int os_linux_list_for_each_entry | ( | struct target * | t, |
| struct bsymbol * | btype, | ||
| struct bsymbol * | list_head, | ||
| char * | list_head_member_name, | ||
| int | nofree, | ||
| os_linux_list_iterator_t | iterator, | ||
| void * | data | ||
| ) |
Definition at line 3877 of file target_os_linux_generic.c.
| int os_linux_list_for_each_struct | ( | struct target * | t, |
| struct bsymbol * | bsymbol, | ||
| char * | list_head_member_name, | ||
| int | nofree, | ||
| os_linux_list_iterator_t | iterator, | ||
| void * | data | ||
| ) |
Definition at line 3770 of file target_os_linux_generic.c.
| int os_linux_load_available_threads | ( | struct target * | target, |
| int | force | ||
| ) |
Definition at line 4050 of file target_os_linux_generic.c.
| struct target_thread * os_linux_load_current_thread | ( | struct target * | target, |
| int | force | ||
| ) |
WARNING: esp and ss may not be valid if the sleeping thread was interrupted while it was in the kernel, because the interrupt gate does not push ss and esp; see include/asm-i386/processor.h .
(SOFTIRQ_COUNT(preempt_count) || HARDIRQ_COUNT(preempt_count))) {
Definition at line 4291 of file target_os_linux_generic.c.
| struct value* os_linux_load_current_thread_as_type | ( | struct target * | target, |
| struct symbol * | datatype, | ||
| REGVAL | kernel_esp | ||
| ) |
Definition at line 3372 of file target_os_linux_generic.c.
| struct target_thread* os_linux_load_thread | ( | struct target * | target, |
| tid_t | tid, | ||
| int | force | ||
| ) |
Definition at line 4099 of file target_os_linux_generic.c.
| struct target_thread * os_linux_load_thread_from_value | ( | struct target * | target, |
| struct value * | taskv | ||
| ) |
Prototypes.
WARNING: esp and ss may not be valid if the sleeping thread was interrupted while it was in the kernel, because the interrupt gate does not push ss and esp; see include/asm-i386/processor.h .
Definition at line 5166 of file target_os_linux_generic.c.
| int os_linux_postloadinit | ( | struct target * | target | ) |
Definition at line 500 of file target_os_linux_generic.c.
| int os_linux_postopened | ( | struct target * | target | ) |
Definition at line 1208 of file target_os_linux_generic.c.
| struct target_process* os_linux_process_load | ( | struct target * | target, |
| struct target_thread * | tthread | ||
| ) |
Definition at line 8821 of file target_os_linux_generic.c.
| GHashTable* os_linux_processes_load | ( | struct target * | target | ) |
Definition at line 8817 of file target_os_linux_generic.c.
| int os_linux_set_active_probing | ( | struct target * | target, |
| active_probe_flags_t | flags | ||
| ) |
Definition at line 8960 of file target_os_linux_generic.c.
| int os_linux_signal_enqueue | ( | struct target * | target, |
| struct target_thread * | tthread, | ||
| int | signo, | ||
| void * | data | ||
| ) |
Definition at line 2038 of file target_os_linux_generic.c.
| int os_linux_signal_from_name | ( | struct target * | target, |
| const char * | name | ||
| ) |
Definition at line 2221 of file target_os_linux_generic.c.
| const char* os_linux_signal_to_name | ( | struct target * | target, |
| int | signo | ||
| ) |
Definition at line 2209 of file target_os_linux_generic.c.
| struct target_os_syscall* os_linux_syscall_lookup_addr | ( | struct target * | target, |
| ADDR | addr | ||
| ) |
Definition at line 2479 of file target_os_linux_generic.c.
| struct target_os_syscall* os_linux_syscall_lookup_name | ( | struct target * | target, |
| char * | name | ||
| ) |
Definition at line 2446 of file target_os_linux_generic.c.
| struct target_os_syscall* os_linux_syscall_lookup_num | ( | struct target * | target, |
| int | num | ||
| ) |
Definition at line 2462 of file target_os_linux_generic.c.
| struct probe* os_linux_syscall_probe | ( | struct target * | target, |
| tid_t | tid, | ||
| struct target_os_syscall * | syscall, | ||
| probe_handler_t | pre_handler, | ||
| probe_handler_t | post_handler, | ||
| void * | handler_data | ||
| ) |
Definition at line 3027 of file target_os_linux_generic.c.
| struct probe* os_linux_syscall_probe_all | ( | struct target * | target, |
| tid_t | tid, | ||
| probe_handler_t | pre_handler, | ||
| probe_handler_t | post_handler, | ||
| void * | handler_data | ||
| ) |
Definition at line 3073 of file target_os_linux_generic.c.
| GHashTable* os_linux_syscall_table_get | ( | struct target * | target | ) |
Definition at line 2442 of file target_os_linux_generic.c.
| int os_linux_syscall_table_load | ( | struct target * | target | ) |
Definition at line 2297 of file target_os_linux_generic.c.
| int os_linux_syscall_table_unload | ( | struct target * | target | ) |
Definition at line 2400 of file target_os_linux_generic.c.
| struct target_thread* os_linux_thread_get_leader | ( | struct target * | target, |
| struct target_thread * | tthread | ||
| ) |
Definition at line 1972 of file target_os_linux_generic.c.
| int os_linux_thread_get_pgd_phys | ( | struct target * | target, |
| struct target_thread * | tthread, | ||
| ADDR * | pgdp | ||
| ) |
Definition at line 1953 of file target_os_linux_generic.c.
| int os_linux_thread_is_user | ( | struct target * | target, |
| struct target_thread * | tthread | ||
| ) |
Definition at line 1961 of file target_os_linux_generic.c.
| int os_linux_thread_singlestep | ( | struct target * | target, |
| tid_t | tid, | ||
| int | isbp, | ||
| struct target * | overlay, | ||
| int | force_emulate | ||
| ) |
Definition at line 9327 of file target_os_linux_generic.c.
| int os_linux_thread_singlestep_end | ( | struct target * | target, |
| tid_t | tid, | ||
| struct target * | overlay, | ||
| int | force_emulate | ||
| ) |
Definition at line 9371 of file target_os_linux_generic.c.
| int os_linux_thread_snprintf | ( | struct target * | target, |
| struct target_thread * | tthread, | ||
| char * | buf, | ||
| int | bufsiz, | ||
| int | detail, | ||
| char * | sep, | ||
| char * | kvsep | ||
| ) |
Definition at line 7114 of file target_os_linux_generic.c.
| target_os_type_t os_linux_type | ( | struct target * | target | ) |
Definition at line 1831 of file target_os_linux_generic.c.
| uint64_t os_linux_version | ( | struct target * | target | ) |
Definition at line 1842 of file target_os_linux_generic.c.
| int os_linux_version_cmp | ( | struct target * | target, |
| uint64_t | vers | ||
| ) |
Definition at line 1935 of file target_os_linux_generic.c.
| char* os_linux_version_string | ( | struct target * | target | ) |
Definition at line 1948 of file target_os_linux_generic.c.
| struct target_os_ops os_linux_generic_os_ops |
Definition at line 9442 of file target_os_linux_generic.c.
| struct target_personality_ops os_linux_generic_personality_ops |
Definition at line 9414 of file target_os_linux_generic.c.
| struct probe_ops os_linux_global_syscall_ret_probe_ops |
Definition at line 3066 of file target_os_linux_generic.c.
| struct probe_ops os_linux_syscall_ret_probe_ops |
Definition at line 3009 of file target_os_linux_generic.c.
1.8.8