diff options
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r-- | arch/blackfin/kernel/ptrace.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index 6ec77685df52..b35839354130 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. |
@@ -113,8 +114,8 @@ put_reg(struct task_struct *task, long regno, unsigned long data) | |||
113 | /* | 114 | /* |
114 | * check that an address falls within the bounds of the target process's memory mappings | 115 | * check that an address falls within the bounds of the target process's memory mappings |
115 | */ | 116 | */ |
116 | static inline int is_user_addr_valid(struct task_struct *child, | 117 | int |
117 | unsigned long start, unsigned long len) | 118 | is_user_addr_valid(struct task_struct *child, unsigned long start, unsigned long len) |
118 | { | 119 | { |
119 | struct vm_area_struct *vma; | 120 | struct vm_area_struct *vma; |
120 | struct sram_list_struct *sraml; | 121 | struct sram_list_struct *sraml; |
@@ -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 | ||