aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Song <barry.song@analog.com>2010-06-21 06:19:50 -0400
committerMike Frysinger <vapier@gentoo.org>2010-10-22 03:48:52 -0400
commit175671e75c54cf4b17c71d9c99151dd5635964b1 (patch)
tree61f3709e2a96a754ba140367435cf8e7f4cfc5da
parentc5af5451fcf97f38f0c79cbb9f929af2779f234d (diff)
Blackfin: ptrace: enable access to L1 stacks
If an app is placing its stack in L1 scratchpad SRAM, make sure ptrace is granted access to it so that gdb can do its thing. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--arch/blackfin/kernel/ptrace.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 6ec77685df52..d890c1e35ec6 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -27,6 +27,7 @@
27#include <asm/fixed_code.h> 27#include <asm/fixed_code.h>
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include <asm/mem_map.h> 29#include <asm/mem_map.h>
30#include <asm/mmu_context.h>
30 31
31/* 32/*
32 * does not yet catch signals sent when the child dies. 33 * does not yet catch signals sent when the child dies.
@@ -135,6 +136,13 @@ static inline int is_user_addr_valid(struct task_struct *child,
135 if (start >= FIXED_CODE_START && start + len < FIXED_CODE_END) 136 if (start >= FIXED_CODE_START && start + len < FIXED_CODE_END)
136 return 0; 137 return 0;
137 138
139#ifdef CONFIG_APP_STACK_L1
140 if (child->mm->context.l1_stack_save)
141 if (start >= (unsigned long)l1_stack_base &&
142 start + len < (unsigned long)l1_stack_base + l1_stack_len)
143 return 0;
144#endif
145
138 return -EIO; 146 return -EIO;
139} 147}
140 148