(1) Masquerade clv
(2) Fix timeout
(3) Let mcexec thread with the same tid as McKernel thread migrating
to Linux handles the migration request
(4) Call create_tracer() before creating proxy related objects
Change-Id: I6b2689b70db49827f10aa7d5a4c581aa81319b55
124 lines
2.0 KiB
C
124 lines
2.0 KiB
C
#ifndef ARCH_ARGS_H
|
|
#define ARCH_ARGS_H
|
|
|
|
#ifdef POSTK_DEBUG_ARCH_DEP_77 /* arch depend hide */
|
|
#include <asm/prctl.h>
|
|
#endif /* !POSTK_DEBUG_ARCH_DEP_77 */
|
|
|
|
typedef struct user_regs_struct syscall_args;
|
|
|
|
static inline int
|
|
get_syscall_args(int pid, syscall_args *args)
|
|
{
|
|
return ptrace(PTRACE_GETREGS, pid, NULL, args);
|
|
}
|
|
|
|
static inline int
|
|
set_syscall_args(int pid, syscall_args *args)
|
|
{
|
|
return ptrace(PTRACE_SETREGS, pid, NULL, args);
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_number(syscall_args *args)
|
|
{
|
|
return args->orig_rax;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_return(syscall_args *args)
|
|
{
|
|
return args->rax;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_arg1(syscall_args *args)
|
|
{
|
|
return args->rdi;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_arg2(syscall_args *args)
|
|
{
|
|
return args->rsi;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_arg3(syscall_args *args)
|
|
{
|
|
return args->rdx;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_arg4(syscall_args *args)
|
|
{
|
|
return args->r10;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_arg5(syscall_args *args)
|
|
{
|
|
return args->r8;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_arg6(syscall_args *args)
|
|
{
|
|
return args->r9;
|
|
}
|
|
|
|
static inline unsigned long
|
|
get_syscall_rip(syscall_args *args)
|
|
{
|
|
return args->rip;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_number(syscall_args *args, unsigned long value)
|
|
{
|
|
args->orig_rax = value;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_return(syscall_args *args, unsigned long value)
|
|
{
|
|
args->rax = value;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_arg1(syscall_args *args, unsigned long value)
|
|
{
|
|
args->rdi = value;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_arg2(syscall_args *args, unsigned long value)
|
|
{
|
|
args->rsi = value;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_arg3(syscall_args *args, unsigned long value)
|
|
{
|
|
args->rdx = value;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_arg4(syscall_args *args, unsigned long value)
|
|
{
|
|
args->r10 = value;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_arg5(syscall_args *args, unsigned long value)
|
|
{
|
|
args->r8 = value;
|
|
}
|
|
|
|
static inline void
|
|
set_syscall_arg6(syscall_args *args, unsigned long value)
|
|
{
|
|
args->r9 = value;
|
|
}
|
|
#endif
|