@@ -185,8 +185,8 @@ SYSCALL_DEFINE1(s390_fadvise64_64, struct fadvise64_64_args __user *, args)
* to
* %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len
*/
-SYSCALL_DEFINE(s390_fallocate)(int fd, int mode, loff_t offset,
- u32 len_high, u32 len_low)
+SYSCALL_DEFINE(s390_fallocate, 5, int, fd, int, mode, loff_t, offset,
+ u32, len_high, u32, len_low)
{
return sys_fallocate(fd, mode, offset, ((u64)len_high << 32) | len_low);
}
@@ -145,7 +145,7 @@ out:
/* And here is where the userspace process can look up the cookie value
* to retrieve the path.
*/
-SYSCALL_DEFINE(lookup_dcookie)(u64 cookie64, char __user * buf, size_t len)
+SYSCALL_DEFINE(lookup_dcookie, 3, u64, cookie64, char __user *, buf, size_t, len)
{
unsigned long cookie = (unsigned long)cookie64;
int err = -EINVAL;
@@ -185,7 +185,7 @@ SYSCALL_DEFINE2(ftruncate, unsigned int, fd, unsigned long, length)
/* LFS versions of truncate are only needed on 32 bit machines */
#if BITS_PER_LONG == 32
-SYSCALL_DEFINE(truncate64)(const char __user * path, loff_t length)
+SYSCALL_DEFINE(truncate64, 2, const char __user *, path, loff_t, length)
{
return do_sys_truncate(path, length);
}
@@ -197,7 +197,7 @@ asmlinkage long SyS_truncate64(long path, loff_t length)
SYSCALL_ALIAS(sys_truncate64, SyS_truncate64);
#endif
-SYSCALL_DEFINE(ftruncate64)(unsigned int fd, loff_t length)
+SYSCALL_DEFINE(ftruncate64, 2, unsigned int, fd, loff_t, length)
{
long ret = do_sys_ftruncate(fd, length, 0);
/* avoid REGPARM breakage on x86: */
@@ -256,7 +256,7 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
return inode->i_op->fallocate(inode, mode, offset, len);
}
-SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len)
+SYSCALL_DEFINE(fallocate, 4, int, fd, int, mode, loff_t, offset, loff_t, len)
{
struct file *file;
int error = -EBADF;
@@ -423,8 +423,8 @@ SYSCALL_DEFINE3(write, unsigned int, fd, const char __user *, buf,
return ret;
}
-SYSCALL_DEFINE(pread64)(unsigned int fd, char __user *buf,
- size_t count, loff_t pos)
+SYSCALL_DEFINE(pread64, 4, unsigned int, fd, char __user *, buf,
+ size_t, count, loff_t, pos)
{
struct file *file;
ssize_t ret = -EBADF;
@@ -452,8 +452,8 @@ asmlinkage long SyS_pread64(long fd, long buf, long count, loff_t pos)
SYSCALL_ALIAS(sys_pread64, SyS_pread64);
#endif
-SYSCALL_DEFINE(pwrite64)(unsigned int fd, const char __user *buf,
- size_t count, loff_t pos)
+SYSCALL_DEFINE(pwrite64, 4, unsigned int, fd, const char __user *, buf,
+ size_t, count, loff_t, pos)
{
struct file *file;
ssize_t ret = -EBADF;
@@ -292,8 +292,8 @@ EXPORT_SYMBOL(generic_write_sync);
* already-instantiated disk blocks, there are no guarantees here that the data
* will be available after a crash.
*/
-SYSCALL_DEFINE(sync_file_range)(int fd, loff_t offset, loff_t nbytes,
- unsigned int flags)
+SYSCALL_DEFINE(sync_file_range, 4, int, fd, loff_t, offset, loff_t, nbytes,
+ unsigned int, flags)
{
int ret;
struct file *file;
@@ -387,8 +387,8 @@ SYSCALL_ALIAS(sys_sync_file_range, SyS_sync_file_range);
/* It would be nice if people remember that not all the world's an i386
when they introduce new system calls */
-SYSCALL_DEFINE(sync_file_range2)(int fd, unsigned int flags,
- loff_t offset, loff_t nbytes)
+SYSCALL_DEFINE(sync_file_range2, 4, int, fd, unsigned int, flags,
+ loff_t, offset, loff_t, nbytes)
{
return sys_sync_file_range(fd, offset, nbytes, flags);
}
@@ -251,7 +251,9 @@ extern struct trace_event_functions exit_syscall_print_funcs;
#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
-#define SYSCALL_DEFINE(name) static inline long SYSC_##name
+#define SYSCALL_DEFINE(name, x, ...) \
+ SYSCALL_METADATAx(sys_##name, sys_##name, x, syscall, __VA_ARGS__);\
+ static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__))
#define __SYSCALL_DEFINEx(x, name, ...) \
asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__)); \
@@ -266,7 +268,10 @@ extern struct trace_event_functions exit_syscall_print_funcs;
#else /* CONFIG_HAVE_SYSCALL_WRAPPERS */
-#define SYSCALL_DEFINE(name) asmlinkage long sys_##name
+#define SYSCALL_DEFINE(name, x, ...) \
+ SYSCALL_METADATAx(sys_##name, sys_##name, x, syscall, __VA_ARGS__);\
+ asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__))
+
#define __SYSCALL_DEFINEx(x, name, ...) \
asmlinkage long sys##name(__SC_DECL##x(__VA_ARGS__))
@@ -1074,7 +1074,7 @@ out_up:
return err;
}
-SYSCALL_DEFINE(semctl)(int semid, int semnum, int cmd, union semun arg)
+SYSCALL_DEFINE(semctl, 4, int, semid, int, semnum, int, cmd, union semun, arg)
{
int err = -EINVAL;
int version;
@@ -24,7 +24,7 @@
* POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could
* deactivate the pages and clear PG_Referenced.
*/
-SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice)
+SYSCALL_DEFINE(fadvise64_64, 4, int, fd, loff_t, offset, loff_t, len, int, advice)
{
struct file *file = fget(fd);
struct address_space *mapping;
@@ -144,7 +144,7 @@ SYSCALL_ALIAS(sys_fadvise64_64, SyS_fadvise64_64);
#ifdef __ARCH_WANT_SYS_FADVISE64
-SYSCALL_DEFINE(fadvise64)(int fd, loff_t offset, size_t len, int advice)
+SYSCALL_DEFINE(fadvise64, 4, int, fd, loff_t, offset, size_t, len, int, advice)
{
return sys_fadvise64_64(fd, offset, len, advice);
}
@@ -1372,7 +1372,7 @@ do_readahead(struct address_space *mapping, struct file *filp,
return 0;
}
-SYSCALL_DEFINE(readahead)(int fd, loff_t offset, size_t count)
+SYSCALL_DEFINE(readahead, 3, int, fd, loff_t, offset, size_t, count)
{
ssize_t ret;
struct file *file;