Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273002
b: refs/heads/master
c: adcfb98
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and Richard Weinberger committed Nov 2, 2011
1 parent e3576f3 commit 63ce330
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 23 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: 51d34749051a6369093e5067ef67c17f17694921
refs/heads/master: adcfb9852d8f2ddba908da0d023c280e23a40452
1 change: 0 additions & 1 deletion trunk/arch/um/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <asm/unistd.h>
#include "frame_kern.h"
#include "kern_util.h"
#include <sysdep/sigcontext.h>

EXPORT_SYMBOL(block_signals);
EXPORT_SYMBOL(unblock_signals);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/um/kernel/trap.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "kern_util.h"
#include "os.h"
#include "skas.h"
#include "sysdep/sigcontext.h"

/*
* Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/um/sys-x86/shared/sysdep/faultinfo_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ struct faultinfo {
#define FAULT_WRITE(fi) ((fi).error_code & 2)
#define FAULT_ADDRESS(fi) ((fi).cr2)

/* This is Page Fault */
#define SEGV_IS_FIXABLE(fi) ((fi)->trap_no == 14)

/* SKAS3 has no trap_no on i386, but get_skas_faultinfo() sets it to 0. */
#define SEGV_MAYBE_FIXABLE(fi) ((fi)->trap_no == 0 && ptrace_faultinfo)

#define PTRACE_FULL_FAULTINFO 0

#endif
6 changes: 6 additions & 0 deletions trunk/arch/um/sys-x86/shared/sysdep/faultinfo_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ struct faultinfo {
#define FAULT_WRITE(fi) ((fi).error_code & 2)
#define FAULT_ADDRESS(fi) ((fi).cr2)

/* This is Page Fault */
#define SEGV_IS_FIXABLE(fi) ((fi)->trap_no == 14)

/* No broken SKAS API, which doesn't pass trap_no, here. */
#define SEGV_MAYBE_FIXABLE(fi) 0

#define PTRACE_FULL_FAULTINFO 1

#endif
1 change: 1 addition & 0 deletions trunk/arch/um/sys-x86/shared/sysdep/ptrace_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extern int sysemu_supported;

#define REGS_SET_SYSCALL_RETURN(r, res) REGS_EAX(r) = (res)

#define IP_RESTART_SYSCALL(ip) ((ip) -= 2)
#define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r))

#ifndef PTRACE_SYSEMU_SINGLESTEP
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/um/sys-x86/shared/sysdep/ptrace_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@

#define REGS_SET_SYSCALL_RETURN(r, res) REGS_RAX(r) = (res)

#define IP_RESTART_SYSCALL(ip) ((ip) -= 2)
#define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r))

#define REGS_SEGV_IS_FIXABLE(r) SEGV_IS_FIXABLE((r)->trap_type)

#define REGS_FAULT_ADDR(r) ((r)->fault_addr)

#define REGS_FAULT_WRITE(r) FAULT_WRITE((r)->fault_type)
Expand Down Expand Up @@ -152,8 +151,6 @@ struct syscall_args {

#define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->gp)

#define UPT_SEGV_IS_FIXABLE(r) REGS_SEGV_IS_FIXABLE(&r->skas)

#define UPT_FAULTINFO(r) (&(r)->faultinfo)

static inline void arch_init_registers(int pid)
Expand Down
8 changes: 0 additions & 8 deletions trunk/arch/um/sys-x86/shared/sysdep/sigcontext_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#include <generated/user_constants.h>

#define IP_RESTART_SYSCALL(ip) ((ip) -= 2)

#define SC_OFFSET(sc, field) \
*((unsigned long *) &(((char *) (sc))[HOST_##field]))

Expand All @@ -24,10 +22,4 @@
(fi).trap_no = SC_TRAPNO(sc); \
}

/* This is Page Fault */
#define SEGV_IS_FIXABLE(fi) ((fi)->trap_no == 14)

/* SKAS3 has no trap_no on i386, but get_skas_faultinfo() sets it to 0. */
#define SEGV_MAYBE_FIXABLE(fi) ((fi)->trap_no == 0 && ptrace_faultinfo)

#endif
8 changes: 0 additions & 8 deletions trunk/arch/um/sys-x86/shared/sysdep/sigcontext_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,11 @@
#define SC_ERR(sc) SC_OFFSET(sc, SC_ERR)
#define SC_TRAPNO(sc) SC_OFFSET(sc, SC_TRAPNO)

#define IP_RESTART_SYSCALL(ip) ((ip) -= 2)

#define GET_FAULTINFO_FROM_SC(fi, sc) \
{ \
(fi).cr2 = SC_CR2(sc); \
(fi).error_code = SC_ERR(sc); \
(fi).trap_no = SC_TRAPNO(sc); \
}

/* This is Page Fault */
#define SEGV_IS_FIXABLE(fi) ((fi)->trap_no == 14)

/* No broken SKAS API, which doesn't pass trap_no, here. */
#define SEGV_MAYBE_FIXABLE(fi) 0

#endif

0 comments on commit 63ce330

Please sign in to comment.