From: John Calixto <john.calixto@modsystems.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Michał Mirosław" <mirqus@gmail.com>,
linux-mmc@vger.kernel.org, "Chris Ball" <cjb@laptop.org>,
"Andrei Warkentin" <andreiw@motorola.com>
Subject: Re: [PATCH v4] mmc: Add ioctl to let userspace apps send ACMDs
Date: Tue, 12 Apr 2011 16:08:48 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.2.00.1104121604220.8483@peruna> (raw)
In-Reply-To: <201104130100.39810.arnd@arndb.de>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1038 bytes --]
On Wed, 13 Apr 2011, Arnd Bergmann wrote:
> On Tuesday 12 April 2011, Michał Mirosław wrote:
> > > + unsigned int cmd_timeout_ms;
> > > + __u64 data_ptr; /* DAT buffer */
> >
> > This will be more natural if you have an anonymous union here:
> > union {
> > __u64 data_ptr_
> > void *data_ptr;
> > };
>
> No, that really does not work. It's important for all members of the ioctl data
> structure to have a fixed size, independent of the size of long or pointer.
>
> If you do a union, the pointer ends up in the first 32 bits of the 64 bit member,
> which does not work on big-endian architectures. It also doesn't work on 31
> bit architectures, although that is a minor worry here.
>
Gah! OK, so much for the v5 I just sent then. What do you think about
the compat_ioctl that I sent in v2? It means having the extra 32-bit
compat structure, but at least all the compat overhead is conditional
upon CONFIG_COMPAT. If you're not using CONFIG_COMPAT, you don't get
any compat cruft.
John
next prev parent reply other threads:[~2011-04-12 23:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 21:47 mmc: Add ioctl to let userspace apps send ACMDs John Calixto
2011-04-11 21:55 ` [PATCH v4] " John Calixto
2011-04-12 14:21 ` Michał Mirosław
2011-04-12 21:51 ` John Calixto
2011-04-12 23:00 ` Arnd Bergmann
2011-04-12 23:08 ` John Calixto [this message]
2011-04-18 14:39 ` Arnd Bergmann
2011-04-18 16:30 ` John Calixto
2011-04-12 23:10 ` Arnd Bergmann
2011-04-12 23:40 ` John Calixto
2011-04-18 14:42 ` Arnd Bergmann
2011-04-18 16:37 ` 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=alpine.DEB.2.00.1104121604220.8483@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