From: John Stultz <john.stultz@linaro.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
Colin Cross <ccross@android.com>,
Greg KH <gregkh@linuxfoundation.org>,
Android Kernel Team <kernel-team@android.com>
Subject: [PATCH] ion_test: Add compat_ioctl support (v2)
Date: Thu, 19 Dec 2013 15:56:23 -0800 [thread overview]
Message-ID: <1387497383-8321-1-git-send-email-john.stultz@linaro.org> (raw)
In-Reply-To: <CAMbhsRR9XODihXhYof=Fo=ZEb=_t_OZ7g2xd9_Zd2B0RT1nXXA@mail.gmail.com>
Prior to subitting this, Colin reworked the compat_ioctl support
for the ion_test driver, moving the structure to be the same size
on both 32 and 64 bit architectures.
Two small things were left out. The compat_ioctl ptr assignment,
and the fact that despite having uniform sized types in the
structure, the structure pads out to different sizes on different
arches.
This patch resolves this issue by adding a padding entry after
the write flag, and adding the compat_ioctl ptr.
Changes in v2:
- Add a padding int rather then making write a u64
Cc: Colin Cross <ccross@android.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
drivers/staging/android/ion/ion_test.c | 1 +
drivers/staging/android/uapi/ion_test.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/staging/android/ion/ion_test.c b/drivers/staging/android/ion/ion_test.c
index 3e20349..654acb5 100644
--- a/drivers/staging/android/ion/ion_test.c
+++ b/drivers/staging/android/ion/ion_test.c
@@ -231,6 +231,7 @@ static int ion_test_release(struct inode *inode, struct file *file)
static const struct file_operations ion_test_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = ion_test_ioctl,
+ .compat_ioctl = ion_test_ioctl,
.open = ion_test_open,
.release = ion_test_release,
};
diff --git a/drivers/staging/android/uapi/ion_test.h b/drivers/staging/android/uapi/ion_test.h
index 614d1e3..ffef06f 100644
--- a/drivers/staging/android/uapi/ion_test.h
+++ b/drivers/staging/android/uapi/ion_test.h
@@ -32,6 +32,7 @@ struct ion_test_rw_data {
__u64 offset;
__u64 size;
int write;
+ int __padding;
};
#define ION_IOC_MAGIC 'I'
--
1.8.3.2
next prev parent reply other threads:[~2013-12-19 23:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-19 22:40 [PATCH] ion_test: Add compat_ioctl support John Stultz
2013-12-19 22:52 ` Colin Cross
2013-12-19 23:30 ` John Stultz
2013-12-19 23:45 ` Colin Cross
2013-12-19 23:56 ` John Stultz [this message]
2013-12-20 0:06 ` [PATCH] ion_test: Add compat_ioctl support (v2) Colin Cross
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=1387497383-8321-1-git-send-email-john.stultz@linaro.org \
--to=john.stultz@linaro.org \
--cc=ccross@android.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®