diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2013-05-28 06:04:45 +0200 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2013-06-22 15:53:21 +0200 |
commit | 283237a04fd332bddc2ac298e6ad7d23a1fc4b99 (patch) | |
tree | 227d6d2d2c2b167fb75df1835b466ed160a7994f /arch/arc/include/asm/ptrace.h | |
parent | ARC: pt_regs update #0: remove kernel stack canary (diff) | |
download | linux-283237a04fd332bddc2ac298e6ad7d23a1fc4b99.tar.xz linux-283237a04fd332bddc2ac298e6ad7d23a1fc4b99.zip |
ARC: pt_regs update #1: Align pt_regs end with end of kernel stack page
Historically, pt_regs would end at offset of 1 word from end of stack
page.
----------------- -> START of page (task->stack)
| |
| thread_info |
-----------------
| |
^ ~ ~
| ~ ~
| | |
| | | <---- pt_regs used to END here
-----------------
| 1 word GUTTER |
----------------- -> End of page (START of kernel stack)
This required special "one-off" considerations in low level code.
The root cause is very likely assumption of "empty" SP by the original
ARC kernel hackers, despite ARC700 always been "full" SP.
So finally RIP one word gutter !
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/ptrace.h')
-rw-r--r-- | arch/arc/include/asm/ptrace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h index 6179de7e07c2..f82a3a2201b5 100644 --- a/arch/arc/include/asm/ptrace.h +++ b/arch/arc/include/asm/ptrace.h @@ -110,7 +110,7 @@ struct callee_regs { /* open-coded current_thread_info() */ \ register unsigned long sp asm ("sp"); \ unsigned long pg_start = (sp & ~(THREAD_SIZE - 1)); \ - (struct pt_regs *)(pg_start + THREAD_SIZE - 4) - 1; \ + (struct pt_regs *)(pg_start + THREAD_SIZE) - 1; \ }) static inline long regs_return_value(struct pt_regs *regs) |