Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288045
b: refs/heads/master
c: 3f6ffc8
h: refs/heads/master
i:
  288043: 21a03e8
v: v3
  • Loading branch information
Jonas Bonn committed Feb 17, 2012
1 parent 3df8eae commit 41e0ccd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 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: abdf8b5e07884a183938969253770164d60b87cb
refs/heads/master: 3f6ffc8c2087791920721f086f9a92fde7bed9e2
8 changes: 7 additions & 1 deletion trunk/arch/openrisc/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ struct pt_regs {
long syscallno; /* Syscall number (used by strace) */
long dummy; /* Cheap alignment fix */
};
#endif /* __ASSEMBLY__ */

/* TODO: Rename this to REDZONE because that's what it is */
#define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */
Expand All @@ -87,6 +86,13 @@ struct pt_regs {
#define user_stack_pointer(regs) ((unsigned long)(regs)->sp)
#define profile_pc(regs) instruction_pointer(regs)

static inline long regs_return_value(struct pt_regs *regs)
{
return regs->gpr[11];
}

#endif /* __ASSEMBLY__ */

/*
* Offsets used by 'ptrace' system call interface.
*/
Expand Down
12 changes: 4 additions & 8 deletions trunk/arch/openrisc/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
*/
ret = -1L;

/* Are these regs right??? */
if (unlikely(current->audit_context))
audit_syscall_entry(audit_arch(), regs->syscallno,
regs->gpr[3], regs->gpr[4],
regs->gpr[5], regs->gpr[6]);
audit_syscall_entry(audit_arch(), regs->syscallno,
regs->gpr[3], regs->gpr[4],
regs->gpr[5], regs->gpr[6]);

return ret ? : regs->syscallno;
}
Expand All @@ -201,9 +199,7 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs)
{
int step;

if (unlikely(current->audit_context))
audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]),
regs->gpr[11]);
audit_syscall_exit(regs);

step = test_thread_flag(TIF_SINGLESTEP);
if (step || test_thread_flag(TIF_SYSCALL_TRACE))
Expand Down

0 comments on commit 41e0ccd

Please sign in to comment.