diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/kernel/alpha_ksyms.c | 3 | ||||
-rw-r--r-- | arch/alpha/kernel/entry.S | 10 | ||||
-rw-r--r-- | arch/arm/kernel/sys_arm.c | 4 | ||||
-rw-r--r-- | arch/arm26/kernel/sys_arm.c | 4 | ||||
-rw-r--r-- | arch/ia64/kernel/entry.S | 4 | ||||
-rw-r--r-- | arch/parisc/kernel/process.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/misc_64.S | 2 | ||||
-rw-r--r-- | arch/um/kernel/syscall.c | 13 | ||||
-rw-r--r-- | arch/x86_64/kernel/entry.S | 4 |
10 files changed, 37 insertions, 18 deletions
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index f042cc42b00f..dbe327d32b6f 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/cacheflush.h> | 36 | #include <asm/cacheflush.h> |
37 | #include <asm/vga.h> | 37 | #include <asm/vga.h> |
38 | 38 | ||
39 | #define __KERNEL_SYSCALLS__ | ||
40 | #include <asm/unistd.h> | 39 | #include <asm/unistd.h> |
41 | 40 | ||
42 | extern struct hwrpb_struct *hwrpb; | 41 | extern struct hwrpb_struct *hwrpb; |
@@ -116,7 +115,7 @@ EXPORT_SYMBOL(sys_dup); | |||
116 | EXPORT_SYMBOL(sys_exit); | 115 | EXPORT_SYMBOL(sys_exit); |
117 | EXPORT_SYMBOL(sys_write); | 116 | EXPORT_SYMBOL(sys_write); |
118 | EXPORT_SYMBOL(sys_lseek); | 117 | EXPORT_SYMBOL(sys_lseek); |
119 | EXPORT_SYMBOL(execve); | 118 | EXPORT_SYMBOL(kernel_execve); |
120 | EXPORT_SYMBOL(sys_setsid); | 119 | EXPORT_SYMBOL(sys_setsid); |
121 | EXPORT_SYMBOL(sys_wait4); | 120 | EXPORT_SYMBOL(sys_wait4); |
122 | 121 | ||
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index 01ecd09d4a64..c95e95e1ab04 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S | |||
@@ -655,12 +655,12 @@ kernel_thread: | |||
655 | .end kernel_thread | 655 | .end kernel_thread |
656 | 656 | ||
657 | /* | 657 | /* |
658 | * execve(path, argv, envp) | 658 | * kernel_execve(path, argv, envp) |
659 | */ | 659 | */ |
660 | .align 4 | 660 | .align 4 |
661 | .globl execve | 661 | .globl kernel_execve |
662 | .ent execve | 662 | .ent kernel_execve |
663 | execve: | 663 | kernel_execve: |
664 | /* We can be called from a module. */ | 664 | /* We can be called from a module. */ |
665 | ldgp $gp, 0($27) | 665 | ldgp $gp, 0($27) |
666 | lda $sp, -(32+SIZEOF_PT_REGS+8)($sp) | 666 | lda $sp, -(32+SIZEOF_PT_REGS+8)($sp) |
@@ -704,7 +704,7 @@ execve: | |||
704 | 704 | ||
705 | 1: lda $sp, 32+SIZEOF_PT_REGS+8($sp) | 705 | 1: lda $sp, 32+SIZEOF_PT_REGS+8($sp) |
706 | ret | 706 | ret |
707 | .end execve | 707 | .end kernel_execve |
708 | 708 | ||
709 | 709 | ||
710 | /* | 710 | /* |
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 8170af471439..00c18d35913c 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -279,7 +279,7 @@ out: | |||
279 | return error; | 279 | return error; |
280 | } | 280 | } |
281 | 281 | ||
282 | long execve(const char *filename, char **argv, char **envp) | 282 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) |
283 | { | 283 | { |
284 | struct pt_regs regs; | 284 | struct pt_regs regs; |
285 | int ret; | 285 | int ret; |
@@ -317,7 +317,7 @@ long execve(const char *filename, char **argv, char **envp) | |||
317 | out: | 317 | out: |
318 | return ret; | 318 | return ret; |
319 | } | 319 | } |
320 | EXPORT_SYMBOL(execve); | 320 | EXPORT_SYMBOL(kernel_execve); |
321 | 321 | ||
322 | /* | 322 | /* |
323 | * Since loff_t is a 64 bit type we avoid a lot of ABI hastle | 323 | * Since loff_t is a 64 bit type we avoid a lot of ABI hastle |
diff --git a/arch/arm26/kernel/sys_arm.c b/arch/arm26/kernel/sys_arm.c index 85457897b8a9..dc05aba58baf 100644 --- a/arch/arm26/kernel/sys_arm.c +++ b/arch/arm26/kernel/sys_arm.c | |||
@@ -283,7 +283,7 @@ out: | |||
283 | } | 283 | } |
284 | 284 | ||
285 | /* FIXME - see if this is correct for arm26 */ | 285 | /* FIXME - see if this is correct for arm26 */ |
286 | long execve(const char *filename, char **argv, char **envp) | 286 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) |
287 | { | 287 | { |
288 | struct pt_regs regs; | 288 | struct pt_regs regs; |
289 | int ret; | 289 | int ret; |
@@ -320,4 +320,4 @@ long execve(const char *filename, char **argv, char **envp) | |||
320 | return ret; | 320 | return ret; |
321 | } | 321 | } |
322 | 322 | ||
323 | EXPORT_SYMBOL(execve); | 323 | EXPORT_SYMBOL(kernel_execve); |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 12701cf32d99..e5b1be51b197 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -492,11 +492,11 @@ GLOBAL_ENTRY(prefetch_stack) | |||
492 | br.ret.sptk.many rp | 492 | br.ret.sptk.many rp |
493 | END(prefetch_stack) | 493 | END(prefetch_stack) |
494 | 494 | ||
495 | GLOBAL_ENTRY(execve) | 495 | GLOBAL_ENTRY(kernel_execve) |
496 | mov r15=__NR_execve // put syscall number in place | 496 | mov r15=__NR_execve // put syscall number in place |
497 | break __BREAK_SYSCALL | 497 | break __BREAK_SYSCALL |
498 | br.ret.sptk.many rp | 498 | br.ret.sptk.many rp |
499 | END(execve) | 499 | END(kernel_execve) |
500 | 500 | ||
501 | GLOBAL_ENTRY(clone) | 501 | GLOBAL_ENTRY(clone) |
502 | mov r15=__NR_clone // put syscall number in place | 502 | mov r15=__NR_clone // put syscall number in place |
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 0b485ef4be89..2f9f9dfa66f7 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c | |||
@@ -368,7 +368,14 @@ out: | |||
368 | return error; | 368 | return error; |
369 | } | 369 | } |
370 | 370 | ||
371 | unsigned long | 371 | extern int __execve(const char *filename, char *const argv[], |
372 | char *const envp[], struct task_struct *task); | ||
373 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | ||
374 | { | ||
375 | return __execve(filename, argv, envp, current); | ||
376 | } | ||
377 | |||
378 | unsigned long | ||
372 | get_wchan(struct task_struct *p) | 379 | get_wchan(struct task_struct *p) |
373 | { | 380 | { |
374 | struct unwind_frame_info info; | 381 | struct unwind_frame_info info; |
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 58758d883361..88fd73fdf048 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -843,7 +843,7 @@ _GLOBAL(kernel_thread) | |||
843 | addi r1,r1,16 | 843 | addi r1,r1,16 |
844 | blr | 844 | blr |
845 | 845 | ||
846 | _GLOBAL(execve) | 846 | _GLOBAL(kernel_execve) |
847 | li r0,__NR_execve | 847 | li r0,__NR_execve |
848 | sc | 848 | sc |
849 | bnslr | 849 | bnslr |
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index e3ed21cd3d94..9c54eccad993 100644 --- a/arch/powerpc/kernel/misc_64.S +++ b/arch/powerpc/kernel/misc_64.S | |||
@@ -556,7 +556,7 @@ _GLOBAL(giveup_altivec) | |||
556 | 556 | ||
557 | #endif /* CONFIG_ALTIVEC */ | 557 | #endif /* CONFIG_ALTIVEC */ |
558 | 558 | ||
559 | _GLOBAL(execve) | 559 | _GLOBAL(kernel_execve) |
560 | li r0,__NR_execve | 560 | li r0,__NR_execve |
561 | sc | 561 | sc |
562 | bnslr | 562 | bnslr |
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c index abf14aaf905f..f5ed8624648b 100644 --- a/arch/um/kernel/syscall.c +++ b/arch/um/kernel/syscall.c | |||
@@ -164,3 +164,16 @@ int next_syscall_index(int limit) | |||
164 | spin_unlock(&syscall_lock); | 164 | spin_unlock(&syscall_lock); |
165 | return(ret); | 165 | return(ret); |
166 | } | 166 | } |
167 | |||
168 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | ||
169 | { | ||
170 | mm_segment_t fs; | ||
171 | int ret; | ||
172 | |||
173 | fs = get_fs(); | ||
174 | set_fs(KERNEL_DS); | ||
175 | ret = um_execve(filename, argv, envp); | ||
176 | set_fs(fs); | ||
177 | |||
178 | return ret; | ||
179 | } | ||
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 2802524104f3..b8285cf1a9c3 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -1023,7 +1023,7 @@ ENDPROC(child_rip) | |||
1023 | * do_sys_execve asm fallback arguments: | 1023 | * do_sys_execve asm fallback arguments: |
1024 | * rdi: name, rsi: argv, rdx: envp, fake frame on the stack | 1024 | * rdi: name, rsi: argv, rdx: envp, fake frame on the stack |
1025 | */ | 1025 | */ |
1026 | ENTRY(execve) | 1026 | ENTRY(kernel_execve) |
1027 | CFI_STARTPROC | 1027 | CFI_STARTPROC |
1028 | FAKE_STACK_FRAME $0 | 1028 | FAKE_STACK_FRAME $0 |
1029 | SAVE_ALL | 1029 | SAVE_ALL |
@@ -1036,7 +1036,7 @@ ENTRY(execve) | |||
1036 | UNFAKE_STACK_FRAME | 1036 | UNFAKE_STACK_FRAME |
1037 | ret | 1037 | ret |
1038 | CFI_ENDPROC | 1038 | CFI_ENDPROC |
1039 | ENDPROC(execve) | 1039 | ENDPROC(kernel_execve) |
1040 | 1040 | ||
1041 | KPROBE_ENTRY(page_fault) | 1041 | KPROBE_ENTRY(page_fault) |
1042 | errorentry do_page_fault | 1042 | errorentry do_page_fault |