From: Mark Brown <broonie@kernel•org>
To: Heiko Carstens <heiko.carstens@de•ibm.com>,
"H. Peter Anvin" <hpa@linux•intel.com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: linux-next: manual merge of the compat tree with the tree
Date: Fri, 14 Mar 2014 18:43:47 +0000 [thread overview]
Message-ID: <20140314184347.GY366@sirena.org.uk> (raw)
In-Reply-To: <20140314183653.0a4a750f0b72080e3b982104@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 2316 bytes --]
On Fri, Mar 14, 2014 at 06:36:53PM +0000, Mark Brown wrote:
> Today's linux-next merge of the compat tree got a conflict in between
> commit 81993e81a99 ("compat: Get rid of
> (get|put)_compat_time(val|spec)") from the tip tree and commit
> 932602e23832 ("fs/compat: convert to COMPAT_SYSCALL_DEFINE with
> changing parameter types") from the compat tree.
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
And essentially the same thing in ipc/compat_mq.c:
diff --cc ipc/compat_mq.c
index a9cf16378d7a,d58747293772..000000000000
--- a/ipc/compat_mq.c
+++ b/ipc/compat_mq.c
@@@ -64,10 -64,24 +64,10 @@@ COMPAT_SYSCALL_DEFINE4(mq_open, const c
return sys_mq_open(u_name, oflag, mode, p);
}
- asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes,
- const char __user *u_msg_ptr,
- size_t msg_len, unsigned int msg_prio,
- const struct compat_timespec __user *u_abs_timeout)
-static int compat_prepare_timeout(struct timespec __user **p,
- const struct compat_timespec __user *u)
-{
- struct timespec ts;
- if (!u) {
- *p = NULL;
- return 0;
- }
- *p = compat_alloc_user_space(sizeof(ts));
- if (get_compat_timespec(&ts, u) || copy_to_user(*p, &ts, sizeof(ts)))
- return -EFAULT;
- return 0;
-}
-
+ COMPAT_SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes,
+ const char __user *, u_msg_ptr,
+ compat_size_t, msg_len, unsigned int, msg_prio,
+ const struct compat_timespec __user *, u_abs_timeout)
{
struct timespec __user *u_ts;
@@@ -78,14 -92,13 +78,14 @@@
msg_prio, u_ts);
}
- asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes,
- char __user *u_msg_ptr,
- size_t msg_len, unsigned int __user *u_msg_prio,
- const struct compat_timespec __user *u_abs_timeout)
+ COMPAT_SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes,
+ char __user *, u_msg_ptr,
+ compat_size_t, msg_len, unsigned int __user *, u_msg_prio,
+ const struct compat_timespec __user *, u_abs_timeout)
{
struct timespec __user *u_ts;
- if (compat_prepare_timeout(&u_ts, u_abs_timeout))
+
+ if (compat_convert_timespec(&u_ts, u_abs_timeout))
return -EFAULT;
return sys_mq_timedreceive(mqdes, u_msg_ptr, msg_len,
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
parent reply other threads:[~2014-03-14 18:43 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20140314183653.0a4a750f0b72080e3b982104@kernel.org>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140314184347.GY366@sirena.org.uk \
--to=broonie@kernel$(echo .)org \
--cc=heiko.carstens@de$(echo .)ibm.com \
--cc=hpa@linux$(echo .)intel.com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox