diff options
author | Barry Song <barry.song@analog.com> | 2010-06-21 12:19:50 +0200 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-10-22 09:48:52 +0200 |
commit | 175671e75c54cf4b17c71d9c99151dd5635964b1 (patch) | |
tree | 61f3709e2a96a754ba140367435cf8e7f4cfc5da /arch/blackfin/kernel/ptrace.c | |
parent | Blackfin: boards: fix num_chipselect values for on-chip SPI buses (diff) | |
download | linux-175671e75c54cf4b17c71d9c99151dd5635964b1.tar.xz linux-175671e75c54cf4b17c71d9c99151dd5635964b1.zip |
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>
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r-- | arch/blackfin/kernel/ptrace.c | 8 |
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 @@ #include <asm/fixed_code.h> #include <asm/cacheflush.h> #include <asm/mem_map.h> +#include <asm/mmu_context.h> /* * 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, if (start >= FIXED_CODE_START && start + len < FIXED_CODE_END) return 0; +#ifdef CONFIG_APP_STACK_L1 + if (child->mm->context.l1_stack_save) + if (start >= (unsigned long)l1_stack_base && + start + len < (unsigned long)l1_stack_base + l1_stack_len) + return 0; +#endif + return -EIO; } |