From: "H. Peter Anvin" <hpa@zytor.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Philip Langdale <philipl@overt.org>,
linux-input@vger.kernel.org, "H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: INPUT_COMPAT_TEST
Date: Fri, 08 Jul 2011 15:22:24 -0700 [thread overview]
Message-ID: <4E178320.7050401@zytor.com> (raw)
In-Reply-To: <20110708204630.GA28623@core.coreip.homeip.net>
On 07/08/2011 01:46 PM, Dmitry Torokhov wrote:
>
> One such place is evdev read/write - unfortunately "struct input_event"
> was not created 32/64 bit safe so we need to mangle it when running 32
> bit userspace with 64-bit kernels. See drivers/input/input-compat.c.
>
So these are actually present on all the read/write path system calls.
That is truly awful.
Do you happen to know if there is any kind of passing around of file
descriptors, or if this could perhaps be tied to file descriptor state.
> We also have similar issues with uinput API and uploading force-freedack
> effects.
Those are ioctl, though, if I read the code right, or did I miss
something obvious?
>> but it looks like input also
>> does things like change the format(?!) of sysfs entries, all of which
>> makes me very concerned.
>
> Another historical unfortunate decision. /proc/bus/input (and later
> added sysfs entries) export bitmaps in "compressed" form so that
> userspace can not figure out the size of the segment (32 or 64 bit) on
> its own so we have to convert to userspace size for longs.
"Compressed form"? Could you give a concrete example? They look like
they are emitted in text form.
Do you have a program that someone could run to see the differences
between compat and non-compat paths?
-hpa
next prev parent reply other threads:[~2011-07-08 22:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-08 18:45 INPUT_COMPAT_TEST H. Peter Anvin
2011-07-08 20:46 ` INPUT_COMPAT_TEST Dmitry Torokhov
2011-07-08 22:22 ` H. Peter Anvin [this message]
2011-07-08 22:37 ` INPUT_COMPAT_TEST Dmitry Torokhov
2011-07-08 22:44 ` INPUT_COMPAT_TEST Thadeu Lima de Souza Cascardo
2011-07-08 23:18 ` INPUT_COMPAT_TEST H. Peter Anvin
2011-07-09 0:35 ` INPUT_COMPAT_TEST Dmitry Torokhov
2011-07-09 8:04 ` INPUT_COMPAT_TEST H. Peter Anvin
2011-09-07 18:16 ` INPUT_COMPAT_TEST Dmitry Torokhov
2011-09-07 18:22 ` INPUT_COMPAT_TEST H. Peter Anvin
2011-09-07 18:37 ` INPUT_COMPAT_TEST Dmitry Torokhov
2011-09-07 18:40 ` INPUT_COMPAT_TEST H. Peter Anvin
2011-09-07 18:54 ` INPUT_COMPAT_TEST Dmitry Torokhov
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=4E178320.7050401@zytor.com \
--to=hpa@zytor.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hjl.tools@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=philipl@overt.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;
as well as URLs for NNTP newsgroup(s).