Skip to content

Commit 1134723

Browse files
committed
[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>
1 parent e55380e commit 1134723

15 files changed

Lines changed: 22 additions & 23 deletions

File tree

‎arch/alpha/kernel/entry.S‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -896,9 +896,9 @@ sys_getxpid:
896896
.end sys_getxpid
897897

898898
.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:
902902
lda $sp, -16($sp)
903903
stq $26, 0($sp)
904904
.prologue 0
@@ -916,7 +916,7 @@ sys_pipe:
916916
stq $1, 80+16($sp)
917917
1: lda $sp, 16($sp)
918918
ret
919-
.end sys_pipe
919+
.end sys_alpha_pipe
920920

921921
.align 4
922922
.globl sys_execve

‎arch/alpha/kernel/systbls.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ sys_call_table:
5252
.quad sys_setpgid
5353
.quad alpha_ni_syscall /* 40 */
5454
.quad sys_dup
55-
.quad sys_pipe
55+
.quad sys_alpha_pipe
5656
.quad osf_set_program_attributes
5757
.quad alpha_ni_syscall
5858
.quad sys_open /* 45 */

‎arch/ia64/ia32/ia32_entry.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ ia32_syscall_table:
220220
data8 sys_mkdir
221221
data8 sys_rmdir /* 40 */
222222
data8 sys_dup
223-
data8 sys_pipe
223+
data8 sys_ia64_pipe
224224
data8 compat_sys_times
225225
data8 sys_ni_syscall /* old prof syscall holder */
226226
data8 sys32_brk /* 45 */

‎arch/ia64/include/asm/unistd.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ struct pt_regs;
364364
struct sigaction;
365365
long sys_execve(char __user *filename, char __user * __user *argv,
366366
char __user * __user *envp, struct pt_regs *regs);
367-
asmlinkage long sys_pipe(void);
367+
asmlinkage long sys_ia64_pipe(void);
368368
asmlinkage long sys_rt_sigaction(int sig,
369369
const struct sigaction __user *act,
370370
struct sigaction __user *oact,

‎arch/ia64/kernel/entry.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,7 +1442,7 @@ sys_call_table:
14421442
data8 sys_mkdir // 1055
14431443
data8 sys_rmdir
14441444
data8 sys_dup
1445-
data8 sys_pipe
1445+
data8 sys_ia64_pipe
14461446
data8 sys_times
14471447
data8 ia64_brk // 1060
14481448
data8 sys_setgid

‎arch/ia64/kernel/sys_ia64.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ ia64_brk (unsigned long brk)
154154
* and r9) as this is faster than doing a copy_to_user().
155155
*/
156156
asmlinkage long
157-
sys_pipe (void)
157+
sys_ia64_pipe (void)
158158
{
159159
struct pt_regs *regs = task_pt_regs(current);
160160
int fd[2];

‎arch/s390/kernel/entry.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ struct fadvise64_64_args;
3030
struct old_sigaction;
3131
struct sel_arg_struct;
3232

33-
long sys_pipe(unsigned long __user *fildes);
3433
long sys_mmap2(struct mmap_arg_struct __user *arg);
3534
long old_mmap(struct mmap_arg_struct __user *arg);
3635
long sys_ipc(uint call, int first, unsigned long second,

‎arch/sh/include/asm/syscalls_32.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
3636
asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
3737
unsigned long r6, unsigned long r7,
3838
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);
4242
asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf,
4343
size_t count, long dummy, loff_t pos);
4444
asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf,

‎arch/sh/kernel/sys_sh32.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* sys_pipe() is the normal C calling standard for creating
2323
* a pipe. It's not the way Unix traditionally does this, though.
2424
*/
25-
asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
25+
asmlinkage int sys_sh_pipe(unsigned long r4, unsigned long r5,
2626
unsigned long r6, unsigned long r7,
2727
struct pt_regs __regs)
2828
{

‎arch/sh/kernel/syscalls_32.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ENTRY(sys_call_table)
5858
.long sys_mkdir
5959
.long sys_rmdir /* 40 */
6060
.long sys_dup
61-
.long sys_pipe
61+
.long sys_sh_pipe
6262
.long sys_times
6363
.long sys_ni_syscall /* old prof syscall holder */
6464
.long sys_brk /* 45 */

0 commit comments

Comments
 (0)