Commit 1134723e96f6e2abcf8bfd7a2d1c96fcc323ef35
1 parent
e55380edf6
Exists in
master
and in
7 other branches
[CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2
Remove __attribute__((weak)) from common code sys_pipe implemantation. IA64, ALPHA, SUPERH (32bit) and SPARC (32bit) have own implemantations with the same name. Just rename them. For sys_pipe2 there is no architecture specific implementation. Cc: Richard Henderson <rth@twiddle.net> Cc: David S. Miller <davem@davemloft.net> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Tony Luck <tony.luck@intel.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Showing 15 changed files with 22 additions and 23 deletions Side-by-side Diff
- arch/alpha/kernel/entry.S
- arch/alpha/kernel/systbls.S
- arch/ia64/ia32/ia32_entry.S
- arch/ia64/include/asm/unistd.h
- arch/ia64/kernel/entry.S
- arch/ia64/kernel/sys_ia64.c
- arch/s390/kernel/entry.h
- arch/sh/include/asm/syscalls_32.h
- arch/sh/kernel/sys_sh32.c
- arch/sh/kernel/syscalls_32.S
- arch/sparc/kernel/entry.S
- arch/sparc/kernel/syscalls.S
- arch/sparc/kernel/systbls_32.S
- arch/sparc/kernel/systbls_64.S
- fs/pipe.c
arch/alpha/kernel/entry.S
... | ... | @@ -896,9 +896,9 @@ |
896 | 896 | .end sys_getxpid |
897 | 897 | |
898 | 898 | .align 4 |
899 | - .globl sys_pipe | |
900 | - .ent sys_pipe | |
901 | -sys_pipe: | |
899 | + .globl sys_alpha_pipe | |
900 | + .ent sys_alpha_pipe | |
901 | +sys_alpha_pipe: | |
902 | 902 | lda $sp, -16($sp) |
903 | 903 | stq $26, 0($sp) |
904 | 904 | .prologue 0 |
... | ... | @@ -916,7 +916,7 @@ |
916 | 916 | stq $1, 80+16($sp) |
917 | 917 | 1: lda $sp, 16($sp) |
918 | 918 | ret |
919 | -.end sys_pipe | |
919 | +.end sys_alpha_pipe | |
920 | 920 | |
921 | 921 | .align 4 |
922 | 922 | .globl sys_execve |
arch/alpha/kernel/systbls.S
arch/ia64/ia32/ia32_entry.S
arch/ia64/include/asm/unistd.h
... | ... | @@ -364,7 +364,7 @@ |
364 | 364 | struct sigaction; |
365 | 365 | long sys_execve(char __user *filename, char __user * __user *argv, |
366 | 366 | char __user * __user *envp, struct pt_regs *regs); |
367 | -asmlinkage long sys_pipe(void); | |
367 | +asmlinkage long sys_ia64_pipe(void); | |
368 | 368 | asmlinkage long sys_rt_sigaction(int sig, |
369 | 369 | const struct sigaction __user *act, |
370 | 370 | struct sigaction __user *oact, |
arch/ia64/kernel/entry.S
arch/ia64/kernel/sys_ia64.c
arch/s390/kernel/entry.h
... | ... | @@ -30,7 +30,6 @@ |
30 | 30 | struct old_sigaction; |
31 | 31 | struct sel_arg_struct; |
32 | 32 | |
33 | -long sys_pipe(unsigned long __user *fildes); | |
34 | 33 | long sys_mmap2(struct mmap_arg_struct __user *arg); |
35 | 34 | long old_mmap(struct mmap_arg_struct __user *arg); |
36 | 35 | long sys_ipc(uint call, int first, unsigned long second, |
arch/sh/include/asm/syscalls_32.h
... | ... | @@ -36,9 +36,9 @@ |
36 | 36 | asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, |
37 | 37 | unsigned long r6, unsigned long r7, |
38 | 38 | struct pt_regs __regs); |
39 | -asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | |
40 | - unsigned long r6, unsigned long r7, | |
41 | - struct pt_regs __regs); | |
39 | +asmlinkage int sys_sh_pipe(unsigned long r4, unsigned long r5, | |
40 | + unsigned long r6, unsigned long r7, | |
41 | + struct pt_regs __regs); | |
42 | 42 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf, |
43 | 43 | size_t count, long dummy, loff_t pos); |
44 | 44 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf, |
arch/sh/kernel/sys_sh32.c
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | * sys_pipe() is the normal C calling standard for creating |
23 | 23 | * a pipe. It's not the way Unix traditionally does this, though. |
24 | 24 | */ |
25 | -asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | |
25 | +asmlinkage int sys_sh_pipe(unsigned long r4, unsigned long r5, | |
26 | 26 | unsigned long r6, unsigned long r7, |
27 | 27 | struct pt_regs __regs) |
28 | 28 | { |
arch/sh/kernel/syscalls_32.S
arch/sparc/kernel/entry.S
... | ... | @@ -1088,8 +1088,8 @@ |
1088 | 1088 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 |
1089 | 1089 | |
1090 | 1090 | .align 4 |
1091 | - .globl sys_pipe | |
1092 | -sys_pipe: | |
1091 | + .globl sys_sparc_pipe | |
1092 | +sys_sparc_pipe: | |
1093 | 1093 | mov %o7, %l5 |
1094 | 1094 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg |
1095 | 1095 | call sparc_pipe |
arch/sparc/kernel/syscalls.S
arch/sparc/kernel/systbls_32.S
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | /*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause |
25 | 25 | /*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice |
26 | 26 | /*35*/ .long sys_chown, sys_sync, sys_kill, sys_newstat, sys_sendfile |
27 | -/*40*/ .long sys_newlstat, sys_dup, sys_pipe, sys_times, sys_getuid | |
27 | +/*40*/ .long sys_newlstat, sys_dup, sys_sparc_pipe, sys_times, sys_getuid | |
28 | 28 | /*45*/ .long sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16 |
29 | 29 | /*50*/ .long sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys_ioctl |
30 | 30 | /*55*/ .long sys_reboot, sys_mmap2, sys_symlink, sys_readlink, sys_execve |
arch/sparc/kernel/systbls_64.S
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | /*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause |
27 | 27 | /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice |
28 | 28 | .word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile |
29 | -/*40*/ .word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid | |
29 | +/*40*/ .word compat_sys_newlstat, sys_dup, sys_sparc_pipe, compat_sys_times, sys_getuid | |
30 | 30 | .word sys32_umount, sys_setgid16, sys_getgid16, sys32_signal, sys_geteuid16 |
31 | 31 | /*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl |
32 | 32 | .word sys32_reboot, sys32_mmap2, sys_symlink, sys32_readlink, sys32_execve |
... | ... | @@ -100,7 +100,7 @@ |
100 | 100 | /*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall |
101 | 101 | /*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice |
102 | 102 | .word sys_nis_syscall, sys_sync, sys_kill, sys_newstat, sys_sendfile64 |
103 | -/*40*/ .word sys_newlstat, sys_dup, sys_pipe, sys_times, sys_nis_syscall | |
103 | +/*40*/ .word sys_newlstat, sys_dup, sys_sparc_pipe, sys_times, sys_nis_syscall | |
104 | 104 | .word sys_umount, sys_setgid, sys_getgid, sys_signal, sys_geteuid |
105 | 105 | /*50*/ .word sys_getegid, sys_acct, sys_memory_ordering, sys_nis_syscall, sys_ioctl |
106 | 106 | .word sys_reboot, sys_nis_syscall, sys_symlink, sys_readlink, sys_execve |
fs/pipe.c
... | ... | @@ -1043,7 +1043,7 @@ |
1043 | 1043 | * sys_pipe() is the normal C calling standard for creating |
1044 | 1044 | * a pipe. It's not the way Unix traditionally does this, though. |
1045 | 1045 | */ |
1046 | -asmlinkage long __weak sys_pipe2(int __user *fildes, int flags) | |
1046 | +asmlinkage long sys_pipe2(int __user *fildes, int flags) | |
1047 | 1047 | { |
1048 | 1048 | int fd[2]; |
1049 | 1049 | int error; |
... | ... | @@ -1059,7 +1059,7 @@ |
1059 | 1059 | return error; |
1060 | 1060 | } |
1061 | 1061 | |
1062 | -asmlinkage long __weak sys_pipe(int __user *fildes) | |
1062 | +asmlinkage long sys_pipe(int __user *fildes) | |
1063 | 1063 | { |
1064 | 1064 | return sys_pipe2(fildes, 0); |
1065 | 1065 | } |