From: John Calixto <john.calixto@modsystems.com>
To: "Michał Mirosław" <mirqus@gmail.com>
Cc: linux-mmc@vger.kernel.org,
Andrei Warkentin <andreiw@motorola.com>,
Arnd Bergmann <arnd@arndb.de>, Chris Ball <cjb@laptop.org>
Subject: Re: [PATCH v6] mmc: Add mmc CMD+ACMD passthrough ioctl
Date: Wed, 20 Apr 2011 12:06:49 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1104201131080.28361@peruna> (raw)
In-Reply-To: <BANLkTi=Ni+GZN3Ah4k-pMheZR7PTrwQDYg@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1004 bytes --]
Hi Michał,
On Wed, 20 Apr 2011, Michał Mirosław wrote:
> Hmm. This might be even better:
>
> static int mmc_blk_ioctl(struct block_device *bdev, fmode_t mode,
> unsigned int cmd, unsigned long arg)
> {
> struct mmc_ioc_cmd blk;
>
> if (cmd != MMC_IOC_CMD)
> return -EINVAL;
>
> copy_from_user((void __user *)arg, &blk) ...
>
> #ifdef CONFIG_COMPAT
> if (is_compat_task())
> blk.data_ptr = compat_ptr(*(u32 *)&blk.data_ptr);
> #endif
>
> return mmc_blk_ioctl_cmd(bdev, &blk);
> }
>
> [no compat_ioctl needed]
>
I'm okay with the anon union + ``compat_ptr(*(u32 *))`` part of your
solution. If everyone else thinks it is reasonable, I'll submit a v7
with it.
However, I still think it should be implemented in compat_ioctl()
because compat_blkdev_ioctl() expects it. Either that, or I add to the
big switch in compat_blkdev_driver_ioctl(), and spreading this change
out to block/compat_ioctl.c does not seem like The Right Thing to me.
John
next prev parent reply other threads:[~2011-04-20 19:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 0:34 v6 changelog for mmc ioctl patch John Calixto
2011-04-14 0:38 ` [PATCH v6] mmc: Add mmc CMD+ACMD passthrough ioctl John Calixto
2011-04-20 17:12 ` John Calixto
2011-04-20 17:29 ` Chris Ball
2011-04-21 10:47 ` Arnd Bergmann
2011-04-20 17:31 ` Michał Mirosław
2011-04-20 17:38 ` John Calixto
2011-04-20 18:06 ` Michał Mirosław
2011-04-20 18:23 ` Michał Mirosław
2011-04-20 19:06 ` John Calixto [this message]
2011-04-20 19:17 ` Arnd Bergmann
2011-04-20 19:34 ` John Calixto
2011-04-20 19:38 ` Arnd Bergmann
2011-04-20 19:46 ` Michał Mirosław
2011-04-20 20:47 ` John Calixto
2011-04-20 22:28 ` Chris Ball
2011-04-21 5:11 ` Arnd Bergmann
2011-04-21 10:28 ` Michał Mirosław
2011-04-21 11:15 ` Arnd Bergmann
2011-04-21 11:47 ` Michał Mirosław
2011-04-21 12:39 ` Arnd Bergmann
2011-04-21 13:40 ` Michał Mirosław
2011-04-20 22:13 ` Chris Ball
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=alpine.DEB.2.00.1104201131080.28361@peruna \
--to=john.calixto@modsystems.com \
--cc=andreiw@motorola.com \
--cc=arnd@arndb.de \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mirqus@gmail.com \
/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