diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-03-06 13:37:41 -0500 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-03-06 13:37:41 -0500 |
commit | 0ddeeca25ce33686262459e2387f57bd09574e47 (patch) | |
tree | cd33798b51e358260e2089a97e9e3e3de6d8e02b /arch/blackfin/kernel/process.c | |
parent | 1307a65130963b061fbaca308b228a0f693a4495 (diff) |
[Blackfin] arch: add missing __user marking to ss_sp member of signalstack and a few userspace system functions
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/process.c')
-rw-r--r-- | arch/blackfin/kernel/process.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 6dedb2da8b67..fb94cbeafad6 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -202,7 +202,7 @@ copy_thread(int nr, unsigned long clone_flags, | |||
202 | * sys_execve() executes a new program. | 202 | * sys_execve() executes a new program. |
203 | */ | 203 | */ |
204 | 204 | ||
205 | asmlinkage int sys_execve(char *name, char **argv, char **envp) | 205 | asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp) |
206 | { | 206 | { |
207 | int error; | 207 | int error; |
208 | char *filename; | 208 | char *filename; |
@@ -245,23 +245,25 @@ unsigned long get_wchan(struct task_struct *p) | |||
245 | 245 | ||
246 | void finish_atomic_sections (struct pt_regs *regs) | 246 | void finish_atomic_sections (struct pt_regs *regs) |
247 | { | 247 | { |
248 | int __user *up0 = (int __user *)®s->p0; | ||
249 | |||
248 | if (regs->pc < ATOMIC_SEQS_START || regs->pc >= ATOMIC_SEQS_END) | 250 | if (regs->pc < ATOMIC_SEQS_START || regs->pc >= ATOMIC_SEQS_END) |
249 | return; | 251 | return; |
250 | 252 | ||
251 | switch (regs->pc) { | 253 | switch (regs->pc) { |
252 | case ATOMIC_XCHG32 + 2: | 254 | case ATOMIC_XCHG32 + 2: |
253 | put_user(regs->r1, (int *)regs->p0); | 255 | put_user(regs->r1, up0); |
254 | regs->pc += 2; | 256 | regs->pc += 2; |
255 | break; | 257 | break; |
256 | 258 | ||
257 | case ATOMIC_CAS32 + 2: | 259 | case ATOMIC_CAS32 + 2: |
258 | case ATOMIC_CAS32 + 4: | 260 | case ATOMIC_CAS32 + 4: |
259 | if (regs->r0 == regs->r1) | 261 | if (regs->r0 == regs->r1) |
260 | put_user(regs->r2, (int *)regs->p0); | 262 | put_user(regs->r2, up0); |
261 | regs->pc = ATOMIC_CAS32 + 8; | 263 | regs->pc = ATOMIC_CAS32 + 8; |
262 | break; | 264 | break; |
263 | case ATOMIC_CAS32 + 6: | 265 | case ATOMIC_CAS32 + 6: |
264 | put_user(regs->r2, (int *)regs->p0); | 266 | put_user(regs->r2, up0); |
265 | regs->pc += 2; | 267 | regs->pc += 2; |
266 | break; | 268 | break; |
267 | 269 | ||
@@ -269,7 +271,7 @@ void finish_atomic_sections (struct pt_regs *regs) | |||
269 | regs->r0 = regs->r1 + regs->r0; | 271 | regs->r0 = regs->r1 + regs->r0; |
270 | /* fall through */ | 272 | /* fall through */ |
271 | case ATOMIC_ADD32 + 4: | 273 | case ATOMIC_ADD32 + 4: |
272 | put_user(regs->r0, (int *)regs->p0); | 274 | put_user(regs->r0, up0); |
273 | regs->pc = ATOMIC_ADD32 + 6; | 275 | regs->pc = ATOMIC_ADD32 + 6; |
274 | break; | 276 | break; |
275 | 277 | ||
@@ -277,7 +279,7 @@ void finish_atomic_sections (struct pt_regs *regs) | |||
277 | regs->r0 = regs->r1 - regs->r0; | 279 | regs->r0 = regs->r1 - regs->r0; |
278 | /* fall through */ | 280 | /* fall through */ |
279 | case ATOMIC_SUB32 + 4: | 281 | case ATOMIC_SUB32 + 4: |
280 | put_user(regs->r0, (int *)regs->p0); | 282 | put_user(regs->r0, up0); |
281 | regs->pc = ATOMIC_SUB32 + 6; | 283 | regs->pc = ATOMIC_SUB32 + 6; |
282 | break; | 284 | break; |
283 | 285 | ||
@@ -285,7 +287,7 @@ void finish_atomic_sections (struct pt_regs *regs) | |||
285 | regs->r0 = regs->r1 | regs->r0; | 287 | regs->r0 = regs->r1 | regs->r0; |
286 | /* fall through */ | 288 | /* fall through */ |
287 | case ATOMIC_IOR32 + 4: | 289 | case ATOMIC_IOR32 + 4: |
288 | put_user(regs->r0, (int *)regs->p0); | 290 | put_user(regs->r0, up0); |
289 | regs->pc = ATOMIC_IOR32 + 6; | 291 | regs->pc = ATOMIC_IOR32 + 6; |
290 | break; | 292 | break; |
291 | 293 | ||
@@ -293,7 +295,7 @@ void finish_atomic_sections (struct pt_regs *regs) | |||
293 | regs->r0 = regs->r1 & regs->r0; | 295 | regs->r0 = regs->r1 & regs->r0; |
294 | /* fall through */ | 296 | /* fall through */ |
295 | case ATOMIC_AND32 + 4: | 297 | case ATOMIC_AND32 + 4: |
296 | put_user(regs->r0, (int *)regs->p0); | 298 | put_user(regs->r0, up0); |
297 | regs->pc = ATOMIC_AND32 + 6; | 299 | regs->pc = ATOMIC_AND32 + 6; |
298 | break; | 300 | break; |
299 | 301 | ||
@@ -301,7 +303,7 @@ void finish_atomic_sections (struct pt_regs *regs) | |||
301 | regs->r0 = regs->r1 ^ regs->r0; | 303 | regs->r0 = regs->r1 ^ regs->r0; |
302 | /* fall through */ | 304 | /* fall through */ |
303 | case ATOMIC_XOR32 + 4: | 305 | case ATOMIC_XOR32 + 4: |
304 | put_user(regs->r0, (int *)regs->p0); | 306 | put_user(regs->r0, up0); |
305 | regs->pc = ATOMIC_XOR32 + 6; | 307 | regs->pc = ATOMIC_XOR32 + 6; |
306 | break; | 308 | break; |
307 | } | 309 | } |