aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-12-03 19:51:02 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-11 06:44:58 -0500
commit05d72faa6d13c9d857478a5d35c85db9adada685 (patch)
treee38ab5cf8c3b16456df9cdb8cf7534236546a4fb /arch/sparc
parent2c6a10161d0b5fc047b5bd81b03693b9af99fab5 (diff)
sparc_brk() is not needed anymore
the checks it's doing are duplicated in sys_brk() and failing them early makes no sense, AFAICT. Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/sys_sparc_32.c9
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c12
-rw-r--r--arch/sparc/kernel/systbls.h1
-rw-r--r--arch/sparc/kernel/systbls_32.S2
-rw-r--r--arch/sparc/kernel/systbls_64.S4
5 files changed, 3 insertions, 25 deletions
diff --git a/arch/sparc/kernel/sys_sparc_32.c b/arch/sparc/kernel/sys_sparc_32.c
index 36f6f26d9cec..997bdd0d3d70 100644
--- a/arch/sparc/kernel/sys_sparc_32.c
+++ b/arch/sparc/kernel/sys_sparc_32.c
@@ -79,15 +79,6 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
79 } 79 }
80} 80}
81 81
82asmlinkage unsigned long sparc_brk(unsigned long brk)
83{
84 if(ARCH_SUN4C) {
85 if ((brk & 0xe0000000) != (current->mm->brk & 0xe0000000))
86 return current->mm->brk;
87 }
88 return sys_brk(brk);
89}
90
91/* 82/*
92 * sys_pipe() is the normal C calling standard for creating 83 * sys_pipe() is the normal C calling standard for creating
93 * a pipe. It's not the way unix traditionally does this, though. 84 * a pipe. It's not the way unix traditionally does this, though.
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 8f9cd58497de..cfa0e19abe3b 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -403,18 +403,6 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
403 } 403 }
404} 404}
405 405
406SYSCALL_DEFINE1(sparc_brk, unsigned long, brk)
407{
408 /* People could try to be nasty and use ta 0x6d in 32bit programs */
409 if (test_thread_flag(TIF_32BIT) && brk >= STACK_TOP32)
410 return current->mm->brk;
411
412 if (unlikely(straddles_64bit_va_hole(current->mm->brk, brk)))
413 return current->mm->brk;
414
415 return sys_brk(brk);
416}
417
418/* 406/*
419 * sys_pipe() is the normal C calling standard for creating 407 * sys_pipe() is the normal C calling standard for creating
420 * a pipe. It's not the way unix traditionally does this, though. 408 * a pipe. It's not the way unix traditionally does this, though.
diff --git a/arch/sparc/kernel/systbls.h b/arch/sparc/kernel/systbls.h
index a63c5d2d9849..d2f999ae2b85 100644
--- a/arch/sparc/kernel/systbls.h
+++ b/arch/sparc/kernel/systbls.h
@@ -9,7 +9,6 @@
9struct new_utsname; 9struct new_utsname;
10 10
11extern asmlinkage unsigned long sys_getpagesize(void); 11extern asmlinkage unsigned long sys_getpagesize(void);
12extern asmlinkage unsigned long sparc_brk(unsigned long brk);
13extern asmlinkage long sparc_pipe(struct pt_regs *regs); 12extern asmlinkage long sparc_pipe(struct pt_regs *regs);
14extern asmlinkage long sys_ipc(unsigned int call, int first, 13extern asmlinkage long sys_ipc(unsigned int call, int first,
15 unsigned long second, 14 unsigned long second,
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S
index 3a66765ade58..801fc8e5a0e8 100644
--- a/arch/sparc/kernel/systbls_32.S
+++ b/arch/sparc/kernel/systbls_32.S
@@ -19,7 +19,7 @@ sys_call_table:
19/*0*/ .long sys_restart_syscall, sys_exit, sys_fork, sys_read, sys_write 19/*0*/ .long sys_restart_syscall, sys_exit, sys_fork, sys_read, sys_write
20/*5*/ .long sys_open, sys_close, sys_wait4, sys_creat, sys_link 20/*5*/ .long sys_open, sys_close, sys_wait4, sys_creat, sys_link
21/*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod 21/*10*/ .long sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys_mknod
22/*15*/ .long sys_chmod, sys_lchown16, sparc_brk, sys_nis_syscall, sys_lseek 22/*15*/ .long sys_chmod, sys_lchown16, sys_brk, sys_nis_syscall, sys_lseek
23/*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 23/*20*/ .long sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
24/*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause 24/*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause
25/*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice 25/*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S
index 0648a087810a..e575b46bd7a9 100644
--- a/arch/sparc/kernel/systbls_64.S
+++ b/arch/sparc/kernel/systbls_64.S
@@ -21,7 +21,7 @@ sys_call_table32:
21/*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write 21/*0*/ .word sys_restart_syscall, sys32_exit, sys_fork, sys_read, sys_write
22/*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link 22/*5*/ .word sys32_open, sys_close, sys32_wait4, sys32_creat, sys_link
23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod 23/*10*/ .word sys_unlink, sunos_execv, sys_chdir, sys_chown16, sys32_mknod
24/*15*/ .word sys_chmod, sys_lchown16, sys_sparc_brk, sys32_perfctr, sys32_lseek 24/*15*/ .word sys_chmod, sys_lchown16, sys_brk, sys32_perfctr, sys32_lseek
25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16 25/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid16, sys_getuid16
26/*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause 26/*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause
27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice 27/*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice
@@ -96,7 +96,7 @@ sys_call_table:
96/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write 96/*0*/ .word sys_restart_syscall, sparc_exit, sys_fork, sys_read, sys_write
97/*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link 97/*5*/ .word sys_open, sys_close, sys_wait4, sys_creat, sys_link
98/*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod 98/*10*/ .word sys_unlink, sys_nis_syscall, sys_chdir, sys_chown, sys_mknod
99/*15*/ .word sys_chmod, sys_lchown, sys_sparc_brk, sys_perfctr, sys_lseek 99/*15*/ .word sys_chmod, sys_lchown, sys_brk, sys_perfctr, sys_lseek
100/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid 100/*20*/ .word sys_getpid, sys_capget, sys_capset, sys_setuid, sys_getuid
101/*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall 101/*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall
102/*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice 102/*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice