lkml.org 
[lkml]   [2007]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Subjectcompat_ioctl question
    From
    Date
    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

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-04-26 22:55    [W:5.426 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site