public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* compat_ioctl question
@ 2007-04-26 20:51 Paul Fulghum
  2007-04-26 21:37 ` Arnd Bergmann
  2007-04-27  0:38 ` compat_ioctl question Andi Kleen
  0 siblings, 2 replies; 10+ messages in thread
From: Paul Fulghum @ 2007-04-26 20:51 UTC (permalink / raw)
  To: Linux Kernel Mailing List

I need to add ioctl translations for my driver to
allow 32 bit access on 64 bit systems.

After digging through the kernel code there seems to be
3 methods of doing this:

1. define compat_ioctl() file operation for device and
    implement translation code in individual driver
2. add COMPATIBLE_IOCTL entry to include/linux/compat_ioctl.h
    to mark an ioctl code as the same in any environment
3. add HANDLE_IOCTL entry to fs/compat_ioctl.c with translation code
    implemented in the same file

There is no way to implement #1 for a tty driver without
modifying the kernel tty code to allow registration of a
compat_ioctl() handler.

#3 would put a lot of driver specific stuff in a common
kernel file. This method also seems to break if there
is an ioctl code collision.

All of these methods involve changes to code outside of my driver.

--

Before I spend a lot of time on this I need to know what the
officially sanctioned method is. I haven't found any definitive
documentation and a review of mailing list archives does not
suggest a prevailing opinion.

Does anyone have pointers on which way would be most likely
to be accepted as a patch?

Thanks,
Paul


-- 
Paul Fulghum
Microgate Systems, Ltd


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-05-02 22:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 20:51 compat_ioctl question Paul Fulghum
2007-04-26 21:37 ` Arnd Bergmann
2007-04-26 22:42   ` Paul Fulghum
2007-04-26 22:08     ` Arnd Bergmann
2007-04-26 23:15       ` Paul Fulghum
2007-05-02 17:52       ` [PATCH] tty add compat_ioctl method Paul Fulghum
2007-05-02 21:55         ` Arnd Bergmann
2007-05-02 23:03           ` Paul Fulghum
2007-05-02 22:28             ` Arnd Bergmann
2007-04-27  0:38 ` compat_ioctl question Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox