Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332957
b: refs/heads/master
c: 8813f67
h: refs/heads/master
i:
  332955: 0fabdb6
v: v3
  • Loading branch information
Al Viro authored and Richard Weinberger committed Oct 9, 2012
1 parent d234019 commit 1d5976c
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 79 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4301785c7c7ca712797f2f25bcd531b1d226ccb3
refs/heads/master: 8813f67439524ab54978b011c51665e1854a64b5
58 changes: 54 additions & 4 deletions trunk/arch/x86/um/asm/ptrace.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#ifndef __UM_X86_PTRACE_H
#define __UM_X86_PTRACE_H

#ifdef CONFIG_X86_32
# include "ptrace_32.h"
#else
# include "ptrace_64.h"
#include <linux/compiler.h>
#ifndef CONFIG_X86_32
#define __FRAME_OFFSETS /* Needed to get the R* macros */
#endif
#include <asm/ptrace-generic.h>

#define user_mode(r) UPT_IS_USER(&(r)->regs)

#define PT_REGS_AX(r) UPT_AX(&(r)->regs)
#define PT_REGS_BX(r) UPT_BX(&(r)->regs)
Expand Down Expand Up @@ -36,4 +38,52 @@ static inline long regs_return_value(struct pt_regs *regs)
{
return PT_REGS_AX(regs);
}

/*
* Forward declaration to avoid including sysdep/tls.h, which causes a
* circular include, and compilation failures.
*/
struct user_desc;

#ifdef CONFIG_X86_32

#define HOST_AUDIT_ARCH AUDIT_ARCH_I386

extern int ptrace_get_thread_area(struct task_struct *child, int idx,
struct user_desc __user *user_desc);

extern int ptrace_set_thread_area(struct task_struct *child, int idx,
struct user_desc __user *user_desc);

#else

#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64

#define PT_REGS_R8(r) UPT_R8(&(r)->regs)
#define PT_REGS_R9(r) UPT_R9(&(r)->regs)
#define PT_REGS_R10(r) UPT_R10(&(r)->regs)
#define PT_REGS_R11(r) UPT_R11(&(r)->regs)
#define PT_REGS_R12(r) UPT_R12(&(r)->regs)
#define PT_REGS_R13(r) UPT_R13(&(r)->regs)
#define PT_REGS_R14(r) UPT_R14(&(r)->regs)
#define PT_REGS_R15(r) UPT_R15(&(r)->regs)

#include <asm/errno.h>

static inline int ptrace_get_thread_area(struct task_struct *child, int idx,
struct user_desc __user *user_desc)
{
return -ENOSYS;
}

static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
struct user_desc __user *user_desc)
{
return -ENOSYS;
}

extern long arch_prctl(struct task_struct *task, int code,
unsigned long __user *addr);

#endif
#endif /* __UM_X86_PTRACE_H */
28 changes: 0 additions & 28 deletions trunk/arch/x86/um/asm/ptrace_32.h

This file was deleted.

46 changes: 0 additions & 46 deletions trunk/arch/x86/um/asm/ptrace_64.h

This file was deleted.

0 comments on commit 1d5976c

Please sign in to comment.