Introducing asm/syscalls.h
Subsystems (13)
PATCH 1/1 Introducing asm/syscalls.h
Declaring arch-dependent syscalls for all architectures Beneficial for kernel and userspace
--- arch/alpha/kernel/signal.c | 1 + arch/arm/kernel/signal.c | 1 + arch/arm/kernel/sys_oabi-compat.c | 3 - arch/avr32/kernel/process.c | 1 + arch/avr32/kernel/signal.c | 1 + arch/avr32/kernel/sys_avr32.c | 1 + arch/avr32/mm/cache.c | 1 + arch/blackfin/kernel/process.c | 1 + arch/frv/kernel/process.c | 1 + arch/frv/kernel/signal.c | 1 + arch/h8300/kernel/process.c | 1 + arch/ia64/kernel/process.c | 1 + arch/ia64/kernel/signal.c | 1 + arch/m32r/kernel/process.c | 1 + arch/m32r/kernel/signal.c | 1 + arch/m68k/kernel/process.c | 1 + arch/m68knommu/kernel/process.c | 1 + arch/mips/kernel/linux32.c | 1 - arch/mips/kernel/signal.c | 2 +- arch/mips/kernel/signal32.c | 1 - arch/mips/kernel/syscall.c | 1 - arch/mn10300/kernel/process.c | 1 + arch/mn10300/kernel/signal.c | 1 + arch/parisc/kernel/process.c | 1 + arch/parisc/kernel/signal.c | 1 + arch/s390/kernel/entry.h | 18 -------- arch/s390/kernel/process.c | 1 + arch/s390/kernel/signal.c | 1 + arch/s390/mm/fault.c | 1 + arch/sh/kernel/process_32.c | 1 + arch/sh/kernel/process_64.c | 1 + arch/sh/kernel/signal_32.c | 1 + arch/sh/kernel/signal_64.c | 1 + arch/sparc/kernel/signal.c | 1 + arch/um/kernel/exec.c | 1 + arch/um/kernel/signal.c | 3 +- arch/um/kernel/syscall.c | 1 + arch/v850/kernel/process.c | 1 + arch/v850/kernel/signal.c | 1 + arch/x86/kernel/ldt.c | 1 + arch/x86/kernel/process_32.c | 1 + arch/x86/kernel/process_64.c | 1 + arch/x86/kernel/signal_32.c | 1 + arch/x86/kernel/signal_64.c | 1 + arch/x86/kernel/tls.c | 1 + arch/x86/kernel/vm86_32.c | 1 + include/asm-alpha/syscalls.h | 21 +++++++++ include/asm-arm/syscalls.h | 73 ++++++++++++++++++++++++++++++ include/asm-avr32/syscalls.h | 36 +++++++++++++++ include/asm-blackfin/syscalls.h | 29 ++++++++++++ include/asm-cris/syscalls.h | 21 +++++++++ include/asm-frv/syscalls.h | 37 +++++++++++++++ include/asm-h8300/syscalls.h | 33 ++++++++++++++ include/asm-ia64/syscalls.h | 38 ++++++++++++++++ include/asm-ia64/unistd.h | 14 +----- include/asm-m32r/syscalls.h | 49 ++++++++++++++++++++ include/asm-m68k/syscalls.h | 35 +++++++++++++++ include/asm-m68knommu/syscalls.h | 34 ++++++++++++++ include/asm-mips/syscalls.h | 51 +++++++++++++++++++++ include/asm-mn10300/syscalls.h | 41 +++++++++++++++++ include/asm-parisc/syscalls.h | 36 +++++++++++++++ include/asm-s390/syscalls.h | 38 ++++++++++++++++ include/asm-sh/syscalls.h | 88 +++++++++++++++++++++++++++++++++++++ include/asm-sparc/syscalls.h | 30 +++++++++++++ include/asm-um/syscalls.h | 32 +++++++++++++ include/asm-v850/syscalls.h | 34 ++++++++++++++ include/asm-x86/syscalls.h | 83 ++++++++++++++++++++++++++++++++++ include/asm-xtensa/syscalls.h | 17 +++++++ include/linux/syscalls.h | 4 ++ 69 files changed, 902 insertions(+), 40 deletions(-) create mode 100644 include/asm-alpha/syscalls.h create mode 100644 include/asm-arm/syscalls.h create mode 100644 include/asm-avr32/syscalls.h create mode 100644 include/asm-blackfin/syscalls.h create mode 100644 include/asm-cris/syscalls.h create mode 100644 include/asm-frv/syscalls.h create mode 100644 include/asm-h8300/syscalls.h create mode 100644 include/asm-ia64/syscalls.h create mode 100644 include/asm-m32r/syscalls.h create mode 100644 include/asm-m68k/syscalls.h create mode 100644 include/asm-m68knommu/syscalls.h create mode 100644 include/asm-mips/syscalls.h create mode 100644 include/asm-mn10300/syscalls.h create mode 100644 include/asm-parisc/syscalls.h create mode 100644 include/asm-s390/syscalls.h create mode 100644 include/asm-sh/syscalls.h create mode 100644 include/asm-sparc/syscalls.h create mode 100644 include/asm-um/syscalls.h create mode 100644 include/asm-v850/syscalls.h create mode 100644 include/asm-x86/syscalls.h create mode 100644 include/asm-xtensa/syscalls.h
arch/alpha/kernel/signal.c +1 -0
@@ -19,6 +19,7 @@#include <linux/tty.h> #include <linux/binfmts.h> #include <linux/bitops.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/sigcontext.h>
arch/arm/kernel/signal.c +1 -0
@@ -11,6 +11,7 @@#include <linux/signal.h> #include <linux/personality.h> #include <linux/freezer.h> +#include <linux/syscalls.h> #include <asm/elf.h> #include <asm/cacheflush.h>
arch/arm/kernel/sys_oabi-compat.c +0 -3
@@ -354,9 +354,6 @@ asmlinkage long sys_oabi_semop(int semid, struct oabi_sembuf __user *tsops,return sys_oabi_semtimedop (semid, tsops, nsops,NULL ); } -extern asmlinkage int sys_ipc(uint call, int first, int second, int third, -void __user *ptr,long fifth); - asmlinkage int sys_oabi_ipc(uint call, int first, int second, int third,void __user *ptr,long fifth) {
arch/avr32/kernel/process.c +1 -0
@@ -14,6 +14,7 @@#include <linux/tick.h> #include <linux/uaccess.h> #include <linux/unistd.h> +#include <linux/syscalls.h> #include <asm/sysreg.h> #include <asm/ocd.h>
arch/avr32/kernel/signal.c +1 -0
@@ -16,6 +16,7 @@#include <linux/ptrace.h> #include <linux/unistd.h> #include <linux/freezer.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/ucontext.h>
arch/avr32/kernel/sys_avr32.c +1 -0
@@ -10,6 +10,7 @@#include <linux/file.h> #include <linux/mm.h> #include <linux/unistd.h> +#include <linux/syscalls.h> #include <asm/mman.h> #include <asm/uaccess.h>
arch/avr32/mm/cache.c +1 -0
@@ -8,6 +8,7 @@#include <linux/highmem.h> #include <linux/unistd.h> +#include <linux/syscalls.h> #include <asm/cacheflush.h> #include <asm/cachectl.h>
arch/blackfin/kernel/process.c +1 -0
@@ -36,6 +36,7 @@#include <linux/tick.h> #include <linux/fs.h> #include <linux/err.h> +#include <linux/syscalls.h> #include <asm/blackfin.h> #include <asm/fixed_code.h>
arch/frv/kernel/process.c +1 -0
@@ -26,6 +26,7 @@#include <linux/reboot.h> #include <linux/interrupt.h> #include <linux/pagemap.h> +#include <linux/syscalls.h> #include <asm/asm-offsets.h> #include <asm/uaccess.h>
arch/frv/kernel/signal.c +1 -0
@@ -21,6 +21,7 @@#include <linux/unistd.h> #include <linux/personality.h> #include <linux/freezer.h> +#include <linux/syscalls.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/cacheflush.h>
arch/h8300/kernel/process.c +1 -0
@@ -38,6 +38,7 @@#include <linux/interrupt.h> #include <linux/reboot.h> #include <linux/fs.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/system.h>
arch/ia64/kernel/process.c +1 -0
@@ -28,6 +28,7 @@#include <linux/delay.h> #include <linux/kdebug.h> #include <linux/utsname.h> +#include <linux/syscalls.h> #include <asm/cpu.h> #include <asm/delay.h>
arch/ia64/kernel/signal.c +1 -0
@@ -19,6 +19,7 @@#include <linux/binfmts.h> #include <linux/unistd.h> #include <linux/wait.h> +#include <linux/syscalls.h> #include <asm/ia32.h> #include <asm/intrinsics.h>
arch/m32r/kernel/process.c +1 -0
@@ -26,6 +26,7 @@#include <linux/unistd.h> #include <linux/slab.h> #include <linux/hardirq.h> +#include <linux/syscalls.h> #include <asm/io.h> #include <asm/uaccess.h>
arch/m32r/kernel/signal.c +1 -0
@@ -21,6 +21,7 @@#include <linux/stddef.h> #include <linux/personality.h> #include <linux/freezer.h> +#include <linux/syscalls.h> #include <asm/cacheflush.h> #include <asm/ucontext.h> #include <asm/uaccess.h>
arch/m68k/kernel/process.c +1 -0
@@ -26,6 +26,7 @@#include <linux/reboot.h> #include <linux/init_task.h> #include <linux/mqueue.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/system.h>
arch/m68knommu/kernel/process.c +1 -0
@@ -29,6 +29,7 @@#include <linux/interrupt.h> #include <linux/reboot.h> #include <linux/fs.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/system.h>
arch/mips/kernel/linux32.c +0 -1
@@ -41,7 +41,6 @@#include <net/scm.h> #include <asm/compat-signal.h> -#include <asm/sim.h> #include <asm/uaccess.h> #include <asm/mmu_context.h> #include <asm/mman.h>
arch/mips/kernel/signal.c +1 -1
@@ -20,13 +20,13 @@#include <linux/unistd.h> #include <linux/compiler.h> #include <linux/uaccess.h> +#include <linux/syscalls.h> #include <asm/abi.h> #include <asm/asm.h> #include <linux/bitops.h> #include <asm/cacheflush.h> #include <asm/fpu.h> -#include <asm/sim.h> #include <asm/ucontext.h> #include <asm/cpu-features.h> #include <asm/war.h>
arch/mips/kernel/signal32.c +0 -1
@@ -27,7 +27,6 @@#include <asm/compat-signal.h> #include <linux/bitops.h> #include <asm/cacheflush.h> -#include <asm/sim.h> #include <asm/ucontext.h> #include <asm/system.h> #include <asm/fpu.h>
arch/mips/kernel/syscall.c +0 -1
@@ -35,7 +35,6 @@#include <asm/cacheflush.h> #include <asm/asm-offsets.h> #include <asm/signal.h> -#include <asm/sim.h> #include <asm/shmparam.h> #include <asm/sysmips.h> #include <asm/uaccess.h>
arch/mn10300/kernel/process.c +1 -0
@@ -26,6 +26,7 @@#include <linux/percpu.h> #include <linux/err.h> #include <linux/fs.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/pgtable.h> #include <asm/system.h>
arch/mn10300/kernel/signal.c +1 -0
@@ -23,6 +23,7 @@#include <linux/tty.h> #include <linux/personality.h> #include <linux/suspend.h> +#include <linux/syscalls.h> #include <asm/cacheflush.h> #include <asm/ucontext.h> #include <asm/uaccess.h>
arch/parisc/kernel/process.c +1 -0
@@ -46,6 +46,7 @@#include <linux/stddef.h> #include <linux/unistd.h> #include <linux/kallsyms.h> +#include <linux/syscalls.h> #include <asm/io.h> #include <asm/asm-offsets.h>
arch/parisc/kernel/signal.c +1 -0
@@ -25,6 +25,7 @@#include <linux/stddef.h> #include <linux/compat.h> #include <linux/elf.h> +#include <linux/syscalls.h> #include <asm/ucontext.h> #include <asm/rt_sigframe.h> #include <asm/uaccess.h>
arch/s390/kernel/entry.h +0 -18
@@ -25,36 +25,18 @@ void __init startup_init(void);void die (const char * str,struct pt_regs * regs,long err);struct new_utsname ; -struct mmap_arg_struct ;struct fadvise64_64_args ; -struct old_sigaction ; -struct sel_arg_struct ;long sys_pipe (unsigned long __user *fildes); -long sys_mmap2 (struct mmap_arg_struct __user *arg); -long old_mmap (struct mmap_arg_struct __user *arg); -long sys_ipc (uint call,int first,unsigned long second, -unsigned long third,void __user *ptr);long s390x_newuname (struct new_utsname __user *name);long s390x_personality (unsigned long personality);long s390_fadvise64 (int fd,u32 offset_high,u32 offset_low,size_t len,int advice);long s390_fadvise64_64 (struct fadvise64_64_args __user *args);long s390_fallocate (int fd,int mode,loff_t offset,u32 len_high,u32 len_low); -long sys_fork (void ); -long sys_clone (void ); -long sys_vfork (void );void execve_tail (void ); -long sys_execve (void ); -int sys_sigsuspend (int history0,int history1,old_sigset_t mask); -long sys_sigaction (int sig,const struct old_sigaction __user *act, -struct old_sigaction __user *oact); -long sys_sigaltstack (const stack_t __user *uss,stack_t __user *uoss); -long sys_sigreturn (void ); -long sys_rt_sigreturn (void );long sys32_sigreturn (void );long sys32_rt_sigreturn (void ); -long old_select (struct sel_arg_struct __user *arg);long sys_ptrace (long request,long pid,long addr,long data);#endif /* _ENTRY_H */
arch/s390/kernel/process.c +1 -0
@@ -38,6 +38,7 @@#include <linux/utsname.h> #include <linux/tick.h> #include <linux/elfcore.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/pgtable.h> #include <asm/system.h>
arch/s390/kernel/signal.c +1 -0
@@ -24,6 +24,7 @@#include <linux/tty.h> #include <linux/personality.h> #include <linux/binfmts.h> +#include <linux/syscalls.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/lowcore.h>
arch/s390/mm/fault.c +1 -0
@@ -29,6 +29,7 @@#include <linux/kprobes.h> #include <linux/uaccess.h> #include <linux/hugetlb.h> +#include <linux/syscalls.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/s390_ext.h>
arch/sh/kernel/process_32.c +1 -0
@@ -20,6 +20,7 @@#include <linux/reboot.h> #include <linux/fs.h> #include <linux/preempt.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/mmu_context.h> #include <asm/pgalloc.h>
arch/sh/kernel/process_64.c +1 -0
@@ -25,6 +25,7 @@#include <linux/module.h> #include <linux/proc_fs.h> #include <linux/io.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/pgtable.h> #include <asm/mmu_context.h>
arch/sh/kernel/signal_32.c +1 -0
@@ -24,6 +24,7 @@#include <linux/binfmts.h> #include <linux/freezer.h> #include <linux/io.h> +#include <linux/syscalls.h> #include <asm/system.h> #include <asm/ucontext.h> #include <asm/uaccess.h>
arch/sh/kernel/signal_64.c +1 -0
@@ -22,6 +22,7 @@#include <linux/ptrace.h> #include <linux/unistd.h> #include <linux/stddef.h> +#include <linux/syscalls.h> #include <asm/ucontext.h> #include <asm/uaccess.h> #include <asm/pgtable.h>
arch/sparc/kernel/signal.c +1 -0
@@ -18,6 +18,7 @@#include <linux/smp.h> #include <linux/binfmts.h> /* do_coredum */ #include <linux/bitops.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/ptrace.h>
arch/um/kernel/exec.c +1 -0
@@ -8,6 +8,7 @@#include "linux/smp_lock.h" #include "linux/ptrace.h" #include "linux/sched.h" +#include "linux/syscalls.h" #include "asm/current.h" #include "asm/processor.h" #include "asm/uaccess.h"
arch/um/kernel/signal.c +1 -2
@@ -6,8 +6,7 @@#include <linux/module.h> #include <linux/ptrace.h> #include <linux/sched.h> -#include <asm/siginfo.h> -#include <asm/signal.h> +#include <linux/syscalls.h> #include <asm/unistd.h> #include "frame_kern.h" #include "kern_util.h"
arch/um/kernel/syscall.c +1 -0
@@ -8,6 +8,7 @@#include "linux/mm.h" #include "linux/sched.h" #include "linux/utsname.h" +#include "linux/syscalls.h" #include "asm/current.h" #include "asm/mman.h" #include "asm/uaccess.h"
arch/v850/kernel/process.c +1 -0
@@ -23,6 +23,7 @@#include <linux/user.h> #include <linux/a.out.h> #include <linux/reboot.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/system.h>
arch/v850/kernel/signal.c +1 -0
@@ -26,6 +26,7 @@#include <linux/stddef.h> #include <linux/personality.h> #include <linux/tty.h> +#include <linux/syscalls.h> #include <asm/ucontext.h> #include <asm/uaccess.h>
arch/x86/kernel/ldt.c +1 -0
@@ -12,6 +12,7 @@#include <linux/mm.h> #include <linux/smp.h> #include <linux/vmalloc.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/system.h>
arch/x86/kernel/process_32.c +1 -0
@@ -37,6 +37,7 @@#include <linux/tick.h> #include <linux/percpu.h> #include <linux/prctl.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/pgtable.h>
arch/x86/kernel/process_64.c +1 -0
@@ -37,6 +37,7 @@#include <linux/kdebug.h> #include <linux/tick.h> #include <linux/prctl.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/pgtable.h>
arch/x86/kernel/signal_32.c +1 -0
@@ -20,6 +20,7 @@#include <linux/elf.h> #include <linux/smp.h> #include <linux/mm.h> +#include <linux/syscalls.h> #include <asm/processor.h> #include <asm/ucontext.h>
arch/x86/kernel/signal_64.c +1 -0
@@ -19,6 +19,7 @@#include <linux/stddef.h> #include <linux/personality.h> #include <linux/compiler.h> +#include <linux/syscalls.h> #include <asm/processor.h> #include <asm/ucontext.h> #include <asm/uaccess.h>
arch/x86/kernel/tls.c +1 -0
@@ -3,6 +3,7 @@#include <linux/sched.h> #include <linux/user.h> #include <linux/regset.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/desc.h>
arch/x86/kernel/vm86_32.c +1 -0
@@ -41,6 +41,7 @@#include <linux/ptrace.h> #include <linux/audit.h> #include <linux/stddef.h> +#include <linux/syscalls.h> #include <asm/uaccess.h> #include <asm/io.h>
include/asm-alpha/syscalls.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_APLHA_SYSCALLS_H +#define _ASM_APLHA_SYSCALLS_H + +/* kernel/signal.c */ +asmlinkage long sys_rt_sigaction (int ,const struct sigaction __user *, +struct sigaction __user *,size_t , +void __user *restorer); +asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *); + +#endif /* _ASM_APLHA_SYSCALLS_H */
include/asm-arm/syscalls.h new file +73 -0
73 lines not on this page · raw message
include/asm-avr32/syscalls.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_AVR32_SYSCALLS_H +#define _ASM_AVR32_SYSCALLS_H + +/* kernel/process.c */ +asmlinkage int sys_fork(struct pt_regs); +asmlinkage int sys_clone(unsigned long, unsigned long, +unsigned long ,unsigned long , +struct pt_regs *); +asmlinkage int sys_vfork(struct pt_regs); +asmlinkage int sys_execve(char __user *, char __user *__user *, +char __user *__user *,struct pt_regs *); + +/* kernel/signal.c */ +asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *, +struct pt_regs *); +asmlinkage int sys_rt_sigreturn(struct pt_regs *); + +/* kernel/sys_avr32.c */ +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,off_t ); + +/* mm/cache.c */ +asmlinkage int sys_cacheflush(int, void __user *, size_t); + +#endif /* _ASM_AVR32_SYSCALLS_H */
include/asm-blackfin/syscalls.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_BLACKFIN_SYSCALLS_H +#define _ASM_BLACKFIN_SYSCALLS_H + +/* kernel/process.c */ +asmlinkage int sys_execve(char __user *, char __user * __user *, +char __user *__user *); + +/* kernel/signal.c */ +asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *); + +/* kernel/sys_bfin.c */ +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +asmlinkage void *sys_sram_alloc(size_t, unsigned long); +asmlinkage int sys_sram_free(const void *); +asmlinkage void *sys_dma_memcpy(void *, const void *, size_t); + +#endif /* _ASM_BLACKFIN_SYSCALLS_H */
include/asm-cris/syscalls.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_CRIS_SYSCALLS_H +#define _ASM_CRIS_SYSCALLS_H + +/* kernel/sys_cris.c */ +asmlinkage unsigned long old_mmap (unsigned long __user *); +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); + +#endif /* _ASM_CRIS_SYSCALLS_H */
include/asm-frv/syscalls.h new file +37 -0
@@ -0,0 +1,37 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_FRV_SYSCALLS_H +#define _ASM_FRV_SYSCALLS_H + +/* kernel/process.c */ +asmlinkage int sys_fork(void); +asmlinkage int sys_vfork(void); +asmlinkage int sys_clone(unsigned long, unsigned long, int __user *, +int __user *,int __user *); +asmlinkage int sys_execve(char __user *, char __user * __user *, +char __user *__user *); + +/* kernel/signal.c */ +asmlinkage int sys_sigsuspend(int, int, old_sigset_t); +asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, +struct old_sigaction __user *); +asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *); +asmlinkage int sys_sigreturn(void); +asmlinkage int sys_rt_sigreturn(void); + +/* kernel/sys_frv.c */ +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +asmlinkage long sys_ipc (unsigned long ,unsigned long ,unsigned long , +unsigned long ,void __user *,unsigned long ); + +#endif /* _ASM_FRV_SYSCALLS_H */
include/asm-h8300/syscalls.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_H8300_SYSCALLS_H +#define _ASM_H8300_SYSCALLS_H + +/* kernel/process.c */ +asmlinkage int sys_execve(char *, char **, char **, int, ...); + +/* kernel/signal.c */ +asmlinkage int sys_sigaction(int, const struct old_sigaction *, +struct old_sigaction *); +asmlinkage int sys_sigaltstack(const stack_t *, stack_t *); + +/* kernel/sys_h8300.c */ +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +struct mmap_arg_struct ; +asmlinkage int old_mmap(struct mmap_arg_struct *); +struct sel_arg_struct ; +asmlinkage int old_select(struct sel_arg_struct *); +asmlinkage int sys_ipc(uint, int, int, int, void *, long); +asmlinkage int sys_cacheflush(unsigned long, int, int, unsigned long); + +#endif /* _ASM_H8300_SYSCALLS_H */
include/asm-ia64/syscalls.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_IA64_SYSCALLS_H +#define _ASM_IA64_SYSCALLS_H + +/* kernel/process.c */ +long sys_execve (char __user *,char __user *__user *, +char __user *__user *,struct pt_regs *); + +/* kernel/signal.c */ +asmlinkage long sys_sigaltstack (const stack_t __user *,stack_t __user *, +long ,long ,long ,long ,long ,long , +struct pt_regs ); + +/* kernel/sys_ia64.c */ +asmlinkage unsigned long sys_getpagesize (void ); +asmlinkage long sys_pipe (void ); +asmlinkage unsigned long sys_mmap2 (unsigned long ,unsigned long , +int ,int ,int ,long ); +asmlinkage unsigned long sys_mmap (unsigned long ,unsigned long , +int ,int ,int ,long ); +#ifndef CONFIG_PCI +asmlinkage long sys_pciconfig_read (unsigned long ,unsigned long , +unsigned long ,unsigned long ,void *); +asmlinkage long sys_pciconfig_write (unsigned long ,unsigned long , +unsigned long ,unsigned long ,void *); +#endif /* CONFIG_PCI */ + +#endif /* _ASM_IA64_SYSCALLS_H */
include/asm-ia64/unistd.h +1 -13
@@ -342,22 +342,10 @@#include <linux/types.h> #include <linux/linkage.h> #include <linux/compiler.h> +#include <linux/syscalls.h> extern long __ia64_syscall (long a0,long a1,long a2,long a3,long a4,long nr); -asmlinkage unsigned long sys_mmap ( -unsigned long addr,unsigned long len, -int prot,int flags, -int fd,long off); -asmlinkage unsigned long sys_mmap2 ( -unsigned long addr,unsigned long len, -int prot,int flags, -int fd,long pgoff); -struct pt_regs ; -struct sigaction ; -long sys_execve (char __user *filename,char __user *__user *argv, -char __user *__user *envp,struct pt_regs *regs); -asmlinkage long sys_pipe (void ); asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act, struct sigaction __user *oact,
include/asm-m32r/syscalls.h new file +49 -0
49 lines not on this page · raw message
include/asm-m68k/syscalls.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_M68K_SYSCALLS_H +#define _ASM_M68K_SYSCALLS_H + +/* kernel/process.c */ +asmlinkage int sys_execve(char __user *, char __user * __user *, +char __user *__user *); + +/* kernel/signal.c */ +asmlinkage int sys_sigaction(int, const struct old_sigaction __user *, +struct old_sigaction __user *); +asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *); + +/* kernel/sys_m68k.c */ +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +struct mmap_arg_struct ; +asmlinkage int old_mmap(struct mmap_arg_struct __user *); +struct sel_arg_struct ; +asmlinkage int old_select(struct sel_arg_struct __user *); +asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); +asmlinkage int sys_cacheflush(unsigned long, int, int, unsigned long); +asmlinkage int sys_getpagesize(void); + +#endif /* _ASM_M68K_SYSCALLS_H */
include/asm-m68knommu/syscalls.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_M68KNOMMU_SYSCALLS_H +#define _ASM_M68KNOMMU_SYSCALLS_H + +/* kernel/process.c */ +asmlinkage int sys_execve(char *, char **, char **); + +/* kernel/signal.c */ +asmlinkage int sys_sigaction(int, const struct old_sigaction *, +struct old_sigaction *); +asmlinkage int sys_sigaltstack(const stack_t *, stack_t *); + +/* kernel/sys_m68k.c */ +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +struct mmap_arg_struct ; +asmlinkage int old_mmap(struct mmap_arg_struct *); +struct sel_arg_struct ; +asmlinkage int old_select(struct sel_arg_struct *); +asmlinkage int sys_ipc(uint, int, int, int, void *, long); +asmlinkage int sys_cacheflush(unsigned long, int, int, unsigned long); +asmlinkage int sys_getpagesize(void); + +#endif /* _ASM_M68KNOMMU_SYSCALLS_H */
include/asm-mips/syscalls.h new file +51 -0
51 lines not on this page · raw message
include/asm-mn10300/syscalls.h new file +41 -0
41 lines not on this page · raw message
include/asm-parisc/syscalls.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_PARISC_SYSCALLS_H +#define _ASM_PARISC_SYSCALLS_H + +/* kernel/process.c */ +int sys_clone (unsigned long ,unsigned long ,struct pt_regs *); +int sys_vfork (struct pt_regs *); +asmlinkage int sys_execve(struct pt_regs *); + +/* kernel/signal.c */ +void sys_rt_sigreturn (struct pt_regs *,int ); + +/* kernel/sys_parisc.c */ +asmlinkage unsigned long sys_mmap2 (unsigned long ,unsigned long , +unsigned long ,unsigned long , +unsigned long ,unsigned long ); +asmlinkage unsigned long sys_mmap (unsigned long ,unsigned long , +unsigned long ,unsigned long , +unsigned long ,unsigned long ); +#ifdef CONFIG_64BIT +asmlinkage long sys_truncate64 (const char __user *,unsigned long ); +asmlinkage long sys_ftruncate64 (unsigned int ,unsigned long ); +asmlinkage long sys_fcntl64 (unsigned int ,unsigned int ,unsigned long ); +#endif + +#endif /* _ASM_PARISC_SYSCALLS_H */
include/asm-s390/syscalls.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_S390_SYSCALLS_H +#define _ASM_S390_SYSCALLS_H + +/* kernel/process.c */ +asmlinkage long sys_fork (void ); +asmlinkage long sys_clone (void ); +asmlinkage long sys_vfork (void ); +asmlinkage long sys_execve (void ); + +/* kernel/signal.c */ +asmlinkage int sys_sigsuspend(int, int, old_sigset_t); +asmlinkage long sys_sigaction (int , +const struct old_sigaction __user *, +struct old_sigaction __user *); +asmlinkage long sys_sigaltstack (const stack_t __user *, +stack_t __user *); +asmlinkage long sys_sigreturn (void ); +asmlinkage long sys_rt_sigreturn (void ); + +/* kernel/sys_s390.c */ +struct mmap_arg_struct ; +asmlinkage long sys_mmap2 (struct mmap_arg_struct __user *); +asmlinkage long old_mmap (struct mmap_arg_struct __user *); +asmlinkage long sys_ipc (uint ,int ,unsigned long , +unsigned long ,void __user *); + +#endif /* _ASM_S390_SYSCALLS_H */
include/asm-sh/syscalls.h new file +88 -0
88 lines not on this page · raw message
include/asm-sparc/syscalls.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_SPARC_SYSCALLS_H +#define _ASM_SPARC_SYSCALLS_H + +/* kernel/signal.c */ +asmlinkage int sys_sigsuspend(old_sigset_t); + +/* kernel/sys_sparc.c */ +asmlinkage unsigned long sys_getpagesize (void ); +asmlinkage int sys_ipc(uint, int, int, int, void __user *, long); +asmlinkage long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +asmlinkage long sys_mmap (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +asmlinkage long sys_rt_sigaction (int ,const struct sigaction __user *, +struct sigaction __user *, +void __user *,size_t ); +asmlinkage int sys_getdomainname(char __user *, int); + +#endif /* _ASM_SPARC_SYSCALLS_H */
include/asm-um/syscalls.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_UM_SYSCALLS_H +#define _ASM_UM_SYSCALLS_H + +/* kernel/exec.c */ +long sys_execve (char __user *,char __user *__user *, +char __user *__user *); + +/* kernel/signal.c */ +long sys_sigsuspend (int ,int ,old_sigset_t ); +long sys_sigaltstack (const stack_t __user *,stack_t __user *); + +/* kernel/syscall.c */ +long sys_fork (void ); +long sys_vfork (void ); +long sys_mmap2 (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +long old_mmap (unsigned long ,unsigned long ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +long sys_uname (struct old_utsname __user *); + +#endif /* _ASM_UM_SYSCALLS_H */
include/asm-v850/syscalls.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_V850_SYSCALLS_H +#define _ASM_V850_SYSCALLS_H + +/* kernel/process.c */ +int sys_execve (char *,char **,char **,struct pt_regs *); + +/* kernel/signal.c */ +asmlinkage int sys_sigsuspend(old_sigset_t, struct pt_regs *); +asmlinkage int sys_rt_sigsuspend(sigset_t *, size_t, struct pt_regs *); +asmlinkage int sys_sigaction(int, const struct old_sigaction *, +struct old_sigaction *); +asmlinkage int sys_sigaltstack(const stack_t *, stack_t *, struct pt_regs *); +asmlinkage int sys_sigreturn(struct pt_regs *); +asmlinkage int sys_rt_sigreturn(struct pt_regs *); + +/* kernel/syscalls.c */ +int sys_ipc (uint ,int ,int ,int ,void *,long ); +unsigned long sys_mmap2 (unsigned long ,size_t ,unsigned long , +unsigned long ,unsigned long ,unsigned long ); +unsigned long sys_mmap (unsigned long ,size_t ,unsigned long , +unsigned long ,unsigned long ,off_t ); + +#endif /* _ASM_V850_SYSCALLS_H */
include/asm-x86/syscalls.h new file +83 -0
83 lines not on this page · raw message
include/asm-xtensa/syscalls.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* syscalls.h - Linux syscall interfaces (arch-specific) +* +* Copyright (c) 2008 Jaswinder Singh +* +* This file is released under the GPLv2. +* See the file COPYING for more details. +* +* Please do not call me directly, include linux/syscalls.h +*/ + +#ifndef _ASM_XTENSA_SYSCALLS_H +#define _ASM_XTENSA_SYSCALLS_H + +/* define arch dependent syscalls here */ + +#endif /* _ASM_XTENSA_SYSCALLS_H */
include/linux/syscalls.h +4 -0
@@ -54,6 +54,8 @@ struct compat_stat;struct compat_timeval ;struct robust_list_head ;struct getcpu_cache ; +struct oldold_utsname ; +struct old_utsname ;#include <linux/types.h> #include <linux/aio_abi.h>
@@ -65,6 +67,8 @@ struct getcpu_cache;#include <linux/quota.h> #include <linux/key.h> +#include <asm/syscalls.h> +asmlinkage long sys_time (time_t __user *tloc);asmlinkage long sys_stime (time_t __user *tptr); asmlinkage long sys_gettimeofday(struct timeval __user *tv,
Signature · 1 line
1.5.5.1
Quoted 13 lines · Jaswinder Singh
From: Jaswinder Singh <[email protected]>
Date: Sun, 20 Jul 2008 14:39:00 +0530
To: LKML <[email protected]>, Ingo Molnar <[email protected]>,
David Woodhouse <[email protected]>, [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: [PATCH] Introducingasm/syscalls.h
Content-Type: text/plain
Quoted 4 lines
Declaring arch-dependent syscalls for all architectures Beneficial for kernel and userspace
Signed-off-by Jaswinder Singh <[email protected]>
You write beneficial for userspace - but don't add <asm/syscall.h> to include/asm-generic/Kbuild.asm. Fortunately. I doubt there is any good reason for userspace to know about kernel prototypes. For configurations where userspace and kernel API differ - think 32-bit code running on a 64-bit kernel or similar - that would be a receipe for disaster.
Ralf
Hello Ralf,
Quoted 14 lines · Ralf Baechle
Quoted 13 lines · Jaswinder Singh
From: Jaswinder Singh <[email protected]>
Date: Sun, 20 Jul 2008 14:39:00 +0530
To: LKML <[email protected]>, Ingo Molnar <[email protected]>,
David Woodhouse <[email protected]>, [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: [PATCH] Introducingasm/syscalls.h
Content-Type: text/plain
Quoted 7 lines
Quoted 4 lines
Declaring arch-dependent syscalls for all architectures Beneficial for kernel and userspace
Signed-off-by Jaswinder Singh <[email protected]>You write beneficial for userspace - but don't add <
asm/syscall.h> toinclude/asm-generic/Kbuild.asm.
(quoted diff) +0 -0
b/include/asm-generic/Kbuild.asm
index 7cd25b8..af24926 100644
include/asm-generic/Kbuild.asm +1 -0
@@ -27,6 +27,7 @@ unifdef-y += socket.h unifdef-y += sockios.h unifdef-y += stat.h unifdef-y += statfs.h +unifdef-y += syscalls.h unifdef-y += termbits.h unifdef-y += termios.h unifdef-y += types.h
Thank you,
Jaswinder Singh.
Hello Ralf,
Quoted 11 lines · Jaswinder Singh
Quoted 3 lines
You write beneficial for userspace - but don't add <
asm/syscall.h> toinclude/asm-generic/Kbuild.asm.include/asm-generic/Kbuild.asm +0
-0
include/asm-generic/Kbuild.asm unifdef-y += socket.h · line 33
Quoted 7 lines
include/asm-generic/Kbuild.asm +1
-0@@ -27,6 +27,7 @@ unifdef-y += socket.h unifdef-y += sockios.h unifdef-y += stat.h unifdef-y += statfs.h +unifdef-y += syscalls.h unifdef-y += termbits.h unifdef-y += termios.h unifdef-y += types.h
I think, adding syscalls.h is not required in include/asm-generic/Kbuild.asm. Beneficial to userspace, I mean for reference purpose only.
Thank you,
Jaswinder Singh.
Quoted 12 lines · Jaswinder Singh
index 7cd25b8..af24926 100644
include/asm-generic/Kbuild.asm +1
-0@@ -27,6 +27,7 @@ unifdef-y += socket.h unifdef-y += sockios.h unifdef-y += stat.h unifdef-y += statfs.h +unifdef-y += syscalls.h unifdef-y += termbits.h unifdef-y += termios.h unifdef-y += types.h
Quoted 1 line
Thank you,
No. Why would userspace want to know about these entry points?
I'd also like to point you at two other commits I just made:
http://www.linux-mips.org/g/linux/a599080f
http://www.linux-mips.org/g/linux/3c339dba
The first deletes the unused sys_truncate64 and sys_ftruncate64 entry-points and the second resolves conflicting prototypes for sys_pipe() - MIPS uses it's own sys_pipe() which conflicts with the one declared in <linux/syscalls.h>. The patch below takes care of that and also includes the ptrace.h which is needed to make <asm/syscalls.h> work without relying on other headers having been included previously. Could you fold that into your patch? Thanks,
Ralf
include/asm-mips/syscalls.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
include/asm-mips/syscalls.h +2 -7
@@ -12,6 +12,7 @@#ifndef _ASM_MIPS_SYSCALLS_H#define _ASM_MIPS_SYSCALLS_H +#include <linux/ptrace.h> #include <asm/sim.h> /* kernel/signal.c */
@@ -26,14 +27,8 @@ asmlinkage int sys_rt_sigsuspend(nabi_no asmlinkage int sys_sigaltstack(nabi_no_regargs struct pt_regs); asmlinkage void sys_rt_sigreturn(nabi_no_regargs struct pt_regs); -/* kernel/linux32.c */ -asmlinkage int sys_truncate64(const char __user *, unsigned int, -unsigned int ); -asmlinkage int sys_ftruncate64(unsigned int, unsigned int, -unsigned int ); -/* kernel/syscalls.c */ -asmlinkage int sys_pipe(nabi_no_regargs volatile struct pt_regs); +asmlinkage int sysm_pipe(nabi_no_regargs volatile struct pt_regs);asmlinkage unsigned long old_mmap (unsigned long ,unsigned long ,int ,int ,int ,off_t );
Hello Ralf,
Quoted 14 lines · Ralf Baechle
Quoted 12 lines · Jaswinder Singh
index 7cd25b8..af24926 100644
include/asm-generic/Kbuild.asm +1
-0@@ -27,6 +27,7 @@ unifdef-y += socket.h unifdef-y += sockios.h unifdef-y += stat.h unifdef-y += statfs.h +unifdef-y += syscalls.h unifdef-y += termbits.h unifdef-y += termios.h unifdef-y += types.h
Quoted 4 lines
Quoted 1 line
Thank you,
No. Why would userspace want to know about these entry points?
Yes, I am totally agree with you, I also point this in my previous email.
Thank you,
Jaswinder Singh.
Quoted 3 lines · Jaswinder Singh
Declaring arch-dependent syscalls for all architectures Beneficial for kernel and userspace
Not really beneficial for userspace at all. Don't expose it.
I'm a little dubious about touching all architectures at once.
It might be nicer to do a first patch which adds an _empty_ <asm/syscalls.h> on each platform, and includes that from <linux/syscalls.h>. And then follow up with one patch per architecture.
Have you compile-tested them all?
Signature · 1 line
dwmw2