summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-03-19 17:38:31 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2018-04-02 20:16:09 +0200
commit36028d5dd71175c332ab634e089e16dbdfe3812b (patch)
treed25084dfe2fe7c0a070cad40333a365af076695c /include/linux
parentdf260e21e6cd5d2dfc1fe9b6a3bbf747e72b3bed (diff)
fs: add ksys_p{read,write}64() helpers; remove in-kernel calls to syscalls
Using the ksys_p{read,write}64() wrappers allows us to get rid of in-kernel calls to the sys_pread64() and sys_pwrite64() syscalls. The ksys_ prefix denotes that this function is meant as a drop-in replacement for the syscall. In particular, it uses the same calling convention as sys_p{read,write}64(). This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/syscalls.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 78b79e3a1279..a30e4c2d0c27 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -965,6 +965,10 @@ int ksys_unshare(unsigned long unshare_flags);
int ksys_setsid(void);
int ksys_sync_file_range(int fd, loff_t offset, loff_t nbytes,
unsigned int flags);
+ssize_t ksys_pread64(unsigned int fd, char __user *buf, size_t count,
+ loff_t pos);
+ssize_t ksys_pwrite64(unsigned int fd, const char __user *buf,
+ size_t count, loff_t pos);
/*
* The following kernel syscall equivalents are just wrappers to fs-internal