diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-04 05:17:50 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-06 10:30:44 -0500 |
commit | 5d70a59637911e84687b421afeb4c111a579fb2b (patch) | |
tree | 645055f75e5a47120128f17430f82da40fa00eff /ipc/compat.c | |
parent | 625b1d7e812d55df8d42253a134002c006de7468 (diff) |
ipc/compat: convert to COMPAT_SYSCALL_DEFINE
Convert all compat system call functions where all parameter types
have a size of four or less than four bytes, or are pointer types
to COMPAT_SYSCALL_DEFINE.
The implicit casts within COMPAT_SYSCALL_DEFINE will perform proper
zero and sign extension to 64 bit of all parameters if needed.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'ipc/compat.c')
-rw-r--r-- | ipc/compat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ipc/compat.c b/ipc/compat.c index e1f4ab65660c..98b9016cab6c 100644 --- a/ipc/compat.c +++ b/ipc/compat.c | |||
@@ -498,7 +498,7 @@ static inline int put_compat_msqid_ds(struct msqid64_ds *m, | |||
498 | return err; | 498 | return err; |
499 | } | 499 | } |
500 | 500 | ||
501 | long compat_sys_msgctl(int first, int second, void __user *uptr) | 501 | COMPAT_SYSCALL_DEFINE3(msgctl, int, first, int, second, void __user *, uptr) |
502 | { | 502 | { |
503 | int err, err2; | 503 | int err, err2; |
504 | struct msqid64_ds m64; | 504 | struct msqid64_ds m64; |
@@ -668,7 +668,7 @@ static inline int put_compat_shm_info(struct shm_info __user *ip, | |||
668 | return err; | 668 | return err; |
669 | } | 669 | } |
670 | 670 | ||
671 | long compat_sys_shmctl(int first, int second, void __user *uptr) | 671 | COMPAT_SYSCALL_DEFINE3(shmctl, int, first, int, second, void __user *, uptr) |
672 | { | 672 | { |
673 | void __user *p; | 673 | void __user *p; |
674 | struct shmid64_ds s64; | 674 | struct shmid64_ds s64; |
@@ -749,8 +749,9 @@ long compat_sys_shmctl(int first, int second, void __user *uptr) | |||
749 | return err; | 749 | return err; |
750 | } | 750 | } |
751 | 751 | ||
752 | long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, | 752 | COMPAT_SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsems, |
753 | unsigned nsops, const struct compat_timespec __user *timeout) | 753 | unsigned, nsops, |
754 | const struct compat_timespec __user *, timeout) | ||
754 | { | 755 | { |
755 | struct timespec __user *ts64 = NULL; | 756 | struct timespec __user *ts64 = NULL; |
756 | if (timeout) { | 757 | if (timeout) { |