From: Brian Gerst Remove stubs for sys_ioperm for non-x86 arches, using sys_ni_syscall instead where applicable. Support for sys_ioperm is unconditionally no for non-x86 arches. --- arch/h8300/kernel/sys_h8300.c | 5 ----- arch/h8300/kernel/syscalls.S | 2 +- arch/m68k/kernel/entry.S | 2 +- arch/m68k/kernel/sys_m68k.c | 6 ------ arch/m68knommu/kernel/sys_m68k.c | 6 ------ arch/m68knommu/kernel/syscalltable.S | 2 +- arch/parisc/kernel/sys_parisc.c | 8 -------- arch/s390/kernel/sys_s390.c | 5 ----- arch/s390/kernel/syscalls.S | 2 +- arch/sparc/kernel/setup.c | 5 ----- arch/sparc64/kernel/setup.c | 5 ----- arch/sparc64/kernel/sys_sparc32.c | 5 ----- include/asm-h8300/unistd.h | 1 - include/asm-m68k/unistd.h | 1 - include/asm-m68knommu/unistd.h | 1 - include/asm-parisc/unistd.h | 1 - include/asm-s390/unistd.h | 1 - include/asm-sparc/unistd.h | 1 - include/asm-sparc64/unistd.h | 1 - 19 files changed, 4 insertions(+), 56 deletions(-) diff -puN arch/h8300/kernel/syscalls.S~remove-sys_ioperm-stubs arch/h8300/kernel/syscalls.S --- 25/arch/h8300/kernel/syscalls.S~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/h8300/kernel/syscalls.S 2004-02-25 20:14:48.000000000 -0800 @@ -116,7 +116,7 @@ SYMBOL_NAME_LABEL(sys_call_table) .long SYMBOL_NAME(sys_ni_syscall) /* old profil syscall holder */ .long SYMBOL_NAME(sys_statfs) .long SYMBOL_NAME(sys_fstatfs) /* 100 */ - .long SYMBOL_NAME(sys_ioperm) + .long SYMBOL_NAME(sys_ni_syscall) /* ioperm for i386 */ .long SYMBOL_NAME(sys_socketcall) .long SYMBOL_NAME(sys_syslog) .long SYMBOL_NAME(sys_setitimer) diff -puN arch/h8300/kernel/sys_h8300.c~remove-sys_ioperm-stubs arch/h8300/kernel/sys_h8300.c --- 25/arch/h8300/kernel/sys_h8300.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/h8300/kernel/sys_h8300.c 2004-02-25 20:14:48.000000000 -0800 @@ -260,11 +260,6 @@ asmlinkage int sys_ipc (uint call, int f return -EINVAL; } -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on) -{ - return -ENOSYS; -} - /* sys_cacheflush -- no support. */ asmlinkage int sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) diff -puN arch/m68k/kernel/entry.S~remove-sys_ioperm-stubs arch/m68k/kernel/entry.S --- 25/arch/m68k/kernel/entry.S~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/m68k/kernel/entry.S 2004-02-25 20:14:48.000000000 -0800 @@ -528,7 +528,7 @@ sys_call_table: .long sys_ni_syscall /* old profil syscall holder */ .long sys_statfs .long sys_fstatfs /* 100 */ - .long sys_ioperm + .long sys_ni_syscall /* ioperm for i386 */ .long sys_socketcall .long sys_syslog .long sys_setitimer diff -puN arch/m68k/kernel/sys_m68k.c~remove-sys_ioperm-stubs arch/m68k/kernel/sys_m68k.c --- 25/arch/m68k/kernel/sys_m68k.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/m68k/kernel/sys_m68k.c 2004-02-25 20:14:48.000000000 -0800 @@ -261,12 +261,6 @@ asmlinkage int sys_ipc (uint call, int f return -EINVAL; } -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on) -{ - return -ENOSYS; -} - - /* Convert virtual (user) address VADDR to physical address PADDR */ #define virt_to_phys_040(vaddr) \ ({ \ diff -puN arch/m68knommu/kernel/syscalltable.S~remove-sys_ioperm-stubs arch/m68knommu/kernel/syscalltable.S --- 25/arch/m68knommu/kernel/syscalltable.S~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/m68knommu/kernel/syscalltable.S 2004-02-25 20:14:48.000000000 -0800 @@ -120,7 +120,7 @@ ENTRY(sys_call_table) .long sys_ni_syscall /* old profil syscall holder */ .long sys_statfs .long sys_fstatfs /* 100 */ - .long sys_ioperm + .long sys_ni_syscall /* ioperm for i386 */ .long sys_socketcall .long sys_syslog .long sys_setitimer diff -puN arch/m68knommu/kernel/sys_m68k.c~remove-sys_ioperm-stubs arch/m68knommu/kernel/sys_m68k.c --- 25/arch/m68knommu/kernel/sys_m68k.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/m68knommu/kernel/sys_m68k.c 2004-02-25 20:14:48.000000000 -0800 @@ -193,12 +193,6 @@ asmlinkage int sys_ipc (uint call, int f return -EINVAL; } -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on) -{ - return -ENOSYS; -} - - /* sys_cacheflush -- flush (part of) the processor cache. */ asmlinkage int sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) diff -puN arch/parisc/kernel/sys_parisc.c~remove-sys_ioperm-stubs arch/parisc/kernel/sys_parisc.c --- 25/arch/parisc/kernel/sys_parisc.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/parisc/kernel/sys_parisc.c 2004-02-25 20:14:48.000000000 -0800 @@ -242,14 +242,6 @@ asmlinkage ssize_t parisc_readahead(int return sys_readahead(fd, (loff_t)high << 32 | low, count); } -/* - * This changes the io permissions bitmap in the current task. - */ -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on) -{ - return -ENOSYS; -} - asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr, unsigned long len, int prot, int flag) { return -ENOMEM; diff -puN arch/s390/kernel/syscalls.S~remove-sys_ioperm-stubs arch/s390/kernel/syscalls.S --- 25/arch/s390/kernel/syscalls.S~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/s390/kernel/syscalls.S 2004-02-25 20:14:48.000000000 -0800 @@ -109,7 +109,7 @@ SYSCALL(sys_setpriority,sys_setpriority, NI_SYSCALL /* old profil syscall */ SYSCALL(sys_statfs,sys_statfs,compat_sys_statfs_wrapper) SYSCALL(sys_fstatfs,sys_fstatfs,compat_sys_fstatfs_wrapper) /* 100 */ -SYSCALL(sys_ioperm,sys_ni_syscall,sys_ni_syscall) +NI_SYSCALL /* ioperm for i386 */ SYSCALL(sys_socketcall,sys_socketcall,compat_sys_socketcall_wrapper) SYSCALL(sys_syslog,sys_syslog,sys32_syslog_wrapper) SYSCALL(sys_setitimer,sys_setitimer,compat_sys_setitimer_wrapper) diff -puN arch/s390/kernel/sys_s390.c~remove-sys_ioperm-stubs arch/s390/kernel/sys_s390.c --- 25/arch/s390/kernel/sys_s390.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/s390/kernel/sys_s390.c 2004-02-25 20:14:48.000000000 -0800 @@ -289,11 +289,6 @@ asmlinkage int sys_olduname(struct oldol return error; } -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on) -{ - return -ENOSYS; -} - #else /* CONFIG_ARCH_S390X */ asmlinkage int s390x_newuname(struct new_utsname * name) diff -puN arch/sparc64/kernel/setup.c~remove-sys_ioperm-stubs arch/sparc64/kernel/setup.c --- 25/arch/sparc64/kernel/setup.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/sparc64/kernel/setup.c 2004-02-25 20:14:48.000000000 -0800 @@ -603,11 +603,6 @@ static int __init set_preferred_console( } console_initcall(set_preferred_console); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on) -{ - return -EIO; -} - /* BUFFER is PAGE_SIZE bytes long. */ extern char *sparc_cpu_type; diff -puN arch/sparc64/kernel/sys_sparc32.c~remove-sys_ioperm-stubs arch/sparc64/kernel/sys_sparc32.c --- 25/arch/sparc64/kernel/sys_sparc32.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/sparc64/kernel/sys_sparc32.c 2004-02-25 20:14:48.000000000 -0800 @@ -282,11 +282,6 @@ static inline long put_tv32(struct compa __put_user(i->tv_usec, &o->tv_usec))); } -asmlinkage long sys32_ioperm(u32 from, u32 num, int on) -{ - return sys_ioperm((unsigned long)from, (unsigned long)num, on); -} - struct msgbuf32 { s32 mtype; char mtext[1]; }; struct ipc_perm32 diff -puN arch/sparc/kernel/setup.c~remove-sys_ioperm-stubs arch/sparc/kernel/setup.c --- 25/arch/sparc/kernel/setup.c~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/arch/sparc/kernel/setup.c 2004-02-25 20:14:48.000000000 -0800 @@ -390,11 +390,6 @@ static int __init set_preferred_console( } console_initcall(set_preferred_console); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on) -{ - return -EIO; -} - extern char *sparc_cpu_type[]; extern char *sparc_fpu_type[]; diff -puN include/asm-h8300/unistd.h~remove-sys_ioperm-stubs include/asm-h8300/unistd.h --- 25/include/asm-h8300/unistd.h~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/include/asm-h8300/unistd.h 2004-02-25 20:14:48.000000000 -0800 @@ -490,7 +490,6 @@ asmlinkage int sys_execve(char *name, ch int dummy, ...); asmlinkage int sys_pipe(unsigned long *fildes); asmlinkage int sys_ptrace(long request, long pid, long addr, long data); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, diff -puN include/asm-m68knommu/unistd.h~remove-sys_ioperm-stubs include/asm-m68knommu/unistd.h --- 25/include/asm-m68knommu/unistd.h~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/include/asm-m68knommu/unistd.h 2004-02-25 20:14:48.000000000 -0800 @@ -416,7 +416,6 @@ asmlinkage long sys_mmap2(unsigned long asmlinkage int sys_execve(char *name, char **argv, char **envp); asmlinkage int sys_pipe(unsigned long *fildes); asmlinkage int sys_ptrace(long request, long pid, long addr, long data); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); struct pt_regs; int sys_request_irq(unsigned int, irqreturn_t (*)(int, void *, struct pt_regs *), diff -puN include/asm-m68k/unistd.h~remove-sys_ioperm-stubs include/asm-m68k/unistd.h --- 25/include/asm-m68k/unistd.h~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/include/asm-m68k/unistd.h 2004-02-25 20:14:48.000000000 -0800 @@ -374,7 +374,6 @@ asmlinkage long sys_mmap2( asmlinkage int sys_execve(char *name, char **argv, char **envp); asmlinkage int sys_pipe(unsigned long *fildes); asmlinkage int sys_ptrace(long request, long pid, long addr, long data); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); struct pt_regs; int sys_request_irq(unsigned int, irqreturn_t (*)(int, void *, struct pt_regs *), diff -puN include/asm-parisc/unistd.h~remove-sys_ioperm-stubs include/asm-parisc/unistd.h --- 25/include/asm-parisc/unistd.h~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/include/asm-parisc/unistd.h 2004-02-25 20:14:48.000000000 -0800 @@ -909,7 +909,6 @@ int sys_clone(unsigned long clone_flags, int sys_vfork(struct pt_regs *regs); int sys_pipe(int *fildes); long sys_ptrace(long request, pid_t pid, long addr, long data); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, diff -puN include/asm-s390/unistd.h~remove-sys_ioperm-stubs include/asm-s390/unistd.h --- 25/include/asm-s390/unistd.h~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/include/asm-s390/unistd.h 2004-02-25 20:14:48.000000000 -0800 @@ -553,7 +553,6 @@ asmlinkage int sys_vfork(struct pt_regs #endif /* CONFIG_ARCH_S390X */ asmlinkage __SYS_RETTYPE sys_pipe(unsigned long *fildes); asmlinkage int sys_ptrace(long request, long pid, long addr, long data); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, diff -puN include/asm-sparc64/unistd.h~remove-sys_ioperm-stubs include/asm-sparc64/unistd.h --- 25/include/asm-sparc64/unistd.h~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/include/asm-sparc64/unistd.h 2004-02-25 20:14:48.000000000 -0800 @@ -447,7 +447,6 @@ asmlinkage unsigned long sys_mmap( unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off); -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, diff -puN include/asm-sparc/unistd.h~remove-sys_ioperm-stubs include/asm-sparc/unistd.h --- 25/include/asm-sparc/unistd.h~remove-sys_ioperm-stubs 2004-02-25 20:14:48.000000000 -0800 +++ 25-akpm/include/asm-sparc/unistd.h 2004-02-25 20:14:48.000000000 -0800 @@ -461,7 +461,6 @@ asmlinkage unsigned long sys_mmap2( unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long pgoff); -asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on); struct sigaction; asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, _