Skip to content

Commit

Permalink
missing user_stack_pointer() instances
Browse files Browse the repository at this point in the history
for the architectures that have usp in pt_regs and do not have
user_stack_pointer() already defined.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Dec 19, 2012
1 parent ae903ca commit 5208ba2
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/avr32/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define user_mode(regs) (((regs)->sr & MODE_MASK) == MODE_USER)
#define instruction_pointer(regs) ((regs)->pc)
#define profile_pc(regs) instruction_pointer(regs)
#define user_stack_pointer(regs) ((regs)->sp)

static __inline__ int valid_user_regs(struct pt_regs *regs)
{
Expand Down
1 change: 1 addition & 0 deletions arch/m32r/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ extern void init_debug_traps(struct task_struct *);

#define instruction_pointer(regs) ((regs)->bpc)
#define profile_pc(regs) instruction_pointer(regs)
#define user_stack_pointer(regs) ((regs)->spu)

extern void withdraw_debug_trap(struct pt_regs *regs);

Expand Down
1 change: 1 addition & 0 deletions arch/microblaze/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct pt_regs {

#define instruction_pointer(regs) ((regs)->pc)
#define profile_pc(regs) instruction_pointer(regs)
#define user_stack_pointer(regs) ((regs)->r1)

static inline long regs_return_value(struct pt_regs *regs)
{
Expand Down
1 change: 1 addition & 0 deletions arch/mips/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static inline long regs_return_value(struct pt_regs *regs)

#define instruction_pointer(regs) ((regs)->cp0_epc)
#define profile_pc(regs) instruction_pointer(regs)
#define user_stack_pointer(r) ((r)->regs[29])

extern asmlinkage void syscall_trace_enter(struct pt_regs *regs);
extern asmlinkage void syscall_trace_leave(struct pt_regs *regs);
Expand Down
1 change: 1 addition & 0 deletions arch/score/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ struct task_struct;

#define instruction_pointer(regs) ((unsigned long)(regs)->cp0_epc)
#define profile_pc(regs) instruction_pointer(regs)
#define user_stack_pointer(r) ((unsigned long)(r)->regs[0])

extern void do_syscall_trace(struct pt_regs *regs, int entryexit);
extern int read_tsk_long(struct task_struct *, unsigned long, unsigned long *);
Expand Down
1 change: 1 addition & 0 deletions arch/tile/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ typedef unsigned long pt_reg_t;

#define instruction_pointer(regs) ((regs)->pc)
#define profile_pc(regs) instruction_pointer(regs)
#define user_stack_pointer(regs) ((regs)->sp)

/* Does the process account for user or for system time? */
#define user_mode(regs) (EX1_PL((regs)->ex1) == USER_PL)
Expand Down
1 change: 1 addition & 0 deletions arch/unicore32/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ static inline int valid_user_regs(struct pt_regs *regs)
}

#define instruction_pointer(regs) ((regs)->UCreg_pc)
#define user_stack_pointer(regs) ((regs)->UCreg_sp)

#endif /* __ASSEMBLY__ */
#endif
1 change: 1 addition & 0 deletions arch/x86/um/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ extern long arch_prctl(struct task_struct *task, int code,
unsigned long __user *addr);

#endif
#define user_stack_pointer(regs) PT_REGS_SP(regs)
#endif /* __UM_X86_PTRACE_H */
2 changes: 2 additions & 0 deletions arch/xtensa/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ struct pt_regs {
# define profile_pc(regs) instruction_pointer(regs)
# endif

#define user_stack_pointer(regs) ((regs)->areg[1])

#else /* __ASSEMBLY__ */

# include <asm/asm-offsets.h>
Expand Down

0 comments on commit 5208ba2

Please sign in to comment.