diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-18 12:50:10 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-19 18:07:39 -0500 |
commit | 1ca97bb541a1f5a735e697a8bba763cde3aab452 (patch) | |
tree | 548d835c0f13de780678922ba3b3ea4c841e8cd7 /include | |
parent | 5208ba24e7826519d310474dedaed2f84b0ab6a0 (diff) |
new helper: current_user_stack_pointer()
Cross-architecture equivalent of rdusp(); default is
user_stack_pointer(current_pt_regs()) - that works for almost all
platforms that have usp saved in pt_regs. The only exception from
that is ia64 - we want memory stack, not the backing store for
register one.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ptrace.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index a89ff04bddd9..a3a9d085f932 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -342,6 +342,10 @@ static inline void user_single_step_siginfo(struct task_struct *tsk, | |||
342 | #define signal_pt_regs() task_pt_regs(current) | 342 | #define signal_pt_regs() task_pt_regs(current) |
343 | #endif | 343 | #endif |
344 | 344 | ||
345 | #ifndef current_user_stack_pointer | ||
346 | #define current_user_stack_pointer() user_stack_pointer(current_pt_regs()) | ||
347 | #endif | ||
348 | |||
345 | extern int task_current_syscall(struct task_struct *target, long *callno, | 349 | extern int task_current_syscall(struct task_struct *target, long *callno, |
346 | unsigned long args[6], unsigned int maxargs, | 350 | unsigned long args[6], unsigned int maxargs, |
347 | unsigned long *sp, unsigned long *pc); | 351 | unsigned long *sp, unsigned long *pc); |