Skip to contentSkip to conversation

ia64: Fix me add register r8

PATCH In review Nicholas Krause 2 participants 3 messages Jul 18, 2014 – Jul 20, 2014 ptrace support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: Fix me add register r8

The function user_stack_pointer was not returning the correct value \
as stated by a Fix Me message before the function declaration. I fixed the return value to add register r8 as that register stores dirty pages.

---
 arch/ia64/include/asm/ptrace.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/ia64/include/asm/ptrace.h +1 -2
index 8451439..eaef692 100644
@@ -53,8 +53,7 @@
 
 static inline unsigned long user_stack_pointer(struct pt_regs *regs)
 {
-	/* FIXME: should this be bspstore + nr_dirty regs? */
-	return regs->ar_bspstore;
+	return regs->ar_bspstore + regs->r8;
 }
 
 static inline int is_syscall_success(struct pt_regs *regs)
Signature · 1 line
1.9.1
#1 lore raw

Hi,

Well, I'm wondering why the original author of this FIXME comment didn't fix the issue him/herself. Can you track down who added this comment? I fear that this simple comment was actually here to point to something more subtle...

Émeric

2014-07-18 7:25 GMT+02:00 Nicholas Krause <[email protected]>:

Quoted 31 lines

The function user_stack_pointer was not returning the correct value \
as stated by a Fix Me message before the function declaration. I fixed the return value to add register r8 as that register stores dirty pages.

---
 arch/ia64/include/asm/ptrace.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/ia64/include/asm/ptrace.h +1 -3
index 8451439..eaef692 100644
@@ -53,8 +53,7 @@
 
 static inline unsigned long user_stack_pointer(struct pt_regs *regs)
 {
-       /* FIXME: should this be bspstore + nr_dirty regs? */
-       return regs->ar_bspstore;
+       return regs->ar_bspstore + regs->r8;
 }
 
 static inline int is_syscall_success(struct pt_regs *regs)
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 9 lines · Émeric MASCHINO

Hi,

Well, I'm wondering why the original author of this FIXME comment didn't fix the issue him/herself. Can you track down who added this comment? I fear that this simple comment was actually here to point to something more subtle...

Émeric

Émeric,
I ran git blame on the file and I got this name, Shaohua Li for the fix me and the whole function .

Nick