Re: "Enhanced" MD code avaible for review

From: Jeff Garzik (jgarzik_at_pobox.com)
Date: 03/18/04

  • Next message: Marcelo Tosatti: "Re: [BUG] 2.4.25: kernel BUG at inode.c:334!"
    Date:	Wed, 17 Mar 2004 21:00:02 -0500
    To: Andi Kleen <ak@muc.de>
    
    

    Andi Kleen wrote:
    > Sorry, Jeff, but that's just not true. While ioctls need an additional
    > entry in the conversion table, they can at least easily get an
    > translation handler if needed. When they are correctly designed you
    > just need a single line to enable pass through the emulation.
    > If you don't want to add that line to the generic compat_ioctl.h
    > file you can also do it in your driver.
    >
    > read/write has the big disadvantage that if someone gets the emulation
    > wrong (and that happens regularly) it is near impossible to add an
    > emulation handler then, because there is no good way to hook
    > into the read/write paths.
    >
    > There may be valid reasons to go for read/write, but 32bit emulation
    > is not one of them. In fact from the emulation perspective read/write
    > should be avoided.

    I'll probably have to illustrate with code, but basically, read/write
    can be completely ignorant of 32/64-bit architecture, endianness, it can
    even be network-transparent. ioctls just can't do that.

            Jeff

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


  • Next message: Marcelo Tosatti: "Re: [BUG] 2.4.25: kernel BUG at inode.c:334!"

    Relevant Pages

    • [PATCH] fget_light/fput_light for ioctls (fixed)
      ... that patch had a typo. ... ioctls can now ... be as fast as read/write. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [ACPI] Re: [PATCH/RFC] exposing ACPI objects in sysfs
      ... Please don't pass pointers by read/write ... emulation problem is limited to an ILP32 application generating data ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: "Enhanced" MD code avaible for review
      ... > even be network-transparent. ... You can write architecture-specific ioctls which take and return ... structs -- and you can do the same with read/write. ... Or, you can write architecture-independent read/write, which use fixed ...
      (Linux-Kernel)
    • Re: "Enhanced" MD code avaible for review
      ... Jeff Garzik writes: ... > read/write interface allows one to create an interface that requires ... just need a single line to enable pass through the emulation. ...
      (Linux-Kernel)