Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106286
b: refs/heads/master
c: 6546eae
h: refs/heads/master
v: v3
  • Loading branch information
Jie Zhang authored and Bryan Wu committed Jul 15, 2008
1 parent d37583c commit 82745c4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2cfebf2bceff4645b403246b608b1bb6222e4deb
refs/heads/master: 6546eae4fd90ab11ca7ab6d6b9e1b243d1ce5fe6
28 changes: 28 additions & 0 deletions trunk/arch/blackfin/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
safe_dma_memcpy (&tmp, (const void *)(addr + add), sizeof(tmp));
copied = sizeof(tmp);
} else
#endif
#if L1_DATA_A_LENGTH != 0
if (addr + add >= L1_DATA_A_START
&& addr + add + sizeof(tmp) <= L1_DATA_A_START + L1_DATA_A_LENGTH) {
memcpy(&tmp, (const void *)(addr + add), sizeof(tmp));
copied = sizeof(tmp);
} else
#endif
#if L1_DATA_B_LENGTH != 0
if (addr + add >= L1_DATA_B_START
&& addr + add + sizeof(tmp) <= L1_DATA_B_START + L1_DATA_B_LENGTH) {
memcpy(&tmp, (const void *)(addr + add), sizeof(tmp));
copied = sizeof(tmp);
} else
#endif
if (addr + add >= FIXED_CODE_START
&& addr + add + sizeof(tmp) <= FIXED_CODE_END) {
Expand Down Expand Up @@ -289,6 +303,20 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
safe_dma_memcpy ((void *)(addr + add), &data, sizeof(data));
copied = sizeof(data);
} else
#endif
#if L1_DATA_A_LENGTH != 0
if (addr + add >= L1_DATA_A_START
&& addr + add + sizeof(data) <= L1_DATA_A_START + L1_DATA_A_LENGTH) {
memcpy((void *)(addr + add), &data, sizeof(data));
copied = sizeof(data);
} else
#endif
#if L1_DATA_B_LENGTH != 0
if (addr + add >= L1_DATA_B_START
&& addr + add + sizeof(data) <= L1_DATA_B_START + L1_DATA_B_LENGTH) {
memcpy((void *)(addr + add), &data, sizeof(data));
copied = sizeof(data);
} else
#endif
if (addr + add >= FIXED_CODE_START
&& addr + add + sizeof(data) <= FIXED_CODE_END) {
Expand Down

0 comments on commit 82745c4

Please sign in to comment.