From: Chris Ball <cjb@laptop.org>
To: John Calixto <john.calixto@modsystems.com>
Cc: linux-mmc@vger.kernel.org
Subject: Re: [PATCH v3] mmc: Add ioctl to let userspace apps send ACMDs
Date: Mon, 11 Apr 2011 17:23:49 -0400 [thread overview]
Message-ID: <m3ipuka3dm.fsf@pullcord.laptop.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1104071816270.10238@peruna> (John Calixto's message of "Thu, 7 Apr 2011 18:18:27 -0700 (PDT)")
Hi John,
On Thu, Apr 07 2011, John Calixto wrote:
> Sending ACMDs from userspace is useful for such things as:
>
> - The security application of an SD card (SD Specification, Part 3,
> Security)
>
> - SD passthrough for virtual machines
>
> Tested on TI PCIxx12 (SDHCI), Sigma Designs SMP8652 SoC, TI OMAP3621
> SoC, TI OMAP3630 SoC, Samsung S5PC110 SoC, Qualcomm MSM7200A SoC.
>
> Signed-off-by: John Calixto <john.calixto@modsystems.com>
This adds two gcc warnings here (compiling for ARM):
CC drivers/mmc/card/block.o
drivers/mmc/card/block.c: In function ‘mmc_blk_ioctl_copy_from_user’:
drivers/mmc/card/block.c:199:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
drivers/mmc/card/block.c: In function ‘mmc_blk_ioctl_acmd’:
drivers/mmc/card/block.c:308:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
...
> + if (copy_from_user(idata->buf, (u8 *) user->data_ptr, idata->buf_bytes)) {
> + err = -EFAULT;
> + goto copy_err;
> + }
...
> + if (copy_to_user((u8 *) ic_ptr->data_ptr, idata->buf, idata->buf_bytes)) {
> + err = -EFAULT;
> + goto acmd_rel_host;
> + }
...
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2011-04-11 21:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 1:18 [PATCH v3] mmc: Add ioctl to let userspace apps send ACMDs John Calixto
2011-04-08 8:22 ` Andrei Warkentin
2011-04-08 8:46 ` Andrei Warkentin
2011-04-08 19:20 ` John Calixto
2011-04-08 19:58 ` Andrei Warkentin
2011-04-08 21:25 ` John Calixto
2011-04-08 21:39 ` Andrei Warkentin
2011-04-08 21:46 ` Chris Ball
2011-04-08 22:17 ` John Calixto
2011-04-11 21:23 ` Chris Ball [this message]
2011-04-11 23:32 ` John Calixto
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=m3ipuka3dm.fsf@pullcord.laptop.org \
--to=cjb@laptop.org \
--cc=john.calixto@modsystems.com \
--cc=linux-mmc@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