Skip to content

Commit

Permalink
[PATCH] Make UML use ptrace-abi.h
Browse files Browse the repository at this point in the history
Include the host architecture's ptrace-abi.h instead of ptrace.h.

There was some cpp mangling of names around the ptrace.h include to avoid
symbol clashes between UML and the host architecture.  Most of these can go
away.  The exception is struct pt_regs, which is convenient to have in
userspace, but must be renamed in order that UML can define its own.

ptrace-x86_64.h needed to have some now-obsolete cpp cruft and a declaration
removed.

Signed-off-by: Jeff Dike <[email protected]>
Cc: David Woodhouse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
cfd-36 authored and Linus Torvalds committed Sep 26, 2006
1 parent 70e0eb8 commit e8df8c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
14 changes: 1 addition & 13 deletions include/asm-um/ptrace-generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,7 @@

#ifndef __ASSEMBLY__


#define pt_regs pt_regs_subarch
#define show_regs show_regs_subarch
#define send_sigtrap send_sigtrap_subarch

#include "asm/arch/ptrace.h"

#undef pt_regs
#undef show_regs
#undef send_sigtrap
#undef user_mode
#undef instruction_pointer

#include "asm/arch/ptrace-abi.h"
#include "sysdep/ptrace.h"

struct pt_regs {
Expand Down
4 changes: 0 additions & 4 deletions include/asm-um/ptrace-x86_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,11 @@
#include "asm/errno.h"
#include "asm/host_ldt.h"

#define signal_fault signal_fault_x86_64
#define __FRAME_OFFSETS /* Needed to get the R* macros */
#include "asm/ptrace-generic.h"
#undef signal_fault

#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64

void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where);

#define FS_BASE (21 * sizeof(unsigned long))
#define GS_BASE (22 * sizeof(unsigned long))
#define DS (23 * sizeof(unsigned long))
Expand Down

0 comments on commit e8df8c3

Please sign in to comment.