Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
process.c File Reference
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <asm/unistd.h>
#include <init.h>
#include <longjmp.h>
#include <os.h>
#include <skas_ptrace.h>

Go to the source code of this file.

Macros

#define ARBITRARY_ADDR   -1
 
#define FAILURE_PID   -1
 
#define STAT_PATH_LEN   sizeof("/proc/#######/stat\0")
 
#define COMM_SCANF   "%*[^)])"
 
#define MADV_REMOVE   KERNEL_MADV_REMOVE
 

Functions

unsigned long os_process_pc (int pid)
 
int os_process_parent (int pid)
 
void os_stop_process (int pid)
 
void os_kill_process (int pid, int reap_child)
 
long os_ptrace_ldt (long pid, long addr, long data)
 
void os_kill_ptraced_process (int pid, int reap_child)
 
int os_getpid (void)
 
int os_getpgrp (void)
 
int os_map_memory (void *virt, int fd, unsigned long long off, unsigned long len, int r, int w, int x)
 
int os_protect_memory (void *addr, unsigned long len, int r, int w, int x)
 
int os_unmap_memory (void *addr, int len)
 
int os_drop_memory (void *addr, int length)
 
int __init can_drop_memory (void)
 
void init_new_thread_signals (void)
 

Macro Definition Documentation

#define ARBITRARY_ADDR   -1

Definition at line 20 of file process.c.

#define COMM_SCANF   "%*[^)])"

Definition at line 24 of file process.c.

#define FAILURE_PID   -1

Definition at line 21 of file process.c.

#define MADV_REMOVE   KERNEL_MADV_REMOVE

Definition at line 185 of file process.c.

#define STAT_PATH_LEN   sizeof("/proc/#######/stat\0")

Definition at line 23 of file process.c.

Function Documentation

int __init can_drop_memory ( void  )

Definition at line 198 of file process.c.

void init_new_thread_signals ( void  )

Definition at line 235 of file process.c.

int os_drop_memory ( void addr,
int  length 
)

Definition at line 188 of file process.c.

int os_getpgrp ( void  )

Definition at line 142 of file process.c.

int os_getpid ( void  )

Definition at line 137 of file process.c.

void os_kill_process ( int  pid,
int  reap_child 
)

Definition at line 97 of file process.c.

void os_kill_ptraced_process ( int  pid,
int  reap_child 
)

Definition at line 124 of file process.c.

int os_map_memory ( void virt,
int  fd,
unsigned long long  off,
unsigned long  len,
int  r,
int  w,
int  x 
)

Definition at line 147 of file process.c.

int os_process_parent ( int  pid)

Definition at line 58 of file process.c.

unsigned long os_process_pc ( int  pid)

Definition at line 26 of file process.c.

int os_protect_memory ( void addr,
unsigned long  len,
int  r,
int  w,
int  x 
)

Definition at line 163 of file process.c.

long os_ptrace_ldt ( long  pid,
long  addr,
long  data 
)

Definition at line 108 of file process.c.

void os_stop_process ( int  pid)

Definition at line 92 of file process.c.

int os_unmap_memory ( void addr,
int  len 
)

Definition at line 174 of file process.c.