From: Vojtech Pavlik <vojtech@suse.cz>
To: Pavel Machek <pavel@suse.cz>
Cc: Vojtech Pavlik <vojtech@suse.cz>,
Raphael Assenat <raph@raphnet.net>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ioctl entries for joystick in compat_ioctl.h
Date: Sat, 13 Sep 2003 09:13:02 +0200 [thread overview]
Message-ID: <20030913071302.GA9315@ucw.cz> (raw)
In-Reply-To: <20030912211306.GA444@elf.ucw.cz>
On Fri, Sep 12, 2003 at 11:13:06PM +0200, Pavel Machek wrote:
> > > > I wanted to use a joystick on my sparc64 workstation, and discovered that the
> > > > joystick driver uses simple ioclt that are safe to pass from 32bit user space
> > > > to 64bit kernel space. My patch adds the necessary entries in compat_ioctl.h.
> > > >
> > > > There is only one missing ioctl in the patch. The ioctl is defined like this:
> > > > #define JSIOCGNAME(len) _IOC(_IOC_READ, 'j', 0x13, len)
> > > > so the command does not have a fixed value. I dont know how to handle this one,
> > > > but it is only used to get the joystick name, all the applications I tried work
> > > > well even if this ioctl fails.
> > >
> > > Well, whoever invented that JSIOCGNAME should be shot. That is not
> > > single ioctl, its 2^14 of them!
> >
> > Well, who could ever have known that this will be a problem in 1998?
> > It's not the only ioctl done this way.
>
> So it was you? :-)
Yes. :)
> I believe ultrasparcs were around in '98. Anyway, what are other
> ioctls doing this? They look pretty problematic from compat_ioctl
> perspective.
I don't remember - I know I just copied the concept from elsewhere.
I'm sure you'll be able to grep for it.
> We could do better by pushing compat handler down to the drivers for
> ugly cases like this...
--
Vojtech Pavlik
SuSE Labs, SuSE CR
next prev parent reply other threads:[~2003-09-13 7:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030912112557.C10099@raphnet.net>
2003-09-12 18:41 ` [PATCH] ioctl entries for joystick in compat_ioctl.h Pavel Machek
2003-09-12 20:01 ` Vojtech Pavlik
2003-09-12 21:13 ` Pavel Machek
2003-09-13 7:13 ` Vojtech Pavlik [this message]
2004-12-08 19:25 ` Jeremy Fitzhardinge
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=20030913071302.GA9315@ucw.cz \
--to=vojtech@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=raph@raphnet.net \
/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