Now I might not totally correct, but I think there is a problem with
the 1.3.42 patch.
I am referring to the swapping of _IOC_READ and _IOC_WRITE. I noticed
the swapping in the asm-i386/ioctl.h:
--- v1.3.41/linux/include/asm-i386/ioctl.h Mon Nov 13 12:36:46 1995
* Direction bits.
*/
#define _IOC_NONE 0U
-#define _IOC_READ 1U
-#define _IOC_WRITE 2U
+#define _IOC_WRITE 1U
+#define _IOC_READ 2U
But they are also flipped three times in drivers/block/floppy.c.
As an example on line 3216:
/* verify writability of result, and fail early */
- if (_IOC_DIR(cmd) & _IOC_WRITE)
+ if (_IOC_DIR(cmd) & _IOC_READ)
A double flipping would cancel the change, which may be what is desired.
Is this correct? I also noticed that after an IOC_WRITE on line 3222
there is an attempt to fd_copyin. Would that not be a read as opposed to
write?
If I am wrong, sorry, just trying to help.
Sean
--
Sean C. Farley
PGP 2.6.2 key using finger or WWW
WWW Homepage is: http://www.cs.purdue.edu/people/farleysc