]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
missing user_stack_pointer() instances
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 14 Dec 2012 06:50:19 +0000 (01:50 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 19 Dec 2012 23:07:39 +0000 (18:07 -0500)
for the architectures that have usp in pt_regs and do not have
user_stack_pointer() already defined.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/avr32/include/asm/ptrace.h
arch/m32r/include/asm/ptrace.h
arch/microblaze/include/asm/ptrace.h
arch/mips/include/asm/ptrace.h
arch/score/include/asm/ptrace.h
arch/tile/include/asm/ptrace.h
arch/unicore32/include/asm/ptrace.h
arch/x86/um/asm/ptrace.h
arch/xtensa/include/asm/ptrace.h

index 8d3c412fc65ff7b86037b6230d953f3feee63b19..630e4f9bf5f084be7a2942126d3e71666482f383 100644 (file)
@@ -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)
 {
index c4432f1fb2cfacc75978459d3b7c74b652a3d484..56795d6cab4cc65f57d0408013436b3e0da492b2 100644 (file)
@@ -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);
 
index 94e92c8058592f786cfd6fac942c90b308664e85..fa791e2181402094f02bc84e7bb3a00a60983150 100644 (file)
@@ -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)
 {
index cec5e125f7e466fceb8680f029de9ad040b9c4a3..a3186f2bb8a09aab56fcf5324c2bf7209b2c92c4 100644 (file)
@@ -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);
index e89dc9b1ef49b505d387584d423dff5bb93db863..99cd4efa918e46e036c1c944f1b48e2884864300 100644 (file)
@@ -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 *);
index 1a4fd9ab0ee1663ce4a4bdb86584be442c345dad..3f792b6d60d5dcc1378e310b24f3a6fba05be4f7 100644 (file)
@@ -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)
index 726749dab52fff679f6b787ff07498053f75e7e0..9df53d991c7872fba46cf23f3033ccbc3098df77 100644 (file)
@@ -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
index 755133258c45bd0d1b9a1997e6ac272738c64954..54f8102ccde5d2774f375f6584c31c712f46d915 100644 (file)
@@ -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 */
index da21c17f23aad235c313c02683e87ccbfb9e23bf..43d0d5d7c8a07d67402eda4823f8fabc5af620ec 100644 (file)
@@ -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>