diff options
30 files changed, 101 insertions, 70 deletions
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index baa903602f6a..e2af5eb59bb4 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c | |||
@@ -269,7 +269,8 @@ void ptrace_disable(struct task_struct *child) | |||
269 | user_disable_single_step(child); | 269 | user_disable_single_step(child); |
270 | } | 270 | } |
271 | 271 | ||
272 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 272 | long arch_ptrace(struct task_struct *child, long request, |
273 | unsigned long addr, unsigned long data) | ||
273 | { | 274 | { |
274 | unsigned long tmp; | 275 | unsigned long tmp; |
275 | size_t copied; | 276 | size_t copied; |
@@ -292,7 +293,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
292 | case PTRACE_PEEKUSR: | 293 | case PTRACE_PEEKUSR: |
293 | force_successful_syscall_return(); | 294 | force_successful_syscall_return(); |
294 | ret = get_reg(child, addr); | 295 | ret = get_reg(child, addr); |
295 | DBG(DBG_MEM, ("peek $%ld->%#lx\n", addr, ret)); | 296 | DBG(DBG_MEM, ("peek $%lu->%#lx\n", addr, ret)); |
296 | break; | 297 | break; |
297 | 298 | ||
298 | /* When I and D space are separate, this will have to be fixed. */ | 299 | /* When I and D space are separate, this will have to be fixed. */ |
@@ -302,7 +303,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
302 | break; | 303 | break; |
303 | 304 | ||
304 | case PTRACE_POKEUSR: /* write the specified register */ | 305 | case PTRACE_POKEUSR: /* write the specified register */ |
305 | DBG(DBG_MEM, ("poke $%ld<-%#lx\n", addr, data)); | 306 | DBG(DBG_MEM, ("poke $%lu<-%#lx\n", addr, data)); |
306 | ret = put_reg(child, addr, data); | 307 | ret = put_reg(child, addr, data); |
307 | break; | 308 | break; |
308 | default: | 309 | default: |
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index e0cb6370ed14..9bca6165459e 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c | |||
@@ -1075,7 +1075,8 @@ out: | |||
1075 | } | 1075 | } |
1076 | #endif | 1076 | #endif |
1077 | 1077 | ||
1078 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 1078 | long arch_ptrace(struct task_struct *child, long request, |
1079 | unsigned long addr, unsigned long data) | ||
1079 | { | 1080 | { |
1080 | int ret; | 1081 | int ret; |
1081 | 1082 | ||
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index 5e73c25f8f85..ecea9b6bfab4 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -146,7 +146,8 @@ static int ptrace_setregs(struct task_struct *tsk, const void __user *uregs) | |||
146 | return ret; | 146 | return ret; |
147 | } | 147 | } |
148 | 148 | ||
149 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 149 | long arch_ptrace(struct task_struct *child, long request, |
150 | unsigned long addr, unsigned long data) | ||
150 | { | 151 | { |
151 | int ret; | 152 | int ret; |
152 | 153 | ||
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c index b35839354130..8e3083ccd88a 100644 --- a/arch/blackfin/kernel/ptrace.c +++ b/arch/blackfin/kernel/ptrace.c | |||
@@ -240,7 +240,8 @@ void user_disable_single_step(struct task_struct *child) | |||
240 | clear_tsk_thread_flag(child, TIF_SINGLESTEP); | 240 | clear_tsk_thread_flag(child, TIF_SINGLESTEP); |
241 | } | 241 | } |
242 | 242 | ||
243 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 243 | long arch_ptrace(struct task_struct *child, long request, |
244 | unsigned long addr, unsigned long data) | ||
244 | { | 245 | { |
245 | int ret; | 246 | int ret; |
246 | unsigned long __user *datap = (unsigned long __user *)data; | 247 | unsigned long __user *datap = (unsigned long __user *)data; |
diff --git a/arch/cris/arch-v10/kernel/ptrace.c b/arch/cris/arch-v10/kernel/ptrace.c index e70c804e9377..d411e024e05f 100644 --- a/arch/cris/arch-v10/kernel/ptrace.c +++ b/arch/cris/arch-v10/kernel/ptrace.c | |||
@@ -76,7 +76,8 @@ ptrace_disable(struct task_struct *child) | |||
76 | * (in user space) where the result of the ptrace call is written (instead of | 76 | * (in user space) where the result of the ptrace call is written (instead of |
77 | * being returned). | 77 | * being returned). |
78 | */ | 78 | */ |
79 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 79 | long arch_ptrace(struct task_struct *child, long request, |
80 | unsigned long addr, unsigned long data) | ||
80 | { | 81 | { |
81 | int ret; | 82 | int ret; |
82 | unsigned long __user *datap = (unsigned long __user *)data; | 83 | unsigned long __user *datap = (unsigned long __user *)data; |
@@ -141,7 +142,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
141 | break; | 142 | break; |
142 | } | 143 | } |
143 | 144 | ||
144 | data += sizeof(long); | 145 | data += sizeof(unsigned long); |
145 | } | 146 | } |
146 | 147 | ||
147 | break; | 148 | break; |
@@ -165,7 +166,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
165 | } | 166 | } |
166 | 167 | ||
167 | put_reg(child, i, tmp); | 168 | put_reg(child, i, tmp); |
168 | data += sizeof(long); | 169 | data += sizeof(unsigned long); |
169 | } | 170 | } |
170 | 171 | ||
171 | break; | 172 | break; |
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index f4ebd1e7d0f5..3e058a121753 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c | |||
@@ -126,7 +126,8 @@ ptrace_disable(struct task_struct *child) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | 128 | ||
129 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 129 | long arch_ptrace(struct task_struct *child, long request, |
130 | unsigned long addr, unsigned long data) | ||
130 | { | 131 | { |
131 | int ret; | 132 | int ret; |
132 | unsigned long __user *datap = (unsigned long __user *)data; | 133 | unsigned long __user *datap = (unsigned long __user *)data; |
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c index fac028936a04..e9dbfad93589 100644 --- a/arch/frv/kernel/ptrace.c +++ b/arch/frv/kernel/ptrace.c | |||
@@ -254,7 +254,8 @@ void ptrace_disable(struct task_struct *child) | |||
254 | user_disable_single_step(child); | 254 | user_disable_single_step(child); |
255 | } | 255 | } |
256 | 256 | ||
257 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 257 | long arch_ptrace(struct task_struct *child, long request, |
258 | unsigned long addr, unsigned long data) | ||
258 | { | 259 | { |
259 | unsigned long tmp; | 260 | unsigned long tmp; |
260 | int ret; | 261 | int ret; |
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c index df114122ebdf..ef1aa0b8b20f 100644 --- a/arch/h8300/kernel/ptrace.c +++ b/arch/h8300/kernel/ptrace.c | |||
@@ -50,7 +50,8 @@ void ptrace_disable(struct task_struct *child) | |||
50 | user_disable_single_step(child); | 50 | user_disable_single_step(child); |
51 | } | 51 | } |
52 | 52 | ||
53 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 53 | long arch_ptrace(struct task_struct *child, long request, |
54 | unsigned long addr, unsigned long data) | ||
54 | { | 55 | { |
55 | int ret; | 56 | int ret; |
56 | 57 | ||
@@ -120,7 +121,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
120 | ret = -EFAULT; | 121 | ret = -EFAULT; |
121 | break; | 122 | break; |
122 | } | 123 | } |
123 | data += sizeof(long); | 124 | data += sizeof(unsigned long); |
124 | } | 125 | } |
125 | ret = 0; | 126 | ret = 0; |
126 | break; | 127 | break; |
@@ -135,7 +136,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
135 | break; | 136 | break; |
136 | } | 137 | } |
137 | h8300_put_reg(child, i, tmp); | 138 | h8300_put_reg(child, i, tmp); |
138 | data += sizeof(long); | 139 | data += sizeof(unsigned long); |
139 | } | 140 | } |
140 | ret = 0; | 141 | ret = 0; |
141 | break; | 142 | break; |
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 7c7909f9bc93..8848f43d819e 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -1177,7 +1177,8 @@ ptrace_disable (struct task_struct *child) | |||
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | long | 1179 | long |
1180 | arch_ptrace (struct task_struct *child, long request, long addr, long data) | 1180 | arch_ptrace (struct task_struct *child, long request, |
1181 | unsigned long addr, unsigned long data) | ||
1181 | { | 1182 | { |
1182 | switch (request) { | 1183 | switch (request) { |
1183 | case PTRACE_PEEKTEXT: | 1184 | case PTRACE_PEEKTEXT: |
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 0021ade4cba8..5e00e0a41fff 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -622,7 +622,8 @@ void ptrace_disable(struct task_struct *child) | |||
622 | } | 622 | } |
623 | 623 | ||
624 | long | 624 | long |
625 | arch_ptrace(struct task_struct *child, long request, long addr, long data) | 625 | arch_ptrace(struct task_struct *child, long request, |
626 | unsigned long addr, unsigned long data) | ||
626 | { | 627 | { |
627 | int ret; | 628 | int ret; |
628 | 629 | ||
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index 616e59752c29..583f59fcc363 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c | |||
@@ -156,7 +156,8 @@ void user_disable_single_step(struct task_struct *child) | |||
156 | singlestep_disable(child); | 156 | singlestep_disable(child); |
157 | } | 157 | } |
158 | 158 | ||
159 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 159 | long arch_ptrace(struct task_struct *child, long request, |
160 | unsigned long addr, unsigned long data) | ||
160 | { | 161 | { |
161 | unsigned long tmp; | 162 | unsigned long tmp; |
162 | int i, ret = 0; | 163 | int i, ret = 0; |
@@ -200,7 +201,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
200 | * into internal fpu reg representation | 201 | * into internal fpu reg representation |
201 | */ | 202 | */ |
202 | if (FPU_IS_EMU && (addr < 45) && !(addr % 3)) { | 203 | if (FPU_IS_EMU && (addr < 45) && !(addr % 3)) { |
203 | data = (unsigned long)data << 15; | 204 | data <<= 15; |
204 | data = (data & 0xffff0000) | | 205 | data = (data & 0xffff0000) | |
205 | ((data & 0x0000ffff) >> 1); | 206 | ((data & 0x0000ffff) >> 1); |
206 | } | 207 | } |
@@ -215,7 +216,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
215 | ret = put_user(tmp, (unsigned long *)data); | 216 | ret = put_user(tmp, (unsigned long *)data); |
216 | if (ret) | 217 | if (ret) |
217 | break; | 218 | break; |
218 | data += sizeof(long); | 219 | data += sizeof(unsigned long); |
219 | } | 220 | } |
220 | break; | 221 | break; |
221 | 222 | ||
@@ -229,7 +230,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
229 | tmp |= get_reg(child, PT_SR) & ~SR_MASK; | 230 | tmp |= get_reg(child, PT_SR) & ~SR_MASK; |
230 | } | 231 | } |
231 | put_reg(child, i, tmp); | 232 | put_reg(child, i, tmp); |
232 | data += sizeof(long); | 233 | data += sizeof(unsigned long); |
233 | } | 234 | } |
234 | break; | 235 | break; |
235 | 236 | ||
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c index 6fe7c38cd556..7dbb08f5534e 100644 --- a/arch/m68knommu/kernel/ptrace.c +++ b/arch/m68knommu/kernel/ptrace.c | |||
@@ -112,7 +112,8 @@ void ptrace_disable(struct task_struct *child) | |||
112 | user_disable_single_step(child); | 112 | user_disable_single_step(child); |
113 | } | 113 | } |
114 | 114 | ||
115 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 115 | long arch_ptrace(struct task_struct *child, long request, |
116 | unsigned long addr, unsigned long data) | ||
116 | { | 117 | { |
117 | int ret; | 118 | int ret; |
118 | 119 | ||
@@ -184,7 +185,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
184 | ret = -EFAULT; | 185 | ret = -EFAULT; |
185 | break; | 186 | break; |
186 | } | 187 | } |
187 | data += sizeof(long); | 188 | data += sizeof(unsigned long); |
188 | } | 189 | } |
189 | ret = 0; | 190 | ret = 0; |
190 | break; | 191 | break; |
@@ -204,7 +205,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
204 | tmp |= get_reg(child, PT_SR) & ~(SR_MASK << 16); | 205 | tmp |= get_reg(child, PT_SR) & ~(SR_MASK << 16); |
205 | } | 206 | } |
206 | put_reg(child, i, tmp); | 207 | put_reg(child, i, tmp); |
207 | data += sizeof(long); | 208 | data += sizeof(unsigned long); |
208 | } | 209 | } |
209 | ret = 0; | 210 | ret = 0; |
210 | break; | 211 | break; |
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c index dc03ffc8174a..3544bc157406 100644 --- a/arch/microblaze/kernel/ptrace.c +++ b/arch/microblaze/kernel/ptrace.c | |||
@@ -73,7 +73,8 @@ static microblaze_reg_t *reg_save_addr(unsigned reg_offs, | |||
73 | return (microblaze_reg_t *)((char *)regs + reg_offs); | 73 | return (microblaze_reg_t *)((char *)regs + reg_offs); |
74 | } | 74 | } |
75 | 75 | ||
76 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 76 | long arch_ptrace(struct task_struct *child, long request, |
77 | unsigned long addr, unsigned long data) | ||
77 | { | 78 | { |
78 | int rval; | 79 | int rval; |
79 | unsigned long val = 0; | 80 | unsigned long val = 0; |
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index c8777333e198..95c3ae8b198c 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -255,7 +255,8 @@ int ptrace_set_watch_regs(struct task_struct *child, | |||
255 | return 0; | 255 | return 0; |
256 | } | 256 | } |
257 | 257 | ||
258 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 258 | long arch_ptrace(struct task_struct *child, long request, |
259 | unsigned long addr, unsigned long data) | ||
259 | { | 260 | { |
260 | int ret; | 261 | int ret; |
261 | 262 | ||
diff --git a/arch/mn10300/kernel/ptrace.c b/arch/mn10300/kernel/ptrace.c index cf847dabc1bd..ec4b41439e99 100644 --- a/arch/mn10300/kernel/ptrace.c +++ b/arch/mn10300/kernel/ptrace.c | |||
@@ -295,7 +295,8 @@ void ptrace_disable(struct task_struct *child) | |||
295 | /* | 295 | /* |
296 | * handle the arch-specific side of process tracing | 296 | * handle the arch-specific side of process tracing |
297 | */ | 297 | */ |
298 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 298 | long arch_ptrace(struct task_struct *child, long request, |
299 | unsigned long addr, unsigned long data) | ||
299 | { | 300 | { |
300 | unsigned long tmp; | 301 | unsigned long tmp; |
301 | int ret; | 302 | int ret; |
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c index c4f49e45129d..03920db4af45 100644 --- a/arch/parisc/kernel/ptrace.c +++ b/arch/parisc/kernel/ptrace.c | |||
@@ -110,7 +110,8 @@ void user_enable_block_step(struct task_struct *task) | |||
110 | pa_psw(task)->l = 0; | 110 | pa_psw(task)->l = 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 113 | long arch_ptrace(struct task_struct *child, long request, |
114 | unsigned long addr, unsigned long data) | ||
114 | { | 115 | { |
115 | unsigned long tmp; | 116 | unsigned long tmp; |
116 | long ret = -EIO; | 117 | long ret = -EIO; |
@@ -120,8 +121,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
120 | /* Read the word at location addr in the USER area. For ptraced | 121 | /* Read the word at location addr in the USER area. For ptraced |
121 | processes, the kernel saves all regs on a syscall. */ | 122 | processes, the kernel saves all regs on a syscall. */ |
122 | case PTRACE_PEEKUSR: | 123 | case PTRACE_PEEKUSR: |
123 | if ((addr & (sizeof(long)-1)) || | 124 | if ((addr & (sizeof(unsigned long)-1)) || |
124 | (unsigned long) addr >= sizeof(struct pt_regs)) | 125 | addr >= sizeof(struct pt_regs)) |
125 | break; | 126 | break; |
126 | tmp = *(unsigned long *) ((char *) task_regs(child) + addr); | 127 | tmp = *(unsigned long *) ((char *) task_regs(child) + addr); |
127 | ret = put_user(tmp, (unsigned long *) data); | 128 | ret = put_user(tmp, (unsigned long *) data); |
@@ -151,8 +152,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
151 | break; | 152 | break; |
152 | } | 153 | } |
153 | 154 | ||
154 | if ((addr & (sizeof(long)-1)) || | 155 | if ((addr & (sizeof(unsigned long)-1)) || |
155 | (unsigned long) addr >= sizeof(struct pt_regs)) | 156 | addr >= sizeof(struct pt_regs)) |
156 | break; | 157 | break; |
157 | if ((addr >= PT_GR1 && addr <= PT_GR31) || | 158 | if ((addr >= PT_GR1 && addr <= PT_GR31) || |
158 | addr == PT_IAOQ0 || addr == PT_IAOQ1 || | 159 | addr == PT_IAOQ0 || addr == PT_IAOQ1 || |
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 286d9783d93f..136763568a7b 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -1406,8 +1406,8 @@ static long ppc_del_hwdebug(struct task_struct *child, long addr, long data) | |||
1406 | * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls, | 1406 | * Here are the old "legacy" powerpc specific getregs/setregs ptrace calls, |
1407 | * we mark them as obsolete now, they will be removed in a future version | 1407 | * we mark them as obsolete now, they will be removed in a future version |
1408 | */ | 1408 | */ |
1409 | static long arch_ptrace_old(struct task_struct *child, long request, long addr, | 1409 | static long arch_ptrace_old(struct task_struct *child, long request, |
1410 | long data) | 1410 | unsigned long addr, unsigned long data) |
1411 | { | 1411 | { |
1412 | switch (request) { | 1412 | switch (request) { |
1413 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ | 1413 | case PPC_PTRACE_GETREGS: /* Get GPRs 0 - 31. */ |
@@ -1434,7 +1434,8 @@ static long arch_ptrace_old(struct task_struct *child, long request, long addr, | |||
1434 | return -EPERM; | 1434 | return -EPERM; |
1435 | } | 1435 | } |
1436 | 1436 | ||
1437 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 1437 | long arch_ptrace(struct task_struct *child, long request, |
1438 | unsigned long addr, unsigned long data) | ||
1438 | { | 1439 | { |
1439 | int ret = -EPERM; | 1440 | int ret = -EPERM; |
1440 | 1441 | ||
@@ -1446,11 +1447,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
1446 | ret = -EIO; | 1447 | ret = -EIO; |
1447 | /* convert to index and check */ | 1448 | /* convert to index and check */ |
1448 | #ifdef CONFIG_PPC32 | 1449 | #ifdef CONFIG_PPC32 |
1449 | index = (unsigned long) addr >> 2; | 1450 | index = addr >> 2; |
1450 | if ((addr & 3) || (index > PT_FPSCR) | 1451 | if ((addr & 3) || (index > PT_FPSCR) |
1451 | || (child->thread.regs == NULL)) | 1452 | || (child->thread.regs == NULL)) |
1452 | #else | 1453 | #else |
1453 | index = (unsigned long) addr >> 3; | 1454 | index = addr >> 3; |
1454 | if ((addr & 7) || (index > PT_FPSCR)) | 1455 | if ((addr & 7) || (index > PT_FPSCR)) |
1455 | #endif | 1456 | #endif |
1456 | break; | 1457 | break; |
@@ -1474,11 +1475,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
1474 | ret = -EIO; | 1475 | ret = -EIO; |
1475 | /* convert to index and check */ | 1476 | /* convert to index and check */ |
1476 | #ifdef CONFIG_PPC32 | 1477 | #ifdef CONFIG_PPC32 |
1477 | index = (unsigned long) addr >> 2; | 1478 | index = addr >> 2; |
1478 | if ((addr & 3) || (index > PT_FPSCR) | 1479 | if ((addr & 3) || (index > PT_FPSCR) |
1479 | || (child->thread.regs == NULL)) | 1480 | || (child->thread.regs == NULL)) |
1480 | #else | 1481 | #else |
1481 | index = (unsigned long) addr >> 3; | 1482 | index = addr >> 3; |
1482 | if ((addr & 7) || (index > PT_FPSCR)) | 1483 | if ((addr & 7) || (index > PT_FPSCR)) |
1483 | #endif | 1484 | #endif |
1484 | break; | 1485 | break; |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 83339d33c4b1..019bb714db49 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -343,7 +343,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
343 | return __poke_user(child, addr, data); | 343 | return __poke_user(child, addr, data); |
344 | } | 344 | } |
345 | 345 | ||
346 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 346 | long arch_ptrace(struct task_struct *child, long request, |
347 | unsigned long addr, unsigned long data) | ||
347 | { | 348 | { |
348 | ptrace_area parea; | 349 | ptrace_area parea; |
349 | int copied, ret; | 350 | int copied, ret; |
diff --git a/arch/score/kernel/ptrace.c b/arch/score/kernel/ptrace.c index 174c6422b096..894dcbf72099 100644 --- a/arch/score/kernel/ptrace.c +++ b/arch/score/kernel/ptrace.c | |||
@@ -325,7 +325,8 @@ void ptrace_disable(struct task_struct *child) | |||
325 | } | 325 | } |
326 | 326 | ||
327 | long | 327 | long |
328 | arch_ptrace(struct task_struct *child, long request, long addr, long data) | 328 | arch_ptrace(struct task_struct *child, long request, |
329 | unsigned long addr, unsigned long data) | ||
329 | { | 330 | { |
330 | int ret; | 331 | int ret; |
331 | unsigned long __user *datap = (void __user *)data; | 332 | unsigned long __user *datap = (void __user *)data; |
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 2cd42b58cb20..34bf03745e86 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -365,7 +365,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) | |||
365 | return &user_sh_native_view; | 365 | return &user_sh_native_view; |
366 | } | 366 | } |
367 | 367 | ||
368 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 368 | long arch_ptrace(struct task_struct *child, long request, |
369 | unsigned long addr, unsigned long data) | ||
369 | { | 370 | { |
370 | struct user * dummy = NULL; | 371 | struct user * dummy = NULL; |
371 | unsigned long __user *datap = (unsigned long __user *)data; | 372 | unsigned long __user *datap = (unsigned long __user *)data; |
@@ -383,17 +384,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
383 | 384 | ||
384 | if (addr < sizeof(struct pt_regs)) | 385 | if (addr < sizeof(struct pt_regs)) |
385 | tmp = get_stack_long(child, addr); | 386 | tmp = get_stack_long(child, addr); |
386 | else if (addr >= (long) &dummy->fpu && | 387 | else if (addr >= (unsigned long) &dummy->fpu && |
387 | addr < (long) &dummy->u_fpvalid) { | 388 | addr < (unsigned long) &dummy->u_fpvalid) { |
388 | if (!tsk_used_math(child)) { | 389 | if (!tsk_used_math(child)) { |
389 | if (addr == (long)&dummy->fpu.fpscr) | 390 | if (addr == (unsigned long)&dummy->fpu.fpscr) |
390 | tmp = FPSCR_INIT; | 391 | tmp = FPSCR_INIT; |
391 | else | 392 | else |
392 | tmp = 0; | 393 | tmp = 0; |
393 | } else | 394 | } else |
394 | tmp = ((long *)child->thread.xstate) | 395 | tmp = ((unsigned long *)child->thread.xstate) |
395 | [(addr - (long)&dummy->fpu) >> 2]; | 396 | [(addr - (long)&dummy->fpu) >> 2]; |
396 | } else if (addr == (long) &dummy->u_fpvalid) | 397 | } else if (addr == (unsigned long) &dummy->u_fpvalid) |
397 | tmp = !!tsk_used_math(child); | 398 | tmp = !!tsk_used_math(child); |
398 | else if (addr == PT_TEXT_ADDR) | 399 | else if (addr == PT_TEXT_ADDR) |
399 | tmp = child->mm->start_code; | 400 | tmp = child->mm->start_code; |
@@ -417,13 +418,13 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
417 | 418 | ||
418 | if (addr < sizeof(struct pt_regs)) | 419 | if (addr < sizeof(struct pt_regs)) |
419 | ret = put_stack_long(child, addr, data); | 420 | ret = put_stack_long(child, addr, data); |
420 | else if (addr >= (long) &dummy->fpu && | 421 | else if (addr >= (unsigned long) &dummy->fpu && |
421 | addr < (long) &dummy->u_fpvalid) { | 422 | addr < (unsigned long) &dummy->u_fpvalid) { |
422 | set_stopped_child_used_math(child); | 423 | set_stopped_child_used_math(child); |
423 | ((long *)child->thread.xstate) | 424 | ((unsigned long *)child->thread.xstate) |
424 | [(addr - (long)&dummy->fpu) >> 2] = data; | 425 | [(addr - (long)&dummy->fpu) >> 2] = data; |
425 | ret = 0; | 426 | ret = 0; |
426 | } else if (addr == (long) &dummy->u_fpvalid) { | 427 | } else if (addr == (unsigned long) &dummy->u_fpvalid) { |
427 | conditional_stopped_child_used_math(data, child); | 428 | conditional_stopped_child_used_math(data, child); |
428 | ret = 0; | 429 | ret = 0; |
429 | } | 430 | } |
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index e0fb065914aa..4840716c196a 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -383,7 +383,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) | |||
383 | return &user_sh64_native_view; | 383 | return &user_sh64_native_view; |
384 | } | 384 | } |
385 | 385 | ||
386 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 386 | long arch_ptrace(struct task_struct *child, long request, |
387 | unsigned long addr, unsigned long data) | ||
387 | { | 388 | { |
388 | int ret; | 389 | int ret; |
389 | 390 | ||
@@ -471,7 +472,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
471 | return ret; | 472 | return ret; |
472 | } | 473 | } |
473 | 474 | ||
474 | asmlinkage int sh64_ptrace(long request, long pid, long addr, long data) | 475 | asmlinkage int sh64_ptrace(long request, long pid, |
476 | unsigned long addr, unsigned long data) | ||
475 | { | 477 | { |
476 | #define WPC_DBRMODE 0x0d104008 | 478 | #define WPC_DBRMODE 0x0d104008 |
477 | static unsigned long first_call; | 479 | static unsigned long first_call; |
diff --git a/arch/sparc/kernel/ptrace_32.c b/arch/sparc/kernel/ptrace_32.c index e608f397e11f..e08ba4a46acd 100644 --- a/arch/sparc/kernel/ptrace_32.c +++ b/arch/sparc/kernel/ptrace_32.c | |||
@@ -323,7 +323,8 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) | |||
323 | return &user_sparc32_view; | 323 | return &user_sparc32_view; |
324 | } | 324 | } |
325 | 325 | ||
326 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 326 | long arch_ptrace(struct task_struct *child, long request, |
327 | unsigned long addr, unsigned long data) | ||
327 | { | 328 | { |
328 | unsigned long addr2 = current->thread.kregs->u_regs[UREG_I4]; | 329 | unsigned long addr2 = current->thread.kregs->u_regs[UREG_I4]; |
329 | const struct user_regset_view *view; | 330 | const struct user_regset_view *view; |
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index aa90da08bf61..d9db5a4dfef9 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -969,7 +969,8 @@ struct fps { | |||
969 | unsigned long fsr; | 969 | unsigned long fsr; |
970 | }; | 970 | }; |
971 | 971 | ||
972 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 972 | long arch_ptrace(struct task_struct *child, long request, |
973 | unsigned long addr, unsigned long data) | ||
973 | { | 974 | { |
974 | const struct user_regset_view *view = task_user_regset_view(current); | 975 | const struct user_regset_view *view = task_user_regset_view(current); |
975 | unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4]; | 976 | unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4]; |
@@ -977,8 +978,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
977 | struct fps __user *fps; | 978 | struct fps __user *fps; |
978 | int ret; | 979 | int ret; |
979 | 980 | ||
980 | pregs = (struct pt_regs __user *) (unsigned long) addr; | 981 | pregs = (struct pt_regs __user *) addr; |
981 | fps = (struct fps __user *) (unsigned long) addr; | 982 | fps = (struct fps __user *) addr; |
982 | 983 | ||
983 | switch (request) { | 984 | switch (request) { |
984 | case PTRACE_PEEKUSR: | 985 | case PTRACE_PEEKUSR: |
diff --git a/arch/tile/kernel/ptrace.c b/arch/tile/kernel/ptrace.c index 5b20c2874d51..f634729211d1 100644 --- a/arch/tile/kernel/ptrace.c +++ b/arch/tile/kernel/ptrace.c | |||
@@ -45,7 +45,8 @@ void ptrace_disable(struct task_struct *child) | |||
45 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 45 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
46 | } | 46 | } |
47 | 47 | ||
48 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 48 | long arch_ptrace(struct task_struct *child, long request, |
49 | unsigned long addr, unsigned long data) | ||
49 | { | 50 | { |
50 | unsigned long __user *datap = (long __user __force *)data; | 51 | unsigned long __user *datap = (long __user __force *)data; |
51 | unsigned long tmp; | 52 | unsigned long tmp; |
@@ -98,7 +99,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
98 | if (!access_ok(VERIFY_WRITE, datap, PTREGS_SIZE)) | 99 | if (!access_ok(VERIFY_WRITE, datap, PTREGS_SIZE)) |
99 | break; | 100 | break; |
100 | childregs = (long *)task_pt_regs(child); | 101 | childregs = (long *)task_pt_regs(child); |
101 | for (i = 0; i < sizeof(struct pt_regs)/sizeof(long); ++i) { | 102 | for (i = 0; i < sizeof(struct pt_regs)/sizeof(unsigned long); |
103 | ++i) { | ||
102 | ret = __put_user(childregs[i], &datap[i]); | 104 | ret = __put_user(childregs[i], &datap[i]); |
103 | if (ret != 0) | 105 | if (ret != 0) |
104 | break; | 106 | break; |
@@ -109,7 +111,8 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
109 | if (!access_ok(VERIFY_READ, datap, PTREGS_SIZE)) | 111 | if (!access_ok(VERIFY_READ, datap, PTREGS_SIZE)) |
110 | break; | 112 | break; |
111 | childregs = (long *)task_pt_regs(child); | 113 | childregs = (long *)task_pt_regs(child); |
112 | for (i = 0; i < sizeof(struct pt_regs)/sizeof(long); ++i) { | 114 | for (i = 0; i < sizeof(struct pt_regs)/sizeof(unsigned long); |
115 | ++i) { | ||
113 | ret = __get_user(childregs[i], &datap[i]); | 116 | ret = __get_user(childregs[i], &datap[i]); |
114 | if (ret != 0) | 117 | if (ret != 0) |
115 | break; | 118 | break; |
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index e0510496596c..963d82bdec06 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -42,10 +42,11 @@ void ptrace_disable(struct task_struct *child) | |||
42 | extern int peek_user(struct task_struct * child, long addr, long data); | 42 | extern int peek_user(struct task_struct * child, long addr, long data); |
43 | extern int poke_user(struct task_struct * child, long addr, long data); | 43 | extern int poke_user(struct task_struct * child, long addr, long data); |
44 | 44 | ||
45 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 45 | long arch_ptrace(struct task_struct *child, long request, |
46 | unsigned long addr, unsigned long data) | ||
46 | { | 47 | { |
47 | int i, ret; | 48 | int i, ret; |
48 | unsigned long __user *p = (void __user *)(unsigned long)data; | 49 | unsigned long __user *p = (void __user *)data; |
49 | 50 | ||
50 | switch (request) { | 51 | switch (request) { |
51 | /* read word at location addr. */ | 52 | /* read word at location addr. */ |
diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c index c9b176534d65..d23b2d3ea384 100644 --- a/arch/um/sys-i386/ptrace.c +++ b/arch/um/sys-i386/ptrace.c | |||
@@ -203,8 +203,8 @@ int set_fpxregs(struct user_fxsr_struct __user *buf, struct task_struct *child) | |||
203 | (unsigned long *) &fpregs); | 203 | (unsigned long *) &fpregs); |
204 | } | 204 | } |
205 | 205 | ||
206 | long subarch_ptrace(struct task_struct *child, long request, long addr, | 206 | long subarch_ptrace(struct task_struct *child, long request, |
207 | long data) | 207 | unsigned long addr, unsigned long data) |
208 | { | 208 | { |
209 | return -EIO; | 209 | return -EIO; |
210 | } | 210 | } |
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c index f3458d7d1c5a..67e63680df28 100644 --- a/arch/um/sys-x86_64/ptrace.c +++ b/arch/um/sys-x86_64/ptrace.c | |||
@@ -175,8 +175,8 @@ int set_fpregs(struct user_i387_struct __user *buf, struct task_struct *child) | |||
175 | return restore_fp_registers(userspace_pid[cpu], fpregs); | 175 | return restore_fp_registers(userspace_pid[cpu], fpregs); |
176 | } | 176 | } |
177 | 177 | ||
178 | long subarch_ptrace(struct task_struct *child, long request, long addr, | 178 | long subarch_ptrace(struct task_struct *child, long request, |
179 | long data) | 179 | unsigned long addr, unsigned long data) |
180 | { | 180 | { |
181 | int ret = -EIO; | 181 | int ret = -EIO; |
182 | 182 | ||
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 70c4872cd8aa..1a7ca045920d 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -801,7 +801,8 @@ void ptrace_disable(struct task_struct *child) | |||
801 | static const struct user_regset_view user_x86_32_view; /* Initialized below. */ | 801 | static const struct user_regset_view user_x86_32_view; /* Initialized below. */ |
802 | #endif | 802 | #endif |
803 | 803 | ||
804 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 804 | long arch_ptrace(struct task_struct *child, long request, |
805 | unsigned long addr, unsigned long data) | ||
805 | { | 806 | { |
806 | int ret; | 807 | int ret; |
807 | unsigned long __user *datap = (unsigned long __user *)data; | 808 | unsigned long __user *datap = (unsigned long __user *)data; |
@@ -888,14 +889,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
888 | 889 | ||
889 | #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION | 890 | #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION |
890 | case PTRACE_GET_THREAD_AREA: | 891 | case PTRACE_GET_THREAD_AREA: |
891 | if (addr < 0) | 892 | if ((int) addr < 0) |
892 | return -EIO; | 893 | return -EIO; |
893 | ret = do_get_thread_area(child, addr, | 894 | ret = do_get_thread_area(child, addr, |
894 | (struct user_desc __user *) data); | 895 | (struct user_desc __user *) data); |
895 | break; | 896 | break; |
896 | 897 | ||
897 | case PTRACE_SET_THREAD_AREA: | 898 | case PTRACE_SET_THREAD_AREA: |
898 | if (addr < 0) | 899 | if ((int) addr < 0) |
899 | return -EIO; | 900 | return -EIO; |
900 | ret = do_set_thread_area(child, addr, | 901 | ret = do_set_thread_area(child, addr, |
901 | (struct user_desc __user *) data, 0); | 902 | (struct user_desc __user *) data, 0); |
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 9d4e1ceb3f09..af9ba80f254c 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c | |||
@@ -256,7 +256,8 @@ int ptrace_pokeusr(struct task_struct *child, long regno, long val) | |||
256 | return 0; | 256 | return 0; |
257 | } | 257 | } |
258 | 258 | ||
259 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) | 259 | long arch_ptrace(struct task_struct *child, long request, |
260 | unsigned long addr, unsigned long data) | ||
260 | { | 261 | { |
261 | int ret = -EPERM; | 262 | int ret = -EPERM; |
262 | 263 | ||
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 67a4cd77c352..092a04f874a8 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -100,7 +100,8 @@ | |||
100 | #include <linux/sched.h> /* For struct task_struct. */ | 100 | #include <linux/sched.h> /* For struct task_struct. */ |
101 | 101 | ||
102 | 102 | ||
103 | extern long arch_ptrace(struct task_struct *child, long request, long addr, long data); | 103 | extern long arch_ptrace(struct task_struct *child, long request, |
104 | unsigned long addr, unsigned long data); | ||
104 | extern int ptrace_traceme(void); | 105 | extern int ptrace_traceme(void); |
105 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); | 106 | extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len); |
106 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 107 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |