Skip to content

Commit a67ba43

Browse files
asm-generic/unistd.h: support new process_vm_{readv,write} syscalls
Also prototype the "compat" functions so they can be referenced from C code. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
1 parent c2851a9 commit a67ba43

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎include/asm-generic/unistd.h‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,9 +685,15 @@ __SYSCALL(__NR_syncfs, sys_syncfs)
685685
__SYSCALL(__NR_setns, sys_setns)
686686
#define __NR_sendmmsg 269
687687
__SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg)
688+
#define __NR_process_vm_readv 270
689+
__SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \
690+
compat_sys_process_vm_readv)
691+
#define __NR_process_vm_writev 271
692+
__SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \
693+
compat_sys_process_vm_writev)
688694

689695
#undef __NR_syscalls
690-
#define __NR_syscalls 270
696+
#define __NR_syscalls 272
691697

692698
/*
693699
* All syscalls below here should go away really,

‎include/linux/compat.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,5 +552,14 @@ extern ssize_t compat_rw_copy_check_uvector(int type,
552552

553553
extern void __user *compat_alloc_user_space(unsigned long len);
554554

555+
asmlinkage ssize_t compat_sys_process_vm_readv(compat_pid_t pid,
556+
const struct compat_iovec __user *lvec,
557+
unsigned long liovcnt, const struct compat_iovec __user *rvec,
558+
unsigned long riovcnt, unsigned long flags);
559+
asmlinkage ssize_t compat_sys_process_vm_writev(compat_pid_t pid,
560+
const struct compat_iovec __user *lvec,
561+
unsigned long liovcnt, const struct compat_iovec __user *rvec,
562+
unsigned long riovcnt, unsigned long flags);
563+
555564
#endif /* CONFIG_COMPAT */
556565
#endif /* _LINUX_COMPAT_H */

0 commit comments

Comments
 (0)