linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "H. Peter Anvin" <hpa@zytor.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, 8 Jul 2011 13:46:30 -0700	[thread overview]
Message-ID: <20110708204630.GA28623@core.coreip.homeip.net> (raw)
In-Reply-To: <4E17504F.5070806@zytor.com>

Hi Peter,

On Fri, Jul 08, 2011 at 11:45:35AM -0700, H. Peter Anvin wrote:
> Hello,
> 
> I'm trying to figure out what system calls can actually invoke code that
> depends on INPUT_COMPAT_TEST, and in particular which of those changes
> actually matter.
> 
> The input system and seccomp are the *only* arch-neutral subsystem in
> Linux which appear to trigger on if we are in compat mode, and this is
> causing some serious consternation in trying to freeze the proposed x32
> (32-bit x86-64) ABI.
> 
> I would really like to understand if that dependency can be eliminated
> or mitigated; as it currently sits we may need an entirely separate
> system call table *just to support the input system*.
> 
> The problem is that I am personally not familiar enough with the input
> subsystem to know what the dependencies are.  ioctls are not an issue;
> there is already an entire infrastructure to handle compatibility ioctls
> (and that infrastructure should be used!),

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.

We also have similar issues with uinput API and uploading force-freedack
effects.

> 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.

> 
> Any help in creating an inventory for this would be appreciated.
> 

I believe the above are the only non-ioctl compat issues in input core.

-- 
Dmitry

  reply	other threads:[~2011-07-08 20:46 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 ` Dmitry Torokhov [this message]
2011-07-08 22:22   ` INPUT_COMPAT_TEST H. Peter Anvin
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=20110708204630.GA28623@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=hjl.tools@gmail.com \
    --cc=hpa@zytor.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).