diff options
-rw-r--r-- | arch/ia64/kernel/process.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_ringbuffer.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 1 | ||||
-rw-r--r-- | include/asm-cris/unistd.h | 61 | ||||
-rw-r--r-- | include/asm-frv/unistd.h | 25 | ||||
-rw-r--r-- | include/asm-h8300/unistd.h | 51 | ||||
-rw-r--r-- | include/asm-i386/unistd.h | 39 | ||||
-rw-r--r-- | include/asm-m32r/unistd.h | 37 | ||||
-rw-r--r-- | include/asm-m68k/unistd.h | 6 | ||||
-rw-r--r-- | include/asm-m68knommu/unistd.h | 55 | ||||
-rw-r--r-- | include/asm-mips/unistd.h | 39 | ||||
-rw-r--r-- | include/asm-s390/unistd.h | 51 | ||||
-rw-r--r-- | include/asm-sh/unistd.h | 70 | ||||
-rw-r--r-- | include/asm-sh64/unistd.h | 41 | ||||
-rw-r--r-- | include/asm-sparc/unistd.h | 47 | ||||
-rw-r--r-- | include/asm-sparc64/unistd.h | 42 | ||||
-rw-r--r-- | include/asm-v850/unistd.h | 51 | ||||
-rw-r--r-- | include/asm-xtensa/unistd.h | 5 | ||||
-rw-r--r-- | include/linux/unistd.h | 6 | ||||
-rw-r--r-- | lib/Makefile | 4 | ||||
-rw-r--r-- | lib/errno.c | 7 | ||||
-rw-r--r-- | lib/execve.c | 23 |
22 files changed, 2 insertions, 662 deletions
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index ea914cc6812a..51922b98086a 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c | |||
@@ -8,8 +8,6 @@ | |||
8 | * 2005-10-07 Keith Owens <kaos@sgi.com> | 8 | * 2005-10-07 Keith Owens <kaos@sgi.com> |
9 | * Add notify_die() hooks. | 9 | * Add notify_die() hooks. |
10 | */ | 10 | */ |
11 | #define __KERNEL_SYSCALLS__ /* see <asm/unistd.h> */ | ||
12 | |||
13 | #include <linux/cpu.h> | 11 | #include <linux/cpu.h> |
14 | #include <linux/pm.h> | 12 | #include <linux/pm.h> |
15 | #include <linux/elf.h> | 13 | #include <linux/elf.h> |
diff --git a/drivers/media/dvb/dvb-core/dvb_ringbuffer.c b/drivers/media/dvb/dvb-core/dvb_ringbuffer.c index c972fe014c58..9878183ba3f0 100644 --- a/drivers/media/dvb/dvb-core/dvb_ringbuffer.c +++ b/drivers/media/dvb/dvb-core/dvb_ringbuffer.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | 27 | ||
28 | 28 | ||
29 | #define __KERNEL_SYSCALLS__ | ||
30 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 97937809de09..eddfa8786e83 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -150,7 +150,6 @@ that only one external action is invoked at a time. | |||
150 | #include <linux/skbuff.h> | 150 | #include <linux/skbuff.h> |
151 | #include <asm/uaccess.h> | 151 | #include <asm/uaccess.h> |
152 | #include <asm/io.h> | 152 | #include <asm/io.h> |
153 | #define __KERNEL_SYSCALLS__ | ||
154 | #include <linux/fs.h> | 153 | #include <linux/fs.h> |
155 | #include <linux/mm.h> | 154 | #include <linux/mm.h> |
156 | #include <linux/slab.h> | 155 | #include <linux/slab.h> |
diff --git a/include/asm-cris/unistd.h b/include/asm-cris/unistd.h index 7372efae0516..7c90fa970c38 100644 --- a/include/asm-cris/unistd.h +++ b/include/asm-cris/unistd.h | |||
@@ -322,67 +322,6 @@ | |||
322 | #define __ARCH_WANT_SYS_SIGPROCMASK | 322 | #define __ARCH_WANT_SYS_SIGPROCMASK |
323 | #define __ARCH_WANT_SYS_RT_SIGACTION | 323 | #define __ARCH_WANT_SYS_RT_SIGACTION |
324 | 324 | ||
325 | #ifdef __KERNEL_SYSCALLS__ | ||
326 | |||
327 | #include <linux/compiler.h> | ||
328 | #include <linux/types.h> | ||
329 | #include <linux/linkage.h> | ||
330 | |||
331 | /* | ||
332 | * we need this inline - forking from kernel space will result | ||
333 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
334 | * is no problem, but for the stack. This is handled by not letting | ||
335 | * main() use the stack at all after fork(). Thus, no function | ||
336 | * calls - which means inline code for fork too, as otherwise we | ||
337 | * would use the stack upon exit from 'fork()'. | ||
338 | * | ||
339 | * Actually only pause and fork are needed inline, so that there | ||
340 | * won't be any messing with the stack from main(), but we define | ||
341 | * some others too. | ||
342 | */ | ||
343 | #define __NR__exit __NR_exit | ||
344 | static inline _syscall0(pid_t,setsid) | ||
345 | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
346 | static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
347 | static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
348 | static inline _syscall1(int,dup,int,fd) | ||
349 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
350 | static inline _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
351 | static inline _syscall1(int,close,int,fd) | ||
352 | |||
353 | struct pt_regs; | ||
354 | asmlinkage long sys_mmap2( | ||
355 | unsigned long addr, unsigned long len, | ||
356 | unsigned long prot, unsigned long flags, | ||
357 | unsigned long fd, unsigned long pgoff); | ||
358 | asmlinkage int sys_execve(const char *fname, char **argv, char **envp, | ||
359 | long r13, long mof, long srp, struct pt_regs *regs); | ||
360 | asmlinkage int sys_clone(unsigned long newusp, unsigned long flags, | ||
361 | int* parent_tid, int* child_tid, long mof, long srp, | ||
362 | struct pt_regs *regs); | ||
363 | asmlinkage int sys_fork(long r10, long r11, long r12, long r13, | ||
364 | long mof, long srp, struct pt_regs *regs); | ||
365 | asmlinkage int sys_vfork(long r10, long r11, long r12, long r13, | ||
366 | long mof, long srp, struct pt_regs *regs); | ||
367 | asmlinkage int sys_pipe(unsigned long __user *fildes); | ||
368 | struct sigaction; | ||
369 | asmlinkage long sys_rt_sigaction(int sig, | ||
370 | const struct sigaction __user *act, | ||
371 | struct sigaction __user *oact, | ||
372 | size_t sigsetsize); | ||
373 | |||
374 | /* | ||
375 | * Since we define it "external", it collides with the built-in | ||
376 | * definition, which has the "noreturn" attribute and will cause | ||
377 | * complaints. We don't want to use -fno-builtin, so just use a | ||
378 | * different name when in the kernel. | ||
379 | */ | ||
380 | #define _exit kernel_syscall_exit | ||
381 | static inline _syscall1(int,_exit,int,exitcode) | ||
382 | static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
383 | #endif /* __KERNEL_SYSCALLS__ */ | ||
384 | |||
385 | |||
386 | /* | 325 | /* |
387 | * "Conditional" syscalls | 326 | * "Conditional" syscalls |
388 | * | 327 | * |
diff --git a/include/asm-frv/unistd.h b/include/asm-frv/unistd.h index d104d1b91d39..725e854928cf 100644 --- a/include/asm-frv/unistd.h +++ b/include/asm-frv/unistd.h | |||
@@ -440,31 +440,6 @@ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg | |||
440 | __syscall_return(type, __sc0); \ | 440 | __syscall_return(type, __sc0); \ |
441 | } | 441 | } |
442 | 442 | ||
443 | |||
444 | #ifdef __KERNEL_SYSCALLS__ | ||
445 | |||
446 | #include <linux/compiler.h> | ||
447 | #include <linux/types.h> | ||
448 | #include <linux/linkage.h> | ||
449 | #include <asm/ptrace.h> | ||
450 | |||
451 | /* | ||
452 | * we need this inline - forking from kernel space will result | ||
453 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
454 | * is no problem, but for the stack. This is handled by not letting | ||
455 | * main() use the stack at all after fork(). Thus, no function | ||
456 | * calls - which means inline code for fork too, as otherwise we | ||
457 | * would use the stack upon exit from 'fork()'. | ||
458 | * | ||
459 | * Actually only pause and fork are needed inline, so that there | ||
460 | * won't be any messing with the stack from main(), but we define | ||
461 | * some others too. | ||
462 | */ | ||
463 | #define __NR__exit __NR_exit | ||
464 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
465 | |||
466 | #endif /* __KERNEL_SYSCALLS__ */ | ||
467 | |||
468 | #define __ARCH_WANT_IPC_PARSE_VERSION | 443 | #define __ARCH_WANT_IPC_PARSE_VERSION |
469 | /* #define __ARCH_WANT_OLD_READDIR */ | 444 | /* #define __ARCH_WANT_OLD_READDIR */ |
470 | #define __ARCH_WANT_OLD_STAT | 445 | #define __ARCH_WANT_OLD_STAT |
diff --git a/include/asm-h8300/unistd.h b/include/asm-h8300/unistd.h index a2dd90462d80..747788d629ae 100644 --- a/include/asm-h8300/unistd.h +++ b/include/asm-h8300/unistd.h | |||
@@ -485,57 +485,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e, ftype f) \ | |||
485 | #define __ARCH_WANT_SYS_SIGPROCMASK | 485 | #define __ARCH_WANT_SYS_SIGPROCMASK |
486 | #define __ARCH_WANT_SYS_RT_SIGACTION | 486 | #define __ARCH_WANT_SYS_RT_SIGACTION |
487 | 487 | ||
488 | #ifdef __KERNEL_SYSCALLS__ | ||
489 | |||
490 | #include <linux/compiler.h> | ||
491 | #include <linux/types.h> | ||
492 | |||
493 | /* | ||
494 | * we need this inline - forking from kernel space will result | ||
495 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
496 | * is no problem, but for the stack. This is handled by not letting | ||
497 | * main() use the stack at all after fork(). Thus, no function | ||
498 | * calls - which means inline code for fork too, as otherwise we | ||
499 | * would use the stack upon exit from 'fork()'. | ||
500 | * | ||
501 | * Actually only pause and fork are needed inline, so that there | ||
502 | * won't be any messing with the stack from main(), but we define | ||
503 | * some others too. | ||
504 | */ | ||
505 | #define __NR__exit __NR_exit | ||
506 | static inline _syscall0(int,pause) | ||
507 | static inline _syscall0(int,sync) | ||
508 | static inline _syscall0(pid_t,setsid) | ||
509 | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
510 | static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
511 | static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
512 | static inline _syscall1(int,dup,int,fd) | ||
513 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
514 | static inline _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
515 | static inline _syscall1(int,close,int,fd) | ||
516 | static inline _syscall1(int,_exit,int,exitcode) | ||
517 | static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
518 | static inline _syscall1(int,delete_module,const char *,name) | ||
519 | |||
520 | static inline pid_t wait(int * wait_stat) | ||
521 | { | ||
522 | return waitpid(-1,wait_stat,0); | ||
523 | } | ||
524 | |||
525 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
526 | unsigned long prot, unsigned long flags, | ||
527 | unsigned long fd, unsigned long pgoff); | ||
528 | asmlinkage int sys_execve(char *name, char **argv, char **envp, | ||
529 | int dummy, ...); | ||
530 | asmlinkage int sys_pipe(unsigned long *fildes); | ||
531 | struct sigaction; | ||
532 | asmlinkage long sys_rt_sigaction(int sig, | ||
533 | const struct sigaction __user *act, | ||
534 | struct sigaction __user *oact, | ||
535 | size_t sigsetsize); | ||
536 | |||
537 | #endif /* __KERNEL_SYSCALLS__ */ | ||
538 | |||
539 | /* | 488 | /* |
540 | * "Conditional" syscalls | 489 | * "Conditional" syscalls |
541 | */ | 490 | */ |
diff --git a/include/asm-i386/unistd.h b/include/asm-i386/unistd.h index bd9987087adc..3ca7ab963d7d 100644 --- a/include/asm-i386/unistd.h +++ b/include/asm-i386/unistd.h | |||
@@ -451,45 +451,6 @@ __syscall_return(type,__res); \ | |||
451 | #define __ARCH_WANT_SYS_RT_SIGACTION | 451 | #define __ARCH_WANT_SYS_RT_SIGACTION |
452 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 452 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
453 | 453 | ||
454 | #ifdef __KERNEL_SYSCALLS__ | ||
455 | |||
456 | #include <linux/compiler.h> | ||
457 | #include <linux/types.h> | ||
458 | #include <linux/linkage.h> | ||
459 | #include <asm/ptrace.h> | ||
460 | |||
461 | /* | ||
462 | * we need this inline - forking from kernel space will result | ||
463 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
464 | * is no problem, but for the stack. This is handled by not letting | ||
465 | * main() use the stack at all after fork(). Thus, no function | ||
466 | * calls - which means inline code for fork too, as otherwise we | ||
467 | * would use the stack upon exit from 'fork()'. | ||
468 | * | ||
469 | * Actually only pause and fork are needed inline, so that there | ||
470 | * won't be any messing with the stack from main(), but we define | ||
471 | * some others too. | ||
472 | */ | ||
473 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
474 | |||
475 | asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount); | ||
476 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
477 | unsigned long prot, unsigned long flags, | ||
478 | unsigned long fd, unsigned long pgoff); | ||
479 | asmlinkage int sys_execve(struct pt_regs regs); | ||
480 | asmlinkage int sys_clone(struct pt_regs regs); | ||
481 | asmlinkage int sys_fork(struct pt_regs regs); | ||
482 | asmlinkage int sys_vfork(struct pt_regs regs); | ||
483 | asmlinkage int sys_pipe(unsigned long __user *fildes); | ||
484 | asmlinkage long sys_iopl(unsigned long unused); | ||
485 | struct sigaction; | ||
486 | asmlinkage long sys_rt_sigaction(int sig, | ||
487 | const struct sigaction __user *act, | ||
488 | struct sigaction __user *oact, | ||
489 | size_t sigsetsize); | ||
490 | |||
491 | #endif /* __KERNEL_SYSCALLS__ */ | ||
492 | |||
493 | /* | 454 | /* |
494 | * "Conditional" syscalls | 455 | * "Conditional" syscalls |
495 | * | 456 | * |
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h index 5c6a9ac6cf1a..95aa34298d82 100644 --- a/include/asm-m32r/unistd.h +++ b/include/asm-m32r/unistd.h | |||
@@ -424,43 +424,6 @@ __syscall_return(type,__res); \ | |||
424 | #define __ARCH_WANT_SYS_OLDUMOUNT | 424 | #define __ARCH_WANT_SYS_OLDUMOUNT |
425 | #define __ARCH_WANT_SYS_RT_SIGACTION | 425 | #define __ARCH_WANT_SYS_RT_SIGACTION |
426 | 426 | ||
427 | #ifdef __KERNEL_SYSCALLS__ | ||
428 | |||
429 | #include <linux/compiler.h> | ||
430 | #include <linux/types.h> | ||
431 | #include <linux/linkage.h> | ||
432 | #include <asm/ptrace.h> | ||
433 | |||
434 | /* | ||
435 | * we need this inline - forking from kernel space will result | ||
436 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
437 | * is no problem, but for the stack. This is handled by not letting | ||
438 | * main() use the stack at all after fork(). Thus, no function | ||
439 | * calls - which means inline code for fork too, as otherwise we | ||
440 | * would use the stack upon exit from 'fork()'. | ||
441 | * | ||
442 | * Actually only pause and fork are needed inline, so that there | ||
443 | * won't be any messing with the stack from main(), but we define | ||
444 | * some others too. | ||
445 | */ | ||
446 | static __inline__ _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
447 | |||
448 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
449 | unsigned long prot, unsigned long flags, | ||
450 | unsigned long fd, unsigned long pgoff); | ||
451 | asmlinkage int sys_execve(struct pt_regs regs); | ||
452 | asmlinkage int sys_clone(struct pt_regs regs); | ||
453 | asmlinkage int sys_fork(struct pt_regs regs); | ||
454 | asmlinkage int sys_vfork(struct pt_regs regs); | ||
455 | asmlinkage int sys_pipe(unsigned long __user *fildes); | ||
456 | struct sigaction; | ||
457 | asmlinkage long sys_rt_sigaction(int sig, | ||
458 | const struct sigaction __user *act, | ||
459 | struct sigaction __user *oact, | ||
460 | size_t sigsetsize); | ||
461 | |||
462 | #endif /* __KERNEL_SYSCALLS__ */ | ||
463 | |||
464 | /* | 427 | /* |
465 | * "Conditional" syscalls | 428 | * "Conditional" syscalls |
466 | * | 429 | * |
diff --git a/include/asm-m68k/unistd.h b/include/asm-m68k/unistd.h index 751632b904db..3ab716f0fc18 100644 --- a/include/asm-m68k/unistd.h +++ b/include/asm-m68k/unistd.h | |||
@@ -409,12 +409,6 @@ __syscall_return(type,__res); \ | |||
409 | #define __ARCH_WANT_SYS_SIGPROCMASK | 409 | #define __ARCH_WANT_SYS_SIGPROCMASK |
410 | #define __ARCH_WANT_SYS_RT_SIGACTION | 410 | #define __ARCH_WANT_SYS_RT_SIGACTION |
411 | 411 | ||
412 | #ifdef __KERNEL_SYSCALLS__ | ||
413 | |||
414 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
415 | |||
416 | #endif /* __KERNEL_SYSCALLS__ */ | ||
417 | |||
418 | /* | 412 | /* |
419 | * "Conditional" syscalls | 413 | * "Conditional" syscalls |
420 | * | 414 | * |
diff --git a/include/asm-m68knommu/unistd.h b/include/asm-m68knommu/unistd.h index 21fdc37c5c2c..daafb5d43ef1 100644 --- a/include/asm-m68knommu/unistd.h +++ b/include/asm-m68knommu/unistd.h | |||
@@ -463,61 +463,6 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \ | |||
463 | #define __ARCH_WANT_SYS_SIGPROCMASK | 463 | #define __ARCH_WANT_SYS_SIGPROCMASK |
464 | #define __ARCH_WANT_SYS_RT_SIGACTION | 464 | #define __ARCH_WANT_SYS_RT_SIGACTION |
465 | 465 | ||
466 | #ifdef __KERNEL_SYSCALLS__ | ||
467 | |||
468 | #include <linux/compiler.h> | ||
469 | #include <linux/interrupt.h> | ||
470 | #include <linux/types.h> | ||
471 | |||
472 | /* | ||
473 | * we need this inline - forking from kernel space will result | ||
474 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
475 | * is no problem, but for the stack. This is handled by not letting | ||
476 | * main() use the stack at all after fork(). Thus, no function | ||
477 | * calls - which means inline code for fork too, as otherwise we | ||
478 | * would use the stack upon exit from 'fork()'. | ||
479 | * | ||
480 | * Actually only pause and fork are needed inline, so that there | ||
481 | * won't be any messing with the stack from main(), but we define | ||
482 | * some others too. | ||
483 | */ | ||
484 | #define __NR__exit __NR_exit | ||
485 | static inline _syscall0(int,pause) | ||
486 | static inline _syscall0(int,sync) | ||
487 | static inline _syscall0(pid_t,setsid) | ||
488 | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
489 | static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
490 | static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
491 | static inline _syscall1(int,dup,int,fd) | ||
492 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
493 | static inline _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
494 | static inline _syscall1(int,close,int,fd) | ||
495 | static inline _syscall1(int,_exit,int,exitcode) | ||
496 | static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
497 | static inline _syscall1(int,delete_module,const char *,name) | ||
498 | |||
499 | static inline pid_t wait(int * wait_stat) | ||
500 | { | ||
501 | return waitpid(-1,wait_stat,0); | ||
502 | } | ||
503 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
504 | unsigned long prot, unsigned long flags, | ||
505 | unsigned long fd, unsigned long pgoff); | ||
506 | asmlinkage int sys_execve(char *name, char **argv, char **envp); | ||
507 | asmlinkage int sys_pipe(unsigned long *fildes); | ||
508 | struct pt_regs; | ||
509 | int sys_request_irq(unsigned int, | ||
510 | irqreturn_t (*)(int, void *, struct pt_regs *), | ||
511 | unsigned long, const char *, void *); | ||
512 | void sys_free_irq(unsigned int, void *); | ||
513 | struct sigaction; | ||
514 | asmlinkage long sys_rt_sigaction(int sig, | ||
515 | const struct sigaction __user *act, | ||
516 | struct sigaction __user *oact, | ||
517 | size_t sigsetsize); | ||
518 | |||
519 | #endif /* __KERNEL_SYSCALLS__ */ | ||
520 | |||
521 | /* | 466 | /* |
522 | * "Conditional" syscalls | 467 | * "Conditional" syscalls |
523 | * | 468 | * |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index c39142920fe6..685c91467e63 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -1212,45 +1212,6 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ | |||
1212 | # define __ARCH_WANT_COMPAT_SYS_TIME | 1212 | # define __ARCH_WANT_COMPAT_SYS_TIME |
1213 | # endif | 1213 | # endif |
1214 | 1214 | ||
1215 | #ifdef __KERNEL_SYSCALLS__ | ||
1216 | |||
1217 | #include <linux/compiler.h> | ||
1218 | #include <linux/types.h> | ||
1219 | #include <linux/linkage.h> | ||
1220 | #include <asm/ptrace.h> | ||
1221 | #include <asm/sim.h> | ||
1222 | |||
1223 | /* | ||
1224 | * we need this inline - forking from kernel space will result | ||
1225 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
1226 | * is no problem, but for the stack. This is handled by not letting | ||
1227 | * main() use the stack at all after fork(). Thus, no function | ||
1228 | * calls - which means inline code for fork too, as otherwise we | ||
1229 | * would use the stack upon exit from 'fork()'. | ||
1230 | * | ||
1231 | * Actually only pause and fork are needed inline, so that there | ||
1232 | * won't be any messing with the stack from main(), but we define | ||
1233 | * some others too. | ||
1234 | */ | ||
1235 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
1236 | |||
1237 | asmlinkage unsigned long sys_mmap( | ||
1238 | unsigned long addr, size_t len, | ||
1239 | int prot, int flags, | ||
1240 | int fd, off_t offset); | ||
1241 | asmlinkage long sys_mmap2( | ||
1242 | unsigned long addr, unsigned long len, | ||
1243 | unsigned long prot, unsigned long flags, | ||
1244 | unsigned long fd, unsigned long pgoff); | ||
1245 | asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs); | ||
1246 | asmlinkage int sys_pipe(nabi_no_regargs struct pt_regs regs); | ||
1247 | struct sigaction; | ||
1248 | asmlinkage long sys_rt_sigaction(int sig, | ||
1249 | const struct sigaction __user *act, | ||
1250 | struct sigaction __user *oact, | ||
1251 | size_t sigsetsize); | ||
1252 | |||
1253 | #endif /* __KERNEL_SYSCALLS__ */ | ||
1254 | #endif /* !__ASSEMBLY__ */ | 1215 | #endif /* !__ASSEMBLY__ */ |
1255 | 1216 | ||
1256 | /* | 1217 | /* |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index 0361ac5dcde3..0cccfd83c457 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -523,57 +523,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ | |||
523 | # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | 523 | # define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
524 | # endif | 524 | # endif |
525 | 525 | ||
526 | #ifdef __KERNEL_SYSCALLS__ | ||
527 | |||
528 | #include <linux/compiler.h> | ||
529 | #include <linux/types.h> | ||
530 | #include <asm/ptrace.h> | ||
531 | #include <asm/stat.h> | ||
532 | #include <linux/syscalls.h> | ||
533 | |||
534 | /* | ||
535 | * we need this inline - forking from kernel space will result | ||
536 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
537 | * is no problem, but for the stack. This is handled by not letting | ||
538 | * main() use the stack at all after fork(). Thus, no function | ||
539 | * calls - which means inline code for fork too, as otherwise we | ||
540 | * would use the stack upon exit from 'fork()'. | ||
541 | * | ||
542 | * Actually only pause and fork are needed inline, so that there | ||
543 | * won't be any messing with the stack from main(), but we define | ||
544 | * some others too. | ||
545 | */ | ||
546 | #define __NR__exit __NR_exit | ||
547 | static inline _syscall0(pid_t,setsid) | ||
548 | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
549 | static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
550 | static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
551 | static inline _syscall1(int,dup,int,fd) | ||
552 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
553 | static inline _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
554 | static inline _syscall1(int,close,int,fd) | ||
555 | static inline _syscall2(long,stat,char *,filename,struct stat *,statbuf) | ||
556 | |||
557 | static inline pid_t waitpid(int pid, int *wait_stat, int flags) | ||
558 | { | ||
559 | return sys_wait4(pid, wait_stat, flags, NULL); | ||
560 | } | ||
561 | struct mmap_arg_struct; | ||
562 | asmlinkage long sys_mmap2(struct mmap_arg_struct __user *arg); | ||
563 | |||
564 | asmlinkage long sys_execve(struct pt_regs regs); | ||
565 | asmlinkage long sys_clone(struct pt_regs regs); | ||
566 | asmlinkage long sys_fork(struct pt_regs regs); | ||
567 | asmlinkage long sys_vfork(struct pt_regs regs); | ||
568 | asmlinkage long sys_pipe(unsigned long __user *fildes); | ||
569 | struct sigaction; | ||
570 | asmlinkage long sys_rt_sigaction(int sig, | ||
571 | const struct sigaction __user *act, | ||
572 | struct sigaction __user *oact, | ||
573 | size_t sigsetsize); | ||
574 | |||
575 | #endif /* __KERNEL_SYSCALLS__ */ | ||
576 | |||
577 | /* | 526 | /* |
578 | * "Conditional" syscalls | 527 | * "Conditional" syscalls |
579 | * | 528 | * |
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h index 5d5e9f94def5..f1a0cbc966be 100644 --- a/include/asm-sh/unistd.h +++ b/include/asm-sh/unistd.h | |||
@@ -472,76 +472,6 @@ __syscall_return(type,__sc0); \ | |||
472 | #define __ARCH_WANT_SYS_RT_SIGACTION | 472 | #define __ARCH_WANT_SYS_RT_SIGACTION |
473 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 473 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
474 | 474 | ||
475 | #ifdef __KERNEL_SYSCALLS__ | ||
476 | |||
477 | #include <linux/compiler.h> | ||
478 | #include <linux/types.h> | ||
479 | #include <linux/linkage.h> | ||
480 | #include <asm/ptrace.h> | ||
481 | |||
482 | /* | ||
483 | * we need this inline - forking from kernel space will result | ||
484 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
485 | * is no problem, but for the stack. This is handled by not letting | ||
486 | * main() use the stack at all after fork(). Thus, no function | ||
487 | * calls - which means inline code for fork too, as otherwise we | ||
488 | * would use the stack upon exit from 'fork()'. | ||
489 | * | ||
490 | * Actually only pause and fork are needed inline, so that there | ||
491 | * won't be any messing with the stack from main(), but we define | ||
492 | * some others too. | ||
493 | */ | ||
494 | #define __NR__exit __NR_exit | ||
495 | static __inline__ _syscall0(int,pause) | ||
496 | static __inline__ _syscall0(int,sync) | ||
497 | static __inline__ _syscall0(pid_t,setsid) | ||
498 | static __inline__ _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
499 | static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
500 | static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
501 | static __inline__ _syscall1(int,dup,int,fd) | ||
502 | static __inline__ _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
503 | static __inline__ _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
504 | static __inline__ _syscall1(int,close,int,fd) | ||
505 | static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
506 | static __inline__ _syscall1(int,delete_module,const char *,name) | ||
507 | |||
508 | static __inline__ pid_t wait(int * wait_stat) | ||
509 | { | ||
510 | return waitpid(-1,wait_stat,0); | ||
511 | } | ||
512 | |||
513 | asmlinkage long sys_mmap2( | ||
514 | unsigned long addr, unsigned long len, | ||
515 | unsigned long prot, unsigned long flags, | ||
516 | unsigned long fd, unsigned long pgoff); | ||
517 | asmlinkage int sys_execve(char *ufilename, char **uargv, | ||
518 | char **uenvp, unsigned long r7, | ||
519 | struct pt_regs regs); | ||
520 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
521 | unsigned long parent_tidptr, | ||
522 | unsigned long child_tidptr, | ||
523 | struct pt_regs regs); | ||
524 | asmlinkage int sys_fork(unsigned long r4, unsigned long r5, | ||
525 | unsigned long r6, unsigned long r7, | ||
526 | struct pt_regs regs); | ||
527 | asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | ||
528 | unsigned long r6, unsigned long r7, | ||
529 | struct pt_regs regs); | ||
530 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | ||
531 | unsigned long r6, unsigned long r7, | ||
532 | struct pt_regs regs); | ||
533 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char *buf, | ||
534 | size_t count, long dummy, loff_t pos); | ||
535 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char *buf, | ||
536 | size_t count, long dummy, loff_t pos); | ||
537 | struct sigaction; | ||
538 | asmlinkage long sys_rt_sigaction(int sig, | ||
539 | const struct sigaction __user *act, | ||
540 | struct sigaction __user *oact, | ||
541 | size_t sigsetsize); | ||
542 | |||
543 | #endif /* __KERNEL_SYSCALLS__ */ | ||
544 | |||
545 | /* | 475 | /* |
546 | * "Conditional" syscalls | 476 | * "Conditional" syscalls |
547 | * | 477 | * |
diff --git a/include/asm-sh64/unistd.h b/include/asm-sh64/unistd.h index c113566bef33..ee7828b27ad1 100644 --- a/include/asm-sh64/unistd.h +++ b/include/asm-sh64/unistd.h | |||
@@ -513,47 +513,6 @@ __syscall_return(type,__sc0); \ | |||
513 | #define __ARCH_WANT_SYS_SIGPROCMASK | 513 | #define __ARCH_WANT_SYS_SIGPROCMASK |
514 | #define __ARCH_WANT_SYS_RT_SIGACTION | 514 | #define __ARCH_WANT_SYS_RT_SIGACTION |
515 | 515 | ||
516 | #ifdef __KERNEL_SYSCALLS__ | ||
517 | |||
518 | /* Copy from sh */ | ||
519 | #include <linux/compiler.h> | ||
520 | #include <linux/types.h> | ||
521 | #include <asm/ptrace.h> | ||
522 | |||
523 | /* | ||
524 | * we need this inline - forking from kernel space will result | ||
525 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
526 | * is no problem, but for the stack. This is handled by not letting | ||
527 | * main() use the stack at all after fork(). Thus, no function | ||
528 | * calls - which means inline code for fork too, as otherwise we | ||
529 | * would use the stack upon exit from 'fork()'. | ||
530 | * | ||
531 | * Actually only pause and fork are needed inline, so that there | ||
532 | * won't be any messing with the stack from main(), but we define | ||
533 | * some others too. | ||
534 | */ | ||
535 | #define __NR__exit __NR_exit | ||
536 | static inline _syscall0(int,pause) | ||
537 | static inline _syscall1(int,setup,int,magic) | ||
538 | static inline _syscall0(int,sync) | ||
539 | static inline _syscall0(pid_t,setsid) | ||
540 | static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
541 | static inline _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
542 | static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
543 | static inline _syscall1(int,dup,int,fd) | ||
544 | static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
545 | static inline _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
546 | static inline _syscall1(int,close,int,fd) | ||
547 | static inline _syscall1(int,_exit,int,exitcode) | ||
548 | static inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
549 | static inline _syscall1(int,delete_module,const char *,name) | ||
550 | |||
551 | static inline pid_t wait(int * wait_stat) | ||
552 | { | ||
553 | return waitpid(-1,wait_stat,0); | ||
554 | } | ||
555 | #endif /* __KERNEL_SYSCALLS__ */ | ||
556 | |||
557 | /* | 516 | /* |
558 | * "Conditional" syscalls | 517 | * "Conditional" syscalls |
559 | * | 518 | * |
diff --git a/include/asm-sparc/unistd.h b/include/asm-sparc/unistd.h index 2553762465ca..c7a495afc82e 100644 --- a/include/asm-sparc/unistd.h +++ b/include/asm-sparc/unistd.h | |||
@@ -478,53 +478,6 @@ return -1; \ | |||
478 | #define __ARCH_WANT_SYS_SIGPROCMASK | 478 | #define __ARCH_WANT_SYS_SIGPROCMASK |
479 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 479 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
480 | 480 | ||
481 | #ifdef __KERNEL_SYSCALLS__ | ||
482 | |||
483 | #include <linux/compiler.h> | ||
484 | #include <linux/types.h> | ||
485 | |||
486 | /* | ||
487 | * we need this inline - forking from kernel space will result | ||
488 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
489 | * is no problem, but for the stack. This is handled by not letting | ||
490 | * main() use the stack at all after fork(). Thus, no function | ||
491 | * calls - which means inline code for fork too, as otherwise we | ||
492 | * would use the stack upon exit from 'fork()'. | ||
493 | * | ||
494 | * Actually only pause and fork are needed inline, so that there | ||
495 | * won't be any messing with the stack from main(), but we define | ||
496 | * some others too. | ||
497 | */ | ||
498 | #define __NR__exit __NR_exit | ||
499 | static __inline__ _syscall0(pid_t,setsid) | ||
500 | static __inline__ _syscall3(int,write,int,fd,__const__ char *,buf,off_t,count) | ||
501 | static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
502 | static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
503 | static __inline__ _syscall1(int,dup,int,fd) | ||
504 | static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp) | ||
505 | static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode) | ||
506 | static __inline__ _syscall1(int,close,int,fd) | ||
507 | static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
508 | |||
509 | #include <linux/linkage.h> | ||
510 | |||
511 | asmlinkage unsigned long sys_mmap( | ||
512 | unsigned long addr, unsigned long len, | ||
513 | unsigned long prot, unsigned long flags, | ||
514 | unsigned long fd, unsigned long off); | ||
515 | asmlinkage unsigned long sys_mmap2( | ||
516 | unsigned long addr, unsigned long len, | ||
517 | unsigned long prot, unsigned long flags, | ||
518 | unsigned long fd, unsigned long pgoff); | ||
519 | struct sigaction; | ||
520 | asmlinkage long sys_rt_sigaction(int sig, | ||
521 | const struct sigaction __user *act, | ||
522 | struct sigaction __user *oact, | ||
523 | void __user *restorer, | ||
524 | size_t sigsetsize); | ||
525 | |||
526 | #endif /* __KERNEL_SYSCALLS__ */ | ||
527 | |||
528 | /* | 481 | /* |
529 | * "Conditional" syscalls | 482 | * "Conditional" syscalls |
530 | * | 483 | * |
diff --git a/include/asm-sparc64/unistd.h b/include/asm-sparc64/unistd.h index badc73fdcb97..124cf076717f 100644 --- a/include/asm-sparc64/unistd.h +++ b/include/asm-sparc64/unistd.h | |||
@@ -445,48 +445,6 @@ if (__res>=0) \ | |||
445 | errno = -__res; \ | 445 | errno = -__res; \ |
446 | return -1; \ | 446 | return -1; \ |
447 | } | 447 | } |
448 | #ifdef __KERNEL_SYSCALLS__ | ||
449 | |||
450 | #include <linux/compiler.h> | ||
451 | #include <linux/types.h> | ||
452 | |||
453 | /* | ||
454 | * we need this inline - forking from kernel space will result | ||
455 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
456 | * is no problem, but for the stack. This is handled by not letting | ||
457 | * main() use the stack at all after fork(). Thus, no function | ||
458 | * calls - which means inline code for fork too, as otherwise we | ||
459 | * would use the stack upon exit from 'fork()'. | ||
460 | * | ||
461 | * Actually only pause and fork are needed inline, so that there | ||
462 | * won't be any messing with the stack from main(), but we define | ||
463 | * some others too. | ||
464 | */ | ||
465 | #define __NR__exit __NR_exit | ||
466 | static __inline__ _syscall0(pid_t,setsid) | ||
467 | static __inline__ _syscall3(int,write,int,fd,__const__ char *,buf,off_t,count) | ||
468 | static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
469 | static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
470 | static __inline__ _syscall1(int,dup,int,fd) | ||
471 | static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp) | ||
472 | static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode) | ||
473 | static __inline__ _syscall1(int,close,int,fd) | ||
474 | static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
475 | |||
476 | #include <linux/linkage.h> | ||
477 | |||
478 | asmlinkage unsigned long sys_mmap( | ||
479 | unsigned long addr, unsigned long len, | ||
480 | unsigned long prot, unsigned long flags, | ||
481 | unsigned long fd, unsigned long off); | ||
482 | struct sigaction; | ||
483 | asmlinkage long sys_rt_sigaction(int sig, | ||
484 | const struct sigaction __user *act, | ||
485 | struct sigaction __user *oact, | ||
486 | void __user *restorer, | ||
487 | size_t sigsetsize); | ||
488 | |||
489 | #endif /* __KERNEL_SYSCALLS__ */ | ||
490 | 448 | ||
491 | /* sysconf options, for SunOS compatibility */ | 449 | /* sysconf options, for SunOS compatibility */ |
492 | #define _SC_ARG_MAX 1 | 450 | #define _SC_ARG_MAX 1 |
diff --git a/include/asm-v850/unistd.h b/include/asm-v850/unistd.h index 552b7c873a57..737401e7d3ad 100644 --- a/include/asm-v850/unistd.h +++ b/include/asm-v850/unistd.h | |||
@@ -387,57 +387,6 @@ type name (atype a, btype b, ctype c, dtype d, etype e, ftype f) \ | |||
387 | #define __ARCH_WANT_SYS_SIGPROCMASK | 387 | #define __ARCH_WANT_SYS_SIGPROCMASK |
388 | #define __ARCH_WANT_SYS_RT_SIGACTION | 388 | #define __ARCH_WANT_SYS_RT_SIGACTION |
389 | 389 | ||
390 | #ifdef __KERNEL_SYSCALLS__ | ||
391 | |||
392 | #include <linux/compiler.h> | ||
393 | #include <linux/types.h> | ||
394 | |||
395 | /* | ||
396 | * we need this inline - forking from kernel space will result | ||
397 | * in NO COPY ON WRITE (!!!), until an execve is executed. This | ||
398 | * is no problem, but for the stack. This is handled by not letting | ||
399 | * main() use the stack at all after fork(). Thus, no function | ||
400 | * calls - which means inline code for fork too, as otherwise we | ||
401 | * would use the stack upon exit from 'fork()'. | ||
402 | * | ||
403 | * Actually only pause and fork are needed inline, so that there | ||
404 | * won't be any messing with the stack from main(), but we define | ||
405 | * some others too. | ||
406 | */ | ||
407 | #define __NR__exit __NR_exit | ||
408 | extern inline _syscall0(pid_t,setsid) | ||
409 | extern inline _syscall3(int,write,int,fd,const char *,buf,off_t,count) | ||
410 | extern inline _syscall3(int,read,int,fd,char *,buf,off_t,count) | ||
411 | extern inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count) | ||
412 | extern inline _syscall1(int,dup,int,fd) | ||
413 | extern inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) | ||
414 | extern inline _syscall3(int,open,const char *,file,int,flag,int,mode) | ||
415 | extern inline _syscall1(int,close,int,fd) | ||
416 | extern inline _syscall1(int,_exit,int,exitcode) | ||
417 | extern inline _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) | ||
418 | |||
419 | extern inline pid_t wait(int * wait_stat) | ||
420 | { | ||
421 | return waitpid (-1, wait_stat, 0); | ||
422 | } | ||
423 | |||
424 | unsigned long sys_mmap(unsigned long addr, size_t len, | ||
425 | unsigned long prot, unsigned long flags, | ||
426 | unsigned long fd, off_t offset); | ||
427 | unsigned long sys_mmap2(unsigned long addr, size_t len, | ||
428 | unsigned long prot, unsigned long flags, | ||
429 | unsigned long fd, unsigned long pgoff); | ||
430 | struct pt_regs; | ||
431 | int sys_execve (char *name, char **argv, char **envp, struct pt_regs *regs); | ||
432 | int sys_pipe (int *fildes); | ||
433 | struct sigaction; | ||
434 | asmlinkage long sys_rt_sigaction(int sig, | ||
435 | const struct sigaction __user *act, | ||
436 | struct sigaction __user *oact, | ||
437 | size_t sigsetsize); | ||
438 | |||
439 | #endif /* __KERNEL_SYSCALLS__ */ | ||
440 | |||
441 | /* | 390 | /* |
442 | * "Conditional" syscalls | 391 | * "Conditional" syscalls |
443 | */ | 392 | */ |
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h index 5e1b99dc4ab3..411f810a55c6 100644 --- a/include/asm-xtensa/unistd.h +++ b/include/asm-xtensa/unistd.h | |||
@@ -402,11 +402,6 @@ __asm__ __volatile__ ( \ | |||
402 | __syscall_return(type,__res); \ | 402 | __syscall_return(type,__res); \ |
403 | } | 403 | } |
404 | 404 | ||
405 | |||
406 | #ifdef __KERNEL_SYSCALLS__ | ||
407 | static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp) | ||
408 | #endif | ||
409 | |||
410 | /* | 405 | /* |
411 | * "Conditional" syscalls | 406 | * "Conditional" syscalls |
412 | * | 407 | * |
diff --git a/include/linux/unistd.h b/include/linux/unistd.h index c18c60f3254e..aa8d5b5e2e3e 100644 --- a/include/linux/unistd.h +++ b/include/linux/unistd.h | |||
@@ -1,12 +1,8 @@ | |||
1 | #ifndef _LINUX_UNISTD_H_ | 1 | #ifndef _LINUX_UNISTD_H_ |
2 | #define _LINUX_UNISTD_H_ | 2 | #define _LINUX_UNISTD_H_ |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | extern int errno; | ||
6 | #endif | ||
7 | |||
8 | /* | 4 | /* |
9 | * Include machine specific syscallX macros | 5 | * Include machine specific syscall numbers |
10 | */ | 6 | */ |
11 | #include <asm/unistd.h> | 7 | #include <asm/unistd.h> |
12 | 8 | ||
diff --git a/lib/Makefile b/lib/Makefile index 4d752be0edc0..b0361756e22e 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for some libs needed in the kernel. | 2 | # Makefile for some libs needed in the kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \ | 5 | lib-y := ctype.o string.o vsprintf.o cmdline.o \ |
6 | bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ | 6 | bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \ |
7 | idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ | 7 | idr.o div64.o int_sqrt.o bitmap.o extable.o prio_tree.o \ |
8 | sha1.o | 8 | sha1.o |
@@ -35,8 +35,6 @@ ifneq ($(CONFIG_HAVE_DEC_LOCK),y) | |||
35 | lib-y += dec_and_lock.o | 35 | lib-y += dec_and_lock.o |
36 | endif | 36 | endif |
37 | 37 | ||
38 | lib-y += execve.o | ||
39 | |||
40 | obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o | 38 | obj-$(CONFIG_CRC_CCITT) += crc-ccitt.o |
41 | obj-$(CONFIG_CRC16) += crc16.o | 39 | obj-$(CONFIG_CRC16) += crc16.o |
42 | obj-$(CONFIG_CRC32) += crc32.o | 40 | obj-$(CONFIG_CRC32) += crc32.o |
diff --git a/lib/errno.c b/lib/errno.c deleted file mode 100644 index 41cb9d76c052..000000000000 --- a/lib/errno.c +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | /* | ||
2 | * linux/lib/errno.c | ||
3 | * | ||
4 | * Copyright (C) 1991, 1992 Linus Torvalds | ||
5 | */ | ||
6 | |||
7 | int errno; | ||
diff --git a/lib/execve.c b/lib/execve.c deleted file mode 100644 index 2667ebc15045..000000000000 --- a/lib/execve.c +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #include <asm/bug.h> | ||
2 | #include <asm/uaccess.h> | ||
3 | |||
4 | #define __KERNEL_SYSCALLS__ | ||
5 | static int errno __attribute__((unused)); | ||
6 | #include <asm/unistd.h> | ||
7 | |||
8 | #ifdef _syscall3 | ||
9 | int kernel_execve (const char *filename, char *const argv[], char *const envp[]) | ||
10 | __attribute__((__weak__)); | ||
11 | int kernel_execve (const char *filename, char *const argv[], char *const envp[]) | ||
12 | { | ||
13 | mm_segment_t fs = get_fs(); | ||
14 | int ret; | ||
15 | |||
16 | WARN_ON(segment_eq(fs, USER_DS)); | ||
17 | ret = execve(filename, (char **)argv, (char **)envp); | ||
18 | if (ret) | ||
19 | ret = -errno; | ||
20 | |||
21 | return ret; | ||
22 | } | ||
23 | #endif | ||