aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-04 10:19:16 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-06 10:30:45 -0500
commit8eee9093cdbeb2aa89d67dc1a3fd118acabaea52 (patch)
treead181d1ee2fab9db22b51676cb259083fe890423
parent932602e238329da99f8482c1b721549531fbfe7f (diff)
ipc/compat: convert to COMPAT_SYSCALL_DEFINE with changing parameter types
In order to allow the COMPAT_SYSCALL_DEFINE macro generate code that performs proper zero and sign extension convert all 64 bit parameters to their corresponding 32 bit compat counterparts. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r--include/linux/compat.h4
-rw-r--r--ipc/compat_mq.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index fea8ee9afe22..f670e591aff8 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -655,11 +655,11 @@ asmlinkage long compat_sys_mq_open(const char __user *u_name,
655 struct compat_mq_attr __user *u_attr); 655 struct compat_mq_attr __user *u_attr);
656asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes, 656asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes,
657 const char __user *u_msg_ptr, 657 const char __user *u_msg_ptr,
658 size_t msg_len, unsigned int msg_prio, 658 compat_size_t msg_len, unsigned int msg_prio,
659 const struct compat_timespec __user *u_abs_timeout); 659 const struct compat_timespec __user *u_abs_timeout);
660asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes, 660asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes,
661 char __user *u_msg_ptr, 661 char __user *u_msg_ptr,
662 size_t msg_len, unsigned int __user *u_msg_prio, 662 compat_size_t msg_len, unsigned int __user *u_msg_prio,
663 const struct compat_timespec __user *u_abs_timeout); 663 const struct compat_timespec __user *u_abs_timeout);
664asmlinkage long compat_sys_socketcall(int call, u32 __user *args); 664asmlinkage long compat_sys_socketcall(int call, u32 __user *args);
665asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args); 665asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args);
diff --git a/ipc/compat_mq.c b/ipc/compat_mq.c
index af087fb40bf7..d58747293772 100644
--- a/ipc/compat_mq.c
+++ b/ipc/compat_mq.c
@@ -78,10 +78,10 @@ static int compat_prepare_timeout(struct timespec __user **p,
78 return 0; 78 return 0;
79} 79}
80 80
81asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes, 81COMPAT_SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes,
82 const char __user *u_msg_ptr, 82 const char __user *, u_msg_ptr,
83 size_t msg_len, unsigned int msg_prio, 83 compat_size_t, msg_len, unsigned int, msg_prio,
84 const struct compat_timespec __user *u_abs_timeout) 84 const struct compat_timespec __user *, u_abs_timeout)
85{ 85{
86 struct timespec __user *u_ts; 86 struct timespec __user *u_ts;
87 87
@@ -92,10 +92,10 @@ asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes,
92 msg_prio, u_ts); 92 msg_prio, u_ts);
93} 93}
94 94
95asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes, 95COMPAT_SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes,
96 char __user *u_msg_ptr, 96 char __user *, u_msg_ptr,
97 size_t msg_len, unsigned int __user *u_msg_prio, 97 compat_size_t, msg_len, unsigned int __user *, u_msg_prio,
98 const struct compat_timespec __user *u_abs_timeout) 98 const struct compat_timespec __user *, u_abs_timeout)
99{ 99{
100 struct timespec __user *u_ts; 100 struct timespec __user *u_ts;
101 if (compat_prepare_timeout(&u_ts, u_abs_timeout)) 101 if (compat_prepare_timeout(&u_ts, u_abs_timeout))