s390/s390x ioctls

Heiko Carstens heiko.carstens at de.ibm.com
Tue Feb 22 10:19:08 UTC 2011


On Sun, Feb 20, 2011 at 04:04:21PM -0500, Mike Frysinger wrote:
> anyone know what's going on with the s390 ioctls in ioctlent.h that are 8 hex 
> digits long instead of the normal 4 ?  they date back to the original port 
> (done in 2002).  seems like garbage that can be thrown away ...

The more interesting question would be why the strace ioctl code seems to
ignore a couple of bits of the ioctl commands. In particular it seems to
ignore the direction and size bits.
That way different ioctls would be mapped to the same number.

These two for example:

#define BIODASDINFO    _IOR(DASD_IOCTL_LETTER,1,dasd_information_t)
#define BIODASDFMT     _IOW(DASD_IOCTL_LETTER,1,format_data_t) 

{"asm/dasd.h", "BIODASDINFO", 0x81784401},
{"asm/dasd.h", "BIODASDFMT", 0x40104401},

Without taking direction and size into account both would map to the number
0x4401.

Thus a couple of s390 device driver ioctl commands are not unique to strace.
Very strange.

Looks like ioctl_lookup() needs another #ifdef ;)




More information about the Strace-devel mailing list