Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
ptrace.c File Reference
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/security.h>
#include <linux/audit.h>
#include <linux/signal.h>
#include <linux/elf.h>
#include <linux/regset.h>
#include <linux/tracehook.h>
#include <linux/seccomp.h>
#include <linux/compat.h>
#include <trace/syscall.h>
#include <asm/segment.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/pgalloc.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
#include <asm/switch_to.h>
#include "entry.h"
#include <trace/events/syscalls.h>

Go to the source code of this file.

Macros

#define CREATE_TRACE_POINTS
 
#define __ADDR_MASK   3
 

Enumerations

enum  s390_regset {
  REGSET_GENERAL, REGSET_FP, REGSET_LAST_BREAK, REGSET_TDB,
  REGSET_SYSTEM_CALL, REGSET_GENERAL_EXTENDED
}
 

Functions

void update_per_regs (struct task_struct *task)
 
void user_enable_single_step (struct task_struct *task)
 
void user_disable_single_step (struct task_struct *task)
 
void ptrace_disable (struct task_struct *task)
 
long arch_ptrace (struct task_struct *child, long request, unsigned long addr, unsigned long data)
 
asmlinkage long do_syscall_trace_enter (struct pt_regs *regs)
 
asmlinkage void do_syscall_trace_exit (struct pt_regs *regs)
 
struct user_regset_viewtask_user_regset_view (struct task_struct *task)
 
unsigned long regs_get_register (struct pt_regs *regs, unsigned int offset)
 
int regs_query_register_offset (const char *name)
 
const charregs_query_register_name (unsigned int offset)
 
unsigned long regs_get_kernel_stack_nth (struct pt_regs *regs, unsigned int n)
 

Macro Definition Documentation

#define __ADDR_MASK   3

Definition at line 128 of file ptrace.c.

#define CREATE_TRACE_POINTS

Definition at line 38 of file ptrace.c.

Enumeration Type Documentation

Enumerator:
REGSET_GENERAL 
REGSET_FP 
REGSET_LAST_BREAK 
REGSET_TDB 
REGSET_SYSTEM_CALL 
REGSET_GENERAL_EXTENDED 

Definition at line 41 of file ptrace.c.

Function Documentation

long arch_ptrace ( struct task_struct child,
long  request,
unsigned long  addr,
unsigned long  data 
)

Definition at line 397 of file ptrace.c.

asmlinkage long do_syscall_trace_enter ( struct pt_regs regs)

Definition at line 749 of file ptrace.c.

asmlinkage void do_syscall_trace_exit ( struct pt_regs regs)

Definition at line 788 of file ptrace.c.

void ptrace_disable ( struct task_struct task)

Definition at line 118 of file ptrace.c.

unsigned long regs_get_kernel_stack_nth ( struct pt_regs regs,
unsigned int  n 
)

regs_get_kernel_stack_nth() - get Nth entry of the stack :pt_regs which contains kernel stack pointer.
:stack entry number.

regs_get_kernel_stack_nth() returns
th entry of the kernel stack which is specifined by . If the
th entry is NOT in the kernel stack, this returns 0.

Definition at line 1304 of file ptrace.c.

unsigned long regs_get_register ( struct pt_regs regs,
unsigned int  offset 
)

Definition at line 1261 of file ptrace.c.

const char* regs_query_register_name ( unsigned int  offset)

regs_query_register_name() - query register name from its offset : the offset of a register in struct pt_regs.

regs_query_register_name() returns the name of a register from its offset in struct pt_regs. If the is invalid, this returns NULL;

Definition at line 1281 of file ptrace.c.

int regs_query_register_offset ( const char name)

Definition at line 1268 of file ptrace.c.

struct user_regset_view* task_user_regset_view ( struct task_struct tsk)
read

task_user_regset_view - Return the process's native regset view. : a thread of the process in question

Return the &struct user_regset_view that is native for the given process. For example, what it would access when it called ptrace(). Throughout the life of the process, this only changes at exec.

Definition at line 1247 of file ptrace.c.

void update_per_regs ( struct task_struct task)

Definition at line 50 of file ptrace.c.

void user_disable_single_step ( struct task_struct task)

Definition at line 106 of file ptrace.c.

void user_enable_single_step ( struct task_struct task)

Definition at line 99 of file ptrace.c.