]>
Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* |
2 | * This file is subject to the terms and conditions of the GNU General Public | |
3 | * License. See the file "COPYING" in the main directory of this archive | |
4 | * for more details. | |
5 | * | |
6 | * Copyright (C) 1995, 1996, 1997, 2000, 2001, 05 by Ralf Baechle | |
7 | * Copyright (C) 1999, 2000 Silicon Graphics, Inc. | |
8 | * Copyright (C) 2001 MIPS Technologies, Inc. | |
9 | */ | |
a9415644 | 10 | #include <linux/capability.h> |
1da177e4 LT |
11 | #include <linux/errno.h> |
12 | #include <linux/linkage.h> | |
13 | #include <linux/mm.h> | |
4e950f6f | 14 | #include <linux/fs.h> |
1da177e4 | 15 | #include <linux/smp.h> |
1da177e4 LT |
16 | #include <linux/mman.h> |
17 | #include <linux/ptrace.h> | |
18 | #include <linux/sched.h> | |
19 | #include <linux/string.h> | |
20 | #include <linux/syscalls.h> | |
21 | #include <linux/file.h> | |
22 | #include <linux/slab.h> | |
23 | #include <linux/utsname.h> | |
24 | #include <linux/unistd.h> | |
25 | #include <linux/sem.h> | |
26 | #include <linux/msg.h> | |
27 | #include <linux/shm.h> | |
28 | #include <linux/compiler.h> | |
9ff77c46 | 29 | #include <linux/module.h> |
cba4fbbf | 30 | #include <linux/ipc.h> |
f1e39a4a | 31 | #include <linux/uaccess.h> |
1da177e4 | 32 | |
f1e39a4a | 33 | #include <asm/asm.h> |
1da177e4 LT |
34 | #include <asm/branch.h> |
35 | #include <asm/cachectl.h> | |
36 | #include <asm/cacheflush.h> | |
048eb582 | 37 | #include <asm/asm-offsets.h> |
1da177e4 LT |
38 | #include <asm/signal.h> |
39 | #include <asm/sim.h> | |
40 | #include <asm/shmparam.h> | |
41 | #include <asm/sysmips.h> | |
42 | #include <asm/uaccess.h> | |
43 | ||
8213bbf9 RB |
44 | /* |
45 | * For historic reasons the pipe(2) syscall on MIPS has an unusual calling | |
46 | * convention. It returns results in registers $v0 / $v1 which means there | |
47 | * is no need for it to do verify the validity of a userspace pointer | |
48 | * argument. Historically that used to be expensive in Linux. These days | |
49 | * the performance advantage is negligible. | |
50 | */ | |
51 | asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs regs) | |
1da177e4 LT |
52 | { |
53 | int fd[2]; | |
54 | int error, res; | |
55 | ||
ed8cae8b | 56 | error = do_pipe_flags(fd, 0); |
1da177e4 LT |
57 | if (error) { |
58 | res = error; | |
59 | goto out; | |
60 | } | |
61 | regs.regs[3] = fd[1]; | |
62 | res = fd[0]; | |
63 | out: | |
64 | return res; | |
65 | } | |
66 | ||
67 | unsigned long shm_align_mask = PAGE_SIZE - 1; /* Sane caches */ | |
68 | ||
9ff77c46 RB |
69 | EXPORT_SYMBOL(shm_align_mask); |
70 | ||
1da177e4 LT |
71 | #define COLOUR_ALIGN(addr,pgoff) \ |
72 | ((((addr) + shm_align_mask) & ~shm_align_mask) + \ | |
73 | (((pgoff) << PAGE_SHIFT) & shm_align_mask)) | |
74 | ||
75 | unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, | |
76 | unsigned long len, unsigned long pgoff, unsigned long flags) | |
77 | { | |
78 | struct vm_area_struct * vmm; | |
79 | int do_color_align; | |
80 | unsigned long task_size; | |
81 | ||
82 | task_size = STACK_TOP; | |
83 | ||
098362e7 DD |
84 | if (len > task_size) |
85 | return -ENOMEM; | |
86 | ||
1da177e4 | 87 | if (flags & MAP_FIXED) { |
098362e7 DD |
88 | /* Even MAP_FIXED mappings must reside within task_size. */ |
89 | if (task_size - len < addr) | |
90 | return -EINVAL; | |
91 | ||
1da177e4 LT |
92 | /* |
93 | * We do not accept a shared mapping if it would violate | |
94 | * cache aliasing constraints. | |
95 | */ | |
96 | if ((flags & MAP_SHARED) && (addr & shm_align_mask)) | |
97 | return -EINVAL; | |
98 | return addr; | |
99 | } | |
100 | ||
1da177e4 LT |
101 | do_color_align = 0; |
102 | if (filp || (flags & MAP_SHARED)) | |
103 | do_color_align = 1; | |
104 | if (addr) { | |
105 | if (do_color_align) | |
106 | addr = COLOUR_ALIGN(addr, pgoff); | |
107 | else | |
108 | addr = PAGE_ALIGN(addr); | |
109 | vmm = find_vma(current->mm, addr); | |
110 | if (task_size - len >= addr && | |
111 | (!vmm || addr + len <= vmm->vm_start)) | |
112 | return addr; | |
113 | } | |
114 | addr = TASK_UNMAPPED_BASE; | |
115 | if (do_color_align) | |
116 | addr = COLOUR_ALIGN(addr, pgoff); | |
117 | else | |
118 | addr = PAGE_ALIGN(addr); | |
119 | ||
120 | for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) { | |
121 | /* At this point: (!vmm || addr < vmm->vm_end). */ | |
122 | if (task_size - len < addr) | |
123 | return -ENOMEM; | |
124 | if (!vmm || addr + len <= vmm->vm_start) | |
125 | return addr; | |
126 | addr = vmm->vm_end; | |
127 | if (do_color_align) | |
128 | addr = COLOUR_ALIGN(addr, pgoff); | |
129 | } | |
130 | } | |
131 | ||
132 | /* common code for old and new mmaps */ | |
133 | static inline unsigned long | |
134 | do_mmap2(unsigned long addr, unsigned long len, unsigned long prot, | |
135 | unsigned long flags, unsigned long fd, unsigned long pgoff) | |
136 | { | |
137 | unsigned long error = -EBADF; | |
138 | struct file * file = NULL; | |
139 | ||
140 | flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE); | |
141 | if (!(flags & MAP_ANONYMOUS)) { | |
142 | file = fget(fd); | |
143 | if (!file) | |
144 | goto out; | |
145 | } | |
146 | ||
147 | down_write(¤t->mm->mmap_sem); | |
148 | error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff); | |
149 | up_write(¤t->mm->mmap_sem); | |
150 | ||
151 | if (file) | |
152 | fput(file); | |
153 | out: | |
154 | return error; | |
155 | } | |
156 | ||
dbda6ac0 RB |
157 | SYSCALL_DEFINE6(mips_mmap, unsigned long, addr, unsigned long, len, |
158 | unsigned long, prot, unsigned long, flags, unsigned long, | |
159 | fd, off_t, offset) | |
1da177e4 LT |
160 | { |
161 | unsigned long result; | |
162 | ||
163 | result = -EINVAL; | |
164 | if (offset & ~PAGE_MASK) | |
165 | goto out; | |
166 | ||
167 | result = do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT); | |
168 | ||
169 | out: | |
170 | return result; | |
171 | } | |
172 | ||
dbda6ac0 RB |
173 | SYSCALL_DEFINE6(mips_mmap2, unsigned long, addr, unsigned long, len, |
174 | unsigned long, prot, unsigned long, flags, unsigned long, fd, | |
175 | unsigned long, pgoff) | |
1da177e4 | 176 | { |
947df17c PA |
177 | if (pgoff & (~PAGE_MASK >> 12)) |
178 | return -EINVAL; | |
179 | ||
180 | return do_mmap2(addr, len, prot, flags, fd, pgoff >> (PAGE_SHIFT-12)); | |
1da177e4 LT |
181 | } |
182 | ||
183 | save_static_function(sys_fork); | |
f5dbeaf5 | 184 | static int __used noinline |
1da177e4 LT |
185 | _sys_fork(nabi_no_regargs struct pt_regs regs) |
186 | { | |
187 | return do_fork(SIGCHLD, regs.regs[29], ®s, 0, NULL, NULL); | |
188 | } | |
189 | ||
190 | save_static_function(sys_clone); | |
f5dbeaf5 | 191 | static int __used noinline |
1da177e4 LT |
192 | _sys_clone(nabi_no_regargs struct pt_regs regs) |
193 | { | |
194 | unsigned long clone_flags; | |
195 | unsigned long newsp; | |
3c37026d | 196 | int __user *parent_tidptr, *child_tidptr; |
1da177e4 LT |
197 | |
198 | clone_flags = regs.regs[4]; | |
199 | newsp = regs.regs[5]; | |
200 | if (!newsp) | |
201 | newsp = regs.regs[29]; | |
3c37026d RB |
202 | parent_tidptr = (int __user *) regs.regs[6]; |
203 | #ifdef CONFIG_32BIT | |
204 | /* We need to fetch the fifth argument off the stack. */ | |
205 | child_tidptr = NULL; | |
206 | if (clone_flags & (CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID)) { | |
207 | int __user *__user *usp = (int __user *__user *) regs.regs[29]; | |
208 | if (regs.regs[2] == __NR_syscall) { | |
209 | if (get_user (child_tidptr, &usp[5])) | |
210 | return -EFAULT; | |
211 | } | |
212 | else if (get_user (child_tidptr, &usp[4])) | |
213 | return -EFAULT; | |
214 | } | |
215 | #else | |
216 | child_tidptr = (int __user *) regs.regs[8]; | |
217 | #endif | |
1da177e4 LT |
218 | return do_fork(clone_flags, newsp, ®s, 0, |
219 | parent_tidptr, child_tidptr); | |
220 | } | |
221 | ||
222 | /* | |
223 | * sys_execve() executes a new program. | |
224 | */ | |
225 | asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs) | |
226 | { | |
227 | int error; | |
228 | char * filename; | |
229 | ||
be6e518b | 230 | filename = getname((char __user *) (long)regs.regs[4]); |
1da177e4 LT |
231 | error = PTR_ERR(filename); |
232 | if (IS_ERR(filename)) | |
233 | goto out; | |
be6e518b AN |
234 | error = do_execve(filename, (char __user *__user *) (long)regs.regs[5], |
235 | (char __user *__user *) (long)regs.regs[6], ®s); | |
1da177e4 LT |
236 | putname(filename); |
237 | ||
238 | out: | |
239 | return error; | |
240 | } | |
241 | ||
242 | /* | |
243 | * Compacrapability ... | |
244 | */ | |
dbda6ac0 | 245 | SYSCALL_DEFINE1(uname, struct old_utsname __user *, name) |
1da177e4 | 246 | { |
e9ff3990 | 247 | if (name && !copy_to_user(name, utsname(), sizeof (*name))) |
1da177e4 LT |
248 | return 0; |
249 | return -EFAULT; | |
250 | } | |
251 | ||
252 | /* | |
253 | * Compacrapability ... | |
254 | */ | |
dbda6ac0 | 255 | SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) |
1da177e4 LT |
256 | { |
257 | int error; | |
258 | ||
259 | if (!name) | |
260 | return -EFAULT; | |
21a151d8 | 261 | if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname))) |
1da177e4 LT |
262 | return -EFAULT; |
263 | ||
e9ff3990 SH |
264 | error = __copy_to_user(&name->sysname, &utsname()->sysname, |
265 | __OLD_UTS_LEN); | |
266 | error -= __put_user(0, name->sysname + __OLD_UTS_LEN); | |
267 | error -= __copy_to_user(&name->nodename, &utsname()->nodename, | |
268 | __OLD_UTS_LEN); | |
269 | error -= __put_user(0, name->nodename + __OLD_UTS_LEN); | |
270 | error -= __copy_to_user(&name->release, &utsname()->release, | |
271 | __OLD_UTS_LEN); | |
272 | error -= __put_user(0, name->release + __OLD_UTS_LEN); | |
273 | error -= __copy_to_user(&name->version, &utsname()->version, | |
274 | __OLD_UTS_LEN); | |
275 | error -= __put_user(0, name->version + __OLD_UTS_LEN); | |
276 | error -= __copy_to_user(&name->machine, &utsname()->machine, | |
277 | __OLD_UTS_LEN); | |
278 | error = __put_user(0, name->machine + __OLD_UTS_LEN); | |
1da177e4 LT |
279 | error = error ? -EFAULT : 0; |
280 | ||
281 | return error; | |
282 | } | |
283 | ||
dbda6ac0 | 284 | SYSCALL_DEFINE1(set_thread_area, unsigned long, addr) |
3c37026d | 285 | { |
dc8f6029 | 286 | struct thread_info *ti = task_thread_info(current); |
3c37026d RB |
287 | |
288 | ti->tp_value = addr; | |
a3692020 RB |
289 | if (cpu_has_userlocal) |
290 | write_c0_userlocal(addr); | |
06be375b RB |
291 | |
292 | return 0; | |
3c37026d RB |
293 | } |
294 | ||
f1e39a4a RB |
295 | static inline int mips_atomic_set(struct pt_regs *regs, |
296 | unsigned long addr, unsigned long new) | |
1da177e4 | 297 | { |
f1e39a4a RB |
298 | unsigned long old, tmp; |
299 | unsigned int err; | |
300 | ||
301 | if (unlikely(addr & 3)) | |
302 | return -EINVAL; | |
303 | ||
304 | if (unlikely(!access_ok(VERIFY_WRITE, addr, 4))) | |
305 | return -EINVAL; | |
306 | ||
307 | if (cpu_has_llsc && R10000_LLSC_WAR) { | |
308 | __asm__ __volatile__ ( | |
309 | " li %[err], 0 \n" | |
310 | "1: ll %[old], (%[addr]) \n" | |
311 | " move %[tmp], %[new] \n" | |
312 | "2: sc %[tmp], (%[addr]) \n" | |
313 | " beqzl %[tmp], 1b \n" | |
314 | "3: \n" | |
315 | " .section .fixup,\"ax\" \n" | |
316 | "4: li %[err], %[efault] \n" | |
317 | " j 3b \n" | |
318 | " .previous \n" | |
319 | " .section __ex_table,\"a\" \n" | |
320 | " "STR(PTR)" 1b, 4b \n" | |
321 | " "STR(PTR)" 2b, 4b \n" | |
322 | " .previous \n" | |
323 | : [old] "=&r" (old), | |
324 | [err] "=&r" (err), | |
325 | [tmp] "=&r" (tmp) | |
326 | : [addr] "r" (addr), | |
327 | [new] "r" (new), | |
328 | [efault] "i" (-EFAULT) | |
329 | : "memory"); | |
330 | } else if (cpu_has_llsc) { | |
331 | __asm__ __volatile__ ( | |
332 | " li %[err], 0 \n" | |
333 | "1: ll %[old], (%[addr]) \n" | |
334 | " move %[tmp], %[new] \n" | |
335 | "2: sc %[tmp], (%[addr]) \n" | |
336 | " bnez %[tmp], 4f \n" | |
337 | "3: \n" | |
338 | " .subsection 2 \n" | |
339 | "4: b 1b \n" | |
340 | " .previous \n" | |
341 | " \n" | |
342 | " .section .fixup,\"ax\" \n" | |
343 | "5: li %[err], %[efault] \n" | |
344 | " j 3b \n" | |
345 | " .previous \n" | |
346 | " .section __ex_table,\"a\" \n" | |
347 | " "STR(PTR)" 1b, 5b \n" | |
348 | " "STR(PTR)" 2b, 5b \n" | |
349 | " .previous \n" | |
350 | : [old] "=&r" (old), | |
351 | [err] "=&r" (err), | |
352 | [tmp] "=&r" (tmp) | |
353 | : [addr] "r" (addr), | |
354 | [new] "r" (new), | |
355 | [efault] "i" (-EFAULT) | |
356 | : "memory"); | |
357 | } else { | |
358 | do { | |
359 | preempt_disable(); | |
360 | ll_bit = 1; | |
361 | ll_task = current; | |
362 | preempt_enable(); | |
363 | ||
364 | err = __get_user(old, (unsigned int *) addr); | |
365 | err |= __put_user(new, (unsigned int *) addr); | |
366 | if (err) | |
367 | break; | |
368 | rmb(); | |
369 | } while (!ll_bit); | |
370 | } | |
371 | ||
372 | if (unlikely(err)) | |
373 | return err; | |
374 | ||
375 | regs->regs[2] = old; | |
376 | regs->regs[7] = 0; /* No error */ | |
377 | ||
378 | /* | |
379 | * Don't let your children do this ... | |
380 | */ | |
381 | __asm__ __volatile__( | |
382 | " move $29, %0 \n" | |
383 | " j syscall_exit \n" | |
384 | : /* no outputs */ | |
385 | : "r" (regs)); | |
386 | ||
387 | /* unreached. Honestly. */ | |
388 | while (1); | |
389 | } | |
390 | ||
391 | save_static_function(sys_sysmips); | |
392 | static int __used noinline | |
393 | _sys_sysmips(nabi_no_regargs struct pt_regs regs) | |
394 | { | |
395 | long cmd, arg1, arg2, arg3; | |
396 | ||
397 | cmd = regs.regs[4]; | |
398 | arg1 = regs.regs[5]; | |
399 | arg2 = regs.regs[6]; | |
400 | arg3 = regs.regs[7]; | |
401 | ||
293c5bd1 | 402 | switch (cmd) { |
1da177e4 | 403 | case MIPS_ATOMIC_SET: |
f1e39a4a | 404 | return mips_atomic_set(®s, arg1, arg2); |
1da177e4 LT |
405 | |
406 | case MIPS_FIXADE: | |
293c5bd1 RB |
407 | if (arg1 & ~3) |
408 | return -EINVAL; | |
409 | ||
410 | if (arg1 & 1) | |
411 | set_thread_flag(TIF_FIXADE); | |
412 | else | |
413 | clear_thread_flag(TIF_FIXADE); | |
414 | if (arg1 & 2) | |
415 | set_thread_flag(TIF_LOGADE); | |
416 | else | |
417 | clear_thread_flag(TIF_FIXADE); | |
418 | ||
1da177e4 LT |
419 | return 0; |
420 | ||
421 | case FLUSH_CACHE: | |
422 | __flush_cache_all(); | |
423 | return 0; | |
1da177e4 LT |
424 | } |
425 | ||
426 | return -EINVAL; | |
427 | } | |
428 | ||
429 | /* | |
430 | * sys_ipc() is the de-multiplexer for the SysV IPC calls.. | |
431 | * | |
432 | * This is really horribly ugly. | |
433 | */ | |
dbda6ac0 RB |
434 | SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, int, second, |
435 | unsigned long, third, void __user *, ptr, long, fifth) | |
1da177e4 LT |
436 | { |
437 | int version, ret; | |
438 | ||
439 | version = call >> 16; /* hack for backward compatibility */ | |
440 | call &= 0xffff; | |
441 | ||
442 | switch (call) { | |
443 | case SEMOP: | |
49a89efb RB |
444 | return sys_semtimedop(first, (struct sembuf __user *)ptr, |
445 | second, NULL); | |
1da177e4 | 446 | case SEMTIMEDOP: |
49a89efb RB |
447 | return sys_semtimedop(first, (struct sembuf __user *)ptr, |
448 | second, | |
449 | (const struct timespec __user *)fifth); | |
1da177e4 | 450 | case SEMGET: |
49a89efb | 451 | return sys_semget(first, second, third); |
1da177e4 LT |
452 | case SEMCTL: { |
453 | union semun fourth; | |
454 | if (!ptr) | |
455 | return -EINVAL; | |
219ac73a | 456 | if (get_user(fourth.__pad, (void __user *__user *) ptr)) |
1da177e4 | 457 | return -EFAULT; |
49a89efb | 458 | return sys_semctl(first, second, third, fourth); |
1da177e4 LT |
459 | } |
460 | ||
461 | case MSGSND: | |
49a89efb RB |
462 | return sys_msgsnd(first, (struct msgbuf __user *) ptr, |
463 | second, third); | |
1da177e4 LT |
464 | case MSGRCV: |
465 | switch (version) { | |
466 | case 0: { | |
467 | struct ipc_kludge tmp; | |
468 | if (!ptr) | |
469 | return -EINVAL; | |
470 | ||
471 | if (copy_from_user(&tmp, | |
be6e518b | 472 | (struct ipc_kludge __user *) ptr, |
49a89efb | 473 | sizeof(tmp))) |
1da177e4 | 474 | return -EFAULT; |
49a89efb RB |
475 | return sys_msgrcv(first, tmp.msgp, second, |
476 | tmp.msgtyp, third); | |
1da177e4 LT |
477 | } |
478 | default: | |
49a89efb RB |
479 | return sys_msgrcv(first, |
480 | (struct msgbuf __user *) ptr, | |
481 | second, fifth, third); | |
1da177e4 LT |
482 | } |
483 | case MSGGET: | |
49a89efb | 484 | return sys_msgget((key_t) first, second); |
1da177e4 | 485 | case MSGCTL: |
49a89efb RB |
486 | return sys_msgctl(first, second, |
487 | (struct msqid_ds __user *) ptr); | |
1da177e4 LT |
488 | |
489 | case SHMAT: | |
490 | switch (version) { | |
491 | default: { | |
fc103349 | 492 | unsigned long raddr; |
49a89efb RB |
493 | ret = do_shmat(first, (char __user *) ptr, second, |
494 | &raddr); | |
1da177e4 LT |
495 | if (ret) |
496 | return ret; | |
49a89efb | 497 | return put_user(raddr, (unsigned long __user *) third); |
1da177e4 LT |
498 | } |
499 | case 1: /* iBCS2 emulator entry point */ | |
500 | if (!segment_eq(get_fs(), get_ds())) | |
501 | return -EINVAL; | |
49a89efb RB |
502 | return do_shmat(first, (char __user *) ptr, second, |
503 | (unsigned long *) third); | |
1da177e4 LT |
504 | } |
505 | case SHMDT: | |
49a89efb | 506 | return sys_shmdt((char __user *)ptr); |
1da177e4 | 507 | case SHMGET: |
49a89efb | 508 | return sys_shmget(first, second, third); |
1da177e4 | 509 | case SHMCTL: |
49a89efb RB |
510 | return sys_shmctl(first, second, |
511 | (struct shmid_ds __user *) ptr); | |
1da177e4 LT |
512 | default: |
513 | return -ENOSYS; | |
514 | } | |
515 | } | |
516 | ||
1da177e4 LT |
517 | /* |
518 | * No implemented yet ... | |
519 | */ | |
dbda6ac0 | 520 | SYSCALL_DEFINE3(cachectl, char *, addr, int, nbytes, int, op) |
1da177e4 LT |
521 | { |
522 | return -ENOSYS; | |
523 | } | |
524 | ||
525 | /* | |
526 | * If we ever come here the user sp is bad. Zap the process right away. | |
527 | * Due to the bad stack signaling wouldn't work. | |
528 | */ | |
529 | asmlinkage void bad_stack(void) | |
530 | { | |
531 | do_exit(SIGSEGV); | |
532 | } | |
fe74290d AB |
533 | |
534 | /* | |
535 | * Do a system call from kernel instead of calling sys_execve so we | |
536 | * end up with proper pt_regs. | |
537 | */ | |
538 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | |
539 | { | |
540 | register unsigned long __a0 asm("$4") = (unsigned long) filename; | |
541 | register unsigned long __a1 asm("$5") = (unsigned long) argv; | |
542 | register unsigned long __a2 asm("$6") = (unsigned long) envp; | |
543 | register unsigned long __a3 asm("$7"); | |
544 | unsigned long __v0; | |
545 | ||
546 | __asm__ volatile (" \n" | |
547 | " .set noreorder \n" | |
548 | " li $2, %5 # __NR_execve \n" | |
549 | " syscall \n" | |
550 | " move %0, $2 \n" | |
551 | " .set reorder \n" | |
552 | : "=&r" (__v0), "=r" (__a3) | |
553 | : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_execve) | |
554 | : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", | |
555 | "memory"); | |
556 | ||
557 | if (__a3 == 0) | |
558 | return __v0; | |
559 | ||
560 | return -__v0; | |
561 | } |