Skip to content

Commit

Permalink
asm-generic/unistd.h: support new process_vm_{readv,write} syscalls
Browse files Browse the repository at this point in the history
Also prototype the "compat" functions so they can be referenced
from C code.

Signed-off-by: Chris Metcalf <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
  • Loading branch information
cmetcalf-tilera committed Dec 3, 2011
1 parent c2851a9 commit a67ba43
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/asm-generic/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,15 @@ __SYSCALL(__NR_syncfs, sys_syncfs)
__SYSCALL(__NR_setns, sys_setns)
#define __NR_sendmmsg 269
__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg)
#define __NR_process_vm_readv 270
__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
compat_sys_process_vm_readv)
#define __NR_process_vm_writev 271
__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
compat_sys_process_vm_writev)

#undef __NR_syscalls
#define __NR_syscalls 270
#define __NR_syscalls 272

/*
* All syscalls below here should go away really,
Expand Down
9 changes: 9 additions & 0 deletions include/linux/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,5 +552,14 @@ extern ssize_t compat_rw_copy_check_uvector(int type,

extern void __user *compat_alloc_user_space(unsigned long len);

asmlinkage ssize_t compat_sys_process_vm_readv(compat_pid_t pid,
const struct compat_iovec __user *lvec,
unsigned long liovcnt, const struct compat_iovec __user *rvec,
unsigned long riovcnt, unsigned long flags);
asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid,
const struct compat_iovec __user *lvec,
unsigned long liovcnt, const struct compat_iovec __user *rvec,
unsigned long riovcnt, unsigned long flags);

#endif /* CONFIG_COMPAT */
#endif /* _LINUX_COMPAT_H */

0 comments on commit a67ba43

Please sign in to comment.