···145145/* And here is where the userspace process can look up the cookie value146146 * to retrieve the path.147147 */148148-SYSCALL_DEFINE(lookup_dcookie)(u64 cookie64, char __user * buf, size_t len)148148+SYSCALL_DEFINE3(lookup_dcookie, u64, cookie64, char __user *, buf, size_t, len)149149{150150 unsigned long cookie = (unsigned long)cookie64;151151 int err = -EINVAL;···201201 mutex_unlock(&dcookie_mutex);202202 return err;203203}204204-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS205205-asmlinkage long SyS_lookup_dcookie(u64 cookie64, long buf, long len)206206-{207207- return SYSC_lookup_dcookie(cookie64, (char __user *) buf, (size_t) len);208208-}209209-SYSCALL_ALIAS(sys_lookup_dcookie, SyS_lookup_dcookie);210210-#endif211204212205static int dcookie_init(void)213206{
···212212213213/* LFS versions of truncate are only needed on 32 bit machines */214214#if BITS_PER_LONG == 32215215-SYSCALL_DEFINE(truncate64)(const char __user * path, loff_t length)215215+SYSCALL_DEFINE2(truncate64, const char __user *, path, loff_t, length)216216{217217 return do_sys_truncate(path, length);218218}219219-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS220220-asmlinkage long SyS_truncate64(long path, loff_t length)221221-{222222- return SYSC_truncate64((const char __user *) path, length);223223-}224224-SYSCALL_ALIAS(sys_truncate64, SyS_truncate64);225225-#endif226219227227-SYSCALL_DEFINE(ftruncate64)(unsigned int fd, loff_t length)220220+SYSCALL_DEFINE2(ftruncate64, unsigned int, fd, loff_t, length)228221{229222 long ret = do_sys_ftruncate(fd, length, 0);230223 /* avoid REGPARM breakage on x86: */231224 asmlinkage_protect(2, ret, fd, length);232225 return ret;233226}234234-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS235235-asmlinkage long SyS_ftruncate64(long fd, loff_t length)236236-{237237- return SYSC_ftruncate64((unsigned int) fd, length);238238-}239239-SYSCALL_ALIAS(sys_ftruncate64, SyS_ftruncate64);240240-#endif241227#endif /* BITS_PER_LONG == 32 */242228243229···285299 return ret;286300}287301288288-SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len)302302+SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)289303{290304 struct fd f = fdget(fd);291305 int error = -EBADF;···296310 }297311 return error;298312}299299-300300-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS301301-asmlinkage long SyS_fallocate(long fd, long mode, loff_t offset, loff_t len)302302-{303303- return SYSC_fallocate((int)fd, (int)mode, offset, len);304304-}305305-SYSCALL_ALIAS(sys_fallocate, SyS_fallocate);306306-#endif307313308314/*309315 * access() needs to use the real uid/gid, not the effective uid/gid.
+4-20
fs/read_write.c
···487487 return ret;488488}489489490490-SYSCALL_DEFINE(pread64)(unsigned int fd, char __user *buf,491491- size_t count, loff_t pos)490490+SYSCALL_DEFINE4(pread64, unsigned int, fd, char __user *, buf,491491+ size_t, count, loff_t, pos)492492{493493 struct fd f;494494 ssize_t ret = -EBADF;···506506507507 return ret;508508}509509-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS510510-asmlinkage long SyS_pread64(long fd, long buf, long count, loff_t pos)511511-{512512- return SYSC_pread64((unsigned int) fd, (char __user *) buf,513513- (size_t) count, pos);514514-}515515-SYSCALL_ALIAS(sys_pread64, SyS_pread64);516516-#endif517509518518-SYSCALL_DEFINE(pwrite64)(unsigned int fd, const char __user *buf,519519- size_t count, loff_t pos)510510+SYSCALL_DEFINE4(pwrite64, unsigned int, fd, const char __user *, buf,511511+ size_t, count, loff_t, pos)520512{521513 struct fd f;522514 ssize_t ret = -EBADF;···526534527535 return ret;528536}529529-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS530530-asmlinkage long SyS_pwrite64(long fd, long buf, long count, loff_t pos)531531-{532532- return SYSC_pwrite64((unsigned int) fd, (const char __user *) buf,533533- (size_t) count, pos);534534-}535535-SYSCALL_ALIAS(sys_pwrite64, SyS_pwrite64);536536-#endif537537538538/*539539 * Reduce an iovec's length in-place. Return the resulting number of segments
+4-22
fs/sync.c
···283283 * already-instantiated disk blocks, there are no guarantees here that the data284284 * will be available after a crash.285285 */286286-SYSCALL_DEFINE(sync_file_range)(int fd, loff_t offset, loff_t nbytes,287287- unsigned int flags)286286+SYSCALL_DEFINE4(sync_file_range, int, fd, loff_t, offset, loff_t, nbytes,287287+ unsigned int, flags)288288{289289 int ret;290290 struct fd f;···365365out:366366 return ret;367367}368368-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS369369-asmlinkage long SyS_sync_file_range(long fd, loff_t offset, loff_t nbytes,370370- long flags)371371-{372372- return SYSC_sync_file_range((int) fd, offset, nbytes,373373- (unsigned int) flags);374374-}375375-SYSCALL_ALIAS(sys_sync_file_range, SyS_sync_file_range);376376-#endif377368378369/* It would be nice if people remember that not all the world's an i386379370 when they introduce new system calls */380380-SYSCALL_DEFINE(sync_file_range2)(int fd, unsigned int flags,381381- loff_t offset, loff_t nbytes)371371+SYSCALL_DEFINE4(sync_file_range2, int, fd, unsigned int, flags,372372+ loff_t, offset, loff_t, nbytes)382373{383374 return sys_sync_file_range(fd, offset, nbytes, flags);384375}385385-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS386386-asmlinkage long SyS_sync_file_range2(long fd, long flags,387387- loff_t offset, loff_t nbytes)388388-{389389- return SYSC_sync_file_range2((int) fd, (unsigned int) flags,390390- offset, nbytes);391391-}392392-SYSCALL_ALIAS(sys_sync_file_range2, SyS_sync_file_range2);393393-#endif
+3-2
include/linux/syscalls.h
···9696#define __MAP(n,...) __MAP##n(__VA_ARGS__)97979898#define __SC_DECL(t, a) t a9999-#define __SC_LONG(t, a) long a9999+#define __TYPE_IS_LL(t) (__same_type((t)0, 0LL) || __same_type((t)0, 0ULL))100100+#define __SC_LONG(t, a) __typeof(__builtin_choose_expr(__TYPE_IS_LL(t), 0LL, 0L)) a100101#define __SC_CAST(t, a) (t) a101101-#define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(sizeof(type) > sizeof(long))102102+#define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(!__TYPE_IS_LL(t) && sizeof(t) > sizeof(long))102103103104#ifdef CONFIG_FTRACE_SYSCALLS104105#define __SC_STR_ADECL(t, a) #a
+2-16
mm/fadvise.c
···2525 * POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could2626 * deactivate the pages and clear PG_Referenced.2727 */2828-SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice)2828+SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice)2929{3030 struct fd f = fdget(fd);3131 struct address_space *mapping;···145145 fdput(f);146146 return ret;147147}148148-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS149149-asmlinkage long SyS_fadvise64_64(long fd, loff_t offset, loff_t len, long advice)150150-{151151- return SYSC_fadvise64_64((int) fd, offset, len, (int) advice);152152-}153153-SYSCALL_ALIAS(sys_fadvise64_64, SyS_fadvise64_64);154154-#endif155148156149#ifdef __ARCH_WANT_SYS_FADVISE64157150158158-SYSCALL_DEFINE(fadvise64)(int fd, loff_t offset, size_t len, int advice)151151+SYSCALL_DEFINE4(fadvise64, int, fd, loff_t, offset, size_t, len, int, advice)159152{160153 return sys_fadvise64_64(fd, offset, len, advice);161154}162162-#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS163163-asmlinkage long SyS_fadvise64(long fd, loff_t offset, long len, long advice)164164-{165165- return SYSC_fadvise64((int) fd, offset, (size_t)len, (int)advice);166166-}167167-SYSCALL_ALIAS(sys_fadvise64, SyS_fadvise64);168168-#endif169155170156#endif