diff options
Diffstat (limited to 'arch/blackfin/kernel/ptrace.c')
-rw-r--r-- | arch/blackfin/kernel/ptrace.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index f51ab088098e..bf1a51d8e608 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -220,6 +220,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
220 | copied = sizeof(tmp); | 220 | copied = sizeof(tmp); |
221 | } else | 221 | } else |
222 | #endif | 222 | #endif |
223 | #if L1_DATA_A_LENGTH != 0 | ||
224 | if (addr + add >= L1_DATA_A_START | ||
225 | && addr + add + sizeof(tmp) <= L1_DATA_A_START + L1_DATA_A_LENGTH) { | ||
226 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); | ||
227 | copied = sizeof(tmp); | ||
228 | } else | ||
229 | #endif | ||
230 | #if L1_DATA_B_LENGTH != 0 | ||
231 | if (addr + add >= L1_DATA_B_START | ||
232 | && addr + add + sizeof(tmp) <= L1_DATA_B_START + L1_DATA_B_LENGTH) { | ||
233 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); | ||
234 | copied = sizeof(tmp); | ||
235 | } else | ||
236 | #endif | ||
223 | if (addr + add >= FIXED_CODE_START | 237 | if (addr + add >= FIXED_CODE_START |
224 | && addr + add + sizeof(tmp) <= FIXED_CODE_END) { | 238 | && addr + add + sizeof(tmp) <= FIXED_CODE_END) { |
225 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); | 239 | memcpy(&tmp, (const void *)(addr + add), sizeof(tmp)); |
@@ -290,6 +304,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
290 | copied = sizeof(data); | 304 | copied = sizeof(data); |
291 | } else | 305 | } else |
292 | #endif | 306 | #endif |
307 | #if L1_DATA_A_LENGTH != 0 | ||
308 | if (addr + add >= L1_DATA_A_START | ||
309 | && addr + add + sizeof(data) <= L1_DATA_A_START + L1_DATA_A_LENGTH) { | ||
310 | memcpy((void *)(addr + add), &data, sizeof(data)); | ||
311 | copied = sizeof(data); | ||
312 | } else | ||
313 | #endif | ||
314 | #if L1_DATA_B_LENGTH != 0 | ||
315 | if (addr + add >= L1_DATA_B_START | ||
316 | && addr + add + sizeof(data) <= L1_DATA_B_START + L1_DATA_B_LENGTH) { | ||
317 | memcpy((void *)(addr + add), &data, sizeof(data)); | ||
318 | copied = sizeof(data); | ||
319 | } else | ||
320 | #endif | ||
293 | if (addr + add >= FIXED_CODE_START | 321 | if (addr + add >= FIXED_CODE_START |
294 | && addr + add + sizeof(data) <= FIXED_CODE_END) { | 322 | && addr + add + sizeof(data) <= FIXED_CODE_END) { |
295 | memcpy((void *)(addr + add), &data, sizeof(data)); | 323 | memcpy((void *)(addr + add), &data, sizeof(data)); |